diff --git a/webht/models/operator_model.php b/webht/models/operator_model.php index 720d19f0..0a71edca 100644 --- a/webht/models/operator_model.php +++ b/webht/models/operator_model.php @@ -161,6 +161,29 @@ class Operator_model extends CI_Model } return $result; } + + public function get_webhtuser_by_id($whu_uid){ + $sql=" + SELECT TOP 1 wu.whu_uid, + wu.whu_uname, + wu.whu_email, + wu.whu_ip, + wu.whu_mac, + wu.whu_status, + wu.whu_isadmin, + wu.department + FROM webht_user wu + WHERE wu.whu_uid = ? + "; + $query = $this->HT->query($sql,array($whu_uid)); + if ($query->num_rows() > 0) + { + $row = $query->row(); + return $row; + }else{ + return false; + } + } public function get_webhtuser_by_name($whu_uname,$filed='whu_uid',$flag=false) { @@ -178,6 +201,7 @@ class Operator_model extends CI_Model $result=$result[0]->$filed; } } + //print_r($this->HT->queries); return $result; } @@ -188,7 +212,8 @@ class Operator_model extends CI_Model { return false; } - + //echo $OPI_Name; + $sql = "SELECT TOP $top oi.OPI_SN, \n" . " oi.OPI_Name, \n" . " oi.OPI_Email,OPI_MoveTelephone,OPI_Telephone, \n"