本文整理汇总了PHP中SC_Utils_Ex::sfTermMonth方法的典型用法代码示例。如果您正苦于以下问题:PHP SC_Utils_Ex::sfTermMonth方法的具体用法?PHP SC_Utils_Ex::sfTermMonth怎么用?PHP SC_Utils_Ex::sfTermMonth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SC_Utils_Ex
的用法示例。
在下文中一共展示了SC_Utils_Ex::sfTermMonth方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: lfSetStartEndDate
function lfSetStartEndDate(&$objFormParam)
{
$arrRet = $objFormParam->getHashArray();
// 月度集計
if ($arrRet['search_form'] == 1) {
list($sdate, $edate) = SC_Utils_Ex::sfTermMonth($arrRet['search_startyear_m'], $arrRet['search_startmonth_m'], CLOSE_DAY);
} elseif ($arrRet['search_form'] == 2) {
$sdate = $arrRet['search_startyear'] . '/' . $arrRet['search_startmonth'] . '/' . $arrRet['search_startday'];
$edate = $arrRet['search_endyear'] . '/' . $arrRet['search_endmonth'] . '/' . $arrRet['search_endday'];
}
return array($sdate, $edate);
}
示例2: lfSetStartEndDate
function lfSetStartEndDate(&$objFormParam)
{
$arrRet = $objFormParam->getHashArray();
foreach ($arrRet as $key => $val) {
if ($val == "") {
continue;
}
switch ($key) {
case 'search_startyear':
$sdate = $objFormParam->getValue('search_startyear') . "/" . $objFormParam->getValue('search_startmonth') . "/" . $objFormParam->getValue('search_startday');
break;
case 'search_endyear':
$edate = $objFormParam->getValue('search_endyear') . "/" . $objFormParam->getValue('search_endmonth') . "/" . $objFormParam->getValue('search_endday');
break;
case 'search_startyear_m':
list($sdate, $edate) = SC_Utils_Ex::sfTermMonth($objFormParam->getValue('search_startyear_m'), $objFormParam->getValue('search_startmonth_m'), CLOSE_DAY);
break;
default:
break;
}
}
return array($sdate, $edate);
}
示例3: process
/**
* Page のプロセス.
*
* @return void
*/
function process()
{
$objView = new SC_AdminView();
$objSess = new SC_Session();
// 認証可否の判定
SC_Utils_Ex::sfIsSuccess($objSess);
// 入力期間をセッションに記録する
$this->lfSaveDateSession();
if (isset($_GET['draw_image']) && $_GET['draw_image'] != "") {
define('DRAW_IMAGE', true);
} else {
define('DRAW_IMAGE', false);
}
// パラメータ管理クラス
$this->objFormParam = new SC_FormParam();
// パラメータ情報の初期化
$this->lfInitParam();
$this->objFormParam->setParam($_POST);
$this->objFormParam->setParam($_GET);
// 検索ワードの引き継ぎ
foreach ($_POST as $key => $val) {
if (ereg("^search_", $key)) {
$this->arrHidden[$key] = $val;
}
}
$mode = $this->objFormParam->getValue('mode');
switch ($mode) {
case 'pdf':
case 'csv':
case 'search':
// 入力値の変換
$this->objFormParam->convParam();
$this->arrErr = $this->lfCheckError();
$arrRet = $this->objFormParam->getHashArray();
// 入力エラーなし
if (empty($this->arrErr)) {
foreach ($arrRet as $key => $val) {
if ($val == "") {
continue;
}
switch ($key) {
case 'search_startyear':
$sdate = $this->objFormParam->getValue('search_startyear') . "/" . $this->objFormParam->getValue('search_startmonth') . "/" . $this->objFormParam->getValue('search_startday');
break;
case 'search_endyear':
$edate = $this->objFormParam->getValue('search_endyear') . "/" . $this->objFormParam->getValue('search_endmonth') . "/" . $this->objFormParam->getValue('search_endday');
break;
case 'search_startyear_m':
list($sdate, $edate) = SC_Utils_Ex::sfTermMonth($this->objFormParam->getValue('search_startyear_m'), $this->objFormParam->getValue('search_startmonth_m'), CLOSE_DAY);
break;
default:
break;
}
}
if ($this->objFormParam->getValue('type') != "") {
$type = $this->objFormParam->getValue('type');
} else {
$type = "";
}
$page = $this->objFormParam->getValue('page');
switch ($page) {
// 商品別集計
case 'products':
if ($type == "") {
$type = 'all';
}
$this->tpl_page_type = "total/page_products.tpl";
// 未集計データの集計を行う
if (!DAILY_BATCH_MODE) {
$this->objBatch->lfRealTimeDailyTotal($sdate, $edate);
}
// 検索結果の取得
$this->lfGetOrderProducts($type, $sdate, $edate, $this, $this->install_GD, $mode);
break;
// 職業別集計
// 職業別集計
case 'job':
if ($type == "") {
$type = 'all';
}
$this->tpl_page_type = "total/page_job.tpl";
// 未集計データの集計を行う
if (!DAILY_BATCH_MODE) {
$this->objBatch->lfRealTimeDailyTotal($sdate, $edate);
}
// 検索結果の取得
$this->lfGetOrderJob($type, $sdate, $edate, $this, $this->install_GD);
break;
// 会員別集計
// 会員別集計
case 'member':
if ($type == "") {
$type = 'all';
}
$this->tpl_page_type = "total/page_member.tpl";
//.........这里部分代码省略.........
示例4: lfSetStartEndDate
function lfSetStartEndDate(&$objFormParam)
{
$arrRet = $objFormParam->getHashArray();
$out_flg = 0;
foreach ($arrRet as $key => $val) {
if ($val == '') {
continue;
}
switch ($key) {
case 'search_startyear':
$sdate = $objFormParam->getValue('search_startyear') . '/' . $objFormParam->getValue('search_startmonth') . '/' . $objFormParam->getValue('search_startday');
break;
case 'search_endyear':
$edate = $objFormParam->getValue('search_endyear') . '/' . $objFormParam->getValue('search_endmonth') . '/' . $objFormParam->getValue('search_endday');
break;
case 'search_startyear_m':
list($sdate, $edate) = SC_Utils_Ex::sfTermMonth($objFormParam->getValue('search_startyear_m'), $objFormParam->getValue('search_startmonth_m'), CLOSE_DAY);
$out_flg = 1;
break;
default:
break;
}
// 月度集計の場合に、集計期間が本日日付で上書きされてしまうのを回避するため
if ($objFormParam->getValue('form') == 1 && $out_flg == 1) {
break;
}
}
return array($sdate, $edate);
}