/** * * @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; }
// $errMsg[] = "PCメールアドレスが重複しています"; } // PCアドレスステ-タス if (!ComValidation::isNumeric($param["pc_address_status"])) { $errMsg[] = "PCアドレスステ-タスを選択してください"; } // PC送信ステ-タス if (!ComValidation::isNumeric($param["pc_send_status"])) { $errMsg[] = "PC送信ステ-タスを選択してください"; } // PCメール受信設定 if (!ComValidation::isNumeric($param["pc_is_mailmagazine"])) { $errMsg[] = "PCメール受信設定を選択してください"; } // MBメールアドレス if (ComValidation::isValue($param["mb_address"]) and !ComValidation::isMobileAddress($param["mb_address"])) { $errMsg[] = "MBメールアドレスが正しくありません"; //} else if ($AdminUserOBJ->chkUserDataFromMbMailAddress($param["mb_address"], $param["user_id"])) { // $errMsg[] = "MBメールアドレスが重複しています"; } // MBアドレスステータス if (!ComValidation::isNumeric($param["mb_address_status"])) { $errMsg[] = "MBアドレスステータスを選択してください"; } // MB送信ステ-タス if (!ComValidation::isNumeric($param["mb_send_status"])) { $errMsg[] = "MB送信ステ-タスを選択してください"; } // MBメール受信設定 if (!ComValidation::isNumeric($param["mb_is_mailmagazine"])) { $errMsg[] = "MBメール受信設定を選択してください";
<?php /** * * @author hoang_minh * @since 2014/12/2 */ require_once D_BASE_DIR . "/common/admin_common.php"; // user profile flag $AdminUserProfileFlagOBJ = AdmUserProfileFlag::getInstance(); $param = $requestOBJ->getParameterExcept($exceptArray); $errSessOBJ = new ComSessionNamespace("err"); // Check user profile flag name if (!ComValidation::isValue($param["user_profile_flag_name"])) { $errMsg[] = "user profile flag name is not null"; } if ($errMsg) { $errSessOBJ->errMsg = $errMsg; header("Location: ./?action_User_UserProfileFlagData=1&user_profile_flag_code=" . $param["user_profile_flag_code"]); exit; } //set user profile flag $setUserProfileFlagParam['name'] = $param['user_profile_flag_name']; $setUserProfileFlagParam['convert_code'] = $param['convert_code']; //set where $whereUserProfileFlag[] = "code = '" . $param['user_profile_flag_code'] . "'"; //update $errSessOBJ->errMsg = array("更新しました。"); if (!$AdminUserProfileFlagOBJ->updateUserProfileFlagData($setUserProfileFlagParam, $whereUserProfileFlag)) { $errSessOBJ->errMsg = array("更新できませんでした。"); }
if (in_array($val["login_id"], $loginIdArray)) { continue; } else { $loginIdArray[] = $val["login_id"]; } if (ComValidation::isValue($val["mb_serial_number"]) && in_array($val["mb_serial_number"], $mbSerialNumberArray)) { continue; } else { $mbSerialNumberArray[] = $val["mb_serial_number"]; } if (ComValidation::isValue($val["mb_address"]) && in_array($val["mb_address"], $mbSerialNumberArray)) { continue; } else { $mbAddressArray[] = $val["mb_address"]; } if (ComValidation::isValue($val["pc_address"]) && in_array($val["pc_address"], $mbSerialNumberArray)) { continue; } else { $pcAddressArray[] = $val["pc_address"]; } print mb_convert_encoding("\"" . $val["user_id"] . "\",", "SJIS", "UTF-8"); // 空白の場合、NULL値を入れる(ログインID) if ($val["login_id"] == "") { print mb_convert_encoding(",", "SJIS", "UTF-8"); } else { print mb_convert_encoding("\"" . $val["login_id"] . "\",", "SJIS", "UTF-8"); } // print(mb_convert_encoding("\"".$val["login_id"]."\",","SJIS","UTF-8")); print mb_convert_encoding("\"" . $val["admin_id"] . "\",", "SJIS", "UTF-8"); print mb_convert_encoding("\"" . $val["pc_ip_address"] . "\",", "SJIS", "UTF-8"); print mb_convert_encoding("\"" . $val["pc_user_agent"] . "\",", "SJIS", "UTF-8");
$value["disable"] = $param["disable"][$val]; $value["update_datetime"] = date("YmdHis"); $whereArray[] = "id = " . $val; if (!$AdmBaitaiAgencyCdSettingOBJ->updateData($value, $whereArray)) { $messageSessOBJ->message = $AdmBaitaiAgencyCdSettingOBJ->getErrorMsg(); header("Location: ./?action_baitaiAgency_BaitaiAgencyUpd=1&id=" . $param["id"]); exit; } } $messageSessOBJ->message = array("更新しました。"); // 新規 } else { if (!ComValidation::isValue($param["media_name"])) { $errMsg[] = "媒体名を入力してください"; } if (!ComValidation::isValue($param["media_cd"])) { $errMsg[] = "媒体コードを入力してください"; } // エラー判定 if ($errMsg) { $messageSessOBJ->message = $errMsg; $param["return_cd"] = "setting"; $returnSessOBJ->return = $param; header("Location: ./?action_baitaiAgency_BaitaiAgencyUpd=1&id=" . $param["id"]); exit; } $value["baitai_agency_id"] = $param["id"]; $value["media_name"] = $param["media_name"]; $value["media_cd"] = $param["media_cd"]; $value["create_datetime"] = date("YmdHis"); $value["update_datetime"] = date("YmdHis");
/** * 予約メルマガリストの取得。 * * @return mixed 予約メルマガリスト、失敗ならfalse */ public function getMailReserveList($param = "", $offset = "", $order = "", $limit = "") { $columnArray[] = "SQL_CALC_FOUND_ROWS *"; $whereArray[] = "disable = 0"; if (!ComValidation::isValue($param['do_not_care_datetime'])) { if (ComValidation::isDatetime($param["dispDatetimeFrom"])) { $whereArray[] = "send_datetime >= '" . $param["dispDatetimeFrom"] . "'"; } if (ComValidation::isDatetime($param["dispDatetimeTo"])) { $whereArray[] = "send_datetime <= '" . $param["dispDatetimeTo"] . "'"; } } if ($param["mailmagazine_id"]) { $whereArray[] = "id IN (" . trim($param["mailmagazine_id"], ",") . ")"; } if ($param["mailmagazine_subject"]) { $whereArray[] = "(pc_subject like '%" . $param["mailmagazine_subject"] . "%'" . " OR mb_subject like '%" . $param["mailmagazine_subject"] . "%')"; } if ($param["mailmagazine_body"]) { $whereArray[] = "(pc_text_body like '%" . $param["mailmagazine_body"] . "%' OR pc_html_body like '%" . $param["mailmagazine_body"] . "%'" . " OR mb_text_body like '%" . $param["mailmagazine_body"] . "%' OR mb_html_body like '%" . $param["mailmagazine_body"] . "%')"; } if ($order) { $otherArray[] = " ORDER BY " . $order; } if (ComValidation::isNumeric($offset)) { $otherArray[] = " LIMIT " . $offset . ", " . $limit; } $sql = $this->makeSelectQuery("mailmagazine_reserve", $columnArray, $whereArray, $otherArray); if ($dbResultOBJ = $this->executeQuery($sql)) { $dataArray = $this->fetchAll($dbResultOBJ); } else { return FALSE; } return $dataArray; }
/** * ブラックサーバから削除されたブラックユーザは正常に戻す * * @param array $newBlackUserList ユーザID * @return boolean TRUE:成功 FALSE:失敗 * */ public function updateUserNormal($newBlackUserList = null) { $updateArray = array("danger_status" => $this->_configOBJ->define->FALSE, "update_datetime" => date("Y-m-d H:i:s")); //値チェック if (ComValidation::isValue($newBlackUserList)) { $userIdList = implode(",", $newBlackUserList); $whereArray[] = "danger_status = " . $this->_configOBJ->define->TRUE . " AND id NOT IN (" . $userIdList . ")"; } else { $whereArray[] = "danger_status = " . $this->_configOBJ->define->TRUE; } if (!($dbResultOBJ = $this->update("user", $updateArray, $whereArray))) { return FALSE; } return $dbResultOBJ; }
} if (!ComValidation::isNumeric($param["registPageId"]) or ComValidation::isEmpty($param["registPageId"])) { $errMsg[] = "登録入口コードは数字で入力して下さい。"; } if (!ComValidation::isString($param["advcd"]) or ComValidation::isEmpty($param["advcd"])) { $errMsg[] = "媒体コードが不正です。"; } if ($errMsg) { $errSessOBJ->errMsg = $errMsg; header("Location: ./?action_User_RegistCsv=1"); exit; } //ファイルの中身を配列に格納 $targetMailAddressArray = file($_FILES['regCsvFile']['tmp_name']); //空だったら中止 if (!ComValidation::isValue($targetMailAddressArray)) { $errMsg[] = "ファイルの中身が認識出来ません。"; header("location: ./?action_User_RegistCsv=1"); exit; } $targetCountNum = count($targetMailAddressArray); $i = 0; //順番にまわす foreach ($targetMailAddressArray as $key => $address) { //改行除去 $address = trim($address); //アドレス無し、もしくはアドレスの体を成していない場合はcontinue if (!$address or !ComValidation::isMailAddress($address)) { continue; } //アドレスから重複チェック
/* 未来でも予約できるようにコメントアウト if (!$userList) { $errSessOBJ->errMsg = array("アドレス入力済みユーザーデータがありません"); header("Location: ./?action_user_Search=1"); exit; } */ if (!ComValidation::isMailAddress($param["from_address"])) { $errSessOBJ->errMsg = array("送信アドレスを入力してください"); header("Location: ./?action_mail_mailInput=1" . $URLparam); exit; } //MB添付画像ファイル容量制限チェック $imageDataSize = 0; for ($i = 1; $i <= count($_FILES["mb_image"]["tmp_name"]); $i++) { if (ComValidation::isValue($_FILES["mb_image"]["tmp_name"][$i])) { $imageData = file_get_contents($_FILES["mb_image"]["tmp_name"][$i]); $imageDataSize += strlen($imageData); if (ceil($imageDataSize / 1024) > 100) { $errSessOBJ->errMsg = array("MB添付ファイルの容量制限(100k迄)オーバー!"); header("Location: ./?action_mail_mailInput=1" . $URLparam); exit; } } } // SMTPホスト設定(通常・反転) $normalComSendMagicDeliveryOBJ->setSendMailServerIp($_config["common_config"]["smtp_mail_server_ip"]["sendMagic"]); $reverseComSendMagicDeliveryOBJ->setSendMailServerIp($_config["common_config"]["smtp_mail_server_ip"]["reverse"]); // 検索条件の取得 $whereContents = $AdmMailMagazineOBJ->getWhereContents(); try {
if (!ComValidation::isNumeric($param["mb_address_status"])) { $errMsg[] = "MBアドレスステータスを選択してください"; } // MB送信ステ-タス if (!ComValidation::isNumeric($param["mb_send_status"])) { $errMsg[] = "MB送信ステ-タスを選択してください"; } // MBメール受信設定 if (!ComValidation::isNumeric($param["mb_is_mailmagazine"])) { $errMsg[] = "MBメール受信設定を選択してください"; } // 性別 if (!ComValidation::isNumeric($param["sex_cd"])) { $errMsg[] = "性別を選択してください"; } if (!ComValidation::isValue($param["pc_address"]) and !ComValidation::isValue($param["mb_address"])) { $errMsg[] = "メールアドレスがありません"; } // PCメール強行 if (!ComValidation::isNumeric($param["is_pc_reverse"])) { $errMsg[] = "PCメール強行フラグを選択してください"; } // MBメール強行 if (!ComValidation::isNumeric($param["is_mb_reverse"])) { $errMsg[] = "MBメール強行フラグを選択してください"; } if ($errMsg) { $errSessOBJ->errMsg = $errMsg; $returnSessOBJ->return = $param; header("Location: ./?action_user_Create=1"); exit;