<?php ////////////////////////////////////////////////////////////////////////////////////// // 更新履歴 // 要件ID 更新日 更新者 概要 // nm00237 2011/05/19 kyo メディア一括登録 ////////////////////////////////////////////////////////////////////////////////////// require_once '../../conf/config.php'; require_once 'AlladinCore_v3.php'; $core = new AlladinCore(); $smarty =& $core->getSmarty(); $smarty->display($core->getTmplName());
$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); } } } // テンプレート設定 $smarty->assign('form_action_url', 'site_new.php'); $smarty->assign('action', 'new'); $smarty->assign('step', 'input'); $smarty->assign($m->getFormData()); $smarty->display($core->getTmplName('system/site_detail'));
$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); } } } // テンプレート設定 $smarty->assign('form_action_url', 'new.php'); $smarty->assign('action', 'new'); $smarty->assign('step', 'input'); $smarty->assign($m->getFormData()); $smarty->display($core->getTmplName('client/detail'));
require_once '../../conf/config.php'; require_once 'AlladinCore.php'; $core = new AlladinCore(); $smarty =& $core->getSmarty(); // モデル取得 $m =& $core->getModel('media/edit_model'); // セッションから取得 $o =& $core->getSession('new_media'); // フォーム初期化 $m->initFormData(); try { if ($o != null) { // DB保存 $m->insert($o); $m->setFormTextData($o); $core->setSession('new_media', null); } else { // セッションから取得できません。 $e = new DataObjectNotFoundException('セッションからデータを取得できません。'); $e->display($smarty); } } catch (AlladinException $e) { $e->display($smarty); } // テンプレート設定 $smarty->assign('action', 'new'); $smarty->assign('step', 'end'); $smarty->assign($m->getFormData()); $smarty->display($core->getTmplName('media/detail'));