Do not use global variables into page views

This commit is contained in:
Dmitriy Simushev 2014-01-21 11:16:48 +00:00
parent 5b964974cd
commit e291836523
40 changed files with 85 additions and 91 deletions

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php if( $page['opid'] ) { ?> <?php if( $page['opid'] ) { ?>
@ -46,7 +46,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="opid" value="<?php echo $page['opid'] ?>"/> <input type="hidden" name="opid" value="<?php echo $page['opid'] ?>"/>
<div> <div>
<?php if(!$page['needChangePassword']) { print_tabbar(); } ?> <?php if(!$page['needChangePassword']) { print_tabbar($page['tabs']); } ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
<div class="fieldForm"> <div class="fieldForm">

View File

@ -17,13 +17,13 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_header() { global $page; function tpl_header($page) {
?> ?>
<script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<?php <?php
} }
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page_agents.intro") ?> <?php echo getlocal("page_agents.intro") ?>

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page_avatar.intro") ?> <?php echo getlocal("page_avatar.intro") ?>
@ -32,7 +32,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/> <input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/>
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar($page['tabs']); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
<p> <p>

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php if( $page['saved'] ) { ?> <?php if( $page['saved'] ) { ?>

View File

@ -17,13 +17,13 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_header() { global $page; function tpl_header($page) {
?> ?>
<script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<?php <?php
} }
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page_ban.intro") ?> <?php echo getlocal("page_ban.intro") ?>

View File

@ -17,7 +17,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("canned.descr") ?> <?php echo getlocal("canned.descr") ?>

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php if( $page['saved'] ) { ?> <?php if( $page['saved'] ) { ?>

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<div id="confirmpane"> <div id="confirmpane">

View File

@ -18,14 +18,14 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_header() { global $page; function tpl_header($page) {
?> ?>
<script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/js/features.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/js/features.js"></script>
<?php <?php
} }
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page_settings.intro") ?> <?php echo getlocal("page_settings.intro") ?>
@ -42,7 +42,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="sent" value="true"/> <input type="hidden" name="sent" value="true"/>
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar($page['tabs']); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
<div class="fieldForm"> <div class="fieldForm">

View File

@ -17,7 +17,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page.gen_button.intro") ?> <?php echo getlocal("page.gen_button.intro") ?>

View File

@ -18,14 +18,14 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_header() { global $page; function tpl_header($page) {
?> ?>
<script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/js/group.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/js/group.js"></script>
<?php <?php
} }
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php if( $page['grid'] ) { ?> <?php if( $page['grid'] ) { ?>
@ -47,7 +47,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="gid" value="<?php echo $page['grid'] ?>"/> <input type="hidden" name="gid" value="<?php echo $page['grid'] ?>"/>
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar($page['tabs']); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
<div class="fieldForm"> <div class="fieldForm">

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page.groupmembers.intro") ?> <?php echo getlocal("page.groupmembers.intro") ?>
@ -35,7 +35,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="gid" value="<?php echo $page['groupid'] ?>"/> <input type="hidden" name="gid" value="<?php echo $page['groupid'] ?>"/>
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar($page['tabs']); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
<p> <p>

View File

@ -17,13 +17,13 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_header() { global $page; function tpl_header($page) {
?> ?>
<script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<?php <?php
} }
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page.groups.intro") ?> <?php echo getlocal("page.groups.intro") ?>

View File

@ -21,7 +21,7 @@ function menuloc($id) {
} }
return ""; return "";
} }
function tpl_menu() { global $page; function tpl_menu($page) {
?> ?>
<li> <li>
<h2><b><?php echo getlocal("lang.choose") ?></b></h2> <h2><b><?php echo getlocal("lang.choose") ?></b></h2>

View File

@ -24,7 +24,7 @@ $isrtl = getlocal("localedirection") == 'rtl';
<link rel="shortcut icon" href="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/favicon.ico" type="image/x-icon"/> <link rel="shortcut icon" href="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/favicon.ico" type="image/x-icon"/>
<?php <?php
if(function_exists('tpl_header')) if(function_exists('tpl_header'))
tpl_header(); tpl_header($page);
?> ?>
<title> <title>
<?php echo $page['title'] ?> - <?php echo getlocal("app.title") ?> <?php echo $page['title'] ?> - <?php echo getlocal("app.title") ?>
@ -65,7 +65,7 @@ $isrtl = getlocal("localedirection") == 'rtl';
<div id="wcontent" class="contentnomenu"> <div id="wcontent" class="contentnomenu">
<?php } ?> <?php } ?>
<?php <?php
tpl_content(); tpl_content($page);
?> ?>
</div> </div>
</div> </div>
@ -74,7 +74,7 @@ $isrtl = getlocal("localedirection") == 'rtl';
<div id="sidebar"> <div id="sidebar">
<ul> <ul>
<?php <?php
tpl_menu(); tpl_menu($page);
?> ?>
</ul> </ul>
</div> </div>

View File

@ -15,15 +15,14 @@
* limitations under the License. * limitations under the License.
*/ */
function menuli($name) { function menuli($page, $name) {
global $page; if(isset($page['menuid']) && $name == $page['menuid']) {
if(isset($page) && isset($page['menuid']) && $name == $page['menuid']) {
echo " class=\"active\""; echo " class=\"active\"";
} }
return ""; return "";
} }
function tpl_menu() { global $page; function tpl_menu($page) {
if(isset($page['isOnline']) && !$page['isOnline']) { ?> if(isset($page['isOnline']) && !$page['isOnline']) { ?>
<li id="offwarn"> <li id="offwarn">
<img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/warn.gif" alt="" width="24" height="24"/> <img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/dash/warn.gif" alt="" width="24" height="24"/>
@ -34,31 +33,31 @@ function tpl_menu() { global $page;
<li> <li>
<h2><?php echo getlocal('right.main') ?></h2> <h2><?php echo getlocal('right.main') ?></h2>
<ul class="submenu"> <ul class="submenu">
<li<?php menuli("main")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/index.php'><?php echo getlocal('topMenu.main') ?></a></li> <li<?php menuli($page, "main")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/index.php'><?php echo getlocal('topMenu.main') ?></a></li>
<li<?php menuli("users")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/users.php'><?php echo getlocal('topMenu.users') ?></a> <span class="small">(<a class="inner" href='<?php echo MIBEW_WEB_ROOT ?>/operator/users.php?nomenu'><?php echo getlocal('topMenu.users.nomenu') ?></a>)</span></li> <li<?php menuli($page, "users")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/users.php'><?php echo getlocal('topMenu.users') ?></a> <span class="small">(<a class="inner" href='<?php echo MIBEW_WEB_ROOT ?>/operator/users.php?nomenu'><?php echo getlocal('topMenu.users.nomenu') ?></a>)</span></li>
<li<?php menuli("history")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/history.php'><?php echo getlocal('page_analysis.search.title') ?></a></li> <li<?php menuli($page, "history")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/history.php'><?php echo getlocal('page_analysis.search.title') ?></a></li>
<?php if(isset($page['showstat']) && $page['showstat']) { ?> <?php if(isset($page['showstat']) && $page['showstat']) { ?>
<li<?php menuli("statistics")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/statistics.php'><?php echo getlocal('statistics.title') ?></a></li> <li<?php menuli($page, "statistics")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/statistics.php'><?php echo getlocal('statistics.title') ?></a></li>
<?php } ?> <?php } ?>
<?php if(isset($page['showban']) && $page['showban']) { ?> <?php if(isset($page['showban']) && $page['showban']) { ?>
<li<?php menuli("blocked")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/blocked.php'><?php echo getlocal('menu.blocked') ?></a></li> <li<?php menuli($page, "blocked")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/blocked.php'><?php echo getlocal('menu.blocked') ?></a></li>
<?php } ?> <?php } ?>
</ul> </ul>
</li> </li>
<li> <li>
<h2><?php echo getlocal('right.administration') ?></h2> <h2><?php echo getlocal('right.administration') ?></h2>
<ul class="submenu"> <ul class="submenu">
<li<?php menuli("canned")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/canned.php'><?php echo getlocal('menu.canned') ?></a></li> <li<?php menuli($page, "canned")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/canned.php'><?php echo getlocal('menu.canned') ?></a></li>
<?php if(isset($page['showadmin']) && $page['showadmin']) { ?> <?php if(isset($page['showadmin']) && $page['showadmin']) { ?>
<li<?php menuli("getcode")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/getcode.php'><?php echo getlocal('leftMenu.client_gen_button') ?></a></li> <li<?php menuli($page, "getcode")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/getcode.php'><?php echo getlocal('leftMenu.client_gen_button') ?></a></li>
<li<?php menuli("operators")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/operators.php'><?php echo getlocal('leftMenu.client_agents') ?></a></li> <li<?php menuli($page, "operators")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/operators.php'><?php echo getlocal('leftMenu.client_agents') ?></a></li>
<li<?php menuli("groups")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/groups.php'><?php echo getlocal('menu.groups') ?></a></li> <li<?php menuli($page, "groups")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/groups.php'><?php echo getlocal('menu.groups') ?></a></li>
<li<?php menuli("settings")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/settings.php'><?php echo getlocal('leftMenu.client_settings') ?></a></li> <li<?php menuli($page, "settings")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/settings.php'><?php echo getlocal('leftMenu.client_settings') ?></a></li>
<li<?php menuli("translate")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/translate.php'><?php echo getlocal('menu.translate') ?></a></li> <li<?php menuli($page, "translate")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/translate.php'><?php echo getlocal('menu.translate') ?></a></li>
<li<?php menuli("updates")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/updates.php'><?php echo getlocal('menu.updates') ?></a></li> <li<?php menuli($page, "updates")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/updates.php'><?php echo getlocal('menu.updates') ?></a></li>
<?php } ?> <?php } ?>
<?php if(isset($page['currentopid']) && $page['currentopid']) {?> <?php if(isset($page['currentopid']) && $page['currentopid']) {?>
<li<?php menuli("profile")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/operator.php?op=<?php echo $page['currentopid'] ?>'><?php echo getlocal('menu.profile') ?></a></li> <li<?php menuli($page, "profile")?>><a href='<?php echo MIBEW_WEB_ROOT ?>/operator/operator.php?op=<?php echo $page['currentopid'] ?>'><?php echo getlocal('menu.profile') ?></a></li>
<?php } ?> <?php } ?>
</ul> </ul>
</li> </li>

View File

@ -15,13 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
function print_tabbar() { function print_tabbar($tabs) {
global $page; if($tabs) { ?>
if($page['tabs']) { ?>
<ul class="tabs"> <ul class="tabs">
<?php foreach($page['tabs'] as $k => $v) { if($v) { ?> <?php foreach($tabs as $k => $v) { if($v) { ?>
<li><a href="<?php echo $v ?>"><?php echo $k ?></a></li> <li><a href="<?php echo $v ?>"><?php echo $k ?></a></li>
<?php } else { ?> <?php } else { ?>
<li class="active"><a href="#"><?php echo $k ?></a></li><?php }} ?> <li class="active"><a href="#"><?php echo $k ?></a></li><?php }} ?>

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php <?php

View File

@ -19,7 +19,7 @@ if(isset($page) && isset($page['localeLinks'])) {
require_once(dirname(__FILE__).'/inc_locales.php'); require_once(dirname(__FILE__).'/inc_locales.php');
} }
function tpl_header() { global $page; function tpl_header($page) {
if($page['soundcheck']) { if($page['soundcheck']) {
?> ?>
@ -40,7 +40,7 @@ function tpl_header() { global $page;
} }
} }
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("install.message") ?> <?php echo getlocal("install.message") ?>
<br/> <br/>

View File

@ -18,13 +18,13 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_header() { global $page; function tpl_header($page) {
?> ?>
<link href="<?php echo MIBEW_WEB_ROOT ?>/styles/invitations/<?php echo $page['preview'] ?>/invite.css" rel="stylesheet" type="text/css" /> <link href="<?php echo MIBEW_WEB_ROOT ?>/styles/invitations/<?php echo $page['preview'] ?>/invite.css" rel="stylesheet" type="text/css" />
<? <?
} /* header */ } /* header */
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page.preview.intro") ?> <?php echo getlocal("page.preview.intro") ?>
@ -33,7 +33,7 @@ function tpl_content() { global $page;
<form name="preview" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/invitationthemes.php"> <form name="preview" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/invitationthemes.php">
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar($page['tabs']); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
<div class="fieldForm"> <div class="fieldForm">

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<p>Copyright 2005-2013 the original author or authors.</p> <p>Copyright 2005-2013 the original author or authors.</p>

View File

@ -19,7 +19,7 @@ if(isset($page) && isset($page['localeLinks'])) {
require_once(dirname(__FILE__).'/inc_locales.php'); require_once(dirname(__FILE__).'/inc_locales.php');
} }
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<div id="loginintro"> <div id="loginintro">

View File

@ -17,8 +17,8 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_header() { global $page; function tpl_header($page) {
if(isset($page) && isset($page['localeLinks'])) { if(isset($page['localeLinks'])) {
?> ?>
<script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/compiled/locale.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/compiled/locale.js"></script>
@ -32,7 +32,7 @@ function menuseparator() {
if(($menu_items_count%3) == 0) { echo "</tr><tr>"; } if(($menu_items_count%3) == 0) { echo "</tr><tr>"; }
} }
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<br/> <br/>

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("operator.groups.intro") ?> <?php echo getlocal("operator.groups.intro") ?>
@ -35,7 +35,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/> <input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/>
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar($page['tabs']); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
<p> <p>

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page.preview.intro") ?> <?php echo getlocal("page.preview.intro") ?>
@ -27,7 +27,7 @@ function tpl_content() { global $page;
<form name="preview" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/page_themes.php"> <form name="preview" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/page_themes.php">
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar($page['tabs']); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
<div class="fieldForm"> <div class="fieldForm">

View File

@ -17,7 +17,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_header() { global $page; function tpl_header($page) {
?> ?>
<!-- Plugins CSS files --> <!-- Plugins CSS files -->
@ -129,7 +129,7 @@ function tpl_header() { global $page;
<?php <?php
} }
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<div> <div>

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page_settings.intro") ?> <?php echo getlocal("page_settings.intro") ?>
@ -34,7 +34,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<form name="performance" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/performance.php"> <form name="performance" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/performance.php">
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar($page['tabs']); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
<div class="fieldForm"> <div class="fieldForm">

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("permissions.intro") ?> <?php echo getlocal("permissions.intro") ?>
@ -35,7 +35,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/> <input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/>
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar($page['tabs']); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
<p> <p>

View File

@ -19,9 +19,7 @@ if(isset($page) && isset($page['localeLinks'])) {
require_once(dirname(__FILE__).'/inc_locales.php'); require_once(dirname(__FILE__).'/inc_locales.php');
} }
function tpl_content() { function tpl_content($page) {
global $page;
if($page['isdone']) { if($page['isdone']) {
?> ?>
<div id="loginpane"> <div id="loginpane">

View File

@ -19,9 +19,7 @@ if(isset($page) && isset($page['localeLinks'])) {
require_once(dirname(__FILE__).'/inc_locales.php'); require_once(dirname(__FILE__).'/inc_locales.php');
} }
function tpl_content() { function tpl_content($page) {
global $page;
if($page['isdone']) { if($page['isdone']) {
?> ?>
<div id="loginpane"> <div id="loginpane">

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page_settings.intro") ?> <?php echo getlocal("page_settings.intro") ?>
@ -34,7 +34,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<form name="settings" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/settings.php"> <form name="settings" method="post" action="<?php echo MIBEW_WEB_ROOT ?>/operator/settings.php">
<?php print_csrf_token_input() ?> <?php print_csrf_token_input() ?>
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar($page['tabs']); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
<div class="fieldForm"> <div class="fieldForm">

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal2("statistics.description.full", array(date_to_text($page['last_cron_run']), $page['cron_path'])) ?> <?php echo getlocal2("statistics.description.full", array(date_to_text($page['last_cron_run']), $page['cron_path'])) ?>
@ -31,7 +31,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<form name="statisticsForm" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/statistics.php"> <form name="statisticsForm" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/statistics.php">
<input type="hidden" name="type" value="<?php echo $page['type'] ?>" /> <input type="hidden" name="type" value="<?php echo $page['type'] ?>" />
<?php print_tabbar(); ?> <?php print_tabbar($page['tabs']); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">

View File

@ -18,7 +18,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
require_once(dirname(__FILE__).'/inc_tabbar.php'); require_once(dirname(__FILE__).'/inc_tabbar.php');
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page.preview.intro") ?> <?php echo getlocal("page.preview.intro") ?>
@ -27,7 +27,7 @@ function tpl_content() { global $page;
<form name="preview" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/themes.php"> <form name="preview" method="get" action="<?php echo MIBEW_WEB_ROOT ?>/operator/themes.php">
<div> <div>
<?php print_tabbar(); ?> <?php print_tabbar($page['tabs']); ?>
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner"> <div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
<div class="fieldForm"> <div class="fieldForm">

View File

@ -15,7 +15,8 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_header() { global $page; ?> function tpl_header($page) {
?>
<!-- External libs --> <!-- External libs -->
<script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
@ -40,7 +41,7 @@ function tpl_header() { global $page; ?>
//--></script> //--></script>
<?php } <?php }
function tpl_content() { global $page; function tpl_content($page) {
$chatthreadinfo = $page['thread_info']; $chatthreadinfo = $page['thread_info'];
$chatthread = $page['thread_info']['thread']; $chatthread = $page['thread_info']['thread'];
?> ?>

View File

@ -17,7 +17,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page_search.intro") ?> <?php echo getlocal("page_search.intro") ?>

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("tracked.intro") ?> <?php echo getlocal("tracked.intro") ?>

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php if( $page['saved'] ) { ?> <?php if( $page['saved'] ) { ?>

View File

@ -17,7 +17,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page.translate.descr") ?> <?php echo getlocal("page.translate.descr") ?>

View File

@ -17,7 +17,7 @@
require_once(dirname(__FILE__).'/inc_menu.php'); require_once(dirname(__FILE__).'/inc_menu.php');
function tpl_header() { global $page; function tpl_header($page) {
?> ?>
<script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script> <script type="text/javascript" language="javascript" src="<?php echo MIBEW_WEB_ROOT ?>/js/libs/jquery.min.js"></script>
<script type="text/javascript" language="javascript" src="http://mibew.org/latestMibew.js"></script> <script type="text/javascript" language="javascript" src="http://mibew.org/latestMibew.js"></script>
@ -25,7 +25,7 @@ function tpl_header() { global $page;
<?php <?php
} }
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("updates.intro") ?> <?php echo getlocal("updates.intro") ?>

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
function tpl_content() { global $page; function tpl_content($page) {
?> ?>
<?php echo getlocal("page.analysis.userhistory.intro") ?> <?php echo getlocal("page.analysis.userhistory.intro") ?>