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

WBOY
发布: 2016-07-25 08:50:18
原创
1494 人浏览过
新手献上的
  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. ?>
    复制代码


  • 来源:php.cn
    本站声明
    本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
    热门教程
    更多>
    最新下载
    更多>
    网站特效
    网站源码
    网站素材
    前端模板
    关于我们 免责声明 Sitemap
    PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!