} else { if (isset($_POST['submit'])) { // 入力確認 $o =& $m->getObject($_POST); // check $check =& $o->getChecker(); $check->checkAll(); if ($check->getErrorCount() == 0) { // ログインIDチェック $loginId = $o->getField('login_id')->getValue(); $count = $m->getCountLoginId($loginId); if ($count == 0) { // セッション保存 $core->setSession('new_client', $o); // 確認ページへ移動 $core->movePage('new_conf.php'); } else { // エラー表示 $smarty->assign('error_title', 'ログインID'); $smarty->assign('error', '入力されたログインIDは既に使われています。'); $m->setFormInputData($o); } } else { // エラー表示 $smarty->assign('error_title', '入力が間違っています。'); $smarty->assign('error', $check->getErrorMessage()); $m->setFormInputData($o); } } } // テンプレート設定
// 入力確認 $o =& $m->getObject($_POST); // check $check =& $o->getChecker(); $check->checkAll(); //入力OKの場合 if ($check->getErrorCount() == 0) { // 案件IDチェック $ankenId = $o->getField('anken_id')->getValue(); $count = $m->getCountAnkenId($ankenId); //案件ID重複しないの場合 if ($count == 0) { // セッション保存 $core->setSession('new_site', $o); // 確認ページへ移動 $core->movePage('site_new_conf.php'); //案件ID重複の場合、エラー表示 } else { // エラー表示 $smarty->assign('error_title', '案件ID'); $smarty->assign('error', '入力された案件IDは既にサイトを設定されています。'); $m->setFormInputData($o); } //入力NGの場合、エラーを表示する } else { // エラー表示 $smarty->assign('error_title', '入力が間違っています。'); $smarty->assign('error', $check->getErrorMessage()); $m->setFormInputData($o); } }
// モデル取得 $m =& $core->getModel(); // id pass 判定 $loginId = $_POST['id']; $loginPass = $_POST['password']; $m->Login_login($loginId, $loginPass, $ip); if ($m->IsLoginOk() == true) { // logに出力 $name = $core->getLoginName(); $kind = $core->getLoginKind(); $ip = $core->getLoginIp(); $log =& $core->getLogger(); $log->info("login ({$kind}){$name}:{$ip}"); // ページ遷移 if ($kind == 'listing') { $core->movePage(FULLURL_ADMIN . 'listing/index.php'); } else { $core->movePage(FULLURL_ADMIN . 'index.php'); } } else { // ログイン失敗 $smarty->assign($m->getFormData()); } } else { // システムユーザーログイン画面からきた場合 if ($core->getSession("system_user_flg") == 1) { // ログアウトする場合 if (isset($_GET['logout']) == true) { // ログアウト $core->setSessionLogout(); }
// キャンペーンコード $code = $data['campaign_code']; // 提携メディアID $teikeiMediaId = $m->Send_getTeikeiMediaId($code, $ankenId, $mediaId); $send = $_POST['send']; $url = $_POST['url']; $formActionUrl = $_SERVER['SCRIPT_NAME'] . "?aid={$ankenId}&mid={$mediaId}"; // 確認 if (isset($send) && isset($url)) { // DB更新 $usr = $core->getLoginLoginId(); // check $m->Send_checkMediaAnkenTable($code, $teikeiMediaId); $m->Send_MediaTest_update($code, $teikeiMediaId, $url, $usr); // 再読み込み $core->movePage($formActionUrl); } $enum = new TeikeiMediaStatusEnum(); // 次へ進む if (isset($_POST['next']) == true) { $usr = $core->getLoginLoginId(); // check $m->Send_checkMediaAnkenTable($code, $teikeiMediaId); // 入稿ステータスを進める // メディアテスト待ち から 掲載中 $key = $enum->getKey('掲載中'); $m->Send_updateNyukoStatus($code, $teikeiMediaId, $usr, $key); // 再読み込み $core->movePage($formActionUrl); } // データ取得