<?php require_once '../../conf/config.php'; require_once 'AlladinCore.php'; $core = new AlladinCore(); $smarty =& $core->getSmarty(); // モデル取得 $m =& $core->getModel('client/edit_model'); // フォーム初期化 $m->initFormData(); if (isset($_GET['back'])) { // 確認画面からの戻り $o =& $core->getSession('new_client'); if ($o != null) { // 確認画面表示 $m->setFormInputData($o); } } 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);
// 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(); } } else { // ログアウト $core->setSessionLogout(); } } // 出力 $smarty->display($core->getTmplName());
<?php 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'));
// nm00142 2009/06/10 kyo メディア事業:新規サイト構築 // ////////////////////////////////////////////////////////////////////////////////////// require_once '../../conf/config.php'; require_once 'AlladinCore.php'; $core = new AlladinCore(); $smarty =& $core->getSmarty(); // モデル取得 $m =& $core->getModel('system/site_edit_model'); // フォーム初期化 $init = $m->initFormData(); $smarty->assign($init); // 確認画面表示 if (isset($_GET['back'])) { // 確認画面からの戻り $o =& $core->getSession('new_site'); if ($o != null) { // 確認画面表示 $m->setFormInputData($o); } // 登録確認 } else { if (isset($_POST['submit'])) { // 入力確認 $o =& $m->getObject($_POST); // check $check =& $o->getChecker(); $check->checkAll(); //入力OKの場合 if ($check->getErrorCount() == 0) { // 案件IDチェック
$m =& $core->getModel('media/edit_model'); // フォーム初期化 $m->initFormData(); if (isset($_GET['mid']) == true) { /******************************** * 確認画面を表示 * 1.メディアIDを取得 * 2.変更前後のDataObjectをそれぞれ取得 * 3.差分を取得 * 4.表示 ********************************/ // メディアIDを取得 $mediaId = intval(trim($_GET['mid'])); // セッションから変更前データ取得 $name = "old_media_{$mediaId}"; $old =& $core->getSession($name); // セッションから変更後データ取得 $name = "new_media_{$mediaId}"; $new =& $core->getSession($name); if ($old == null || $new == null) { /////////////////////////////////////// // セッションから取得できません。 /////////////////////////////////////// $e = new DataObjectNotFoundException('セッションからデータを取得できません。'); $e->display($smarty); } /////////////////////////// // 変更の差分を取得 /////////////////////////// $merged =& $m->createMergedObject($old, $new); if ($merged != null) {