ホームページ  >  記事  >  バックエンド開発  >  HTML のフォーム ページでのオープンとフリーズの切り替えと関数の実装

HTML のフォーム ページでのオープンとフリーズの切り替えと関数の実装

WBOY
WBOYオリジナル
2016-07-25 08:50:181496ブラウズ
新手献上的
  1. 证照信息
  2. ?>
  3. <
  4. {$c.account}
  5. ;
  6. のみロゴ
  7. カードの種類
  8. カード所有者名
  9. 銀行カード番号
  10. 電話番号
  11. < ;/th>
  12. カードのステータス
  13. 操作
  14. 起動設定
  15. {$c.id}
  16. if($c['type']==1)
  17. {
  18. echo '法人カード';
  19. }
  20. ?>
  21. {$c.name}

  22. {$c.idcard}
  23. {$c.phone}
  24. if($c['status']==0)
  25. echo 'フリーズ';
  26. if($c['status']==1)
  27. echo 'enable' ;
  28. ?>
  29. 変更 削除
  30. /凍結
  • コードをコピー
    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. $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. ?>
    复制代


  • 声明:
    この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。