示例#1
0
 /**
  * 実行
  */
 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;
 }
示例#2
0
 /**
  * 実行
  */
 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'));
 }
示例#3
0
 /**
  * 実行
  */
 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;
 }