From 2e4d79f915a4d16c6154d34f114153a79ed698cc Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 20 Dec 2006 07:19:09 +0000 Subject: [PATCH] Removed phone status from user divlist git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5439 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/users/class_divListUsers.inc | 54 +--------------------- 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc index 6d63ff3fa..3182de791 100644 --- a/plugins/admin/users/class_divListUsers.inc +++ b/plugins/admin/users/class_divListUsers.inc @@ -172,29 +172,6 @@ class divListUsers extends MultiSelectWindow END :: Variable init ********************/ - /* Get Configuration for goFon DB (if it is set), to connect to the asterisk tables. - * Read Sip Table for specified account (for each user with phoneAccount). - * Check the attributes ip port and regseconds. - * If regseconds is set and >0 , the phone is logged in. - * Else the phone is currently not logged. - * If we can't read any Data from the DB or there is no goFon DB specified - * show old style without status icons. - */ - $r_db =false; - $r_con =false; - if (isset($_SESSION['config']->data['SERVERS']['FON'][0])){ - $a_SETUP= $_SESSION['config']->data['SERVERS']['FON'][0]; - $r_con = false; - $r_db = false; - if(is_callable("mysql_pconnect")){ - $r_con= @mysql_pconnect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']); - // Check if we are connected correctly - if($r_con){ - $r_db = @mysql_select_db($a_SETUP['DB'],$r_con); - } - } - } - /******************** Append entries to divlist @@ -204,8 +181,6 @@ class divListUsers extends MultiSelectWindow foreach($list as $key => $val){ /* Create phonaccopunt informationm, if conencted && is phoneAccount */ - $connected = ""; // This string represents timestamp or offline status - $ip_port = ""; // String that will represent ip : port of the connected phone if((in_array("goFonAccount" ,$val['objectClass']))){ /* Set defaults */ @@ -213,26 +188,6 @@ class divListUsers extends MultiSelectWindow $fonac = preg_replace("/%KEY%/", "$key", $fonac); $fonac = preg_replace("/%title%/", "", $fonac); - /* Database connection is ok ?*/ - if(($r_db)&&(is_callable("mysql_query"))){ - $res= @mysql_query("SELECT regseconds,name,port,ipaddr FROM ".$a_SETUP['SIP_TABLE']." WHERE (name='".$val['uid'][0]."')"); - $mysql_entry = @mysql_fetch_row($res); - if(is_array($mysql_entry)){ - if((isset($mysql_entry[0]))&&($mysql_entry[0]>1)){ - $connected = " | "._("Online")." : ".gmdate("d.m.Y H:i:s",($mysql_entry[0]+(60*60))); - $fonac = preg_replace("/%image%/", "select_phone_connected.png", $fonimg); - $fonac = preg_replace("/%KEY%/", "$key", $fonac); - $fonac = preg_replace("/%title%/", $connected, $fonac); - #$ip_port= " - ".$mysql_entry[3].":".$mysql_entry[2]; - } - if((isset($mysql_entry[0]))&&($mysql_entry[0]==0)){ - $connected = " | "._("Offline"); - $fonac = preg_replace("/%image%/", "select_phone.png", $fonimg); - $fonac = preg_replace("/%KEY%/", "$key", $fonac); - $fonac = preg_replace("/%title%/", $connected, $fonac); - } - } - } }else{ $fonac=$empty; } @@ -270,7 +225,7 @@ class divListUsers extends MultiSelectWindow /* Create each field */ $field1 = array("string" => sprintf($tpl,$val['dn']), "attach" => "style='text-align:center;width:20px;'"); - $field2 = array("string" => sprintf($editlink,$key,$display).$ip_port, "attach" => "style='' title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'"); + $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'"); $field3 = array("string" => $UseImg, "attach" => "style='width:152px;'"); $field4 = array("string" => $s_img_create_from_template.preg_replace("/%KEY%/", "$key", $action), "attach" => "style='width:102px;border-right:0px; text-align:right;'"); @@ -286,13 +241,6 @@ class divListUsers extends MultiSelectWindow } } - /* close database connection, if it was opened */ - if(isset($r_con)){ - if((is_callable("mysql_close"))&&($r_con)){ - @mysql_close($r_con); - } - } - } function Save() -- 2.30.2