mirror of
https://github.com/Mibew/java.git
synced 2025-01-22 17:40:35 +03:00
extract tabbar generation code -> inc_tabbar.php
This commit is contained in:
parent
616e8da89e
commit
b9cc8ed5b1
@ -20,6 +20,8 @@
|
||||
*/
|
||||
|
||||
require_once("inc_menu.php");
|
||||
require_once("inc_tabbar.php");
|
||||
|
||||
$page['title'] = getlocal("page_agent.title");
|
||||
$page['menuid'] = $page['opid'] == $page['currentopid'] ? "profile" : "operators";
|
||||
|
||||
@ -45,15 +47,7 @@ require_once('inc_errors.php');
|
||||
<form name="agentForm" method="post" action="<?php echo $webimroot ?>/operator/operator.php">
|
||||
<input type="hidden" name="opid" value="<?php echo $page['opid'] ?>"/>
|
||||
<div>
|
||||
<?php if($page['tabs']) { ?>
|
||||
<ul class="tabs">
|
||||
|
||||
<?php foreach($page['tabs'] as $k => $v) { if($v) { ?>
|
||||
<li><a href="<?php echo $v ?>"><?php echo $k ?></a></li>
|
||||
<?php } else { ?>
|
||||
<li class="active"><a href="#"><?php echo $k ?></a></li><?php }} ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<?php print_tabbar(); ?>
|
||||
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
|
||||
|
||||
<div class="fieldForm">
|
||||
|
@ -20,6 +20,8 @@
|
||||
*/
|
||||
|
||||
require_once("inc_menu.php");
|
||||
require_once("inc_tabbar.php");
|
||||
|
||||
$page['title'] = getlocal("page_avatar.title");
|
||||
$page['menuid'] = $page['opid'] == $page['currentopid'] ? "profile" : "operators";
|
||||
|
||||
@ -36,15 +38,7 @@ require_once('inc_errors.php');
|
||||
<form name="avatarForm" method="post" action="<?php echo $webimroot ?>/operator/avatar.php" enctype="multipart/form-data">
|
||||
<input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/>
|
||||
<div>
|
||||
<?php if($page['tabs']) { ?>
|
||||
<ul class="tabs">
|
||||
|
||||
<?php foreach($page['tabs'] as $k => $v) { if($v) { ?>
|
||||
<li><a href="<?php echo $v ?>"><?php echo $k ?></a></li>
|
||||
<?php } else { ?>
|
||||
<li class="active"><a href="#"><?php echo $k ?></a></li><?php }} ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<?php print_tabbar(); ?>
|
||||
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
|
||||
|
||||
<p>
|
||||
|
@ -20,6 +20,8 @@
|
||||
*/
|
||||
|
||||
require_once("inc_menu.php");
|
||||
require_once("inc_tabbar.php");
|
||||
|
||||
$page['title'] = getlocal("settings.title");
|
||||
$page['menuid'] = "settings";
|
||||
|
||||
@ -73,15 +75,7 @@ require_once('inc_errors.php');
|
||||
<form name="features" method="post" action="<?php echo $webimroot ?>/operator/features.php">
|
||||
<input type="hidden" name="sent" value="true"/>
|
||||
<div>
|
||||
<?php if($page['tabs']) { ?>
|
||||
<ul class="tabs">
|
||||
|
||||
<?php foreach($page['tabs'] as $k => $v) { if($v) { ?>
|
||||
<li><a href="<?php echo $v ?>"><?php echo $k ?></a></li>
|
||||
<?php } else { ?>
|
||||
<li class="active"><a href="#"><?php echo $k ?></a></li><?php }} ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<?php print_tabbar(); ?>
|
||||
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
|
||||
|
||||
<div class="fieldForm">
|
||||
|
@ -20,6 +20,8 @@
|
||||
*/
|
||||
|
||||
require_once("inc_menu.php");
|
||||
require_once("inc_tabbar.php");
|
||||
|
||||
$page['title'] = getlocal("page.group.title");
|
||||
$page['menuid'] = "groups";
|
||||
|
||||
@ -44,15 +46,7 @@ require_once('inc_errors.php');
|
||||
<form name="groupForm" method="post" action="<?php echo $webimroot ?>/operator/group.php">
|
||||
<input type="hidden" name="gid" value="<?php echo $page['grid'] ?>"/>
|
||||
<div>
|
||||
<?php if($page['tabs']) { ?>
|
||||
<ul class="tabs">
|
||||
|
||||
<?php foreach($page['tabs'] as $k => $v) { if($v) { ?>
|
||||
<li><a href="<?php echo $v ?>"><?php echo $k ?></a></li>
|
||||
<?php } else { ?>
|
||||
<li class="active"><a href="#"><?php echo $k ?></a></li><?php }} ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<?php print_tabbar(); ?>
|
||||
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
|
||||
|
||||
<div class="fieldForm">
|
||||
|
@ -20,6 +20,8 @@
|
||||
*/
|
||||
|
||||
require_once("inc_menu.php");
|
||||
require_once("inc_tabbar.php");
|
||||
|
||||
$page['title'] = getlocal("page.groupmembers.title");
|
||||
$page['menuid'] = "groups";
|
||||
|
||||
@ -39,15 +41,7 @@ require_once('inc_errors.php');
|
||||
<form name="membersForm" method="post" action="<?php echo $webimroot ?>/operator/groupmembers.php">
|
||||
<input type="hidden" name="gid" value="<?php echo $page['groupid'] ?>"/>
|
||||
<div>
|
||||
<?php if($page['tabs']) { ?>
|
||||
<ul class="tabs">
|
||||
|
||||
<?php foreach($page['tabs'] as $k => $v) { if($v) { ?>
|
||||
<li><a href="<?php echo $v ?>"><?php echo $k ?></a></li>
|
||||
<?php } else { ?>
|
||||
<li class="active"><a href="#"><?php echo $k ?></a></li><?php }} ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<?php print_tabbar(); ?>
|
||||
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
|
||||
|
||||
<p>
|
||||
|
36
src/messenger/webim/view/inc_tabbar.php
Normal file
36
src/messenger/webim/view/inc_tabbar.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Mibew Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2011 Mibew Messenger Community
|
||||
* All rights reserved. The contents of this file are subject to the terms of
|
||||
* the Eclipse Public License v1.0 which accompanies this distribution, and
|
||||
* is available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* the GNU General Public License Version 2 or later (the "GPL"), in which case
|
||||
* the provisions of the GPL are applicable instead of those above. If you wish
|
||||
* to allow use of your version of this file only under the terms of the GPL, and
|
||||
* not to allow others to use your version of this file under the terms of the
|
||||
* EPL, indicate your decision by deleting the provisions above and replace them
|
||||
* with the notice and other provisions required by the GPL.
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
function print_tabbar() {
|
||||
global $page;
|
||||
|
||||
if($page['tabs']) { ?>
|
||||
<ul class="tabs">
|
||||
|
||||
<?php foreach($page['tabs'] as $k => $v) { if($v) { ?>
|
||||
<li><a href="<?php echo $v ?>"><?php echo $k ?></a></li>
|
||||
<?php } else { ?>
|
||||
<li class="active"><a href="#"><?php echo $k ?></a></li><?php }} ?>
|
||||
</ul>
|
||||
<?php }
|
||||
}
|
||||
|
||||
?>
|
@ -20,6 +20,8 @@
|
||||
*/
|
||||
|
||||
require_once("inc_menu.php");
|
||||
require_once("inc_tabbar.php");
|
||||
|
||||
$page['title'] = getlocal("operator.groups.title");
|
||||
$page['menuid'] = $page['opid'] == $page['currentopid'] ? "profile" : "operators";
|
||||
|
||||
@ -39,15 +41,7 @@ require_once('inc_errors.php');
|
||||
<form name="opgroupsForm" method="post" action="<?php echo $webimroot ?>/operator/opgroups.php">
|
||||
<input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/>
|
||||
<div>
|
||||
<?php if($page['tabs']) { ?>
|
||||
<ul class="tabs">
|
||||
|
||||
<?php foreach($page['tabs'] as $k => $v) { if($v) { ?>
|
||||
<li><a href="<?php echo $v ?>"><?php echo $k ?></a></li>
|
||||
<?php } else { ?>
|
||||
<li class="active"><a href="#"><?php echo $k ?></a></li><?php }} ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<?php print_tabbar(); ?>
|
||||
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
|
||||
|
||||
<p>
|
||||
|
@ -20,6 +20,8 @@
|
||||
*/
|
||||
|
||||
require_once("inc_menu.php");
|
||||
require_once("inc_tabbar.php");
|
||||
|
||||
$page['title'] = getlocal("settings.title");
|
||||
$page['menuid'] = "settings";
|
||||
|
||||
@ -39,15 +41,7 @@ require_once('inc_errors.php');
|
||||
<form name="performance" method="post" action="<?php echo $webimroot ?>/operator/performance.php">
|
||||
|
||||
<div>
|
||||
<?php if($page['tabs']) { ?>
|
||||
<ul class="tabs">
|
||||
|
||||
<?php foreach($page['tabs'] as $k => $v) { if($v) { ?>
|
||||
<li><a href="<?php echo $v ?>"><?php echo $k ?></a></li>
|
||||
<?php } else { ?>
|
||||
<li class="active"><a href="#"><?php echo $k ?></a></li><?php }} ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<?php print_tabbar(); ?>
|
||||
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
|
||||
|
||||
<div class="fieldForm">
|
||||
|
@ -20,6 +20,8 @@
|
||||
*/
|
||||
|
||||
require_once("inc_menu.php");
|
||||
require_once("inc_tabbar.php");
|
||||
|
||||
$page['title'] = getlocal("permissions.title");
|
||||
$page['menuid'] = $page['opid'] == $page['currentopid'] ? "profile" : "operators";
|
||||
|
||||
@ -39,15 +41,7 @@ require_once('inc_errors.php');
|
||||
<form name="permissionsForm" method="post" action="<?php echo $webimroot ?>/operator/permissions.php">
|
||||
<input type="hidden" name="op" value="<?php echo $page['opid'] ?>"/>
|
||||
<div>
|
||||
<?php if($page['tabs']) { ?>
|
||||
<ul class="tabs">
|
||||
|
||||
<?php foreach($page['tabs'] as $k => $v) { if($v) { ?>
|
||||
<li><a href="<?php echo $v ?>"><?php echo $k ?></a></li>
|
||||
<?php } else { ?>
|
||||
<li class="active"><a href="#"><?php echo $k ?></a></li><?php }} ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<?php print_tabbar(); ?>
|
||||
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
|
||||
|
||||
<p>
|
||||
|
@ -20,6 +20,8 @@
|
||||
*/
|
||||
|
||||
require_once("inc_menu.php");
|
||||
require_once("inc_tabbar.php");
|
||||
|
||||
$page['title'] = getlocal("settings.title");
|
||||
$page['menuid'] = "settings";
|
||||
|
||||
@ -39,15 +41,7 @@ require_once('inc_errors.php');
|
||||
<form name="settings" method="post" action="<?php echo $webimroot ?>/operator/settings.php">
|
||||
|
||||
<div>
|
||||
<?php if($page['tabs']) { ?>
|
||||
<ul class="tabs">
|
||||
|
||||
<?php foreach($page['tabs'] as $k => $v) { if($v) { ?>
|
||||
<li><a href="<?php echo $v ?>"><?php echo $k ?></a></li>
|
||||
<?php } else { ?>
|
||||
<li class="active"><a href="#"><?php echo $k ?></a></li><?php }} ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<?php print_tabbar(); ?>
|
||||
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
|
||||
|
||||
<div class="fieldForm">
|
||||
|
@ -20,6 +20,8 @@
|
||||
*/
|
||||
|
||||
require_once("inc_menu.php");
|
||||
require_once("inc_tabbar.php");
|
||||
|
||||
$page['title'] = getlocal("page.preview.title");
|
||||
$page['menuid'] = "settings";
|
||||
|
||||
@ -32,15 +34,7 @@ function tpl_content() { global $page, $webimroot;
|
||||
|
||||
<form name="preview" method="get" action="<?php echo $webimroot ?>/operator/themes.php">
|
||||
<div>
|
||||
<?php if($page['tabs']) { ?>
|
||||
<ul class="tabs">
|
||||
|
||||
<?php foreach($page['tabs'] as $k => $v) { if($v) { ?>
|
||||
<li><a href="<?php echo $v ?>"><?php echo $k ?></a></li>
|
||||
<?php } else { ?>
|
||||
<li class="active"><a href="#"><?php echo $k ?></a></li><?php }} ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<?php print_tabbar(); ?>
|
||||
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
|
||||
|
||||
<div class="fieldForm">
|
||||
|
Loading…
Reference in New Issue
Block a user