[15680] | 1 | <?php |
---|
| 2 | /* |
---|
[16582] | 3 | * This file is part of EC-CUBE |
---|
| 4 | * |
---|
[18701] | 5 | * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved. |
---|
[15680] | 6 | * |
---|
| 7 | * http://www.lockon.co.jp/ |
---|
[16582] | 8 | * |
---|
| 9 | * This program is free software; you can redistribute it and/or |
---|
| 10 | * modify it under the terms of the GNU General Public License |
---|
| 11 | * as published by the Free Software Foundation; either version 2 |
---|
| 12 | * of the License, or (at your option) any later version. |
---|
| 13 | * |
---|
| 14 | * This program is distributed in the hope that it will be useful, |
---|
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 17 | * GNU General Public License for more details. |
---|
| 18 | * |
---|
| 19 | * You should have received a copy of the GNU General Public License |
---|
| 20 | * along with this program; if not, write to the Free Software |
---|
| 21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
[15680] | 22 | */ |
---|
| 23 | |
---|
| 24 | // {{{ requires |
---|
[19805] | 25 | require_once(CLASS_REALDIR . "pages/admin/LC_Page_Admin.php"); |
---|
[15680] | 26 | |
---|
| 27 | /** |
---|
| 28 | * デザイン管理 のページクラス. |
---|
| 29 | * |
---|
[19663] | 30 | * ターゲットID 0:未使用 1:レフトナビ 2:ライトナビ 3:イン画面上部 4:メイン画面下部 5:画面上部 6:画面下部 7:ヘッダより上 8:フッタより下 9:HEADタグ内 10:ヘッダ内部 |
---|
[15680] | 31 | * @package Page |
---|
| 32 | * @author LOCKON CO.,LTD. |
---|
| 33 | * @version $Id$ |
---|
| 34 | */ |
---|
[19661] | 35 | class LC_Page_Admin_Design extends LC_Page_Admin { |
---|
[15680] | 36 | |
---|
[18212] | 37 | // }}} |
---|
| 38 | // {{{ functions |
---|
[15680] | 39 | |
---|
[18212] | 40 | /** |
---|
| 41 | * Page を初期化する. |
---|
| 42 | * |
---|
| 43 | * @return void |
---|
| 44 | */ |
---|
| 45 | function init() { |
---|
| 46 | parent::init(); |
---|
| 47 | $this->tpl_mainpage = 'design/index.tpl'; |
---|
| 48 | $this->tpl_subnavi = 'design/subnavi.tpl'; |
---|
| 49 | $this->tpl_subno = "layout"; |
---|
| 50 | $this->tpl_mainno = "design"; |
---|
[19719] | 51 | $this->tpl_subtitle = 'レイアウト設定'; |
---|
[19713] | 52 | $masterData = new SC_DB_MasterData_Ex(); |
---|
| 53 | $this->arrTarget = $masterData->getMasterData("mtb_target"); |
---|
[18212] | 54 | } |
---|
[15680] | 55 | |
---|
[18212] | 56 | /** |
---|
| 57 | * Page のプロセス. |
---|
| 58 | * |
---|
| 59 | * @return void |
---|
| 60 | */ |
---|
| 61 | function process() { |
---|
[19661] | 62 | $this->action(); |
---|
| 63 | $this->sendResponse(); |
---|
| 64 | } |
---|
[15680] | 65 | |
---|
[19661] | 66 | /** |
---|
| 67 | * Page のアクション. |
---|
| 68 | * |
---|
[19713] | 69 | * TODO パラメータの数値チェック |
---|
| 70 | * |
---|
[19661] | 71 | * @return void |
---|
| 72 | */ |
---|
| 73 | function action() { |
---|
[18212] | 74 | $objLayout = new SC_Helper_PageLayout_Ex(); |
---|
[19713] | 75 | $objQuery =& SC_Query::getSingletonInstance(); |
---|
[15680] | 76 | |
---|
[18212] | 77 | // 認証可否の判定 |
---|
| 78 | $objSess = new SC_Session(); |
---|
| 79 | SC_Utils_Ex::sfIsSuccess($objSess); |
---|
[15706] | 80 | |
---|
[18212] | 81 | // ページIDを取得 |
---|
[19713] | 82 | if (isset($_REQUEST['page_id']) && is_numeric($_REQUEST['page_id'])) { |
---|
| 83 | $page_id = $_REQUEST['page_id']; |
---|
| 84 | } else { |
---|
[19879] | 85 | $page_id = 1; // FIXME $_REQUEST['page_id'] を受け取れない不具合時に不正処理が行なわれる原因となった |
---|
[18212] | 86 | } |
---|
[19713] | 87 | // 端末種別IDを取得 |
---|
| 88 | if (isset($_REQUEST['device_type_id']) |
---|
| 89 | && is_numeric($_REQUEST['device_type_id'])) { |
---|
| 90 | $device_type_id = $_REQUEST['device_type_id']; |
---|
| 91 | } else { |
---|
| 92 | $device_type_id = DEVICE_TYPE_PC; |
---|
| 93 | } |
---|
[15680] | 94 | |
---|
[18212] | 95 | // 編集可能ページを取得 |
---|
[19713] | 96 | $this->arrEditPage = $objLayout->lfGetPageData("page_id <> 0 AND device_type_id = ?", array($device_type_id)); |
---|
[15680] | 97 | |
---|
[19713] | 98 | // レイアウト情報を取得 |
---|
| 99 | $arrBlocPos = $objLayout->lfGetNaviData($page_id, $device_type_id); |
---|
[15680] | 100 | |
---|
[19713] | 101 | // データの存在チェックを行う |
---|
| 102 | $arrPageData = $objLayout->lfGetPageData("page_id = ? AND device_type_id = ?", array($page_id, $device_type_id)); |
---|
[15680] | 103 | |
---|
[18212] | 104 | if (count($arrPageData) <= 0) { |
---|
[19713] | 105 | $this->exists_page = 0; |
---|
[18212] | 106 | }else{ |
---|
[19713] | 107 | $this->exists_page = 1; |
---|
[18212] | 108 | } |
---|
[15680] | 109 | |
---|
[18212] | 110 | // メッセージ表示 |
---|
| 111 | if (isset($_GET['msg']) && $_GET['msg'] == "on") { |
---|
| 112 | $this->complate_msg="alert('登録が完了しました。');"; |
---|
| 113 | } |
---|
[15680] | 114 | |
---|
[18212] | 115 | // ブロックを取得 |
---|
[19713] | 116 | $arrBloc = $objQuery->select("*", "dtb_bloc", "device_type_id = ?", array($device_type_id)); |
---|
[15680] | 117 | |
---|
[20041] | 118 | switch ($this->getMode()) { |
---|
[18212] | 119 | // 新規ブロック作成 |
---|
[19713] | 120 | case 'new_bloc': |
---|
[19832] | 121 | SC_Response_Ex::sendRedirect('bloc.php', array("device_type_id" => $device_type_id)); |
---|
[18212] | 122 | exit; |
---|
[19713] | 123 | break; |
---|
[16935] | 124 | |
---|
[18212] | 125 | // 新規ページ作成 |
---|
[19713] | 126 | case 'new_page': |
---|
[19832] | 127 | SC_Response_Ex::sendRedirect('main_edit.php', array("device_type_id" => $device_type_id)); |
---|
[18212] | 128 | exit; |
---|
[19713] | 129 | break; |
---|
[15680] | 130 | |
---|
[19713] | 131 | case 'confirm': |
---|
| 132 | case 'preview': |
---|
[20044] | 133 | //TODO 要リファクタリング(MODE if利用) |
---|
[18212] | 134 | $page_id = $_POST['page_id']; |
---|
[20041] | 135 | if ($this->getMode() == 'preview') { |
---|
[18212] | 136 | $page_id = '0'; |
---|
| 137 | } |
---|
[15680] | 138 | |
---|
[18212] | 139 | // 更新用にデータを整える |
---|
| 140 | $arrUpdBlocData = array(); |
---|
[15680] | 141 | |
---|
[19713] | 142 | // delete実行 |
---|
| 143 | $arrRet = $objQuery->delete("dtb_blocposition", |
---|
| 144 | "page_id = ? AND device_type_id = ?", |
---|
| 145 | array($page_id, $device_type_id)); |
---|
[15680] | 146 | |
---|
[19713] | 147 | $arrTargetFlip = array_flip($this->arrTarget); |
---|
| 148 | |
---|
[18212] | 149 | // POSTのデータを使いやすいように修正 |
---|
[19713] | 150 | for ($upd_cnt = 1; $upd_cnt <= $_POST['bloc_cnt']; $upd_cnt++) { |
---|
[18212] | 151 | if (!isset($_POST['id_'.$upd_cnt])) { |
---|
| 152 | break; |
---|
| 153 | } |
---|
[15680] | 154 | |
---|
[19713] | 155 | // ブロック名称 |
---|
| 156 | $arrUpdBlocData[$upd_cnt]['name'] = $_POST['name_'.$upd_cnt]; |
---|
| 157 | // ブロックID |
---|
| 158 | $arrUpdBlocData[$upd_cnt]['id'] = $_POST['id_'.$upd_cnt]; |
---|
| 159 | // ターゲットID |
---|
| 160 | $arrUpdBlocData[$upd_cnt]['target_id'] = $arrTargetFlip[$_POST['target_id_'.$upd_cnt]]; |
---|
| 161 | // TOP座標 |
---|
| 162 | $arrUpdBlocData[$upd_cnt]['top'] = $_POST['top_'.$upd_cnt]; |
---|
| 163 | // 全ページ適用か |
---|
| 164 | $arrUpdBlocData[$upd_cnt]['anywhere'] = $_POST['anywhere_'.$upd_cnt]; |
---|
| 165 | // 更新URL |
---|
| 166 | $arrUpdBlocData[$upd_cnt]['update_url'] = $_SERVER['HTTP_REFERER']; |
---|
[18212] | 167 | } |
---|
[16935] | 168 | |
---|
[15680] | 169 | |
---|
[18212] | 170 | // ブロックの順序を取得し、更新を行う |
---|
[19713] | 171 | foreach ($arrUpdBlocData as $key => $val) { |
---|
[18216] | 172 | if ($arrUpdBlocData[$key]['target_id'] == TARGET_ID_UNUSED) { |
---|
| 173 | continue; |
---|
| 174 | } |
---|
| 175 | |
---|
[18212] | 176 | // ブロックの順序を取得 |
---|
[19713] | 177 | $arrUpdBlocData[$key]['bloc_row'] = $this->lfGetRowID($arrUpdBlocData, $val); |
---|
[15680] | 178 | |
---|
[18212] | 179 | // insertデータ生成 |
---|
[19713] | 180 | $arrInsData = array('device_type_id' => $device_type_id, |
---|
| 181 | 'page_id' => $page_id, |
---|
| 182 | 'target_id' => $arrUpdBlocData[$key]['target_id'], |
---|
| 183 | 'bloc_id' => $arrUpdBlocData[$key]['id'], |
---|
| 184 | 'bloc_row' => $arrUpdBlocData[$key]['bloc_row'], |
---|
| 185 | 'anywhere' => $arrUpdBlocData[$key]['anywhere'] ? 1 : 0); |
---|
| 186 | $count = $objQuery->getOne("SELECT COUNT(*) FROM dtb_blocposition WHERE anywhere = 1 AND bloc_id = ? AND device_type_id = ?", |
---|
| 187 | array($arrUpdBlocData[$key]['id'], $device_type_id)); |
---|
[18201] | 188 | |
---|
[19713] | 189 | if ($arrUpdBlocData[$key]['anywhere'] == 1) { |
---|
| 190 | $count = $objQuery->getOne("SELECT COUNT(*) FROM dtb_blocposition WHERE anywhere = 1 AND bloc_id = ? AND device_type_id = ?", |
---|
| 191 | array($arrUpdBlocData[$key]['id'], $device_type_id)); |
---|
| 192 | if ($count != 0) { |
---|
[18212] | 193 | continue; |
---|
| 194 | } |
---|
[19713] | 195 | } else { |
---|
| 196 | if ($count > 0) { |
---|
| 197 | $objQuery->query("DELETE FROM dtb_blocposition WHERE anywhere = 1 AND bloc_id = ? AND device_type_id = ?", |
---|
| 198 | array($arrUpdBlocData[$key]['id'], $device_type_id)); |
---|
[18212] | 199 | } |
---|
| 200 | } |
---|
| 201 | // SQL実行 |
---|
[19713] | 202 | $arrRet = $objQuery->insert("dtb_blocposition", $arrInsData); |
---|
[18212] | 203 | } |
---|
[18201] | 204 | |
---|
[20044] | 205 | // プレビュー処理 TODO 要リファクタリング(MODE if利用) |
---|
[20041] | 206 | if ($this->getMode() == 'preview') { |
---|
[18212] | 207 | $this->lfSetPreData($arrPageData, $objLayout); |
---|
[18201] | 208 | |
---|
[18212] | 209 | $_SESSION['preview'] = "ON"; |
---|
[18201] | 210 | |
---|
[19998] | 211 | SC_Response_Ex::sendRedirectFromUrlPath('preview/' . DIR_INDEX_PATH, array("filename" => $arrPageData[0]["filename"])); |
---|
[18212] | 212 | exit; |
---|
[18201] | 213 | |
---|
[19713] | 214 | } else { |
---|
[19875] | 215 | $arrQueryString = array("device_type_id" => $device_type_id, "page_id" => $page_id, "msg" => "on"); |
---|
| 216 | SC_Response_Ex::reload($arrQueryString, true); |
---|
[18212] | 217 | exit; |
---|
| 218 | } |
---|
[19713] | 219 | break; |
---|
[15680] | 220 | |
---|
[19713] | 221 | // データ削除処理 |
---|
| 222 | case 'delete': |
---|
| 223 | //ベースデータでなければファイルを削除 |
---|
| 224 | if (!$objLayout->lfCheckBaseData($page_id, $device_type_id)) { |
---|
| 225 | $objLayout->lfDelPageData($page_id, $device_type_id); |
---|
[19879] | 226 | SC_Response_Ex::reload(array('device_type_id' => $device_type_id), true); |
---|
[19713] | 227 | exit; |
---|
| 228 | } |
---|
| 229 | break; |
---|
| 230 | |
---|
| 231 | default: |
---|
[18212] | 232 | } |
---|
[15680] | 233 | |
---|
[18212] | 234 | // ブロック情報を画面配置用に編集 |
---|
| 235 | $tpl_arrBloc = array(); |
---|
| 236 | $cnt = 0; |
---|
| 237 | // 使用されているブロックデータを生成 |
---|
| 238 | foreach($arrBlocPos as $key => $val){ |
---|
| 239 | if ($val['page_id'] == $page_id) { |
---|
| 240 | $tpl_arrBloc = $this->lfSetBlocData($arrBloc, $val, $tpl_arrBloc, $cnt); |
---|
| 241 | $cnt++; |
---|
| 242 | } |
---|
| 243 | } |
---|
| 244 | // 未使用のブロックデータを追加 |
---|
| 245 | foreach($arrBloc as $key => $val){ |
---|
| 246 | if (!$this->lfChkBloc($val, $tpl_arrBloc)) { |
---|
[18216] | 247 | $val['target_id'] = TARGET_ID_UNUSED; // 未使用に追加する |
---|
[18212] | 248 | $tpl_arrBloc = $this->lfSetBlocData($arrBloc, $val, $tpl_arrBloc, $cnt); |
---|
| 249 | $cnt++; |
---|
| 250 | } |
---|
| 251 | } |
---|
[15680] | 252 | |
---|
[18212] | 253 | $this->tpl_arrBloc = $tpl_arrBloc; |
---|
| 254 | $this->bloc_cnt = count($tpl_arrBloc); |
---|
| 255 | $this->page_id = $page_id; |
---|
[19722] | 256 | $this->device_type_id = $device_type_id; |
---|
[15680] | 257 | |
---|
[18212] | 258 | // ページ名称を取得 |
---|
[19713] | 259 | $arrPageData = $objLayout->lfGetPageData('page_id = ? AND device_type_id = ?', array($page_id, $device_type_id)); |
---|
[18212] | 260 | $this->arrPageData = $arrPageData[0]; |
---|
[15680] | 261 | |
---|
[18212] | 262 | global $GLOBAL_ERR; |
---|
| 263 | $errCnt = 0; |
---|
| 264 | if ($GLOBAL_ERR != "") { |
---|
| 265 | $arrGlobalErr = explode("\n",$GLOBAL_ERR); |
---|
| 266 | $errCnt = count($arrGlobalErr) - 8; |
---|
| 267 | if ($errCnt < 0 ) { |
---|
| 268 | $errCnt = 0; |
---|
| 269 | } |
---|
| 270 | } |
---|
| 271 | $this->errCnt = $errCnt; |
---|
[19661] | 272 | } |
---|
[15680] | 273 | |
---|
[18212] | 274 | /** |
---|
| 275 | * デストラクタ. |
---|
| 276 | * |
---|
| 277 | * @return void |
---|
[18211] | 278 | */ |
---|
| 279 | function destroy() { |
---|
| 280 | parent::destroy(); |
---|
| 281 | } |
---|
[15680] | 282 | |
---|
[18211] | 283 | /** |
---|
| 284 | * ブロック情報の配列を生成する. |
---|
| 285 | * |
---|
| 286 | * @param array $arrBloc Bloc情報 |
---|
| 287 | * @param array $tpl_arrBloc データをセットする配列 |
---|
[19713] | 288 | * @param array $val DBから取得したブロック情報 |
---|
[18211] | 289 | * @param integer $cnt 配列番号 |
---|
| 290 | * @return array データをセットした配列 |
---|
| 291 | */ |
---|
| 292 | function lfSetBlocData($arrBloc, $val, $tpl_arrBloc, $cnt) { |
---|
[15680] | 293 | |
---|
[19713] | 294 | $tpl_arrBloc[$cnt]['target_id'] = $this->arrTarget[$val['target_id']]; |
---|
[18211] | 295 | $tpl_arrBloc[$cnt]['bloc_id'] = $val['bloc_id']; |
---|
| 296 | $tpl_arrBloc[$cnt]['bloc_row'] = |
---|
| 297 | isset($val['bloc_row']) ? $val['bloc_row'] : ""; |
---|
| 298 | $tpl_arrBloc[$cnt]['anywhere'] = $val['anywhere']; |
---|
| 299 | if($val['anywhere'] == 1){ |
---|
| 300 | $tpl_arrBloc[$cnt]['anywhere_selected'] = 'checked="checked"'; |
---|
| 301 | } |
---|
| 302 | foreach($arrBloc as $bloc_key => $bloc_val){ |
---|
| 303 | if ($bloc_val['bloc_id'] == $val['bloc_id']) { |
---|
| 304 | $bloc_name = $bloc_val['bloc_name']; |
---|
| 305 | break; |
---|
| 306 | } |
---|
| 307 | } |
---|
| 308 | $tpl_arrBloc[$cnt]['name'] = $bloc_name; |
---|
[15680] | 309 | |
---|
[18211] | 310 | return $tpl_arrBloc; |
---|
| 311 | } |
---|
[15680] | 312 | |
---|
[18211] | 313 | /** |
---|
| 314 | * ブロックIDが配列に追加されているかのチェックを行う. |
---|
| 315 | * |
---|
| 316 | * @param array $arrBloc Bloc情報 |
---|
| 317 | * @param array $arrChkData チェックを行うデータ配列 |
---|
| 318 | * @return bool 存在する場合 true |
---|
| 319 | */ |
---|
| 320 | function lfChkBloc($arrBloc, $arrChkData) { |
---|
| 321 | foreach($arrChkData as $key => $val){ |
---|
| 322 | if ($val['bloc_id'] === $arrBloc['bloc_id'] ) { |
---|
| 323 | // 配列に存在すればTrueを返す |
---|
| 324 | return true; |
---|
| 325 | } |
---|
| 326 | } |
---|
[15680] | 327 | |
---|
[18211] | 328 | // 配列に存在しなければFlaseを返す |
---|
| 329 | return false; |
---|
| 330 | } |
---|
[15829] | 331 | |
---|
[18211] | 332 | /** |
---|
| 333 | * ブロックIDが何番目に配置されているかを調べる. |
---|
| 334 | * |
---|
| 335 | * @param array $arrUpdData 更新情報 |
---|
| 336 | * @param array $arrObj チェックを行うデータ配列 |
---|
| 337 | * @return integer 順番 |
---|
| 338 | */ |
---|
| 339 | function lfGetRowID($arrUpdData, $arrObj){ |
---|
| 340 | $no = 0; // カウント用(同じデータが必ず1件あるので、初期値は0) |
---|
[15680] | 341 | |
---|
[18211] | 342 | // 対象データが何番目に配置されているのかを取得する。 |
---|
| 343 | foreach ($arrUpdData as $key => $val) { |
---|
| 344 | if ($val['target_id'] === $arrObj['target_id'] and $val['top'] <= $arrObj['top']){ |
---|
| 345 | $no++; |
---|
| 346 | } |
---|
| 347 | } |
---|
| 348 | // 番号を返す |
---|
| 349 | return $no; |
---|
| 350 | } |
---|
[16396] | 351 | |
---|
[18211] | 352 | /** |
---|
| 353 | * プレビューするデータを DB に保存する. |
---|
| 354 | * |
---|
[19713] | 355 | * FIXME |
---|
| 356 | * |
---|
[18211] | 357 | * @param array $arrPageData ページ情報の配列 |
---|
| 358 | * @return void |
---|
| 359 | */ |
---|
| 360 | function lfSetPreData($arrPageData, &$objLayout){ |
---|
[18770] | 361 | $objQuery = new SC_Query(); // DB操作オブジェクト |
---|
[18211] | 362 | $sql = ""; // データ更新SQL生成用 |
---|
| 363 | $ret = ""; // データ更新結果格納用 |
---|
| 364 | $arrUpdData = array(); // 更新データ生成用 |
---|
| 365 | $filename = $arrPageData[0]['filename']; |
---|
[15680] | 366 | |
---|
[18211] | 367 | $arrPreData = $objLayout->lfgetPageData(" page_id = ? " , array("0")); |
---|
[16935] | 368 | |
---|
[18211] | 369 | // XXX tplファイルの削除 |
---|
[19805] | 370 | $del_tpl = USER_REALDIR . "templates/" . $filename . '.tpl'; |
---|
[16935] | 371 | |
---|
[18211] | 372 | if (file_exists($del_tpl)){ |
---|
| 373 | unlink($del_tpl); |
---|
| 374 | } |
---|
[15680] | 375 | |
---|
[18211] | 376 | // filename が空の場合にはMYページと判断 |
---|
| 377 | if($filename == ""){ |
---|
[19807] | 378 | $tplfile = TEMPLATE_REALDIR . "mypage/index"; |
---|
[18211] | 379 | $filename = 'mypage'; |
---|
| 380 | } else { |
---|
[19807] | 381 | $tplfile = TEMPLATE_REALDIR . $filename; |
---|
[18211] | 382 | } |
---|
[15680] | 383 | |
---|
[18211] | 384 | // プレビュー用tplファイルのコピー |
---|
[19805] | 385 | $copyTo = USER_REALDIR . "templates/preview/" . TEMPLATE_NAME . "/" . $filename . ".tpl"; |
---|
[15680] | 386 | |
---|
[18211] | 387 | if (!is_dir(dirname($copyTo))) { |
---|
| 388 | mkdir(dirname($copyTo)); |
---|
| 389 | } |
---|
[18201] | 390 | |
---|
[18211] | 391 | copy($tplfile . ".tpl", $copyTo); |
---|
[18201] | 392 | |
---|
[18211] | 393 | // 更新データの取得 |
---|
| 394 | $sql = "select page_id,page_name, header_chk, footer_chk from dtb_pagelayout where page_id = ? OR page_id = (SELECT page_id FROM dtb_blocposition WHERE anywhere = 1)" ; |
---|
[19713] | 395 | |
---|
[18770] | 396 | $ret = $objQuery->getAll($sql, array($arrPageData[0]['page_id'])); |
---|
[18201] | 397 | |
---|
[18211] | 398 | // dbデータのコピー |
---|
| 399 | $sql = " update dtb_pagelayout set "; |
---|
| 400 | $sql .= " page_name = ?"; |
---|
| 401 | $sql .= " ,header_chk = ?"; |
---|
| 402 | $sql .= " ,footer_chk = ?"; |
---|
| 403 | $sql .= " ,url = ?"; |
---|
| 404 | $sql .= " ,filename = ?"; |
---|
| 405 | // $sql .= " ,anywhere = ?"; |
---|
| 406 | $sql .= " where page_id = 0"; |
---|
| 407 | var_dump($ret); |
---|
| 408 | echo("####<br/>\n\n".__LINE__ ." in file:".__FILE__."<br/>\n\n ####"); |
---|
[18201] | 409 | |
---|
[18211] | 410 | $arrUpdData = array($ret[0]['page_id'] |
---|
| 411 | ,$ret[0]['page_id'] |
---|
| 412 | ,$ret[0]['page_id'] |
---|
| 413 | ,USER_DIR . "templates/" . TEMPLATE_NAME . "/" |
---|
| 414 | ,$filename |
---|
| 415 | // ,$ret[0]['anywhere'] |
---|
[19713] | 416 | |
---|
[18211] | 417 | ); |
---|
[18201] | 418 | |
---|
[18770] | 419 | $objQuery->query($sql,$arrUpdData); |
---|
[18211] | 420 | } |
---|
[15680] | 421 | } |
---|
| 422 | ?> |
---|