当前位置: 首页>>代码示例>>PHP>>正文


PHP Stack::stack_get_count_cards方法代码示例

本文整理汇总了PHP中Stack::stack_get_count_cards方法的典型用法代码示例。如果您正苦于以下问题:PHP Stack::stack_get_count_cards方法的具体用法?PHP Stack::stack_get_count_cards怎么用?PHP Stack::stack_get_count_cards使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Stack的用法示例。


在下文中一共展示了Stack::stack_get_count_cards方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: stack_load_card

 public function stack_load_card($card_id)
 {
     $stmt = $this->file_db->prepare('SELECT card.bkgnd_id, bkgnd.bkgnd_name, bkgnd.cant_delete, bkgnd.dont_search, ' . 'bkgnd.bkgnd_data, card.card_data, card_name, card_seq, card.object_data, ' . 'bkgnd.object_data, card.cant_delete, card.dont_search, card.marked, card.card_art, bkgnd.bkgnd_art ' . 'FROM card JOIN bkgnd ON card.bkgnd_id=bkgnd.bkgnd_id WHERE card_id=?');
     Stack::sl_ok($stmt, $this->file_db, 'Loading Card (1)');
     Stack::sl_ok($stmt->execute(array(intval($card_id))), $this->file_db, 'Loading Card (2)');
     $row = $stmt->fetch(PDO::FETCH_NUM);
     if ($row === false) {
         return null;
     }
     $card['card_id'] = intval($card_id);
     $card['card_name'] = $row[6];
     $card['card_seq'] = $row[7] / 10;
     $card['card_cant_delete'] = Stack::decode_bool($row[10]);
     $card['card_dont_search'] = Stack::decode_bool($row[11]);
     $card['card_marked'] = Stack::decode_bool($row[12]);
     $data = json_decode($row[5], true);
     $card['card_script'] = Stack::nvl($data['card_script'], array('content' => '', 'selection' => 0));
     $card['card_has_art'] = Stack::nvl($data['card_has_art'], false);
     $card['data'] = '';
     if (isset($data['data'])) {
         $card['data'] = $data['data'];
     }
     $card['card_art'] = null;
     if (isset($row[13]) && $row[13] !== '' && $row[13] !== null) {
         $card['card_art'] = $row[13];
     }
     //if (isset($data['content']))
     //	$card['content'] = $data['content'];
     $card['card_object_data'] = $row[8];
     $card['bkgnd_id'] = $row[0];
     $card['bkgnd_name'] = $row[1];
     $card['bkgnd_cant_delete'] = Stack::decode_bool($row[2]);
     $card['bkgnd_dont_search'] = Stack::decode_bool($row[3]);
     $data = json_decode($row[4], true);
     $card['bkgnd_script'] = Stack::nvl($data['bkgnd_script'], array('content' => '', 'selection' => 0));
     $card['bkgnd_has_art'] = Stack::nvl($data['bkgnd_has_art'], false);
     $card['bkgnd_art'] = null;
     if (isset($row[14]) && $row[14] !== '' && $row[14] !== null) {
         $card['bkgnd_art'] = $row[14];
     }
     $card['bkgnd_object_data'] = $row[9];
     $card['stack_count'] = Stack::stack_get_count_cards(null);
     $card['bkgnd_count'] = Stack::stack_get_count_cards($card['bkgnd_id']);
     return $card;
 }
开发者ID:Happy-Ferret,项目名称:cinsimp-web,代码行数:45,代码来源:stack.php


注:本文中的Stack::stack_get_count_cards方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。