本文整理汇总了PHP中ComValidation::isDate方法的典型用法代码示例。如果您正苦于以下问题:PHP ComValidation::isDate方法的具体用法?PHP ComValidation::isDate怎么用?PHP ComValidation::isDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ComValidation
的用法示例。
在下文中一共展示了ComValidation::isDate方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: smarty_modifier_zend_date_format
/**
* Smarty {emoji} modifier plugin
*
* Type: modifier
* Name: date_format
* 日付フォーマット
*
* Examples:{$data|date_format:'YYYY-mm-dd'}
* @param string $data
* @param string $format
*
* @return string|null
*/
function smarty_modifier_zend_date_format($data, $format = "yyyy-MM-dd")
{
if (!ComValidation::isDatetime($data) and !ComValidation::isDate($data)) {
return "";
}
$date = new ComDate($data);
// 日付をフォーマット
$data = $date->toString($format);
return $data;
}
示例2: IN
require_once D_BASE_DIR . "/common/admin_common.php";
$param = $requestOBJ->getParameterExcept($exceptArray);
$AdmCalculationOBJ = AdmCalculation::getInstance();
// 売り上げ総金額
$columnArray = "";
$whereArray = "";
$otherArray = "";
$columnArray[] = "p.pay_type";
$columnArray[] = "SUM(p.receive_money) AS pay_total";
$columnArray[] = "CAST(p.create_datetime AS DATE) AS payment_date";
$whereArray[] = "o.disable = 0";
$whereArray[] = "o.is_paid = 1";
$whereArray[] = "o.is_cancel = 0";
$whereArray[] = "o.status IN (" . AdmOrdering::ORDERING_STATUS_PRE_COMPLETE . ", " . AdmOrdering::ORDERING_STATUS_COMPLETE . ", " . AdmOrdering::ORDERING_STATUS_REST . ")";
$otherArray[] = "GROUP BY payment_date, o.id ORDER BY payment_date";
if (ComValidation::isDate($param["date"])) {
$whereArray[] = "p.create_datetime >= '" . date("Y-m-01 00:00:00", strtotime($param["date"])) . "'";
$whereArray[] = "p.create_datetime <= '" . date("Y-m-t 23:59:59", strtotime($param["date"])) . "'";
}
$orderingSalesDataList = $AdmCalculationOBJ->getCalcSalesList($param, $columnArray, $whereArray, $otherArray);
if ($orderingSalesDataList) {
foreach ((array) $orderingSalesDataList as $val) {
// 入金種別毎の集計
$dispDataList[date("w", strtotime($val["payment_date"]))][$val["pay_type"]] += $val["pay_total"];
$totalPay += $val["pay_total"];
}
foreach ((array) $_config["admin_config"]["week_array"] as $weekKey => $weekVal) {
foreach ((array) AdmOrdering::$_payType as $key => $val) {
$jsPaymentDataList[$key][] = "[" . ($dispDataList[$weekKey][$key] ? $dispDataList[$weekKey][$key] : 0) . "," . ($weekKey + 1) . "]";
}
}
示例3: getOrderingChangeLogList
/**
*
* 注文変更ログリストの取得
*
* @param array $param パラメーター
* @param integer $offset オフセット
* @param string $order 表示順
* @param integer $limit 表示件数
*
* @return array $dataList データ配列
*/
public function getOrderingChangeLogList($param, $offset = "", $order = "", $limit = "")
{
$columnArray[] = "SQL_CALC_FOUND_ROWS item.name";
$columnArray[] = "ordering.create_datetime as ordering_create_datetime";
$columnArray[] = "order_change_log.ordering_id";
$columnArray[] = "order_change_log.price";
$columnArray[] = "order_change_log.status";
$columnArray[] = "order_change_log.create_datetime as order_change_log_create_datetime";
$whereArray[] = "item.id = order_change_log.item_id";
$whereArray[] = "order_change_log.ordering_id = ordering.id";
$whereArray[] = "ordering.disable = 0";
$whereArray[] = "order_change_log.disable = 0";
if (ComValidation::isArray($param["pay_type"])) {
$whereArray[] = "ordering.pay_type IN (" . implode(",", $param["pay_type"]) . ")";
}
if (ComValidation::isArray($param["status"])) {
$whereArray[] = "order_change_log.status IN (" . implode(",", $param["status"]) . ")";
}
if (ComValidation::isNumeric($param["search_ordering_id"])) {
$whereArray[] = "ordering.id = " . $param["search_ordering_id"];
}
if (ComValidation::isDateTime($param["order_start_datetime"])) {
$whereArray[] = "ordering.create_datetime >= '" . $param["order_start_datetime"] . "'";
}
if (ComValidation::isDateTime($param["order_end_datetime"])) {
$whereArray[] = "ordering.create_datetime <= '" . $param["order_end_datetime"] . "'";
}
if (ComValidation::isDate($param["change_start_datetime"])) {
$whereArray[] = "order_change_log.create_datetime >= '" . $param["change_start_datetime"] . "'";
}
if (ComValidation::isDate($param["change_end_datetime"])) {
$whereArray[] = "order_change_log.create_datetime <= '" . $param["change_end_datetime"] . "'";
}
if ($order) {
$otherArray[] = " ORDER BY " . $order;
}
if (ComValidation::isNumeric($offset)) {
$otherArray[] = " LIMIT " . $offset . ", " . $limit;
}
$sql = $this->makeSelectQuery("order_change_log, ordering, item", $columnArray, $whereArray, $otherArray);
if (!($dbResultOBJ = $this->executeQuery($sql))) {
return FALSE;
}
// データリスト取得
$dataList = $dbResultOBJ->fetchAll();
return $dataList;
}
示例4: rtrim
// 末尾のカンマ削除(あれば)
$param["monthly_update_item_id"] = rtrim($param["monthly_update_item_id"], ",");
$monthlyUpdateItemId = explode(",", $param["monthly_update_item_id"]);
foreach ($monthlyUpdateItemId as $key => $val) {
if (!ComValidation::isNumeric($val) || !$val) {
$validationOBJ->setErrorMessage("monthly_update_item_id", "月額更新用商品IDは数値のみ入力可能です");
break;
}
}
}
// 月額コース有効日付(開始日)
if ($param["monthly_course_start_date"] and !ComValidation::isDate($param["monthly_course_start_date"])) {
$validationOBJ->setErrorMessage("月額コース有効日付(開始日)", "月額コース有効日付(開始日)を正しく入力してください");
}
// 月額コース有効日付(終了日)
if ($param["monthly_course_end_date"] and !ComValidation::isDate($param["monthly_course_end_date"])) {
$validationOBJ->setErrorMessage("月額コース有効日付(終了日)", "月額コース有効日付(終了日)を正しく入力してください");
}
if ($validationOBJ->isError()) {
$errorMsg = $validationOBJ->getErrorMessage();
$execMsgSessOBJ->exec_msg = $errorMsg;
header("location: ./?action_monthlyCourse_CourseUserSearchList=1&" . $URLparam);
exit;
}
$monthlyCourseUserList = $AdmMonthlyCourseOBJ->getMonthlyCourseUserList($param, $offset, "mcu.id DESC", $dispCnt);
$totalCount = $AdmMonthlyCourseOBJ->getFoundRows();
$dispFirst = $offset + 1;
$dispLast = $offset + count($monthlyCourseUserList);
}
$smartyOBJ->assign("totalCount", $totalCount);
$smartyOBJ->assign("dispFirst", $dispFirst);
示例5:
$param["last_access_datetime"] = $param["last_access_datetime_Date"] . " " . $param["last_access_datetime_Time"];
if (($param["last_access_datetime_Date"] or $param["last_access_datetime_Time"]) and !ComValidation::isDateTime($param["last_access_datetime"])) {
$errMsg[] = "最終アクセス日時を正しく入力してください";
}
// ログイン後トップアクセス日時
$param["home_access_datetime"] = $param["home_access_datetime_date"] . " " . $param["home_access_datetime_time"];
if (($param["home_access_datetime_date"] or $param["home_access_datetime_time"]) and !ComValidation::isDateTime($param["home_access_datetime"])) {
$errMsg[] = "ログイン後トップアクセス日時を正しく入力してください";
}
// 退会日時
$param["quit_datetime"] = $param["quit_datetime_Date"] . " " . $param["quit_datetime_Time"];
if (($param["quit_datetime_Date"] or $param["quit_datetime_Time"]) and !ComValidation::isDateTime($param["quit_datetime"])) {
$errMsg[] = "退会日時を正しく入力してください";
}
// 生年月日
if ($param["birth_date"] and !ComValidation::isDate($param["birth_date"])) {
$errMsg[] = "生年月日を正しく入力してください";
}
// PCメール強行
if (!ComValidation::isNumeric($param["is_pc_reverse"])) {
$errMsg[] = "PCメール強行フラグを選択してください";
}
// MBメール強行
if (!ComValidation::isNumeric($param["is_mb_reverse"])) {
$errMsg[] = "MBメール強行フラグを選択してください";
}
// 危険人物フラグ
if (!ComValidation::isNumeric($param["danger_status"])) {
$errMsg[] = "危険人物フラグを選択してください";
}
// PCメールアドレス
示例6: foreach
$AdmCalculationOBJ = AdmCalculation::getInstance();
$AdmItemOBJ = AdmItem::getInstance();
$AdmCalculationOBJ->setDebugFlag(false);
$ComEmojiOBJ = ComEmoji::getInstance();
// 他キャリアの絵文字を変換する際、半角カナを用いるよう設定
$ComEmojiOBJ->useHalfwidthKatakana();
// 期間指定
if (ComValidation::isDate($param["start_date"])) {
$defaultWhereArray[] = "p.create_datetime >= '" . $param["start_date"] . " 00:00:00'";
}
// 期間指定
if (ComValidation::isDate($param["end_date"])) {
$defaultWhereArray[] = "p.create_datetime <= '" . $param["end_date"] . " 23:59:59'";
}
// 登録日
if (!$param["start_date"] and !$param["end_date"] and ComValidation::isDate($param["date"])) {
$defaultWhereArray[] = "p.create_datetime >= '" . $param["date"] . " 00:00:00'";
$defaultWhereArray[] = "p.create_datetime <= '" . $param["date"] . " 23:59:59'";
}
$columnArray[] = "p.*";
$columnArray[] = "o.id ordering_id";
$columnArray[] = "o.status ordering_status";
$columnArray[] = "o.create_datetime ordering_create_datetime";
// ログリスト
$dataList = $AdmCalculationOBJ->getCalcPaymentList($param, $columnArray, $defaultWhereArray, $otherArray);
if ($dataList) {
foreach ($dataList as $key => $val) {
$total["cnt"]++;
$total["receive_money"] += $val["receive_money"];
$dataList[$key]["pay_type"] = AdmOrdering::$_payType[$val["pay_type"]];
if ($val["ordering_status"] == AdmOrdering::ORDERING_STATUS_REST) {
示例7: elseif
$startDate = $param["start_date"] . " 00:00:00";
} elseif (ComValidation::isDate($param["date"])) {
$startDate = date("Y-m-d H:i:s", mktime(0, 0, 0, date("m", strtotime($param["date"])), 1, date("Y", strtotime($param["date"]))));
}
// 期間指定(終了)
if (ComValidation::isDate($param["end_date"])) {
$endDate = $param["end_date"] . " 23:59:59";
} elseif (ComValidation::isDate($param["date"])) {
$endDate = date("Y-m-d H:i:s", mktime(23, 59, 59, date("m", strtotime($param["date"])) + 1, 0, date("Y", strtotime($param["date"]))));
}
// 入金額、入金者数限定期間指定(開始)
if (ComValidation::isDate($param["start_date_trade"])) {
$startDateTrade = $param["start_date_trade"] . " 00:00:00";
}
// 入金額、入金者数限定期間指定(終了)
if (ComValidation::isDate($param["end_date_trade"])) {
$endDateTrade = $param["end_date_trade"] . " 23:59:59";
}
//年齢制限
if ($param["user_age_from"] or $param["user_age_to"]) {
$searchAgeSqAry = array();
$searchAgeSql = "";
// 年齢 ~以上
if ($param["user_age_from"]) {
$userAgeSql[] = "vup.birth_date <= DATE_SUB(vup.regist_datetime ,interval " . $param["user_age_from"] . " year) AND vup.birth_date != '0000-00-00'";
}
// 年齢 ~未満
if ($param["user_age_to"]) {
$userAgeTo = $param["user_age_to"] + 1;
$userAgeSql[] = "vup.birth_date > DATE_SUB(vup.regist_datetime ,interval " . $userAgeTo . " year)";
}
示例8: header
if (!ComValidation::isNumeric($param["advertise_expenses"][$val]) && $param["advertise_expenses"][$val]) {
$errMsg[] = "広告費は数値で入力してください";
}
if (!ComValidation::isNumeric($param["advertise_expenses_once"][$val]) && $param["advertise_expenses_once"][$val]) {
$errMsg[] = "広告費(一回払い)は数値で入力してください";
}
if (!ComValidation::isNumeric($param["advertise_expenses_apiece"][$val]) && $param["advertise_expenses_apiece"][$val]) {
$errMsg[] = "広告費(単価)は数値で入力してください";
}
if (!ComValidation::isNumeric($param["advertise_expenses_percent"][$val]) && $param["advertise_expenses_percent"][$val]) {
$errMsg[] = "成果報酬は数値で入力してください";
}
if (!ComValidation::isDate($param["advertise_period_from"][$val]) and $param["advertise_period_from"][$val] != "0000-00-00") {
$errMsg[] = "適切な広告期間fromを入力してください";
}
if (!ComValidation::isDate($param["advertise_period_to"][$val]) and $param["advertise_period_to"][$val] != "0000-00-00") {
$errMsg[] = "適切な広告期間toを入力してください";
}
// エラー判定
if ($errMsg) {
$messageSessOBJ->message = $errMsg;
header("Location: ./?action_baitaiAgency_BaitaiAgencyUpd=1&id=" . $param["id"]);
exit;
}
$whereArray = "";
$value = "";
// 更新
$value["media_name"] = $param["media_name"][$val];
$value["media_cd"] = $param["media_cd"][$val];
$value["advertise_expenses_type"] = $param["advertise_expenses_type"][$val];
$value["advertise_expenses"] = $param["advertise_expenses"][$val];
示例9: date
if (!$param["search_flag"]) {
$param["order_start_datetime"] = date("Y-m-01 00:00:00");
} else {
$param["order_start_datetime"] = "";
}
}
$param["order_end_datetime"] = $param["order_end_datetime_Date"] . " 23:59:59";
if (!ComValidation::isDatetime($param["order_end_datetime"])) {
$param["order_end_datetime"] = "";
}
$param["change_start_datetime"] = $param["change_start_datetime_Date"] . " 00:00:00";
if (!ComValidation::isDate($param["change_start_datetime"])) {
$param["change_start_datetime"] = "";
}
$param["change_end_datetime"] = $param["change_end_datetime_Date"] . " 23:59:59";
if (!ComValidation::isDate($param["change_end_datetime"])) {
$param["change_end_datetime"] = "";
}
// セッションにセットします
if ($param["sesKey"]) {
$sesKey = $param["sesKey"];
$param = $orderingSearchSessOBJ->{$param}["sesKey"];
} else {
$sesKey = "change_" . strtotime("NOW");
$orderingSearchSessOBJ->{$sesKey} = $param;
}
$requestOBJ->setParameter("sesKey", $sesKey);
// 注文リストの取得
if ($param["search_flag"]) {
$changeLogList = $AdmOrderChangeLogOBJ->getOrderingChangeLogList($param, $offset, "order_change_log.id DESC", $dispCnt);
$totalCount = $AdmOrderChangeLogOBJ->getFoundRows();
示例10: date
*
* Copyright (c) 2009 Fraise, Inc.
* All rights reserved.
*/
/**
* コンバート対象媒体コード集計ファイル。
*
* @copyright 2009 Fraise, Inc.
* @author mitsuhiro nakamura
*/
require_once D_BASE_DIR . "/common/admin_common.php";
require_once $controllerOBJ->getIncludeBusinessLogic("admInclude");
$param = $requestOBJ->getParameterExcept($exceptArray);
$AdmCalculationOBJ = AdmCalculation::getInstance();
// 期間指定
if (ComValidation::isDate($param["start_date"]) and ComValidation::isDate($param["end_date"])) {
$param["3month_date"] = date("Y-m-d 00:00:00", strtotime($param["start_date"] . " -2 month"));
/*
//コンバート対象媒体コードの売上集計
$tradeSql = "
SELECT trade.`media_cd` AS trade_media_cd,
SUM(CASE WHEN trade_datetime between '" . $param["start_date"] . " 00:00:00' AND '" . $param["end_date"] . " 23:59:59' THEN trade_amount ELSE 0 END) as trade_amount,
SUM(CASE WHEN trade_datetime between '" . $param["start_date"] . " 00:00:00' AND '" . $param["end_date"] . " 23:59:59' AND user_regist_datetime between '" . $param["start_date"] . " 00:00:00' AND '" . $param["end_date"] . " 23:59:59' THEN trade_amount ELSE 0 END) as regist_amount,
SUM(CASE WHEN trade_datetime between '" . $param["start_date"] . " 00:00:00' AND '" . $param["end_date"] . " 23:59:59' AND user_regist_datetime between '" . $param["3month_date"] . " 00:00:00' AND '" . $param["end_date"] . " 23:59:59'THEN trade_amount ELSE 0 END) AS 3month_amount
FROM `v_trade_user` AS trade
WHERE EXISTS(
SELECT * FROM cnv_user AS cnv
WHERE convert_media_cd = '".$param["media_cd"]."'
AND cnv.media_cd = trade.media_cd
)
GROUP BY trade.media_cd
示例11: date
}
$usePointDatetimeTo = $value["use_point_to_Date"] . " " . $value["use_point_to_Time"];
if (ComValidation::isDatetime($usePointDatetimeTo)) {
$smartyOBJ->assign("usePointDatetimeTo", $usePointDatetimeTo);
} else {
$smartyOBJ->assign("usePointDatetimeTo", date("Y-m-d H:0:0"));
}
// 生年月日日時の生成
$birthDayDatetimeFrom = $value["birth_day_from_Date"];
if (ComValidation::isDate($birthDayDatetimeFrom)) {
$smartyOBJ->assign("birthDayDatetimeFrom", $birthDayDatetimeFrom);
} else {
$smartyOBJ->assign("birthDayDatetimeFrom", date("Y-m-d"));
}
$birthDayDatetimeTo = $value["birth_day_to_Date"];
if (ComValidation::isDate($birthDayDatetimeTo)) {
$smartyOBJ->assign("birthDayDatetimeTo", $birthDayDatetimeTo);
} else {
$smartyOBJ->assign("birthDayDatetimeTo", date("Y-m-d"));
}
// 期間購入金額日時の生成
$termsPayDatetimeFrom = $value["terms_pay_from_Date"] . " " . $value["terms_pay_from_Time"];
if (ComValidation::isDatetime($termsPayDatetimeFrom)) {
$smartyOBJ->assign("termsPayDatetimeFrom", $termsPayDatetimeFrom);
} else {
$smartyOBJ->assign("termsPayDatetimeFrom", date("Y-m-d H:0:0"));
}
$termsPayDatetimeTo = $value["terms_pay_to_Date"] . " " . $value["terms_pay_to_Time"];
if (ComValidation::isDatetime($termsPayDatetimeTo)) {
$smartyOBJ->assign("termsPayDatetimeTo", $termsPayDatetimeTo);
} else {