www; $this->www.="?ok=ok"; if($this->order_by){ $opts['order_by']=$this->order_by; $opts['sorder']=$this->sorder; $this->www.="&order_by=".$this->order_by."&sorder=".$this->sorder; } $opts['limit']=$this->limit; $this->www.="&limit=".$this->limit; if($this->where){ $opts['where']=$this->where; $this->www.="&where=".$this->where; } $source=file_get_contents($www."?content=".base64_encode(serialize($opts))); //$file=fopen($this->www,"r"); //$source = fread($file,filesize($this->www)); $this->data=unserialize(base64_decode($source)); //echo $source."

"; //echo "click

"; //print_r($this->data)."

"; } function getCount(){ $this->count=$this->data[0]['count']; } function getIdByCode($code){ $r=mysql_fetch_array(mysql_query("select id from ecmproducts where code like '".$code."'")); return $r['id']; } function formatNumber($no){ return number_format($no,$GLOBALS['sugar_config']['default_currency_significant_digits'],$GLOBALS['sugar_config']['default_decimal_seperator'],$GLOBALS['sugar_config']['default_number_grouping_seperator']); } function timeDate($time){ if($time!='0000-00-00')return $GLOBALS['timedate']->to_display_date($time); } function sortableColumn($name,$field,$ascdesc,$width=10,$index="index"){ $img=""; if($ascdesc=="asc"){ $sorder="desc"; if($this->order_by==$field)$img="_up"; } else { $sorder="asc"; if($this->order_by==$field)$img="_down"; } $str=''.$name.' '; return $str; } function selectStatus($value){ $arr=array("Created","Approved","Delivered","Canceled"); $str.=''; foreach($arr as $a){ $str.='