Source for file LC_Page_Admin_Home.php
Documentation is available at LC_Page_Admin_Home.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2011 LOCKON CO.,LTD. All Rights Reserved.
* http://www.lockon.co.jp/
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
require_once CLASS_EX_REALDIR . 'page_extends/admin/LC_Page_Admin_Ex.php';
require_once DATA_REALDIR . 'module/HTTP/Request.php';
* @author LOCKON CO.,LTD.
* @version $Id: LC_Page_Admin_Home.php 21237 2011-09-09 06:29:59Z Seasoft $
$this->tpl_mainpage = 'home.tpl';
$this->tpl_subtitle = 'ホーム';
* @return string PHPバージョン情報
* @return mixed DBバージョン情報
$dbFactory = SC_DB_DBFactory_Ex::getInstance();
return $dbFactory->sfGetDBVersion();
$objQuery = & SC_Query_Ex::getSingletonInstance();
$col = "COUNT(customer_id)";
$where = "del_flg = 0 AND status = 2";
return $objQuery->get($col, $table, $where);
* @param string $method 取得タイプ 件数:'COUNT' or 金額:'SUM'
$objQuery = & SC_Query_Ex::getSingletonInstance();
// TODO: DBFactory使わないでも共通化できそうな気もしますが
$dbFactory = SC_DB_DBFactory_Ex::getInstance();
$sql = $dbFactory->getOrderYesterdaySql($method);
return $objQuery->getOne($sql);
* @param string $method 取得タイプ 件数:'COUNT' or 金額:'SUM'
$objQuery = & SC_Query_Ex::getSingletonInstance();
// TODO: DBFactory使わないでも共通化できそうな気もしますが
$dbFactory = SC_DB_DBFactory_Ex::getInstance();
$sql = $dbFactory->getOrderMonthSql($method);
return $objQuery->getOne($sql, array($month));
* @return integer 会員の保持ポイント合計
$objQuery = & SC_Query_Ex::getSingletonInstance();
return $objQuery->get($col, $from, $where);
* @return integer 昨日のレビュー書き込み数
$objQuery = & SC_Query_Ex::getSingletonInstance();
// TODO: DBFactory使わないでも共通化できそうな気もしますが
$dbFactory = SC_DB_DBFactory_Ex::getInstance();
$sql = $dbFactory->getReviewYesterdaySql();
return $objQuery->getOne($sql);
* @return integer レビュー書き込み非表示数
$objQuery = & SC_Query_Ex::getSingletonInstance();
$table = "dtb_review AS A LEFT JOIN dtb_products AS B ON A.product_id = B.product_id";
$where = "A.del_flg = 0 AND A.status = 2 AND B.del_flg = 0";
return $objQuery->count($table, $where);
$objQuery = & SC_Query_Ex::getSingletonInstance();
$cols = "product_id, name";
$where = "product_id IN ("
. "SELECT product_id FROM dtb_products_class "
. "WHERE stock_unlimited = ? AND stock <= 0)";
return $objQuery->select($cols, $table, $where, array(UNLIMITED_FLG_LIMITED));
$objQuery = & SC_Query_Ex::getSingletonInstance();
ord.order_name01 AS name01,
ord.order_name02 AS name02,
ord.order_id = det.order_id
ORDER BY det.order_detail_id
ord.payment_id = pay.payment_id
del_flg = 0 AND status <> " . ORDER_CANCEL . "
create_date DESC LIMIT 10 OFFSET 0
$arrNewOrder = $objQuery->getAll($sql);
foreach ($arrNewOrder as $key => $val){
$arrNewOrder[$key]['create_date'] = str_replace("-", "/", substr($val['create_date'], 0,19));
if (!ECCUBE_INFO) return array();
// パラメーター「UPDATE_HTTP」が空文字の場合、処理しない。
// XXX これと別に on/off を持たせるべきか。
if (strlen(UPDATE_HTTP) == 0) return array();
// XXX インストール時に問い合わせて送信可否設定を行うように設定すべきか。
// XXX (URLは強制送信すべきではないと思うが)バージョンは強制送信すべきか。
if (UPDATE_SEND_SITE_INFO === true) {
$query = '?site_url=' . HTTP_URL . '&eccube_version=' . ECCUBE_VERSION;
$url = UPDATE_HTTP . $query;
$context = array('http' => array('timeout' => HTTP_REQUEST_TIMEOUT));
$arrTmpData = is_string($jsonStr) ? SC_Utils_Ex::jsonDecode($jsonStr) : null;
if (empty($arrTmpData)) {
SC_Utils_Ex::sfErrorHeader(">> 更新情報の取得に失敗しました。");
foreach ($arrTmpData as $objData) {
Documentation generated on Fri, 24 Feb 2012 14:01:20 +0900 by Seasoft
|