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

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


  • HTML速学教程(入门课程)
    HTML速学教程(入门课程)

    HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!

    下载
    来源:php中文网
    本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
    最新问题
    开源免费商场系统广告
    热门教程
    更多>
    最新下载
    更多>
    网站特效
    网站源码
    网站素材
    前端模板
    关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
    php中文网:公益在线php培训,帮助PHP学习者快速成长!
    关注服务号 技术交流群
    PHP中文网订阅号
    每天精选资源文章推送
    PHP中文网APP
    随时随地碎片化学习

    Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号