本文整理汇总了PHP中GC_Utils_Ex::isFrontFunction方法的典型用法代码示例。如果您正苦于以下问题:PHP GC_Utils_Ex::isFrontFunction方法的具体用法?PHP GC_Utils_Ex::isFrontFunction怎么用?PHP GC_Utils_Ex::isFrontFunction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GC_Utils_Ex
的用法示例。
在下文中一共展示了GC_Utils_Ex::isFrontFunction方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preProcess
/**
* フックポイント.
*
* @param LC_Page $objPage
*/
function preProcess(LC_Page $objPage)
{
if (!extension_loaded("dom")) {
SC_Utils_Ex::sfErrorHeader("dom extension が有効でないため キャリアIDによるログインができません。");
}
if (GC_Utils_Ex::isFrontFunction()) {
$xrds = new Net_URL(ROOT_URLPATH . 'au/xrds.php');
$xrds = $xrds->getURL();
header("X-XRDS-Location: {$xrds}");
header("X-Content-TYpe-Options: nosniff");
}
}
示例2: sfIsFrontFunction
/**
* 前方互換用
*
* @deprecated 2.12.0 GC_Utils_Ex::isFrontFunction を使用すること
*/
function sfIsFrontFunction()
{
trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
return GC_Utils_Ex::isFrontFunction();
}
示例3: gfPrintLog
/**
* ログの出力を行う
*
* エラー・警告は trigger_error() を経由して利用すること。(補足の出力は例外。)
* @param string $msg
* @param string $path
* @param bool $verbose 冗長な出力を行うか
*/
function gfPrintLog($msg, $path = '', $verbose = USE_VERBOSE_LOG)
{
// 日付の取得
$today = date('Y/m/d H:i:s');
// 出力パスの作成
if (strlen($path) === 0) {
$path = GC_Utils_Ex::isAdminFunction() ? ADMIN_LOG_REALFILE : LOG_REALFILE;
}
$msg = "{$today} [{$_SERVER['SCRIPT_NAME']}] {$msg} from {$_SERVER['REMOTE_ADDR']}\n";
if ($verbose) {
if (GC_Utils_Ex::isFrontFunction()) {
$msg .= 'customer_id = ' . $_SESSION['customer']['customer_id'] . "\n";
}
if (GC_Utils_Ex::isAdminFunction()) {
$msg .= 'login_id = ' . $_SESSION['login_id'] . '(' . $_SESSION['authority'] . ')' . '[' . session_id() . ']' . "\n";
}
$msg .= GC_Utils_Ex::toStringBacktrace(GC_Utils_Ex::getDebugBacktrace());
}
error_log($msg, 3, $path);
// ログテーション
GC_Utils_Ex::gfLogRotation(MAX_LOG_QUANTITY, MAX_LOG_SIZE, $path);
}
示例4: changeProductStatus
function changeProductStatus(LC_Page $objPage)
{
$objQuery = SC_Query_Ex::getSingletonInstance();
$objQuery->begin();
$n = array();
$n2 = array("auto_display_status" => 0);
$objSql = new SC_SelectSql_Ex();
$objSql->setWhere("auto_display_status = 1");
$objSql->setWhere("del_flg = 0");
$s = "auto_display_end_date";
$e = "auto_display_start_date";
// 公開日による状態変更
// {$s} > NOW() 公開開始前
// {$e} < NOW() 公開終了後
// その他 公開中
$objQuery->update("dtb_products", $n, $objSql->getWhere(), $n, array("status" => "CASE WHEN {$s} > NOW() THEN 2 WHEN {$e} < NOW() THEN 2 ELSE 1 END", "auto_display_status" => "CASE WHEN {$e} < NOW() THEN 0 ELSE 1 END"));
$objSql->setWhere("{$e} < NOW() ");
$objQuery->update("dtb_products", $n, $objSql->getWhere(), $n2);
$objQuery->commit();
if (GC_Utils_Ex::isFrontFunction()) {
// 商品数量を再計算
$objDb = new SC_Helper_DB_Ex();
$objDb->sfCountCategory($objQuery);
$objDb->sfCountMaker($objQuery);
}
}
示例5: init
function init()
{
parent::init();
$objCustomer = new SC_Customer_Ex();
if (isset($_GET["sid"]) && isset($_GET["admin"])) {
$sid = $_REQUEST["sid"];
$email = $objCustomer->getValue("email");
$osid = session_id();
if ($osid != $sid) {
session_destroy();
session_id($sid);
session_start();
}
$objCustomer->setLogin($email);
$get = $_GET;
unset($get["sid"]);
SC_Response_Ex::reload($get, true);
}
$objQuery = SC_Query_Ex::getSingletonInstance();
$objProduct = new SC_Product_Ex();
if (GC_Utils_Ex::isFrontFunction() && $this->skip_load_page_layout == false) {
$objCustomer = new SC_Customer_Ex();
// 画面更新毎に情報を更新する
if ($objCustomer->isLoginSuccess()) {
// 初回アクセス時に更新
$objCustomer->updateSession();
$this->tpl_login = true;
$this->tpl_point = $objCustomer->getValue("point");
$this->tpl_customer_id = $objCustomer->getValue("customer_id");
$this->tpl_first_buy_date = $objCustomer->getValue("first_buy_date");
$this->tpl_carrier = $objCustomer->getValue("carrier");
$downloadable_days = $this->arrSiteInfo["downloadable_days"];
$downloadable_days_unlimited = $this->arrSiteInfo["downloadable_days_unlimited"];
$date = null;
if ($downloadable_days_unlimited) {
$date = SC_Utils_Ex::sfGetTimestamp(RELEASE_YEAR, 1, 1, false);
$date2 = SC_Utils_Ex::sfGetTimestamp(9999, 12, 31, false);
} else {
$xdate = strtotime("-{$downloadable_days} day");
$date = SC_Utils_Ex::sfGetTimestamp(date("Y", $xdate), date("m", $xdate), date("d", $xdate), false);
$xdate = strtotime("+{$downloadable_days} day");
$date2 = SC_Utils_Ex::sfGetTimestamp(date("Y", $xdate), date("m", $xdate), date("d", $xdate), false);
}
$this->downloadable_days = $date;
$this->downloadable_days2 = $date2;
$objPurchase = new SC_Helper_Purchase_Ex();
$arrOrderId = $objQuery->getCol("order_id", "dtb_order", "payment_date > ? AND customer_id = ?", array($date, $this->tpl_customer_id));
$this->arrRedownloadProduct = array();
foreach ($arrOrderId as $order_id) {
$arrOrderDetail = $objPurchase->getOrderDetail($order_id, true);
$this->arrRedownloadProduct = array_merge($this->arrRedownloadProduct, $arrOrderDetail);
}
// 再ダウンロード可能な商品一覧
$this->arrRedownloadProduct = SC_Utils_Ex::makeArrayIDToKey("product_id", $this->arrRedownloadProduct);
foreach ($this->arrRedownloadProduct as $product_id => $row) {
$row["product"] = $objProduct->getDetail($product_id);
$this->arrRedownloadProduct[$product_id] = $row;
}
} else {
$this->tpl_login = false;
$this->tpl_point = 0;
$this->tpl_customer_id = 0;
$this->tpl_first_buy_date = null;
$this->tpl_carrier = 9;
$this->arrRedownloadProduct = array();
}
$objDb = new SC_Helper_DB_Ex();
if ($objDb->sfColumnExists("cp_dtb_customer_transaction", "id")) {
$where = " customer_id = ? AND transaction_status = ? AND continue_account_id IS NOT NULL AND del_flg = 0";
$arrWhereVal = array($this->tpl_customer_id, 40);
if ($objQuery->exists("cp_dtb_customer_transaction", $where, $arrWhereVal)) {
// OK
} else {
switch (basename(dirname($_SERVER["SCRIPT_NAME"]))) {
case "au":
break;
default:
if ($objCustomer->isLoginSuccess()) {
$objCustomer->EndSession();
SC_Response_Ex::reload();
}
break;
}
}
}
$objCategory = new SC_Helper_Category_Ex();
$this->arrCommonCategory = $objCategory->getList(true);
$this->arrCommonCategoryTree = $objCategory->getTree();
$detect = new Mobile_Detect();
$script_file = $_SERVER["SCRIPT_NAME"];
$script_file = ltrim($script_file, "/");
$script_file2 = str_replace("ios/", "", $script_file);
if ($detect->is("iOS")) {
if (file_exists(HTML_REALDIR . "ios/{$script_file}")) {
SC_Response_Ex::sendRedirect(HTTP_URL . "ios/{$script_file}", $_GET);
}
} elseif (strcmp($script_file, $script_file2) !== 0) {
SC_Response_Ex::sendRedirect(HTTP_URL . "{$script_file2}", $_GET);
}
$_SESSION["is_android"] = $detect->is("AndroidOS");
//.........这里部分代码省略.........
示例6: getAll
/**
* 全件取得
*/
function getAll(SC_Query $objQuery = NULL)
{
if ($objQuery == null) {
$objQuery =& SC_Query_Ex::getSingletonInstance();
}
$this->setSelect($objQuery->getSql("*", $this->table));
if (strlen($this->order) == 0) {
if (GC_Utils_Ex::isFrontFunction()) {
$this->setOrder("device_name DESC");
} else {
$this->setOrder("device_id DESC");
}
}
return $objQuery->getAll($this->getSql(2), $this->arrWhereVal);
}
示例7: sfIsFrontFunction
/**
* 前方互換用
*
* @deprecated 2.12.0 GC_Utils_Ex::isFrontFunction を使用すること
*/
function sfIsFrontFunction()
{
trigger_error(t("c_A method for upward compatibility was used._01"), E_USER_WARNING);
return GC_Utils_Ex::isFrontFunction();
}