|
From: Benjamin C. <bc...@us...> - 2002-05-09 02:53:17
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv14836
Modified Files:
include.php
Log Message:
Removed $me2 (no longer used) and added a wrap function for smarty (not complete yet)
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -r1.115 -r1.116
--- include.php 14 Apr 2002 23:51:26 -0000 1.115
+++ include.php 9 May 2002 02:53:14 -0000 1.116
@@ -63,8 +63,6 @@
include 'languages/'.LANGUAGE.'.php';
$me = $HTTP_SERVER_VARS['PHP_SELF'];
-$me2 = !empty($HTTP_SERVER_VARS['REQUEST_URI']) ? $HTTP_SERVER_VARS['REQUEST_URI'] :
- $HTTP_SERVER_VARS['SCRIPT_NAME'].'?'.$HTTP_SERVER_VARS['QUERY_STRING'];
$selrange = 30;
$now = time();
$_gv =& $HTTP_GET_VARS;
@@ -108,7 +106,25 @@
error_reporting(E_ALL ^ E_NOTICE); // Clobber Smarty warnings
return Smarty::fetch($_smarty_tpl_file, $_smarty_cache_id, $_smarty_compile_id, $_smarty_display);
}
-
+
+ function wrap($template, $title = '', $dir = '') {
+ global $TITLE, $_gv, $_pv;
+
+ $this->assign(array(
+ 'content_template' => $template,
+ 'page_title' => isset($TITLE[$title]) ? $TITLE[$title] : ''
+ ));
+
+ // Use a popup wrap?
+ if ((isset($_gv['use_js']) and $_gv['use_js']) or
+ (isset($_pv['use_js']) and $_pv['use_js'])) {
+ $wrap = 'wrap-popup.html';
+ } else {
+ $wrap = 'wrap.html';
+ }
+
+ $this->display($dir . $wrap);
+ }
}
$t = new extSmarty;
|