本文整理汇总了PHP中ComValidation类的典型用法代码示例。如果您正苦于以下问题:PHP ComValidation类的具体用法?PHP ComValidation怎么用?PHP ComValidation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ComValidation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getReservePointGrantData
/**
*
* @param array $param
*
* @return array
*/
public function getReservePointGrantData($param = "", $offset = "", $order = "", $limit = "")
{
$columnArray[] = "SQL_CALC_FOUND_ROWS *";
if (ComValidation::isDatetime($param["dispDatetimeFrom"])) {
$whereArray[] = "update_user_point_datetime >= '" . $param["dispDatetimeFrom"] . "'";
}
if (ComValidation::isDatetime($param["dispDatetimeTo"])) {
$whereArray[] = "update_user_point_datetime <= '" . $param["dispDatetimeTo"] . "'";
}
if (ComValidation::isValue($param["is_exec"])) {
$whereArray[] = "is_exec = '" . $param["is_exec"] . "'";
}
$whereArray[] = "disable = 0";
if ($order) {
$otherArray[] = " ORDER BY " . $order;
}
if (ComValidation::isNumeric($offset)) {
$otherArray[] = " LIMIT " . $offset . ", " . $limit;
}
$sql = $this->makeSelectQuery("reserve_point_grant", $columnArray, $whereArray, $otherArray);
if (!($dbResultOBJ = $this->executeQuery($sql))) {
return FALSE;
}
// データリスト取得
$dataList = $this->fetchAll($dbResultOBJ);
return $dataList;
}
示例2: searchNonAllowDomain
/**
*
* 非許可ドメインリストと正規表現にて照会
*
* @return array データ配列
*/
public function searchNonAllowDomain($value)
{
if (!ComValidation::isMailAddress($value)) {
return FALSE;
}
$dangerFlag = FALSE;
$nonAllowDomainList = $this->getNonAllowDomainList();
//非許可リストと照会します
if ($nonAllowDomainList) {
foreach ($nonAllowDomainList as $nonAllowDomainData) {
if (preg_match('/' . preg_quote($nonAllowDomainData['domain']) . '$/', $value) == TRUE) {
$dangerFlag = TRUE;
break;
}
}
}
//非許可に該当するなら、許可リストと照会します
if ($dangerFlag == TRUE) {
$allowDomainList = $this->getAllowDomainList();
if ($allowDomainList) {
foreach ($allowDomainList as $allowDomainData) {
if (preg_match('/' . preg_quote($allowDomainData['domain']) . '$/', $value) == TRUE) {
$dangerFlag = FALSE;
break;
}
}
}
}
return $dangerFlag;
}
示例3: getInformationStatusLogList
/**
* 情報リストの取得
*
* @param array $param パラメーター
* @param integer $offset オフセット
* @param string $order 表示順
* @param integer $limit 表示件数
*
* @return array $dataList データ配列
*/
public function getInformationStatusLogList($param, $offset = 0, $order = null, $limit = 0)
{
if (!is_numeric($param["user_id"])) {
return FALSE;
}
$columnArray[] = "SQL_CALC_FOUND_ROWS ims.*";
$columnArray[] = "log.create_datetime log_create_datetime";
$whereArray[] = "ims.id = log.information_status_id";
$whereArray[] = "log.user_id = " . $param["user_id"];
$whereArray[] = "ims.disable = 0";
$whereArray[] = "log.disable = 0";
if ($order) {
$otherArray[] = " ORDER BY " . $order;
}
if (ComValidation::isNumeric($offset)) {
$otherArray[] = " LIMIT " . $offset . ", " . $limit;
}
$sql = $this->makeSelectQuery("information_status AS ims, information_status_log AS log", $columnArray, $whereArray, $otherArray);
if (!($dbResultOBJ = $this->executeQuery($sql))) {
return FALSE;
}
// データリスト取得
$dataList = $this->fetchAll($dbResultOBJ);
return $dataList;
}
示例4: 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;
}
示例5: getUserProfileFlag
/**
* get user_profile_flag by conditions
*
* @param array $param (conditions)
* @param integer $offset (from)
* @param string $order (sort)
* @param integer $limit (number of records)
* @return array
*/
public function getUserProfileFlag($param = null, $offset = null, $order = null, $limit = null)
{
$columnArray[] = "SQL_CALC_FOUND_ROWS *";
$whereArray = $this->setWhereString($param);
if ($order) {
$otherArray[] = " ORDER BY " . $order;
}
if (ComValidation::isNumeric($offset)) {
$otherArray[] = " LIMIT " . $offset . ", " . $limit;
}
$this->_listSql = $this->makeSelectQuery("user_profile_flag", $columnArray, $whereArray, $otherArray);
if (!($dbResultOBJ = $this->executeQuery($this->_listSql))) {
return false;
}
// データリスト取得
$dataList = $dbResultOBJ->fetchAll();
return $dataList;
}
示例6: getPaymentLogList
/**
*
* 入金ログリストの取得
*
* @param array $param パラメーター
* @param integer $offset オフセット
* @param string $order 表示順
* @param integer $limit 表示件数
*
* @return array $dataList データ配列
*/
public function getPaymentLogList($param, $offset, $order, $limit)
{
if (!is_numeric($param["user_id"])) {
return FALSE;
}
$columnArray[] = "SQL_CALC_FOUND_ROWS *";
$whereArray[] = "user_id = " . $param["user_id"];
$whereArray[] = "disable = 0";
if ($order) {
$otherArray[] = " ORDER BY " . $order;
}
if (ComValidation::isNumeric($offset)) {
$otherArray[] = " LIMIT " . $offset . ", " . $limit;
}
$sql = $this->makeSelectQuery("payment_log", $columnArray, $whereArray, $otherArray);
if (!($dbResultOBJ = $this->executeQuery($sql))) {
return FALSE;
}
// データリスト取得
$dataList = $this->fetchAll($dbResultOBJ);
return $dataList;
}
示例7: getAffiliateList
/**
* アフィリエイト情報リストの取得。
*
* @param array $whereArray 条件
* @param string $order 順序
* @param integer $limit 取得数
*
* @return mixed アフィリエイト情報リスト、失敗ならfalse
*/
public function getAffiliateList($whereArray = "", $order = "", $limit = "")
{
$columnArray[] = "*";
$whereArray[] = "disable = 0";
if ($order) {
$otherArray[] = " ORDER BY " . $order;
}
if (ComValidation::isNumeric($limit)) {
$otherArray[] = " LIMIT " . $limit;
}
$sql = $this->makeSelectQuery("affiliate", $columnArray, $whereArray, $otherArray);
if ($dbResultOBJ = $this->executeQuery($sql)) {
$dataArray = $this->fetchAll($dbResultOBJ);
} else {
return FALSE;
}
return $dataArray;
}
示例8: date
// インスタンスの作成
$AdmMailMagazineOBJ = AdmMailMagazine::getInstance();
$offset = $requestOBJ->getParameter("offset");
if (!$offset) {
$offset = 0;
}
$exceptArray[] = "offset";
$param = $requestOBJ->getParameterExcept($exceptArray);
$dispCnt = 20;
// 入力日時の生成
$param["dispDatetimeFrom"] = $param["disp_date_from"] . " " . $param["disp_time_from"];
if (!ComValidation::isDatetime($param["dispDatetimeFrom"])) {
$param["dispDatetimeFrom"] = date("Y-m-d") . " 00:00:00";
}
$param["dispDatetimeTo"] = $param["disp_date_to"] . " " . $param["disp_time_to"];
if (!ComValidation::isDatetime($param["dispDatetimeTo"])) {
$param["dispDatetimeTo"] = date("Y-m-d") . " 23:59:59";
}
$smartyOBJ->assign("param", $param);
// ソート条件
switch ($param["sort"]) {
case "pc_access":
$sortColumn = "access_count_pc DESC,";
break;
case "pc_access_percent":
$sortColumn = "pc_access_percent DESC,";
break;
case "mb_access":
$sortColumn = "access_count_mb DESC,";
break;
case "mb_access_percent":
示例9: header
exit;
}
// メアドの重複チェック
if (!($duplicateUserData = $UserOBJ->getUserDataFromMailAddress($mailAddressChangeData["mail_address"]))) {
$duplicateUserData = $UserOBJ->chkUserDataFromLoginId($mailAddressChangeData["mail_address"]);
}
// 重複メアドがあった場合
if ($duplicateUserData) {
$errSessOBJ->errMsg[] = "メールアドレスが重複しています。";
header("Location: ./?action_Update=1" . ($comURLparam ? "&" . $comURLparam : ""));
exit;
}
// トランザクション開始
$UserOBJ->beginTransaction();
// メールステータス等も初期化
if (ComValidation::isMobileAddress($mailAddressChangeData["mail_address"])) {
$updateUserData["mb_device_cd"] = $ComUtilityOBJ->getDeviceFromMailAddress($mailAddressChangeData["mail_address"]);
$updateUserData["mb_address"] = $mailAddressChangeData["mail_address"];
$updateUserData["mb_address_status"] = 0;
$updateUserData["mb_send_status"] = 0;
$updateUserData["mb_emsys_count"] = 0;
$updateProfileData["mb_is_mailmagazine"] = 0;
// 変更前メアドがログインIDと一緒ならログインIDも変更
if ($comUserData["mb_address"] == $comUserData["login_id"]) {
$updateUserData["login_id"] = $mailAddressChangeData["mail_address"];
}
// アドレス新規登録か
if (!$comUserData["mb_address"]) {
$firstReg = true;
}
} else {
示例10: array
* @author norio takei
*/
require_once D_BASE_DIR . "/common/admin_common.php";
$param = $requestOBJ->getParameterExcept($exceptArray);
$tags = array("mail_maga_reserve_id");
$URLparam = $requestOBJ->makeGetTag($tags);
$AdmMailMagazineOBJ = AdmMailMagazine::getInstance();
// セッションオブジェクトのインスタンス
$execMsgSessOBJ = new ComSessionNamespace("exec_msg");
$returnSessOBJ = new ComSessionNamespace("return");
$magaData = $AdmMailMagazineOBJ->getMailReserveData($param["mail_maga_reserve_id"]);
if (!ComValidation::isMailAddress($param["from_address"])) {
$errMsg[] = "送信アドレスを入力してください";
}
$timerDatetime = $param["reserve_datetime_Date"] . " " . $param["reserve_datetime_Time"] . ":00";
if (!ComValidation::isDatetime($timerDatetime)) {
$errMsg[] = "有効な日時を入力して下さい";
}
// 戻り値の格納
$returnSessOBJ->return = $param;
if ($errMsg) {
$execMsgSessOBJ->message = $errMsg;
header("Location: ./?action_mailLog_ReserveMailData=1&" . $URLparam);
exit;
}
// 予約メルマガ内容の更新
//前ページから渡って来た値
$mailLog["from_address"] = $param["from_address"];
$mailLog["from_name"] = $param["from_name"];
$mailLog["pc_subject"] = $param["pc_subject"];
$mailLog["pc_text_body"] = $param["pc_text_body"];
示例11: array
if (!$UserOBJ->insertUserData($userAry)) {
$UserOBJ->rollbackTransaction();
$rootChild = $DOMDocumentOBJ->createElement("error");
$root->appendChild($rootChild);
$errorChild = $DOMDocumentOBJ->createElement("message", "登録できませんでした。");
$rootChild->appendChild($errorChild);
print $DOMDocumentOBJ->saveXML();
exit;
}
$userId = $UserOBJ->getInsertId();
$profileAry = array("user_id" => $userId, "by_user_update_datetime" => $currentDateTime, "update_datetime" => $currentDateTime);
if (ComValidation::isNumeric($param["s"])) {
$profileAry["sex_cd"] = $param["s"];
}
// タイムスタンプで来る
if (ComValidation::isNumeric($param["b"])) {
$profileAry["birth_date"] = date("Y-m-d", $param["b"]);
}
if ($mbFlag) {
$profileAry["mb_is_mailmagazine"] = $_config["define"]["ADDRESS_SEND_STATUS_DO"];
} else {
$profileAry["pc_is_mailmagazine"] = $_config["define"]["ADDRESS_SEND_STATUS_DO"];
}
// profileテーブルへのインサート処理
if (!$UserOBJ->insertProfileData($profileAry)) {
$UserOBJ->rollbackTransaction();
$rootChild = $DOMDocumentOBJ->createElement("error");
$root->appendChild($rootChild);
$errorChild = $DOMDocumentOBJ->createElement("message", "登録できませんでした。");
$rootChild->appendChild($errorChild);
print $DOMDocumentOBJ->saveXML();
示例12: header
if (!$UserOBJ->updateProfileData($setProfileParam, $userProfileWhere)) {
$errSessOBJ->errMsg = $UserOBJ->getErrorMsg();
header("Location: ./?action_Error=1" . ($comURLparam ? "&" . $comURLparam : "") . "&" . $sessId);
exit;
}
if ($param["swf"]) {
header("Location: ./?action_Flash=1&" . Auth::ACCESS_KEY_NAME . "=" . $duplicateUserData["access_key"] . "&swf=" . $param["swf"] . "&isid=" . $param["isid"] . ($comURLparam ? "&" . $comURLparam : ""));
} else {
header("Location: ./?action_Information=1&" . Auth::ACCESS_KEY_NAME . "=" . $duplicateUserData["access_key"] . "&isid=" . $param["isid"] . ($comURLparam ? "&" . $comURLparam : ""));
}
exit;
}
}
// 退会なら登録ステータスの変更
if ($comUserData["regist_status"] == $_config["define"]["USER_REGIST_STATUS_MEMBER_QUIT"]) {
if (ComValidation::isDateTime($comUserData["regist_datetime"])) {
$setUserParam["regist_status"] = $_config["define"]["USER_REGIST_STATUS_MEMBER"];
} else {
$setUserParam["regist_status"] = $_config["define"]["USER_REGIST_STATUS_PRE_MEMBER"];
}
$setUserParam["quit_datetime"] = "0000-00-00 00:00:00";
}
$userWhere = "";
$userWhere[] = "id = " . $comUserData["user_id"];
// userテーブルへの更新処理
if (!$UserOBJ->updateUserData($setUserParam, $userWhere)) {
$ComErrSessOBJ->errMsg = $UserOBJ->getErrorMsg();
header("Location: ./?action_Error=1" . ($comURLparam ? "&" . $comURLparam : "") . "&" . $sessId);
exit;
}
$userProfileWhere = "";
示例13: ComSessionNamespace
require_once D_BASE_DIR . "/common/post_common.php";
require_once $controllerOBJ->getIncludeBusinessLogic("postInclude");
$errSessOBJ = new ComSessionNamespace("err_msg");
$UserOBJ = User::getInstance();
$param = $requestOBJ->getParameterExcept($exceptArray);
$mailAddress = $param["mail_account"] . "@" . $param["mail_domain"];
if ($param["login_id"] != $comUserData["login_id"]) {
$errFlag = true;
}
if ($UserOBJ->createPasswordKey($param["password"]) != $comUserData["password"]) {
$errFlag = true;
}
if (!ComValidation::isMailAddress($mailAddress)) {
$errFlag = true;
}
if (!ComValidation::isNumeric($param["q1"]) or $param["q1"] == 1 and !ComValidation::isNumeric($param["q6"]) or (!ComValidation::isNumeric($param["q2"]) or $param["q2"] == 1 and !ComValidation::isNumeric($param["q7"])) or (!ComValidation::isNumeric($param["q3"]) or $param["q3"] == 1 and !ComValidation::isNumeric($param["q8"])) or (!ComValidation::isNumeric($param["q4"]) or $param["q4"] == 1 and !ComValidation::isNumeric($param["q9"])) or (!ComValidation::isNumeric($param["q5"]) or $param["q5"] == 1 and !$param["q10"])) {
$errFlag = true;
}
if ($errFlag) {
$errSessOBJ->errMsg[] = "必須項目に入力漏れがあります";
header("Location: ./?action_Taikai=1" . ($comURLparam ? "&" . $comURLparam : ""));
exit;
}
$QuitRequestOBJ = QuitRequest::getInstance();
if (!$QuitRequestOBJ->getQuitRequestData($comUserDataId)) {
// 退会申請情報をインサート
$insertArray["user_id"] = $comUserDataId;
$insertArray["create_datetime"] = date("YmdHis");
if (!$QuitRequestOBJ->insertQuitRequestData($insertArray)) {
$errSessOBJ->errMsg[] = "退会申請情報処理ができませんでした。";
header("Location: ./?action_Taikai=1" . ($comURLparam ? "&" . $comURLparam : ""));
示例14: getList
/**
* 管理画面アクセス情報の取得。
*
* @return mixed 管理画面アクセスリスト、失敗ならfalse
*/
public function getList($param = "", $offset = "", $order = "", $limit = "")
{
$columnArray[] = "SQL_CALC_FOUND_ROWS *";
//$whereArray[] = "disable = 0";
if (ComValidation::isDatetime($param["dispDatetimeFrom"])) {
$whereArray[] = "create_datetime >= '" . $param["dispDatetimeFrom"] . "'";
}
if (ComValidation::isDatetime($param["dispDatetimeTo"])) {
$whereArray[] = "create_datetime <= '" . $param["dispDatetimeTo"] . "'";
}
if ($param["admin_id"]) {
$whereArray[] = "admin_id = " . $param["admin_id"];
}
if ($order) {
$otherArray[] = " ORDER BY " . $order;
}
if (ComValidation::isNumeric($offset)) {
$otherArray[] = " LIMIT " . $offset . ", " . $limit;
}
$sql = $this->makeSelectQuery("tmp_admin_access", $columnArray, $whereArray, $otherArray);
if ($dbResultOBJ = $this->executeQuery($sql)) {
$dataArray = $this->fetchAll($dbResultOBJ);
} else {
return FALSE;
}
return $dataArray;
}
示例15: header
header("Location: " . $_config["define"]["SITE_URL"]);
exit;
}
}
}
// モバイルなら表示文字コードを設定する
if (($mbUa != "NonMobile" or $isSmartPhone) and !array_key_exists($server["REMOTE_ADDR"], $_config["common_config"]["corporation_ip_address"]) or preg_match("/" . implode("|", $_config["web_config"]["crawler_mb"]) . "/", $server["HTTP_USER_AGENT"])) {
// モバイルURLでなければ
// ドコモ個体識別がなければリダイレクト
if (!$isURIMobile or $mbUa == "Docomo" and !$commonParam["guid"] and !$mbSerialNo) {
if ($server["QUERY_STRING"]) {
parse_str($server["QUERY_STRING"], $queryAry);
if ($queryAry[$sesName]) {
unset($queryAry[$sesName]);
}
if (ComValidation::isArray($queryAry)) {
foreach ((array) $queryAry as $key => $val) {
$queryString[] = $key . "=" . $val;
}
$queryString = implode("&", (array) $queryString);
}
}
header("Location: " . $_config["define"]["SITE_URL_MOBILE"] . "index.php?" . $queryString . ($mbUa == "Docomo" ? $queryString ? "&guid=ON&" . $sessId : "guid=ON&" . $sessId : ($queryString ? "&" . $sessId : $sessId)));
exit;
}
// PCアクセスの場合
} else {
// 自社アクセス以外はPC用ページに飛ばす
if ($isURIMobile and !array_key_exists($server["REMOTE_ADDR"], $_config["common_config"]["corporation_ip_address"]) or preg_match("/" . implode("|", $_config["web_config"]["crawler_pc"]) . "/", $server["HTTP_USER_AGENT"])) {
header("Location: " . $_config["define"]["SITE_URL"] . "?" . $server["QUERY_STRING"]);
exit;