function lfGetTrackbackData($trackback_id, &$objQuery) { $select = "tra.trackback_id, tra.product_id, tra.blog_name, tra.title, tra.excerpt, "; $select .= "tra.url, tra.status, tra.create_date, tra.update_date, pro.name "; $from = "dtb_trackback AS tra LEFT JOIN dtb_products AS pro ON tra.product_id = pro.product_id "; $where = "tra.del_flg = 0 AND pro.del_flg = 0 AND tra.trackback_id = ? "; $arrTrackback = $objQuery->select($select, $from, $where, array($trackback_id)); if (!empty($arrTrackback)) { $this->arrTrackback = $arrTrackback[0]; } else { sfDispError(""); } return $this->arrTrackback; }
/** * 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); }