java/src/messenger/webim/libs/groups.php

36 lines
1005 B
PHP
Raw Normal View History

<?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 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();
}
}
?>