Heim  >  Artikel  >  Backend-Entwicklung  >  HTML上做表单页面上的开启和冻结切换以及功能实现

HTML上做表单页面上的开启和冻结切换以及功能实现

WBOY
WBOYOriginal
2016-07-25 08:50:181496Durchsuche
新手献上的
  1. 证照信息
  2. ?>
  3. 唯一标识
  4. 卡的类型
  5. 持卡人姓名
  6. 卡的余额
  7. 银行卡号
  8. 电话
  9. 卡的状态
  10. 操作
  11. 启动设置
  12. {$c.id}
  13. if($c['type']==1)
  14. {
  15. echo '企业卡';
  16. }
  17. ?>
  18. {$c.name}

  19. {$c.account}
  20. {$c.idcard}
  21. {$c.phone}
  22. if($c['status']==0)
  23. echo '冻结';
  24. if($c['status']==1)
  25. echo '启用';
  26. ?>
  27. 修改 删除
  28. 启用/冻结
  • 复制代码
    1. /**
    2. * 联名卡管理
    3. * @author shendoudou
    4. *
    5. */
    6. import ( '@.Model.Platform.CommonModel' );
    7. class IcbccardModel extends CommonModel {
    8. public function findAllCard(){
    9. $result = $this->select();
    10. if ($result === false)
    11. throw new DBException ( $this->getModelName (), $this->getDbError (), $this->getLastSql () );
    12. return $result;
    13. }
    14. public function findOneCard($id){
    15. $map['id']=$id;
    16. $result = $this->where ($map)->find();
    17. if ($result === false)
    18. throw new DBException ( $this->getModelName (), $this->getDbError (), $this->getLastSql () );
    19. return $result;
    20. }
    21. public function updateCard($id,$data){
    22. $map['id']=$id;
    23. $result = $this->where($map)->save($data);
    24. if ($result === false)
    25. throw new DBException ( $this->getModelName (), $this->getDbError (), $this->getLastSql () );
    26. return $result;
    27. }
    28. public function deleteCard($id){
    29. $map['id']=$id;
    30. $result = $this->where($map)->delete();
    31. if ($result === false)
    32. throw new DBException ( $this->getModelName (), $this->getDbError (), $this->getLastSql () );
    33. return $result;
    34. }
    35. public function findStatusId($status){
    36. $map['status']=$status;
    37. $result = $this->where($map)->field('id')->select();
    38. if ($result === false)
    39. throw new DBException ( $this->getModelName (), $this->getDbError (), $this->getLastSql () );
    40. return $result;
    41. }
    42. public function changeCardStatus($id,$status){
    43. $map['id']=$id;
    44. $map['status']=$status;
    45. $result = $this->save($map);
    46. if ($result === false)
    47. throw new DBException ( $this->getModelName (), $this->getDbError (), $this->getLastSql () );
    48. return $result;
    49. }
    50. }
    51. ?>
    复制代码


  • Stellungnahme:
    Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn