/** * 実行 */ protected function perform() { // コア $core =& $this->_core; // モデル $m =& $this->_model; // セッションから取得 $o =& $core->getSession('new_anken'); // テンプレート初期化 $init =& $m->Anken_Edit_getInitData(); $this->appendDataFrom($init); if ($o != null) { // DB保存 $m->Anken_Edit_update($o); // お知らせメール $old =& $core->getSession('old_anken'); NotifyManager::changeAnkenCampaignTo($this->_core, $old, $o); $m->Anken_Edit_setFormTextData($o); $core->setSession('new_anken', null); $core->setSession('old_anken', null); } else { throw new DataObjectNotFoundException('セッションからデータを取得できません。'); } // モデル内の値をテンプレートに設定 $d =& $m->getFormData(); $this->appendDataFrom($d); // テンプレート変数追加 $this->_dataFrom['action'] = 'edit'; $this->_dataFrom['step'] = 'end'; // 表示 return 'anken/detail'; }
/** * 実行 */ protected function perform() { // コア $core =& $this->_core; // モデル $m =& $this->_model; /******************************** * DB更新 * 1.案件IDを取得 * 2.DB更新 * 3.セッション変数クリア ********************************/ // 案件ID $ankenId = $this->_request['aid']; // セッションから取得 $name = "new_anken_info_{$ankenId}"; $o =& $core->getSession($name); if ($o != null) { // テンプレート初期化 $init =& $m->AnkenInfo_Edit_getInitData($ankenId); $this->appendDataFrom($init); // 更新前のDBの値を取得しておく $old = $m->AnkenInfo_Edit_getObjectByID($ankenId); ////////////////////////////// // DB更新 ////////////////////////////// $m->AnkenInfo_Edit_update($o); // ログ出力 $upd_user_id = $core->getLoginLoginId(); $ip = $core->getLoginIp(); $log =& $core->getLogger(); $log->info("anken_info_edit_end:{$upd_user_id}:{$ip}"); // 更新メールを送信 NotifyManager::changeAnkenIsPrepareTurnOff($this->_core, $old, $o); ////////////////////////////// // セッション変数クリア ////////////////////////////// $name = "new_anken_info_{$ankenId}"; $core->setSession($name, null); $name = "old_anken_info_{$ankenId}"; $core->setSession($name, null); /////////////////////////// // テンプレート設定 /////////////////////////// $m->AnkenInfo_Edit_setFormTextData($o); } else { throw new DataObjectNotFoundException('セッションからデータを取得できません。'); } // モデル内の値をテンプレートに設定 $d =& $m->getFormData(); $this->appendDataFrom($d); // テンプレート変数追加 $this->_dataFrom['action'] = 'edit'; $this->_dataFrom['step'] = 'end'; // 表示 return 'anken/info/detail'; }
/** * 実行 */ protected function perform() { // コア $core =& $this->_core; // モデル $m =& $this->_model; /******************************** * DB更新 * 1.案件IDを取得 * 2.DB更新 * 3.セッション変数クリア ********************************/ // 案件ID $ankenId = $this->_request['aid']; // セッションから取得 $name = "new_anken_{$ankenId}"; $o =& $core->getSession($name); if ($o != null) { // テンプレート初期化 $init =& $m->Anken_Edit_getInitData(); $this->appendDataFrom($init); ////////////////////////////// // DB更新 ////////////////////////////// $m->Anken_Edit_update($o); // お知らせメール $name = "old_anken_{$ankenId}"; $old =& $core->getSession($name); NotifyManager::changeAnkenCampaignTo($this->_core, $old, $o); ////////////////////////////// // セッション変数クリア ////////////////////////////// $name = "new_anken_{$ankenId}"; $core->setSession($name, null); $name = "old_anken_{$ankenId}"; $core->setSession($name, null); /////////////////////////// // テンプレート設定 /////////////////////////// $m->Anken_Edit_setFormTextData($o); } else { throw new DataObjectNotFoundException('セッションからデータを取得できません。'); } // モデル内の値をテンプレートに設定 $d =& $m->getFormData(); $this->appendDataFrom($d); // テンプレート変数追加 $this->_dataFrom['action'] = 'edit'; $this->_dataFrom['step'] = 'end'; // 表示 return 'anken/detail'; }
/** * 実行 */ protected function perform() { // ログ出力" 実行開始時間 $this->log->debug("Start Time:" . date('Y-m-d H:i:s')); // 案件ID $ankenId = $this->_request['aid']; // モデル $m =& $this->_model; $anken =& $m->getAnkenData($ankenId); $this->_anken =& $anken; // キャンペーンコード $code = $anken['campaign_code']; // アクションID対応フラグ $useActionId = false; // 解析 //↓↓===========nm90023 2009/09/21 start=================================== //UL項目追加-無料会員登録日時(track_time1),無料会員登録任意のID(track_cid1)のため、承認ステータスと締め日が行末に移動 $keys = array('reg_time', 'action_time', 'client_user_id', 'media_id', 'meida_name'); //$keys = array('reg_time', 'action_time', 'client_user_id', 'media_id', 'meida_name', 'accept_flg', 'accept_date', 'track_time1', 'track_cid1'); //$keys = array('reg_time', 'action_time', 'client_user_id', 'media_id', 'meida_name', 'accept_flg', 'accept_date'); //↑↑===========nm90023 2009/09/21 end===================================== // アクションID対応の場合 // 2 => 'アクションID', if ($anken['accept_use_action_id'] == 2) { $useActionId = true; //↓↓===========nm90023 2009/09/21 start=================================== //UL項目追加-無料会員登録日時(track_time1),無料会員登録任意のID(track_cid1)のため、承認ステータスと締め日が行末に移動 $keys = array('reg_time', 'action_time', 'client_user_id', 'action_id', 'media_id', 'meida_name'); //$keys = array('reg_time', 'action_time', 'client_user_id', 'action_id', 'media_id', 'meida_name', 'accept_flg', 'accept_date', 'track_time1', 'track_cid1'); //$keys = array('reg_time', 'action_time', 'client_user_id', 'action_id', 'media_id', 'meida_name', 'accept_flg', 'accept_date'); //↑↑===========nm90023 2009/09/21 end===================================== } // 定率案件の場合 if ($anken['price_type_cd'] == 2) { $keys[] = 'amount'; } // 追加パラメータ項目を追加 $addOption =& $m->getSeikaOptionAddOptionForUpLoadCsv($ankenId); $keys = array_merge($keys, $addOption); //↓↓===========nm90023 2009/09/21 start=================================== //UL項目追加-無料会員登録日時(track_time1),無料会員登録任意のID(track_cid1)、、承認ステータスと締め日が行末に移動 $addTrack = array('track_time1', 'track_cid1', 'accept_flg', 'accept_date'); $keys = array_merge($keys, $addTrack); //↑↑===========nm90023 2009/09/21 end===================================== // テンプレートに渡す $this->_dataFrom['use_action_id'] = $useActionId; // カウンター初期化 $this->_updateCount['sum'] = 0; $this->_updateCount['Y'] = 0; $this->_updateCount['D'] = 0; $this->_updateCount['N'] = 0; $this->_updateCount['E'] = 0; //↓↓========nm00137 start=================================== // 月度カウンター初期化 $this->_updateCount['Y_1'] = 0; $this->_updateCount['Y_2'] = 0; $this->_updateCount['D_1'] = 0; $this->_updateCount['D_2'] = 0; //↑↑===========nm00137 end================================== // 作業結果 $result = array(); // 成果UL完了画面データファイル $resultFile = ""; // CSVファイル出力Dir作成 $this->makeResultCsvDir(); //↓↓========nm00137 start=================================== // データチェック場合判定 if ($_POST['input_data'] != 'true') { // データチェックの場合 $this->_dataFrom['is_data_check'] = true; $this->_dataFrom['showdialog'] = 'true'; } //月度タイトル //月度1 $date_time_array = getdate(time()); $year = $date_time_array["year"]; $month = $date_time_array["mon"]; $this->_updateCount['Y_M_1'] = $year . "年" . $month . "月度"; //月度2 $date_time_array = getdate(mktime(0, 0, 0, $month + 1, 1, $year)); $year = $date_time_array["year"]; $month = $date_time_array["mon"]; $this->_updateCount['Y_M_2'] = $year . "年" . $month . "月度"; //↑↑===========nm00137 end================================== // ファイル読込み if (is_file($this->_tmpFilePath) == true) { $lines = file($this->_tmpFilePath); foreach ($lines as $index => $line) { // ログ出力 $this->log->debug($line); // 配列に $values = explode(',', $line); // 1行処理 $d =& $this->actionLine($useActionId, $code, $keys, $values); // 結果を取得 if (empty($d['data']) == false) { // 該当する行(index+1)で登録 $result[$index + 1] =& $d; } } // 成果UL完了画面データファイル作成 $resultFile = $this->makeUploadResultFile($useActionId, $result); } //↓↓========nm00137 start=================================== //データチェックの場合、メール送信不要 if ($this->_dataFrom['is_data_check'] != true) { // 成果UL完了メール送信 NotifyManager::seikaUpload($this->_core, $anken, $this->_updateCount, $this->_acceptDateList, $resultFile, $this->_tmpFilePath); } //↑↑===========nm00137 end================================== // ファイル削除(成果UL結果) if (is_file($resultFile) == true) { @unlink($resultFile); } // ディレクトリ削除 @rmdir($this->_ulResultOutputDir); // テンプレート変数の設定 $this->_dataFrom['list'] =& $result; $this->_dataFrom['anken'] = $anken; // カウンター値をテンプレートに渡す $this->_dataFrom['update_count'] =& $this->_updateCount; // パーミッションを変更 @chmod($this->_tmpFilePath, 0644); //--------------------------------------- // フッターのリンク //--------------------------------------- $tmpl = $m->getExtraLinkTmplPath($ankenId); $this->_dataFrom["extra_link_path"] = $tmpl; //--------------------------------------- // レポートの表示/非表示制御 //--------------------------------------- $this->_dataFrom["disp"] =& $m->getReportDisp($ankenId, $this->_core->getLoginKind()); // ログ出力" 実行終了時間 $this->log->debug("End Time:" . date('Y-m-d H:i:s')); }
/** * 実行 */ protected function perform() { // モデル $m =& $this->_model; // 案件ID $ankenId = $this->_request['aid']; // 案件情報 $anken =& $m->getAnkenData($ankenId); $this->_anken = $anken; // テンプレート変数追加 $this->_dataFrom['anken'] = $anken; // カウンター初期化 $this->_updateCount['sum'] = 0; $this->_updateCount['Y'] = 0; $this->_updateCount['E'] = 0; //-------------------------- // リロード防止対策 //-------------------------- $hashKey = $this->_request['hash']; $execute = $this->_core->getSession("execute{$hashKey}"); if (is_bool($execute) == false || $execute === true) { // エラーメッセージ $this->_dataFrom['reload_error'] = true; // カウンター値をテンプレートに渡す $this->_dataFrom['update_count'] =& $this->_updateCount; return; } $this->_core->setSession("execute{$hashKey}", true); // キャンペーンコード $code = $anken['campaign_code']; // 案件情報の成果段階の値 $enum = new AcceptDankaiEnum(); $accept2Dankai = $enum->getKey('2段階'); $this->_dataFrom["accept_2dankai"] = $accept2Dankai; // 案件情報の単価タイプの値 $enum = new PriceTypeCdEnum(); $priceTeiritsu = $enum->getKey('定率'); $this->_dataFrom["price_teiritsu"] = $priceTeiritsu; // UL項目 $keys = $this->_nomalKeys; $isAccept2Dankai = false; $isPriceTeiritsu = false; if ($anken['accept_dankai'] == $accept2Dankai) { $keys = $this->_2dankaiKeys; $isAccept2Dankai = true; } else { if ($anken['price_type_cd'] == $priceTeiritsu) { $keys = $this->_teiritsuKeys; $isPriceTeiritsu = true; } } // オプションパラメータ一覧取得 $option =& $m->Result_HotenUpload_getOptionParamList($ankenId); $this->_option =& $option; $this->_dataFrom["option"] =& $option; // 任意のIDの後ろに追加 $cidIndex = array_search('client_user_id', $keys); foreach ($option as $k => $v) { $cidIndex++; array_splice($keys, $cidIndex, 0, $k); } $result = array(); // ファイル読込み if (is_file($this->_tmpFilePath) == true) { $lines = file($this->_tmpFilePath); //↓↓===========nm00234 2011/02/11 start================================= // 任意のID重複チェックの対象案件判断 $useSameClientUserIdCheck =& $m->Result_HotenUpload_getUseSameClientUserIdCheckFlg($ankenId); //↑↑===========nm00234 2011/02/11 end=================================== foreach ($lines as $index => $line) { // 空白行は無視 if (strlen(trim($line)) == 0) { continue; } // 文字コード変換 $line = mb_convert_encoding($line, 'utf-8', 'cp932'); // 配列に $values = explode(',', $line); // 1行を処理 //↓↓===========nm00234 2011/02/11 start================================= //$d =& $this->actionLine($code, $isAccept2Dankai, $isPriceTeiritsu, $keys, $values); $d =& $this->actionLine($code, $isAccept2Dankai, $isPriceTeiritsu, $keys, $values, $useSameClientUserIdCheck); //↑↑===========nm00234 2011/02/11 end=================================== // 結果を取得 if (empty($d['data']) == false) { $result[$index + 1] =& $d; } } } // テンプレート変数の設定 $this->_dataFrom['list'] =& $result; // カウンター値をテンプレートに渡す $this->_dataFrom['update_count'] =& $this->_updateCount; // ファイル削除 if (is_file($this->_tmpFilePath) == true) { @unlink($this->_tmpFilePath); } //↓↓===========nm00312 2013/07/29 start=================================== /// ログファイル作成 $logFilePath = $this->makeLogFile($result); // 文書作成 $addMessage .= "該当:" . $this->_updateCount['sum'] . "件\r\n"; $addMessage .= "実施:" . $this->_updateCount['Y'] . "件\r\n"; $addMessage .= "エラー:" . $this->_updateCount['E'] . "件\r\n"; if ($this->_updateCount['sum'] == '0') { $addMessage .= "対象の成果がありません。\r\n"; } // 完了メール送信 NotifyManager::hotenUpload($this->_core, $anken, $logFilePath, $addMessage); //↑↑===========nm00312 2013/07/29 end===================================== }
/** * 実行 */ protected function perform() { // 案件ID $ankenId = $this->_request['aid']; // モデル $m =& $this->_model; $anken =& $m->getAnkenData($ankenId); $this->_anken =& $anken; // キャンペーンコード $code = $anken['campaign_code']; // アクションID対応フラグ $useActionId = false; // 解析 $keys = array('reg_time', 'action_time', 'client_user_id', 'media_id', 'meida_name', 'accept_flg', 'accept_date', 'sid'); // アクションID対応の場合 // 2 => 'アクションID', if ($anken['accept_use_action_id'] == 2) { $useActionId = true; $keys = array('reg_time', 'action_time', 'client_user_id', 'action_id', 'media_id', 'meida_name', 'accept_flg', 'accept_date', 'sid'); } // テンプレートに渡す $this->_dataFrom['use_action_id'] = $useActionId; // カウンター初期化 $this->_updateCount['sum'] = 0; $this->_updateCount['Y'] = 0; $this->_updateCount['D'] = 0; $this->_updateCount['N'] = 0; $this->_updateCount['E'] = 0; // 作業結果 $result = array(); // 成果UL完了画面データファイル $resultFile = ""; // CSVファイル出力Dir作成 $this->makeResultCsvDir(); // ファイル読込み if (is_file($this->_tmpFilePath) == true) { $lines = file($this->_tmpFilePath); foreach ($lines as $index => $line) { // ログ出力 $this->log->debug($line); // 配列に $values = explode(',', $line); // 1行処理 $d =& $this->actionLine($useActionId, $code, $keys, $values); // 結果を取得 if (empty($d['data']) == false) { // 該当する行(index+1)で登録 $result[$index + 1] =& $d; } } // 成果UL完了画面データファイル作成 $resultFile = $this->makeUploadResultFile($useActionId, $result); } // 成果UL完了メール送信 NotifyManager::seikaUpload($this->_core, $anken, $this->_updateCount, $this->_acceptDateList, $resultFile, $this->_tmpFilePath); // ファイル削除(成果UL結果) if (is_file($resultFile) == true) { @unlink($resultFile); } // ディレクトリ削除 @rmdir($this->_ulResultOutputDir); // テンプレート変数の設定 $this->_dataFrom['list'] =& $result; // カウンター値をテンプレートに渡す $this->_dataFrom['update_count'] =& $this->_updateCount; // パーミッションを変更 @chmod($this->_tmpFilePath, 0644); //--------------------------------------- // フッターのリンク //--------------------------------------- $tmpl = $m->getExtraLinkTmplPath($ankenId); $this->_dataFrom["extra_link_path"] = $tmpl; }
/** * 実行 */ protected function perform() { // コア $core =& $this->_core; // モデル $m =& $this->_model; /******************************** * DB更新 * 1.案件IDと提携IDを取得 * 2.DB更新 * 3.セッション変数クリア ********************************/ // 案件ID $ankenId = $this->_request['aid']; // 提携ID $teikeiId = $this->_request['tmid']; // セッションから取得 $name = "new_teikei_{$ankenId}_{$teikeiId}"; $o =& $core->getSession($name); if ($o != null) { // 案件情報を取得します。 $anken =& $m->Anken_TeikeiEdit_getAnkenData($ankenId); $this->_dataFrom['anken'] =& $anken; ////////////////////////////// // DB更新 ////////////////////////////// $m->update($o); // お知らせメール $name = "old_teikei_{$ankenId}_{$teikeiId}"; $old =& $core->getSession($name); NotifyManager::changeTeikeiMediaKikan($this->_core, $anken, $old, $o); ////////////////////////////// // セッション変数クリア ////////////////////////////// $name = "new_teikei_{$ankenId}_{$teikeiId}"; $core->setSession($name, null); $name = "old_teikei_{$ankenId}_{$teikeiId}"; $core->setSession($name, null); ////////////////////////////// // テキスト表示 ////////////////////////////// $m->setFormTextData($o); } else { throw new DataObjectNotFoundException('セッションからデータを取得できません。'); } // モデル内の値をテンプレートに設定 $d =& $m->getFormData(); $this->appendDataFrom($d); // テンプレート変数追加 $this->_dataFrom['action'] = 'edit'; $this->_dataFrom['step'] = 'end'; // 表示 return 'anken/teikei_detail'; }
/** * 実行 */ protected function perform() { // 案件ID $ankenId = $this->_request['aid']; // モデル $m =& $this->_model; $anken =& $m->getAnkenData($ankenId); $this->_anken =& $anken; // キャンペーンコード $code = $anken['campaign_code']; // 解析 $keys = array('reg_time', 'action_time', 'client_user_id', 'media_id', 'meida_name', 'seika_id', 'siteid', 'tid', 'accept_flg', 'accept_date'); // カウンター初期化 $this->_updateCount['sum'] = 0; $this->_updateCount['Y'] = 0; $this->_updateCount['D'] = 0; $this->_updateCount['N'] = 0; $this->_updateCount['E'] = 0; //↓↓========nm00137 start=================================== // 月度カウンター初期化 $this->_updateCount['Y_1'] = 0; $this->_updateCount['Y_2'] = 0; $this->_updateCount['D_1'] = 0; $this->_updateCount['D_2'] = 0; //↑↑===========nm00137 end================================== // 作業結果 $result = array(); // 成果UL完了画面データファイル $resultFile = ""; // CSVファイル出力Dir作成 $this->makeResultCsvDir(); //↓↓========nm00137 start=================================== // データチェック場合判定 if ($_POST['input_data'] != 'true') { // データチェックの場合 $this->_dataFrom['is_data_check'] = true; $this->_dataFrom['showdialog'] = 'true'; } //月度タイトル $date_time_array = getdate(time()); $year = $date_time_array["year"]; $month = $date_time_array["mon"]; $this->_updateCount['Y_M_1'] = $year . "年" . $month . "月度"; //月度2 $date_time_array = getdate(mktime(0, 0, 0, $month + 1, 1, $year)); $year = $date_time_array["year"]; $month = $date_time_array["mon"]; $this->_updateCount['Y_M_2'] = $year . "年" . $month . "月度"; //↑↑===========nm00137 end================================== // ファイル読込み if (is_file($this->_tmpFilePath) == true) { $lines = file($this->_tmpFilePath); foreach ($lines as $index => $line) { // ログ出力 $this->log->debug($line); // 配列に $values = explode(',', $line); // 1行処理 $d =& $this->actionLine($code, $keys, $values); // 結果を取得 if (empty($d['data']) == false) { // 該当する行(index+1)で登録 $result[$index + 1] =& $d; } } // 成果UL完了画面データファイル作成 $resultFile = $this->makeUploadResultFile($result); } //↓↓========nm00137 start=================================== //データチェックの場合、メール送信不要 if ($this->_dataFrom['is_data_check'] != true) { // 成果UL完了メール送信 NotifyManager::seikaUpload($this->_core, $anken, $this->_updateCount, $this->_acceptDateList, $resultFile, $this->_tmpFilePath); } //↑↑===========nm00137 end================================== // ファイル削除(成果UL結果) if (is_file($resultFile) == true) { @unlink($resultFile); } // ディレクトリ削除 @rmdir($this->_ulResultOutputDir); // テンプレート変数の設定 $this->_dataFrom['list'] =& $result; $this->_dataFrom['anken'] = $anken; // カウンター値をテンプレートに渡す $this->_dataFrom['update_count'] =& $this->_updateCount; // パーミッションを変更 @chmod($this->_tmpFilePath, 0644); //--------------------------------------- // フッターのリンク //--------------------------------------- $tmpl = $m->getExtraLinkTmplPath($ankenId); $this->_dataFrom["extra_link_path"] = $tmpl; }
/** * 実行 */ protected function perform() { // 案件ID $ankenId = $this->_request['aid']; // モデル $m =& $this->_model; // キャンペーンコード $d =& $m->Anken_TeikeiIndex_getAnkenData($ankenId); $code = $d['campaign_code']; $ankenName = $d['anken_name']; $this->_dataFrom['anken_name'] = $ankenName; if (isset($this->_request['search']) == true) { // 提携メディアを表示 $data =& $m->Anken_TeikeiIndex_getAnkenTeikeiList($code, $this->_like); // テンプレート変数追加 $this->_dataFrom['show'] = true; $this->_dataFrom['list'] =& $data; $this->_dataFrom['query_string'] = $_SERVER['QUERY_STRING']; } else { if (isset($this->_request['delete']) == true) { $mediaId = $this->_request['mid']; $teikeiMediaId = $this->_request['tmid']; // 削除実行 $m->deleteTeikeiMedia($code, $mediaId, $teikeiMediaId); // メール送信 NotifyManager::deleteTeikeiMedia($this->_core, $ankenId, $mediaId); // 再度表示URL $queryString = $this->_request['query_string']; $url = "teikei_index.php?{$queryString}"; $this->_core->movePage($url); } } }
/** * 実行 */ protected function perform() { // コア $core =& $this->_core; // モデル $m =& $this->_model; /******************************** * DB更新 * 1.案件IDと提携IDを取得 * 2.DB更新 * 3.セッション変数クリア ********************************/ // 案件ID $ankenId = $this->_request['aid']; // 提携ID $teikeiId = $this->_request['tmid']; // セッションから取得 $name = "new_teikei_{$ankenId}_{$teikeiId}"; $o =& $core->getSession($name); if ($o != null) { // テンプレート初期化 $init =& $m->Anken_TeikeiEdit_getInitData(); $this->appendDataFrom($init); // 案件情報を取得します。 $anken =& $m->getAnkenData($ankenId); $this->_dataFrom['anken'] =& $anken; // ID別売上・原価設定 $useOptionPrice = false; if ($anken['price_type_cd'] == "1" && $anken['use_option_price'] == "1") { // カスタム金額項目取得 $this->_dataFrom['price_list'] = $m->getSeikaOptionValue($ankenId); $useOptionPrice = true; } //↓↓===========nm00186 2010/03/04 start=================================== // 追加パラメータ情報を取得 $option =& $m->getOptionInfo($ankenId); $this->_dataFrom['option'] =& $option; //↑↑===========nm00186 2010/03/04 end===================================== //↓↓===========nm00256 2011/08/10 start================================ $useAspPromotionIdFlg = $m->getUseAspPromotionIdFlg($anken); $this->_dataFrom['useAspPromotionIdFlg'] = $useAspPromotionIdFlg; //↑↑===========nm00256 2011/08/10 end================================== //=================================nm00256 2012-01-13 start================================ //追加媒体ID使用フラグ情報を取得 $column = "use_baitai_id_flg"; $useBaitaiIdFlg = $m->Anken_TeikeiEdit_isColumnExistsInTeikeiMedia($anken, $column); $this->_dataFrom['useBaitaiIdFlg'] = $useBaitaiIdFlg; //追加直媒体フラグ情報を取得 $column = "choku_baitai_flg"; $chokuBaitaiFlg = $m->Anken_TeikeiEdit_isColumnExistsInTeikeiMedia($anken, $column); $this->_dataFrom['chokuBaitaiFlg'] = $chokuBaitaiFlg; //追加直媒体URL情報を取得 $column = "choku_baitai_url"; $chokuBaitaiUrl = $m->Anken_TeikeiEdit_isColumnExistsInTeikeiMedia($anken, $column); $this->_dataFrom['chokuBaitaiUrl'] = $chokuBaitaiUrl; //直媒体名情報を取得 $column = "choku_baitai_name"; $chokuBaitaiName = $m->Anken_TeikeiEdit_isColumnExistsInTeikeiMedia($anken, $column); $this->_dataFrom['chokuBaitaiName'] = $chokuBaitaiName; //直媒体種別を取得 $column = "choku_baitai_type"; $chokuBaitaiType = $m->Anken_TeikeiEdit_isColumnExistsInTeikeiMedia($anken, $column); $this->_dataFrom['chokuBaitaiType'] = $chokuBaitaiType; //=================================nm00256 2012-01-13 end================================== //↓↓===========nm00240 2011/05/05 start=================================== // デバイス対応表示 $checkDevice = $m->checkDevice($ankenId); $this->_dataFrom['checkDevice'] = $checkDevice; //↑↑===========nm00240 2011/05/05 end===================================== //---------------------------------------------- // DB更新 //---------------------------------------------- //↓↓===========nm00256 2011/08/10 start=================================== //$m->Anken_TeikeiEdit_update($o, $useOptionPrice); $m->Anken_TeikeiEdit_update($useAspPromotionIdFlg, $o, $useOptionPrice); //↑↑===========nm00256 2011/08/10 end===================================== // お知らせメール $name = "old_teikei_{$ankenId}_{$teikeiId}"; $old =& $core->getSession($name); NotifyManager::changeTeikeiMediaKikan($this->_core, $anken, $old, $o); // ログファイル作成 $this->makeLogFile($old, $o); // ログ出力 $upd_user_id = $core->getLoginLoginId(); $ip = $core->getLoginIp(); $log =& $core->getLogger(); $log->info("anken_teikei_edit_end:{$upd_user_id}:{$ip}"); //---------------------------------------------- // セッション変数クリア //---------------------------------------------- $name = "new_teikei_{$ankenId}_{$teikeiId}"; $core->setSession($name, null); $name = "old_teikei_{$ankenId}_{$teikeiId}"; $core->setSession($name, null); //---------------------------------------------- // テキスト表示 //---------------------------------------------- $m->setFormTextData($o); } else { throw new DataObjectNotFoundException('セッションからデータを取得できません。'); } // モデル内の値をテンプレートに設定 $d =& $m->getFormData(); $this->appendDataFrom($d); //↓↓========nm00217 2010/11/18 start=================================== $this->_dataFrom['affirmAspInfoShow'] = $m->getApiStatus($anken); //↑↑===========nm00217 2010/11/18 end================================== //↓↓========nm00252 2011/07/18 start=================================== $this->_dataFrom['baitaiAspInfoShow'] = $m->getBaitaiTableExistsStatus($anken); //↑↑========nm00252 2011/07/18 end===================================== // テンプレート変数追加 $this->_dataFrom['action'] = 'edit'; $this->_dataFrom['step'] = 'end'; // 表示 return 'anken/teikei_detail'; }
/** * 実行 */ protected function perform() { // 案件ID $ankenId = $this->_request['aid']; // モデル $m =& $this->_model; // 期間 $from = $this->_from; $to = $this->_to; // 基本情報 $anken =& $m->getAnkenData($ankenId); $this->appendDataFrom($anken); // キャンペーンコード $code = $anken['campaign_code']; if ($code === null) { throw new AnkenNotFountException($ankenId); } if (isset($this->_request['update']) == true) { // 更新 // 更新情報を整理 $list =& $m->Result_ClientReportResultSeq_getUpdateList($_POST); // カウンター初期化 $updateCount['sum'] = 0; $updateCount['Y'] = 0; $updateCount['D'] = 0; $updateCount['N'] = 0; $updateCount['E'] = 0; // 更新結果 $result = array(); // 更新処理ループ if (count($list) != 0) { foreach ($list as $index => $value) { // 例外配列初期化 $eList = array(); // 該当数をカウント $updateCount['sum']++; /////////////////////////////// // !error 日付が不正の場合は、対象外 // !error 日付が現在より新しい場合は、対象外 // ステータスがY、Dの場合 /////////////////////////////// if ($value['accept_flg'] == 'Y' || $value['accept_flg'] == 'D') { if (ereg("^([0-9]{4})[\\/\\-]([0-9]{1,2})[\\/\\-]([0-9]{1,2})", trim($value['date']), $regs) !== false && checkdate($regs[2], $regs[3], $regs[1]) == true) { $date = "{$regs['1']}-{$regs['2']}-{$regs['3']}"; $value['date'] = $date; } else { $eList[] = new AcceptDateFormatException(); } } else { $value['date'] = ""; } if (count($eList) == 0) { // 更新 $m->Result_ClientReportResultSeq_update($this->_isExtra, $code, $value['seika_id'], $value['status'], $value['date']); // カウントアップ if ($value['accept_flg'] == 'Y') { $updateCount['Y']++; } elseif ($value['accept_flg'] == 'D') { $updateCount['D']++; } else { $updateCount['N']++; } } else { $updateCount['E']++; } $d['data'] = $value; $d['eListCount'] = count($eList); $d['eList'] = $eList; $result[$index + 1] = $d; } } // 個別承認更新メール送信 NotifyManager::seikaUploadSeq($this->_core, $anken, $result, $updateCount); // ページ番号 $page = $this->_request['pageID']; // テンプレート $this->_dataFrom['list'] =& $result; // カウンター値をテンプレートに渡す $this->_dataFrom['update_count'] =& $updateCount; return 'result/client_report_result_seq_result'; } else { // 表示 // if ($this->_isExtra == false) {$this->_isExtra, // ページャ // 対象成果件数 $count = $m->Result_ClientReportResultSeq_getListDataCount($code, $from, $to); $pager =& $this->_core->getPager($count); // 表示件数範囲を取得 list($pageFrom, $pageTo) = $pager->getOffsetByPageId(); // データ取得 $data =& $m->Result_ClientReportResultSeq_getListData($code, $from, $to, $pageFrom, $pageTo); // 整理します $data =& $m->Result_ClientReportResultSeq_format($data); // テンプレート $this->_dataFrom['list'] =& $data; $this->_dataFrom['pager'] =& $pager->getLinks(); $this->_dataFrom['count'] = $count; } }
/** * 実行 */ protected function perform() { // 案件ID $ankenId = $this->_request['aid']; // モデル $m =& $this->_model; // ステータス $accept_flg = array(3 => '指定なし', 1 => 'Y', 0 => 'D', 2 => 'N'); $this->_dataFrom['accept_flg'] = $accept_flg; // 基本情報 $anken =& $m->getAnkenData($ankenId); $this->appendDataFrom($anken); // キャンペーンコード $code = $anken['campaign_code']; if ($code === null) { throw new AnkenNotFountException($ankenId); } if (empty($_POST['update']) == false) { // 更新 // 更新情報を整理 $list =& $m->Result_ClientReportResultSeq_getUpdateList($_POST); // カウンター初期化 $updateCount['sum'] = 0; $updateCount['Y'] = 0; $updateCount['D'] = 0; $updateCount['N'] = 0; $updateCount['E'] = 0; // 更新結果 $result = array(); // 更新処理ループ if (count($list) != 0) { foreach ($list as $index => $value) { // 例外配列初期化 $eList = array(); // 該当数をカウント $updateCount['sum']++; /////////////////////////////// // !error 日付が不正の場合は、対象外 // !error 日付が現在より新しい場合は、対象外 // ステータスがY、Dの場合 /////////////////////////////// if ($value['accept_flg'] == 'Y' || $value['accept_flg'] == 'D') { if (ereg("^([0-9]{4})[\\/\\-]([0-9]{1,2})[\\/\\-]([0-9]{1,2})", trim($value['date']), $regs) !== false && checkdate($regs[2], $regs[3], $regs[1]) == true) { $date = "{$regs['1']}-{$regs['2']}-{$regs['3']}"; $value['date'] = $date; } else { $eList[] = new AcceptDateFormatException(); } } else { $value['date'] = ""; } /////////////////////////////// // 更新者 /////////////////////////////// if (empty($value['upd_user_id']) == true) { $eList[] = new UpdUserIdNotFountException(); } if (count($eList) == 0) { // 更新 $m->Result_ClientReportResultSeq_update($code, $value['seika_id'], $value['status'], $value['date'], $value['upd_user_id']); // カウントアップ if ($value['accept_flg'] == 'Y') { $updateCount['Y']++; } elseif ($value['accept_flg'] == 'D') { $updateCount['D']++; } else { $updateCount['N']++; } } else { $updateCount['E']++; } $d['data'] = $value; $d['eListCount'] = count($eList); $d['eList'] = $eList; $result[$index + 1] = $d; } } // 個別承認更新メール送信 NotifyManager::seikaUploadSeq($this->_core, $anken, $result, $updateCount); // ページ番号 $page = $this->_request['pageID']; // テンプレート $this->_dataFrom['list'] =& $result; // カウンター値をテンプレートに渡す $this->_dataFrom['update_count'] =& $updateCount; return 'result/client_report_result_seq_result'; } else { if (empty($this->_request['search']) == false) { // 検索 // 条件 $m->setWhereLike($this->_like); // 条件指定されていない場合はエラー if ($m->hasWhere() == false) { $this->_dataFrom['count'] = 0; $this->_dataFrom["error"] = array("検索条件が指定されていません"); return; } // ページャ // 対象成果件数 $count = $m->Result_ClientReportResultSeq_getListDataCount($code); $pager =& $this->_core->getPager($count); // 表示件数範囲を取得 list($pageFrom, $pageTo) = $pager->getOffsetByPageId(); // データ取得 $data =& $m->Result_ClientReportResultSeq_getListData($code, $pageFrom, $pageTo); // 整理します $data =& $m->Result_ClientReportResultSeq_format($data); $this->_dataFrom['show'] = true; // テンプレート $this->_dataFrom['list'] =& $data; $this->_dataFrom['pager'] =& $pager->getLinks(); $this->_dataFrom['count'] = $count; $this->_dataFrom['url_quert'] = $_SERVER['QUERY_STRING']; } } /////////////////////////////////////////////// // 拡張リンク用のカスタム処理 /////////////////////////////////////////////// $tmpl = $m->Result_ClientReportResultSeq_getExtraLinkTmplPath($ankenId); $this->_dataFrom["extra_link_path"] = $tmpl; //--------------------------------------- // レポートの表示/非表示制御 //--------------------------------------- $this->_dataFrom["disp"] =& $m->getReportDisp($ankenId, $this->_core->getLoginKind()); }
/** * 実行 */ protected function perform() { // 案件ID $ankenId = $this->_request['aid']; // モデル $m =& $this->_model; // キャンペーンコード $d =& $m->Anken_TeikeiIndex_getAnkenData($ankenId); $code = $d['campaign_code']; $ankenName = $d['anken_name']; $this->_dataFrom['anken_name'] = $ankenName; $this->_dataFrom['media_special_memo'] = $d['media_special_memo']; $this->_dataFrom['media_special_memo_updated'] = $this->_request['media_special_memo_updated']; $this->_dataFrom['campaign_from'] = $d['campaign_from']; $this->_dataFrom['campaign_to'] = $d['campaign_to']; if (isset($this->_request['search']) == true) { // 提携メディアを表示 $data =& $m->Anken_TeikeiIndex_getAnkenTeikeiList($code, $this->_like); //////////////////////////////// // 拡張仕様 // ASPID //////////////////////////////// $man = new ApsIdManager_52(); foreach ($data as $k => $v) { $mediaId = intval($v['media_id']); $aspId = $man->getAspId($mediaId); $data[$k]['asp_id'] = $aspId; } // テンプレート変数追加 $this->_dataFrom['show'] = true; $this->_dataFrom['list'] =& $data; $this->_dataFrom['query_string'] = $_SERVER['QUERY_STRING']; } else { if (isset($this->_request['delete']) == true) { $mediaId = $this->_request['mid']; $teikeiMediaId = $this->_request['tmid']; // 削除実行 $m->deleteTeikeiMedia($code, $mediaId, $teikeiMediaId); // メール送信 NotifyManager::deleteTeikeiMedia($this->_core, $ankenId, $mediaId); // 再度表示URL $queryString = $this->_request['query_string']; $url = "teikei_index.php?{$queryString}"; $this->_core->movePage($url); } else { if (isset($this->_request['update_media_special_memo']) == true) { $memo = trim($this->_request['media_special_memo']); $m->updateMediaSpecialMemo($ankenId, $memo); $queryString = $this->_request['query_string']; $url = "teikei_index.php?{$queryString}&media_special_memo_updated=true&aid={$ankenId}"; $this->_core->movePage($url); } } } }