2007-10-10 19:15:47 +04:00
|
|
|
<?php
|
|
|
|
/*
|
2009-06-04 02:44:32 +04:00
|
|
|
* This file is part of Mibew Messenger project.
|
2009-08-04 20:30:39 +04:00
|
|
|
*
|
2011-02-16 03:22:22 +03:00
|
|
|
* Copyright (c) 2005-2011 Mibew Messenger Community
|
2009-08-04 19:03:27 +04:00
|
|
|
* 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
|
2009-08-04 20:30:39 +04:00
|
|
|
*
|
2009-08-04 17:38:37 +04:00
|
|
|
* 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.
|
2009-08-04 20:30:39 +04:00
|
|
|
*
|
2007-10-10 19:15:47 +04:00
|
|
|
* Contributors:
|
|
|
|
* Evgeny Gryaznov - initial API and implementation
|
|
|
|
*/
|
|
|
|
|
2009-03-12 04:07:35 +03:00
|
|
|
require_once("inc_menu.php");
|
|
|
|
$page['title'] = getlocal("page_agents.title");
|
|
|
|
$page['menuid'] = "operators";
|
2007-10-10 19:15:47 +04:00
|
|
|
|
2009-06-05 15:38:24 +04:00
|
|
|
function tpl_header() { global $page, $webimroot;
|
|
|
|
?>
|
2011-04-07 02:35:03 +04:00
|
|
|
<script type="text/javascript" language="javascript" src="<?php echo $webimroot ?>/js/jquery-1.4.2.min.js"></script>
|
2009-06-05 15:38:24 +04:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
|
|
|
|
function tpl_content() { global $page, $webimroot, $errors;
|
2009-03-12 04:07:35 +03:00
|
|
|
?>
|
2007-10-10 19:15:47 +04:00
|
|
|
|
2009-03-12 04:07:35 +03:00
|
|
|
<?php echo getlocal("page_agents.intro") ?>
|
|
|
|
<br />
|
|
|
|
<br />
|
2009-06-05 15:38:24 +04:00
|
|
|
<?php
|
|
|
|
require_once('inc_errors.php');
|
|
|
|
?>
|
2009-03-12 04:07:35 +03:00
|
|
|
|
2009-06-05 15:38:24 +04:00
|
|
|
<?php if($page['canmodify']) { ?>
|
2009-03-12 04:07:35 +03:00
|
|
|
<div class="tabletool">
|
|
|
|
<img src='<?php echo $webimroot ?>/images/buttons/createagent.gif' border="0" alt="" />
|
|
|
|
<a href='<?php echo $webimroot ?>/operator/operator.php' title="<?php echo getlocal("page_agents.new_agent") ?>">
|
|
|
|
<?php echo getlocal("page_agents.new_agent") ?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<br clear="all"/>
|
2009-06-05 15:38:24 +04:00
|
|
|
<?php } ?>
|
2009-03-12 04:07:35 +03:00
|
|
|
|
|
|
|
<table class="list">
|
|
|
|
<thead>
|
|
|
|
<tr class="header">
|
|
|
|
<th>
|
|
|
|
<?php echo getlocal("page_agents.login") ?>
|
|
|
|
</th><th>
|
|
|
|
<?php echo getlocal("page_agents.agent_name") ?>
|
|
|
|
</th><th>
|
2009-06-05 17:13:58 +04:00
|
|
|
<?php echo getlocal("page_agents.status") ?>
|
2009-06-05 15:38:24 +04:00
|
|
|
<?php if($page['canmodify']) { ?>
|
|
|
|
</th><th>
|
|
|
|
<?php } ?>
|
2009-03-12 04:07:35 +03:00
|
|
|
</th>
|
2007-10-10 19:15:47 +04:00
|
|
|
</tr>
|
2009-03-12 04:07:35 +03:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2007-10-10 19:15:47 +04:00
|
|
|
<?php foreach( $page['allowedAgents'] as $a ) { ?>
|
|
|
|
<tr>
|
2009-03-12 04:07:35 +03:00
|
|
|
<td class="notlast">
|
2009-06-05 15:38:24 +04:00
|
|
|
<a id="ti<?php echo $a['operatorid'] ?>" href="<?php echo $webimroot ?>/operator/operator.php?op=<?php echo $a['operatorid'] ?>" class="man">
|
2009-03-12 04:07:35 +03:00
|
|
|
<?php echo htmlspecialchars(topage($a['vclogin'])) ?>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="notlast">
|
2009-06-05 17:13:58 +04:00
|
|
|
<?php echo htmlspecialchars(topage($a['vclocalename'])) ?> / <?php echo htmlspecialchars(topage($a['vccommonname'])) ?>
|
2009-03-12 04:07:35 +03:00
|
|
|
</td>
|
2011-02-21 03:02:39 +03:00
|
|
|
<td class="notlast">
|
|
|
|
<?php if(operator_is_available($a)) { ?>
|
2009-06-05 17:13:58 +04:00
|
|
|
<?php echo getlocal("page_agents.isonline") ?>
|
2011-02-21 03:02:39 +03:00
|
|
|
<?php } else if(operator_is_away($a)) { ?>
|
2009-07-24 11:37:58 +04:00
|
|
|
<?php echo getlocal("page_agents.isaway") ?>
|
2009-06-05 17:13:58 +04:00
|
|
|
<?php } else { ?>
|
|
|
|
<?php echo date_to_text(time() - $a['time']) ?>
|
|
|
|
<?php } ?>
|
2007-10-10 19:15:47 +04:00
|
|
|
</td>
|
2009-06-05 15:38:24 +04:00
|
|
|
<?php if($page['canmodify']) { ?>
|
|
|
|
<td>
|
|
|
|
<a class="removelink" id="i<?php echo $a['operatorid'] ?>" href="<?php echo $webimroot ?>/operator/operators.php?act=del&id=<?php echo $a['operatorid'] ?>">
|
|
|
|
remove
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<?php } ?>
|
2007-10-10 19:15:47 +04:00
|
|
|
</tr>
|
|
|
|
<?php } ?>
|
2009-03-12 04:07:35 +03:00
|
|
|
</tbody>
|
2007-10-10 19:15:47 +04:00
|
|
|
</table>
|
2009-06-05 15:38:24 +04:00
|
|
|
<script type="text/javascript" language="javascript"><!--
|
|
|
|
$('a.removelink').click(function(){
|
|
|
|
var login = $("#t"+this.id).text();
|
|
|
|
return confirm("<?php echo getlocalforJS("page_agents.confirm", array('"+$.trim(login)+"')) ?>");
|
|
|
|
});
|
|
|
|
//--></script>
|
2007-10-10 19:15:47 +04:00
|
|
|
|
2009-03-12 04:07:35 +03:00
|
|
|
<?php
|
|
|
|
} /* content */
|
2007-10-10 19:15:47 +04:00
|
|
|
|
2009-03-12 04:07:35 +03:00
|
|
|
require_once('inc_main.php');
|
2009-08-04 20:30:39 +04:00
|
|
|
?>
|