2008-10-04 03:35:17 +04:00
|
|
|
<?php
|
|
|
|
/*
|
2009-06-04 02:44:32 +04:00
|
|
|
* This file is part of Mibew Messenger project.
|
2008-10-04 03:35:17 +04:00
|
|
|
*
|
2009-06-04 02:44:32 +04:00
|
|
|
* Copyright (c) 2005-2009 Mibew 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-06-05 13:51:22 +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
|
|
|
|
}
|
|
|
|
|
2009-06-05 15:38:24 +04:00
|
|
|
function tpl_content() { global $page, $webimroot, $errors;
|
2009-03-12 04:07:35 +03:00
|
|
|
?>
|
2008-10-04 03:35:17 +04:00
|
|
|
|
2009-03-12 04:07:35 +03:00
|
|
|
<?php echo getlocal("page_ban.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
|
|
|
|
|
|
|
<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">
|
2009-06-05 13:51:22 +04:00
|
|
|
<a href="ban.php?id=<?php echo $b['banid'] ?>" class="man" id="ti<?php echo $b['banid'] ?>">
|
2009-03-12 04:07:35 +03:00
|
|
|
<?php echo htmlspecialchars($b['address']) ?>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="notlast">
|
2009-06-05 17:13:58 +04:00
|
|
|
<?php echo date_to_text($b['till']) ?>
|
2009-03-12 04:07:35 +03:00
|
|
|
</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>
|
2009-06-05 13:51:22 +04:00
|
|
|
<a class="removelink" id="i<?php echo $b['banid'] ?>" href="<?php echo $webimroot ?>/operator/blocked.php?act=del&id=<?php echo $b['banid'] ?>">
|
2009-03-12 04:07:35 +03:00
|
|
|
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']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
2009-06-05 13:51:22 +04:00
|
|
|
<script type="text/javascript" language="javascript"><!--
|
|
|
|
$('a.removelink').click(function(){
|
|
|
|
var addr = $("#t"+this.id).text();
|
2009-06-05 15:38:24 +04:00
|
|
|
return confirm("<?php echo getlocalforJS("page_bans.confirm", array('"+$.trim(addr)+"')) ?>");
|
2009-06-05 13:51:22 +04:00
|
|
|
});
|
|
|
|
//--></script>
|
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');
|
|
|
|
?>
|