Пример #1
0
 /**
  * "ASP:API"による媒体リスト取得/格納処理実行
  * GetAutoBaitaiListByApiクラスを利用して、ASPから媒体リストを取得
  */
 public static function executeForAddAutoBaitaiList(&$core, $selectDay = null)
 {
     require_once ABS_ASP_LIB . "baitai_info/AddAutoBaitaiList.php";
     $baitaiObj = new AddAutoBaitaiList($core);
     $baitaiObj->addBaitaiList($selectDay);
 }
Пример #2
0
    // 照合処理実行
    //ListAutoBaitaiManager::executeForAddAutoBaitaiList($core);
    //日付取得
    $request_date = $_SERVER['argv'][1];
    parse_str($request_date, $parse);
    $key = key($parse);
    $select_date = current($parse);
    if (strlen($request_date) != 0 && $key == "date") {
        if (preg_match("/\\A([0-9]{4})[\\/]([0-9]{1,2})[\\/]([0-9]{1,2})\\z/", $select_date, $regs) !== false && checkdate($regs[2], $regs[3], $regs[1]) == true) {
            $select_date = "{$regs['1']}-{$regs['2']}-{$regs['3']}";
            ListAutoBaitaiManager::executeForAddAutoBaitaiList($core, $select_date);
        } else {
            throw new Exception("指定日付フォーマット不正");
        }
    } else {
        ListAutoBaitaiManager::executeForAddAutoBaitaiList($core);
    }
    //================nm00252 2012/02/24 End===============
} catch (Exception $e) {
    // エラーメッセージをメールで送信
    // メール件名
    $subject = "媒体情報反映処理結果:エラー";
    // メール文面を設定
    $message = __FUNCTION__ . "\n";
    //================nm00252 2012/02/24 Start==============
    //$message .= $e->toText();
    $message .= $e->getMessage();
    //================nm00252 2012/02/24 End===============
    $affrimObj = new AddAutoBaitaiList($core);
    $affrimObj->sendMailTo($message, $subject);
}