Add Sametime to the list of supported protocols, add 'Novell' in front of GroupWise to match the About box, remove 'MSN window closing notification' from the feature list.
<?php
classUsers{
var$user_info=array();
var$is_logged_in=false;
functionUsers(){
global$sid,$db;
if(empty($sid)){
$this->is_logged_in=false;
return;
}
$db->query(
"SELECT * FROM Users WHERE SESSION_ID='".$sid."'"
);
if($db->num_rows()>0){
$this->user_info=$db->result_array();
$this->is_logged_in=true;
}
}
functionlogged_in(){
global$sid;
return$this->is_logged_in;
}
functionlogin($username,$password){
global$session;
if($session->login($username,$password)){
$this->is_logged_in=true;
returntrue;
}else{
returnfalse;
}
}
functionlogout(){
global$session;
$session->destroy();
$this->is_logged_in=false;
}
functionuser_exists($username){
global$db;
$db->query("SELECT * FROM Users WHERE USERNAME='$username'");
if($db->num_rows()>0){
$info=$db->result_array();
if(!empty($info["USERNAME"])){
returntrue;
}
}
returnfalse;
}
functionget_user_info_from_id($userid){
global$db;
if($userid==-1){returnNULL;}
if($userid==$this->user_info["USER_ID"]){
return$this->user_info;
}
$db->query(
"SELECT * FROM Users WHERE USER_ID=".$userid
);
if($db->num_rows()>0){
return$db->result_array();
}
returnNULL;
}
functionget_user_info_from_username($username){
global$db;
if($username==""){returnNULL;}
if($username==$this->user_info["USERNAME"]){
return$this->user_info;
}
$db->query(
"SELECT * FROM Users WHERE USERNAME='".$username."'"