Changeset 15820 for branches/feature-templates/data/class/SC_View.php
- Timestamp:
- 2007/09/21 01:35:20 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-templates/data/class/SC_View.php
r15812 r15820 255 255 } 256 256 257 function initDisplay($template) {258 if (empty($this->tplName)) return;259 260 $tpl_mainpage = $this->_smarty->get_template_vars('tpl_mainpage');261 $template_name = $this->tplName;262 263 // ¥Æ¥ó¥×¥ì¡¼¥È¥Ñ¥Ã¥±¡¼¥¸¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤ë¾ì¹ç264 if ($template_name) {265 $template_dir = TPL_PKG_PATH . $template_name . '/templates/admin/';266 267 // tpl_mainpage¤Èmain_frame.tpl¤¬Î¾Êý¸ºß¤¹¤ë»þ¤Î¤ß¥Æ¥ó¥×¥ì¡¼¥È¥Ñ¥Ã¥±¡¼¥¸¤Ç½ÐÎÏ268 if (file_exists($template_dir . $tpl_mainpage)269 && file_exists($template_dir . $template)) {270 echo '<font color="#ffffff">ok</font>';271 $this->_smarty->template_dir = $template_dir;272 $this->_smarty->compile_dir = COMPILE_DIR . "/$template_name";273 }274 }275 }276 257 } 277 258 … … 298 279 299 280 $tpl_mainpage = $this->_smarty->get_template_vars('tpl_mainpage'); 300 $template_name = $this->tplName; 301 302 // ¥Æ¥ó¥×¥ì¡¼¥È¥Ñ¥Ã¥±¡¼¥¸¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤ë¾ì¹ç 303 if ($template_name) { 304 $template_dir = TPL_PKG_PATH . $template_name . '/templates/'; 305 306 // tpl_mainpage¤Èsite_frame.tpl¤¬Î¾Êý¸ºß¤¹¤ë»þ¤Î¤ß¥Æ¥ó¥×¥ì¡¼¥È¥Ñ¥Ã¥±¡¼¥¸¤Ç½ÐÎÏ 307 if ( 308 (file_exists($template_dir . $tpl_mainpage) || file_exists($tpl_mainpage)) 309 && file_exists($template_dir . $template)) { 310 echo 'ok'; 311 $this->_smarty->template_dir = $template_dir; 312 $this->_smarty->compile_dir = COMPILE_DIR . "/$template_name"; 281 $template_dir = TPL_PKG_PATH . $this->tplName . '/templates/'; 282 283 $win = "^[a-zA-Z]{1}:"; 284 $other = "^\/"; 285 $pattern = "/($win)|($other)/"; 286 if (!preg_match($pattern, $tpl_mainpage)) { 287 $tpl_pkg_mainpage = $template_dir . $tpl_mainpage; 288 if (file_exists($tpl_pkg_mainpage)) { 289 $this->assign('tpl_mainpage', $tpl_pkg_mainpage); 313 290 } 314 291 }
Note: See TracChangeset
for help on using the changeset viewer.