/** * Page のプロセス. * * @return void */ function process() { // ログインチェック SC_Utils::sfIsSuccess(new SC_Session()); $mode = isset($_GET['mode']) ? $_GET['mode'] : ''; switch ($mode) { case 'detail': $objForm = $this->initParam(); if ($objForm->checkError()) { SC_Utils::sfDispError(''); } $this->arrLogDetail = $this->getLogDetail($objForm->getValue('log_id')); if (count($this->arrLogDetail) == 0) { SC_Utils::sfDispError(''); } $this->tpl_mainpage = 'ownersstore/log_detail.tpl'; break; default: break; } $this->arrInstallLogs = $this->getLogs(); // ページ出力 $objView = new SC_AdminView(); $objView->assignObj($this); $objView->display(MAIN_FRAME); }
/** * Page のプロセス. * * @return void */ function process() { // ログインチェック SC_Utils::sfIsSuccess(new SC_Session()); // トランザクショントークンの取得 $this->transactionid = $this->getToken(); switch ($this->getMode()) { case 'new': $this->execNewMode(); break; case 'edit': $this->execEditMode(); break; case 'parent_reload': $this->execParentReloadMode(); // defaultアクションも実行させるためbreakしない // defaultアクションも実行させるためbreakしない default: $this->execDefaultMode(); break; } $objView = new SC_AdminView(); $objView->assignobj($this); $objView->display('system/input.tpl'); }
/** * Page のプロセス. * * @return void */ function process() { $conn = new SC_DbConn(); // ログインチェック SC_Utils::sfIsSuccess(new SC_Session()); // ランキングの変更 if ($_GET['move'] == 'up') { // 正当な数値であった場合 if (SC_Utils::sfIsInt($_GET['id'])) { $this->lfRunkUp($conn, $_GET['id']); // エラー処理 } else { GC_Utils::gfPrintLog("error id=" . $_GET['id']); } } else { if ($_GET['move'] == 'down') { if (SC_Utils::sfIsInt($_GET['id'])) { $this->lfRunkDown($conn, $_GET['id']); // エラー処理 } else { GC_Utils::gfPrintLog("error id=" . $_GET['id']); } } } // ページの表示 $this->sendRedirect($this->getLocation(URL_SYSTEM_TOP)); }
/** * Page のプロセス. * * @return void */ function process() { // ログインチェック SC_Utils::sfIsSuccess(new SC_Session()); $objView = new SC_AdminView(); $objView->assignObj($this); $objView->display(MAIN_FRAME); }
public function testSfIsSuccess_認証成功でリファラが不正な場合_falseが返る() { $objSess = new SC_Session_Mock(); $objSess->is_success = SUCCESS; $_SERVER['HTTP_REFERER'] = 'http://test.jp.local/hoge/fuga'; $this->expected = FALSE; $this->actual = SC_Utils::sfIsSuccess($objSess, FALSE); $this->verify('認証可否'); }
/** * Page のプロセス. * * @return void */ function process() { // ログインチェック $objSession = new SC_Session(); SC_Utils::sfIsSuccess($objSession); $this->now_template = $this->lfGetNowTemplate(); // uniqidをテンプレートへ埋め込み $this->uniqid = $objSession->getUniqId(); switch ($this->lfGetMode()) { // ダウンロードボタン押下時の処理 case 'download': break; // アップロードボタン押下時の処理 // アップロードボタン押下時の処理 case 'upload': // 画面遷移の正当性チェック if (!SC_Utils::sfIsValidTransition($objSession)) { SC_Utils::sfDispError(''); } // フォームパラメータ初期化 $objForm = $this->lfInitUpload(); // エラーチェック if ($arrErr = $this->lfValidateUpload($objForm)) { $this->arrErr = $arrErr; $this->arrForm = $objForm->getFormParamList(); break; } // アップロードファイル初期化 $objUpFile = $this->lfInitUploadFile($objForm); // 一時ファイルへ保存 $errMsg = $objUpFile->makeTempFile('template_file', false); // 書き込みエラーチェック if (isset($errMsg)) { $this->arrErr['template_file'] = $errMsg; $this->arrForm = $objForm->getFormParamList(); break; } $this->lfAddTemplates($objForm, $objUpFile); $this->tpl_onload = "alert('テンプレートファイルをアップロードしました。');"; break; // 初回表示 // 初回表示 default: break; } // 画面の表示 $objView = new SC_AdminView(); $objView->assignobj($this); $objView->display(MAIN_FRAME); }
/** * Page のプロセス. * * @return void */ function process() { // ログインチェック SC_Utils::sfIsSuccess(new SC_Session()); // トランザクションIDの取得 $this->transactionid = $this->getToken(); // $_POST['mode']によってアクション振り分け switch ($this->getMode()) { // 入力内容をDBへ登録する case 'register': $this->execRegisterMode(); break; // 初回表示 // 初回表示 default: $this->execDefaultMode(); } // ページ出力 $objView = new SC_AdminView(); $objView->assignObj($this); $objView->display(MAIN_FRAME); }
* GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /** * プラグイン設定をロードする。 * GETのクエリにplugin_idを渡す。 * * 管理画面から呼び出すことを想定しているので、 * 認証は外さないこと */ require_once 'require.php'; // 認証可否の判定 SC_Utils::sfIsSuccess(new SC_Session()); $plugin_id = isset($_GET['plugin_id']) ? $_GET['plugin_id'] : null; if (!empty($plugin_id) && is_numeric($plugin_id)) { GC_Utils::gfPrintLog('loading plugin ====> plugin_id = ' . $plugin_id); $plugin = SC_Plugin_Util_Ex::getPluginByPluginId($plugin_id); if (isset($plugin['plugin_code'])) { $config_path = PLUGIN_UPLOAD_REALDIR . $plugin['plugin_code'] . '/config.php'; if (file_exists($config_path)) { require_once $config_path; exit; } else { die("プラグインの取得に失敗しました: {$config_path}"); } } else { die("プラグインが存在しません: plugin_id => {$plugin_id}"); }
/** * Page のプロセス. * * @return void */ function process() { // 認証可否の判定 $objSession = new SC_Session(); SC_Utils::sfIsSuccess($objSession); // uniqidをテンプレートへ埋め込み $this->uniqid = $objSession->getUniqId(); $objView = new SC_AdminView(); switch ($this->lfGetMode()) { // 登録ボタン押下時 case 'register': // 画面遷移の正当性チェック if (!SC_Utils::sfIsValidTransition($objSession)) { sfDispError(''); } // パラメータ検証 $objForm = $this->lfInitRegister(); if ($objForm->checkError()) { SC_Utils_Ex::sfDispError(''); } $template_code = $objForm->getValue('template_code'); $this->tpl_select = $template_code; if ($template_code == "") { $template_code = "default"; } // DBへ使用するテンプレートを登録 $this->lfRegisterTemplate($template_code); // XXX コンパイルファイルのクリア処理を行う $objView->_smarty->clear_compiled_tpl(); // common.cssの内容を更新 $this->lfChangeCommonCss($template_code); // テンプレートのコピー $this->lfCopyTemplate($template_code); // ブロック位置を更新 $this->lfChangeBloc($template_code); // 完了メッセージ $this->tpl_onload = "alert('登録が完了しました。');"; break; // 削除ボタン押下時 // 削除ボタン押下時 case 'delete': // 画面遷移の正当性チェック if (!SC_Utils::sfIsValidTransition($objSession)) { SC_Utils::sfDispError(''); } // パラメータ検証 $objForm = $this->lfInitDelete(); if ($objForm->checkError()) { SC_Utils::sfDispError(''); } //現在使用中のテンプレートとデフォルトのテンプレートは削除できないようにする $template_code = $objForm->getValue('template_code_temp'); if ($template_code == TEMPLATE_NAME || $template_code == DEFAULT_TEMPLATE_NAME) { $this->tpl_onload = "alert('選択中のテンプレートは削除出来ません');"; break; } $this->lfDeleteTemplate($template_code); break; // downloadボタン押下時 // downloadボタン押下時 case 'download': // 画面遷移の正当性チェック if (!SC_Utils::sfIsValidTransition($objSession)) { SC_Utils::sfDispError(''); } // パラメータ検証 $objForm = $this->lfInitDownload(); $template_code = $objForm->getValue('template_code_temp'); // ユーザデータの下のファイルも保存する。 $from_dir = USER_TEMPLATE_PATH . $template_code . "/"; $to_dir = SMARTY_TEMPLATES_DIR . $template_code . "/_packages/"; SC_Utils::sfMakeDir($to_dir); SC_Utils::sfCopyDir($from_dir, $to_dir); SC_Helper_FileManager::downloadArchiveFiles(SMARTY_TEMPLATES_DIR . $template_code); break; // プレビューボタン押下時 // プレビューボタン押下時 case 'preview': break; default: break; } // defaultパラメータのセット $this->templates = $this->lfGetAllTemplates(); $this->now_template = TEMPLATE_NAME; // 画面の表示 $objView->assignobj($this); $objView->display(MAIN_FRAME); }