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-2007 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_PATH .
"pages/LC_Page.php";
require_once DATA_PATH .
'module/Services/JSON.php';
require_once DATA_PATH .
'module/Request.php';
* @author LOCKON CO.,LTD.
* @version $Id: LC_Page_Admin_Home.php 17746 2009-01-25 10:34:49Z Seasoft $
$this->db_version =
$objDb->sfGetDBVersion();
foreach ($arrNewOrder as $key =>
$val){
$arrNewOrder[$key]['create_date'] =
str_replace("-", "/", substr($val['create_date'], 0,19));
$this->arrNewOrder =
$arrNewOrder;
$objView->assignobj($this);
$objView->display(MAIN_FRAME);
$sql =
"SELECT COUNT(customer_id) FROM dtb_customer WHERE del_flg = 0 AND status = 2";
$return =
$conn->getOne($sql);
if ( $method ==
'SUM' or $method ==
'COUNT'){
// postgresql と mysql とでSQLをわける
if (DB_TYPE ==
"pgsql") {
$sql =
"SELECT ".
$method.
"(total) FROM dtb_order
WHERE del_flg = 0 AND to_char(create_date,'YYYY/MM/DD') = to_char(now() - interval '1 days','YYYY/MM/DD') AND status <> " .
ORDER_CANCEL;
}else if (DB_TYPE ==
"mysql") {
$sql =
"SELECT ".
$method.
"(total) FROM dtb_order
WHERE del_flg = 0 AND cast(create_date as date) = DATE_ADD(current_date, interval -1 day) AND status <> " .
ORDER_CANCEL;
$return =
$conn->getOne($sql);
if ( $method ==
'SUM' or $method ==
'COUNT'){
// postgresql と mysql とでSQLをわける
if (DB_TYPE ==
"pgsql") {
$sql =
"SELECT ".
$method.
"(total) FROM dtb_order
WHERE del_flg = 0 AND to_char(create_date,'YYYY/MM') = ?
AND to_char(create_date,'YYYY/MM/DD') <> to_char(now(),'YYYY/MM/DD') AND status <> " .
ORDER_CANCEL;
}else if (DB_TYPE ==
"mysql") {
$sql =
"SELECT ".
$method.
"(total) FROM dtb_order
WHERE del_flg = 0 AND date_format(create_date, '%Y/%m') = ?
AND date_format(create_date, '%Y/%m/%d') <> date_format(now(), '%Y/%m/%d') AND status <> " .
ORDER_CANCEL;
$return =
$conn->getOne($sql, array($month));
$ret =
$objQuery->get($from, $col, $where);
// postgresql と mysql とでSQLをわける
if (DB_TYPE ==
"pgsql") {
$sql =
"SELECT COUNT(*) FROM dtb_review AS A LEFT JOIN dtb_products AS B ON A.product_id = B.product_id
WHERE A.del_flg=0 AND B.del_flg = 0 AND to_char(A.create_date, 'YYYY/MM/DD') = to_char(now() - interval '1 days','YYYY/MM/DD')
AND to_char(A.create_date,'YYYY/MM/DD') != to_char(now(),'YYYY/MM/DD')";
}else if (DB_TYPE ==
"mysql") {
$sql =
"SELECT COUNT(*) FROM dtb_review AS A LEFT JOIN dtb_products AS B ON A.product_id = B.product_id
WHERE A.del_flg = 0 AND B.del_flg = 0 AND cast(A.create_date as date) = DATE_ADD(current_date, interval -1 day)
AND cast(A.create_date as date) != current_date";
$return =
$conn->getOne($sql);
$sql =
"SELECT COUNT(*) FROM 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 =
$conn->getOne($sql);
$where =
"product_id IN (SELECT product_id FROM dtb_products_class WHERE stock_unlimited = 0 AND stock <= 0)";
$arrRet =
$objQuery->select("product_id, name", "dtb_products", $where);
ord.order_name01 AS name01,
ord.order_name02 AS name02,
ord.order_id = det.order_id LIMIT 1
ord.payment_id = pay.payment_id
del_flg = 0 AND status <> " .
ORDER_CANCEL .
"
create_date DESC LIMIT 10 OFFSET 0
$arrRet =
$objQuery->getAll($sql);
// パラメータ「UPDATE_HTTP」が空文字の場合、処理しない。
// XXX これと別に on/off を持たせるべきか。
if (strlen(UPDATE_HTTP) ==
0) return array();
// XXX インストール時に問い合わせて送信可否設定を行うように設定すべきか。
// XXX (URLは強制送信すべきではないと思うが)バージョンは強制送信すべきか。
if (UPDATE_SEND_SITE_INFO ===
true) {
$query =
'?site_url=' .
SITE_URL .
'&eccube_version=' .
ECCUBE_VERSION;
$url =
UPDATE_HTTP .
$query;
$objJson =
new Services_JSON;
$arrTmpData =
is_string($jsonStr) ?
$objJson->decode($jsonStr) :
null;
if (empty($arrTmpData)) {
foreach ($arrTmpData as $objData) {
Documentation generated on Tue, 28 Apr 2009 18:11:12 +0900 by phpDocumentor 1.4.2