fixes in operator groups

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@434 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2009-03-22 23:09:31 +00:00
parent a4163d4132
commit 11663d2dd5
4 changed files with 23 additions and 10 deletions

View File

@ -13,14 +13,24 @@
*/
function setup_operator_settings_tabs($opId, $active) {
global $page, $webimroot;
global $page, $webimroot, $settings;
loadsettings();
if($opId) {
$page['tabs'] = array(
getlocal("page_agent.tab.main") => $active != 0 ? "$webimroot/operator/operator.php?op=$opId" : "",
getlocal("page_agent.tab.avatar") => $active != 1 ? "$webimroot/operator/avatar.php?op=$opId" : "",
getlocal("page_agent.tab.groups") => $active != 2 ? "$webimroot/operator/opgroups.php?op=$opId" : "",
getlocal("page_agent.tab.permissions") => $active != 3 ? "$webimroot/operator/permissions.php?op=$opId" : ""
);
if($settings['enablegroups'] == '1') {
$page['tabs'] = array(
getlocal("page_agent.tab.main") => $active != 0 ? "$webimroot/operator/operator.php?op=$opId" : "",
getlocal("page_agent.tab.avatar") => $active != 1 ? "$webimroot/operator/avatar.php?op=$opId" : "",
getlocal("page_agent.tab.groups") => $active != 2 ? "$webimroot/operator/opgroups.php?op=$opId" : "",
getlocal("page_agent.tab.permissions") => $active != 3 ? "$webimroot/operator/permissions.php?op=$opId" : ""
);
} else {
$page['tabs'] = array(
getlocal("page_agent.tab.main") => $active != 0 ? "$webimroot/operator/operator.php?op=$opId" : "",
getlocal("page_agent.tab.avatar") => $active != 1 ? "$webimroot/operator/avatar.php?op=$opId" : "",
getlocal("page_agent.tab.permissions") => $active != 3 ? "$webimroot/operator/permissions.php?op=$opId" : ""
);
}
} else {
$page['tabs'] = array();
}

View File

@ -188,6 +188,7 @@ my_settings.error.password_match=Entered passwords do not match
no_such_operator=No such operator
operator.groups.title=Operator groups
operator.groups.intro=Choose groups according to operator skills.
operator.group.no_description=<no description>
page.analysis.search.head_host=Visitor's address
page.analysis.search.head_messages=Visitor's messages
page.analysis.search.head_name=Name

View File

@ -25,6 +25,8 @@ if( isset($_GET['act']) && $_GET['act'] == 'del' ) {
$link = connect();
perform_query("delete from chatgroup where groupid = $groupid",$link);
perform_query("delete from chatgroupoperator where groupid = $groupid",$link);
perform_query("update chatthread set groupid = 0 where groupid = $groupid",$link);
mysql_close($link);
header("Location: $webimroot/operator/groups.php");
exit;

View File

@ -45,11 +45,11 @@ require_once('inc_errors.php');
</p>
<?php foreach( $page['groups'] as $pm ) { ?>
<div class="field">
<div class="flabel"><?php echo $pm['vclocalname'] ?></div>
<div class="flabel"><?php echo htmlspecialchars(topage($pm['vclocalname'])) ?></div>
<div class="fvalue">
<input type="checkbox" name="group<?php echo $pm['groupid'] ?>" value="on"<?php echo form_value_mb('group',$pm['groupid']) ? " checked=\"checked\"" : "" ?>/>
</div>
<div class="fdescr"> &mdash; <?php echo $pm['vclocaldescription'] ?></div>
<div class="fdescr"> &mdash; <?php echo $pm['vclocaldescription'] ? htmlspecialchars(topage($pm['vclocaldescription'])) : getlocal("operator.group.no_description") ?></div>
<br clear="left"/>
</div>
<?php } ?>