2008-10-04 03:35:17 +04:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* This file is part of Web Instant Messenger project.
|
|
|
|
*
|
2009-01-14 01:00:34 +03:00
|
|
|
* Copyright (c) 2005-2009 Web Messenger Community
|
2008-10-04 03:35:17 +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_bans.title");
|
|
|
|
$page['menuid'] = "blocked";
|
2008-10-04 03:35:17 +04:00
|
|
|
|
2009-03-12 04:07:35 +03:00
|
|
|
function tpl_content() { global $page, $webimroot;
|
|
|
|
?>
|
2008-10-04 03:35:17 +04:00
|
|
|
|
2009-03-12 04:07:35 +03:00
|
|
|
<?php echo getlocal("page_ban.intro") ?>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
|
|
|
|
<div class="tabletool">
|
|
|
|
<img src="<?php echo $webimroot ?>/images/buttons/createban.gif" border="0" alt=""/>
|
|
|
|
<a href="<?php echo $webimroot ?>/operator/ban.php" title="<?php echo getlocal("page_bans.add") ?>">
|
|
|
|
<?php echo getlocal("page_bans.add") ?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<br clear="all"/>
|
|
|
|
|
|
|
|
<?php if( $page['pagination'] ) { ?>
|
|
|
|
|
|
|
|
<table class="list">
|
|
|
|
<thead>
|
|
|
|
<tr class="header">
|
|
|
|
<th>
|
|
|
|
<?php echo getlocal("form.field.address") ?>
|
|
|
|
</th><th>
|
|
|
|
<?php echo getlocal("page_bans.to") ?>
|
|
|
|
</th><th>
|
|
|
|
<?php echo getlocal("form.field.ban_comment") ?>
|
|
|
|
</th><th>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
|
|
if( $page['pagination.items'] ) {
|
|
|
|
foreach( $page['pagination.items'] as $b ) { ?>
|
2008-10-04 03:35:17 +04:00
|
|
|
<tr>
|
2009-03-12 04:07:35 +03:00
|
|
|
<td class="notlast">
|
|
|
|
<a href="ban.php?id=<?php echo $b['banid'] ?>" class="man">
|
|
|
|
<?php echo htmlspecialchars($b['address']) ?>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="notlast">
|
|
|
|
<?php echo strftime("%B, %d %Y %H:%M:%S", $b['till']) ?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<?php
|
|
|
|
if( strlen(topage($b['comment'])) > 30 ) {
|
|
|
|
echo htmlspecialchars(substr(topage($b['comment']),0,30));
|
|
|
|
} else {
|
|
|
|
echo htmlspecialchars(topage($b['comment']));
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a href="<?php echo $webimroot ?>/operator/blocked.php?act=del&id=<?php echo $b['banid'] ?>">
|
|
|
|
remove
|
|
|
|
</a>
|
|
|
|
</td>
|
2008-10-04 03:35:17 +04:00
|
|
|
</tr>
|
2009-03-12 04:07:35 +03:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
?>
|
2008-10-04 03:35:17 +04:00
|
|
|
<tr>
|
2009-03-12 04:07:35 +03:00
|
|
|
<td colspan="4">
|
|
|
|
<?php echo getlocal("tag.pagination.no_items.elements") ?>
|
|
|
|
</td>
|
2008-10-04 03:35:17 +04:00
|
|
|
</tr>
|
2009-03-12 04:07:35 +03:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</tbody>
|
2008-10-04 03:35:17 +04:00
|
|
|
</table>
|
2009-03-12 04:07:35 +03:00
|
|
|
<?php
|
|
|
|
if( $page['pagination.items'] ) {
|
|
|
|
echo "<br/>";
|
|
|
|
echo generate_pagination($page['pagination']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
2008-10-04 03:35:17 +04:00
|
|
|
|
2009-03-12 04:07:35 +03:00
|
|
|
<?php
|
|
|
|
} /* content */
|
2008-10-04 03:35:17 +04:00
|
|
|
|
2009-03-12 04:07:35 +03:00
|
|
|
require_once('inc_main.php');
|
|
|
|
?>
|