tray/src/messenger/webim/libs/groups.php
Evgeny Gryaznov b887941d14 redirect to groups
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@443 c66351dc-e62f-0410-b875-e3a5c0b9693f
2009-03-28 23:51:33 +00:00

44 lines
1.2 KiB
PHP

<?php
/*
* This file is part of Web Instant Messenger project.
*
* Copyright (c) 2005-2009 Web Messenger Community
* 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
*/
function group_by_id($id) {
$link = connect();
$group = select_one_row(
"select * from chatgroup where groupid = $id", $link );
mysql_close($link);
return $group;
}
function get_group_name($group) {
global $home_locale, $current_locale;
if( $home_locale == $current_locale || !$group['vccommonname'] )
return $group['vclocalname'];
else
return $group['vccommonname'];
}
function setup_group_settings_tabs($gid, $active) {
global $page, $webimroot, $settings;
if($gid) {
$page['tabs'] = array(
getlocal("page_group.tab.main") => $active != 0 ? "$webimroot/operator/group.php?gid=$gid" : "",
getlocal("page_group.tab.members") => $active != 1 ? "$webimroot/operator/groupmembers.php?gid=$gid" : "",
);
} else {
$page['tabs'] = array();
}
}
?>