function StorageFind($condition = array(), $debug = FALSE) { return StorageQuery($condition['schema'], $condition['fields'], $condition['filter'], $condition['others'], $debug, $condition['charset']); }
<?php // Copyright 2015 The Haohaoxiuche Team Authors. All right reserved. // Use of this source that is governed by a Apache-style // license that can be found in the LICENSE file. // // 技術版API編號002 獲取輪播圖數據信息 // // @authors hjboss <*****@*****.**> 2015-12-14# // @version 1.0.0 // @package hhxc if (!defined('HHXC')) { die('Permission denied'); } $condition = array('schema' => 'hh_dbver', 'fields' => array('*', 'COUNT(*) AS h_ct'), 'filter' => array('vername' => 'loopimg', 'ver' => array('GT', Assign($params['databasever'], 0)))); $record = StorageFindOne($condition); if (is_array($record) and intval($record['h_ct']) > 0) { $result = array('code' => '101', 'databasever' => $record['ver'], 'data' => array()); $buf = StorageQuery('hh_loopimg', '*', array('zhuangtai' => 1), 'ORDER BY site ASC'); if (is_array($buf) and empty($buf) == FALSE) { foreach ($buf as $index => $row) { $result['data'][] = array('imagename' => $row['filename'], 'url' => $row['url'] . '&m=mobile'); } } }
<?php // Copyright 2015 The Haohaoxiuche Team Authors. All right reserved. // Use of this source that is governed by a Apache-style // license that can be found in the LICENSE file. // // 好好修車手機網頁版 首頁頁面模塊 // // @authors hjboss <*****@*****.**> 2015-12-12# // @version 1.0.0 // @package hhxc ## 首頁最新新聞 $mysql = StorageConnect(DB_HOST, DB_USER, DB_PWD, DB_NAME, DB_CHARSET); $news_list = StorageQuery('news', '*', array('type_new' => 1), 'ORDER BY date DESC LIMIT 5'); ## 首頁廣告圖片 $pictures = array(array('src' => 'images/4.png', 'href' => 'index.php/download', 'title' => ''), array('src' => 'images/3.jpg', 'href' => 'index.php/home', 'title' => ''), array('src' => 'images/2.jpg', 'href' => 'index.php/home', 'title' => ''), array('src' => 'images/1.jpg', 'href' => 'index.php/home', 'title' => '')); ?> <style type="text/css">body {background-color:#f8f8f8}</style> <div class="carousel slide h-carousel" data-ride="carousel" id="carousel-picture-generic"> <ol class="carousel-indicators"> <?php foreach ($pictures as $number => $picture) { ?> <li data-target="#carousel-picture-generic" data-slide-to="<?php echo $number; ?> " class="<?php if ($number == 0) { echo 'active'; }
<?php // Copyright 2015 The Haohaoxiuche Team Authors. All right reserved. // Use of this source that is governed by a Apache-style // license that can be found in the LICENSE file. // // 技術版API編號003 獲取案例條數、故障條數、故障碼條數和匹配正時條數 // // @authors hjboss <*****@*****.**> 2015-12-14# // @version 1.0.0 // @package hhxc if (!defined('HHXC')) { die('Permission denied'); } $condition = array('schema' => 'hh_dbver', 'fields' => array('*', 'COUNT(*) AS h_ct'), 'filter' => array('vername' => 'datatotal', 'ver' => array('GT', Assign($params['databasever'], 0)))); $record = StorageFindOne($condition); if (is_array($record) and intval($record['h_ct']) > 0) { $result = array('code' => '101', 'databasever' => $record['ver'], 'data' => array()); $buf = StorageQuery('hh_datatotal', '*', '', 'ORDER BY id DESC LIMIT 1'); if (is_array($buf) and empty($buf) == FALSE) { foreach ($buf as $index => $row) { $result['data'][] = array('pheno' => $row['symptomp'] + 30000, 'case' => $row['anli'] + 400000, 'fault' => $row['fault'] + 20000, 'faultcode' => $row['faultcode'], 'timing' => $row['timing']); } } }