mirror of
https://github.com/Mibew/tray.git
synced 2025-01-22 18:10:34 +03:00
rename query parameters
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@432 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
2fb7e37d7b
commit
aa8e7241d5
@ -17,7 +17,7 @@ require_once('../libs/operator.php');
|
||||
|
||||
$operator = check_login();
|
||||
|
||||
$page = array('depid' => '');
|
||||
$page = array('grid' => '');
|
||||
$errors = array();
|
||||
$groupid = '';
|
||||
|
||||
@ -70,7 +70,7 @@ function update_group($groupid,$name,$descr,$commonname,$commondescr) {
|
||||
|
||||
|
||||
if( isset($_POST['name'])) {
|
||||
$groupid = verifyparam( "dep", "/^(\d{1,9})?$/", "");
|
||||
$groupid = verifyparam( "gid", "/^(\d{1,9})?$/", "");
|
||||
$name = getparam('name');
|
||||
$description = getparam('description');
|
||||
$commonname = getparam('commonname');
|
||||
@ -99,22 +99,22 @@ if( isset($_POST['name'])) {
|
||||
$page['formdescription'] = topage($description);
|
||||
$page['formcommonname'] = topage($commonname);
|
||||
$page['formcommondescription'] = topage($commondescription);
|
||||
$page['depid'] = topage($groupid);
|
||||
$page['grid'] = topage($groupid);
|
||||
}
|
||||
|
||||
} else if( isset($_GET['dep']) ) {
|
||||
$groupid = verifyparam( 'dep', "/^\d{1,9}$/");
|
||||
} else if( isset($_GET['gid']) ) {
|
||||
$groupid = verifyparam( 'gid', "/^\d{1,9}$/");
|
||||
$group = group_by_id($groupid);
|
||||
|
||||
if( !$group ) {
|
||||
$errors[] = getlocal("page.group.no_such");
|
||||
$page['depid'] = topage($groupid);
|
||||
$page['grid'] = topage($groupid);
|
||||
} else {
|
||||
$page['formname'] = topage($group['vclocalname']);
|
||||
$page['formdescription'] = topage($group['vclocaldescription']);
|
||||
$page['formcommonname'] = topage($group['vccommonname']);
|
||||
$page['formcommondescription'] = topage($group['vccommondescription']);
|
||||
$page['depid'] = topage($group['groupid']);
|
||||
$page['grid'] = topage($group['groupid']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ if( isset($_GET['act']) && $_GET['act'] == 'del' ) {
|
||||
|
||||
// TODO check permissions, delete in other places
|
||||
|
||||
$groupid = verifyparam( "dep", "/^(\d{1,9})?$/");
|
||||
$groupid = verifyparam( "gid", "/^(\d{1,9})?$/");
|
||||
|
||||
$link = connect();
|
||||
perform_query("delete from chatgroup where groupid = $groupid",$link);
|
||||
|
@ -19,10 +19,10 @@ $page['menuid'] = "groups";
|
||||
function tpl_content() { global $page, $webimroot, $errors;
|
||||
?>
|
||||
|
||||
<?php if( $page['depid'] ) { ?>
|
||||
<?php if( $page['grid'] ) { ?>
|
||||
<?php echo getlocal("page.group.intro") ?>
|
||||
<?php } ?>
|
||||
<?php if( !$page['depid'] ) { ?>
|
||||
<?php if( !$page['grid'] ) { ?>
|
||||
<?php echo getlocal("page.group.create_new") ?>
|
||||
<?php } ?>
|
||||
<br />
|
||||
@ -32,7 +32,7 @@ require_once('inc_errors.php');
|
||||
?>
|
||||
|
||||
<form name="groupForm" method="post" action="<?php echo $webimroot ?>/operator/group.php">
|
||||
<input type="hidden" name="dep" value="<?php echo $page['depid'] ?>"/>
|
||||
<input type="hidden" name="gid" value="<?php echo $page['grid'] ?>"/>
|
||||
<div>
|
||||
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
|
||||
|
||||
|
@ -48,21 +48,21 @@ function tpl_content() { global $page, $webimroot;
|
||||
<tbody>
|
||||
<?php
|
||||
if(count($page['groups']) > 0) {
|
||||
foreach( $page['groups'] as $dep ) { ?>
|
||||
foreach( $page['groups'] as $grp ) { ?>
|
||||
<tr>
|
||||
<td class="notlast">
|
||||
<a href="<?php echo $webimroot ?>/operator/group.php?dep=<?php echo $dep['groupid'] ?>" class="man">
|
||||
<?php echo htmlspecialchars(topage($dep['vclocalname'])) ?>
|
||||
<a href="<?php echo $webimroot ?>/operator/group.php?gid=<?php echo $grp['groupid'] ?>" class="man">
|
||||
<?php echo htmlspecialchars(topage($grp['vclocalname'])) ?>
|
||||
</a>
|
||||
</td>
|
||||
<td class="notlast">
|
||||
<?php echo $dep['vclocaldescription'] ? htmlspecialchars(topage($dep['vclocaldescription'])) : "<none>" ?>
|
||||
<?php echo $grp['vclocaldescription'] ? htmlspecialchars(topage($grp['vclocaldescription'])) : "<none>" ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo htmlspecialchars(topage($dep['inumofagents'])) ?>
|
||||
<?php echo htmlspecialchars(topage($grp['inumofagents'])) ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $webimroot ?>/operator/groups.php?act=del&dep=<?php echo $dep['groupid'] ?>">
|
||||
<a href="<?php echo $webimroot ?>/operator/groups.php?act=del&gid=<?php echo $grp['groupid'] ?>">
|
||||
remove
|
||||
</a>
|
||||
</td>
|
||||
|
Loading…
Reference in New Issue
Block a user