$user_table = $common->prefix_table("user_table"); $pos = "select position from $user_table where user_id='$user_id'"; $rrs = $db_object->get_a_line($pos); $position = $rrs['position']; $rss = $common->get_chain_below($position,$db_object,$twodarr); $res = $common->get_user_id($db_object,$rss); $pattern="/<{record_loopstart(.*?)<{record_loopend}>/s"; preg_match($pattern,$file,$arr); $match=$arr[0]; $str=""; for($i=0;$i<count($res);$i++) { $uid = $res[$i]['user_id']; $uname = $res[$i]['username']; $email = $res[$i]['email']; $str.=preg_replace("/\<\{(.*?)\}\>/e","$$1",$match); } $file=preg_replace($pattern,$str,$file); echo $file; }//end view }//end phonedir $ob = new phonedir; $ob->view($db_object,$common,$default,$user_id,$emp_id,$name,$email,$sid); include_once("popupfooter.php"); ?>
$rs = $db_object->get_a_line($qry); $position = $rs['position']; $rss = $common->get_chain_below($position,$db_object,$twodarr); $res = $common->get_user_id($db_object,$rss); $pattern="/<{record_loopstart(.*?)<{record_loopend}>/s"; preg_match($pattern,$file,$arr); $match=$arr[0]; $str=""; for($i=0;$i<count($res);$i++) { //$qry = "select $uid = $res[$i]['user_id']; $uname = $res[$i]['username']; $phone = $res[$i]['office_phone']; $str.=preg_replace("/\<\{(.*?)\}\>/e","$$1",$match); } $file=preg_replace($pattern,$str,$file); echo $file; }//end view }//end phonedir $ob = new phonedir; $ob->view($db_object,$common,$default,$user_id,$emp_id); include_once("popupfooter.php"); ?>