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.
|
2007-10-10 19:15:47 +04:00
|
|
|
*
|
2009-06-04 02:44:32 +04:00
|
|
|
* Copyright (c) 2005-2009 Mibew Messenger Community
|
2007-10-10 19:15:47 +04:00
|
|
|
* All rights reserved. This program and the accompanying materials
|
|
|
|
* are made available under 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
|
|
|
|
*
|
|
|
|
* 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;
|
|
|
|
?>
|
|
|
|
<script type="text/javascript" language="javascript" src="<?php echo $webimroot ?>/js/jquery-1.3.2.min.js"></script>
|
|
|
|
<?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>
|
|
|
|
<td>
|
2009-06-05 17:13:58 +04:00
|
|
|
<?php if(is_online($a)) { ?>
|
|
|
|
<?php echo getlocal("page_agents.isonline") ?>
|
|
|
|
<?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');
|
|
|
|
?>
|