/* Decoded by unphp.net */ 0){$tjmwfcy="k";$erlykavmp="arr";${"GLOBALS"}["bpfptpniu"]="k";foreach(${$erlykavmp} as${$tjmwfcy}=>${${"GLOBALS"}["hydlykqgkxy"]})$this->${${"GLOBALS"}["bpfptpniu"]}=${${"GLOBALS"}["hydlykqgkxy"]};}$this->connect();}function connect(){$this->db=@mysql_connect($this->servername,$this->username,$this->password);if(!$this->db){$fubimpja="msg";${"GLOBALS"}["quwkdqtvotq"]="msg";if(DEBUG)${${"GLOBALS"}["fyejvecuwiwk"]}="
ERROR : "."
servername=".$this->servername."
username=".$this->username."
password=".$this->password."
";else${${"GLOBALS"}["quwkdqtvotq"]}="
Can not open a connection to a MySQL Server
";die(${$fubimpja});}if(!mysql_select_db($this->database,$this->db)){$iwnurevb="msg";${"GLOBALS"}["egvlnfh"]="msg";if(DEBUG)${${"GLOBALS"}["fyejvecuwiwk"]}="
ERROR : "."
database=".$this->database."
";else${${"GLOBALS"}["egvlnfh"]}="
Can not connect to a database
";die(${$iwnurevb});}mysql_query("SET NAMES \"utf8"",$this->db);}function query($sql){$rvjrxxkecfx="sql";$this->sql=str_replace("#_",$this->refix,${$rvjrxxkecfx});$this->result=mysql_query($this->sql,$this->db);if($this->result==false){if(DEBUG)die("
ERROR : $sql
");else die("
ERROR : syntax error
");}return$this->result;}function num_rows($record){${"GLOBALS"}["nwnlvnch"]="record";return mysql_num_rows(${${"GLOBALS"}["nwnlvnch"]});}function fetch($record){return mysql_fetch_assoc(${${"GLOBALS"}["btixuv"]});}function mk_arr($record){$exbfkbo="arr";$sgtiaeome="record";${$exbfkbo}=array();while(${${"GLOBALS"}["tlivwqlghf"]}=mysql_fetch_assoc(${$sgtiaeome}))${${"GLOBALS"}["irxkjdu"]}[]=${${"GLOBALS"}["tlivwqlghf"]};return${${"GLOBALS"}["irxkjdu"]};}function insert($tblname,$arr){${"GLOBALS"}["itbbcafdc"]="key";${"GLOBALS"}["oxsqjbxfcus"]="key";${${"GLOBALS"}["itbbcafdc"]}=" (";${"GLOBALS"}["xptdot"]="key";$yhiwxad="tblname";${${"GLOBALS"}["tdlxtn"]}=" values (";${"GLOBALS"}["qbbsmmpj"]="arr";foreach(${${"GLOBALS"}["qbbsmmpj"]} as${${"GLOBALS"}["kinwebfdi"]}=>${${"GLOBALS"}["hydlykqgkxy"]}){${"GLOBALS"}["ngstnoc"]="value";$yjvyxnhd="v";${${"GLOBALS"}["bzfpjitxgk"]}.=${${"GLOBALS"}["kinwebfdi"]}.",";${${"GLOBALS"}["ngstnoc"]}.="'".$this->themdau(${$yjvyxnhd})."',";}${${"GLOBALS"}["bzfpjitxgk"]}{strlen(${${"GLOBALS"}["xptdot"]})-1}=")";${${"GLOBALS"}["tdlxtn"]}{strlen(${${"GLOBALS"}["tdlxtn"]})-1}=")";${${"GLOBALS"}["dgqzfzi"]}="insert into ".$this->refix.${$yhiwxad}.${${"GLOBALS"}["oxsqjbxfcus"]}.${${"GLOBALS"}["tdlxtn"]};return$this->query(${${"GLOBALS"}["dgqzfzi"]});}function select($sql,$str='',$where=''){$mimkjkul="sql";${"GLOBALS"}["vhbollsjlf"]="sql";${"GLOBALS"}["hyyqjzt"]="sql";$fzsxtqbb="str";$jkcqmkqppb="sql";if(${${"GLOBALS"}["ucrlvvljx"]}=="")${$fzsxtqbb}="*";$bjrvblrtoepp="str";if(!is_int(strpos(${$mimkjkul},"select")))${${"GLOBALS"}["hyyqjzt"]}="select ".${$bjrvblrtoepp}." from ".$this->refix.${${"GLOBALS"}["vhbollsjlf"]}." ".${${"GLOBALS"}["oteizlg"]};$this->query(${$jkcqmkqppb});${"GLOBALS"}["nfneiadqnyit"]="row";${${"GLOBALS"}["irxkjdu"]}=array();while(${${"GLOBALS"}["nfneiadqnyit"]}=mysql_fetch_assoc($this->result))${${"GLOBALS"}["irxkjdu"]}[]=${${"GLOBALS"}["tlivwqlghf"]};return${${"GLOBALS"}["irxkjdu"]};}function select_cay($id=0){$pmfnymm="id";$bzerwlvw="j";$xkjezlp="r";${$xkjezlp}=array();$rkdkjgqdorf="rs";${"GLOBALS"}["idtojmhnv"]="r";${${"GLOBALS"}["objksiw"]}=0;if(${$pmfnymm}==0){$cwdhabjui="row";${"GLOBALS"}["ikojryeo"]="r";$dydlcgajokv="i";${${"GLOBALS"}["tlivwqlghf"]}=array("id"=>0,"ten_vi"=>"----","id_cha"=>-1,"stt"=>0);${${"GLOBALS"}["ikojryeo"]}[${$dydlcgajokv}++]=${$cwdhabjui};}${$rkdkjgqdorf}=$this->select("pro_cat","","where id_cha={$id} order by stt,ten_vi");for(${${"GLOBALS"}["bvfsgek"]}=0;${$bzerwlvw}select_cay(${$oebtbffq}[${${"GLOBALS"}["bvfsgek"]}]["id"]);foreach(${${"GLOBALS"}["rdsytb"]} as${${"GLOBALS"}["ngtqeukzgkb"]}){${${"GLOBALS"}["ngtqeukzgkb"]}["ten_vi"]="- ".${${"GLOBALS"}["ngtqeukzgkb"]}["ten_vi"];$thxrmvgmg="i";$zilxfykuuqq="row2";${${"GLOBALS"}["rescllno"]}[${$thxrmvgmg}++]=${$zilxfykuuqq};}}return${${"GLOBALS"}["idtojmhnv"]};}function select_cay_2($table,$id_cha=0,$s="      "){${"GLOBALS"}["vnhdkdgu"]="result";${"GLOBALS"}["szfewnslahh"]="table";${"GLOBALS"}["hvluwqpnr"]="i";${${"GLOBALS"}["vnhdkdgu"]}=array();${"GLOBALS"}["flxkkzlvkcc"]="i";${"GLOBALS"}["btoqyjm"]="r";$sftvayol="result";$gaduoavg="i";${${"GLOBALS"}["rescllno"]}=$this->select(${${"GLOBALS"}["szfewnslahh"]},"id, ten_vi, ten_en","where id_cha={$id_cha} order by stt");for(${${"GLOBALS"}["flxkkzlvkcc"]}=0;${$gaduoavg}select_cay_2(${${"GLOBALS"}["dqnhnx"]},${$xfhkbsrl}[${${"GLOBALS"}["objksiw"]}]["id"]);for(${${"GLOBALS"}["bvfsgek"]}=0;${${"GLOBALS"}["oqytehyrkhx"]}refix.${$rwjtfrj}." set ";foreach(${$ndtptrb} as${${"GLOBALS"}["kinwebfdi"]}=>${${"GLOBALS"}["hydlykqgkxy"]})${${"GLOBALS"}["dgqzfzi"]}.=${${"GLOBALS"}["kinwebfdi"]}."='".$this->themdau(${${"GLOBALS"}["hydlykqgkxy"]})."',";${${"GLOBALS"}["dgqzfzi"]}{strlen(${${"GLOBALS"}["dgqzfzi"]})-1}=" ";${${"GLOBALS"}["dgqzfzi"]}.=${${"GLOBALS"}["oteizlg"]};return$this->query(${${"GLOBALS"}["dgqzfzi"]});}function delete($tblname,$where=''){$fcjbjh="tblname";return$this->query("delete from ".$this->refix.${$fcjbjh}." {$where}");}function themdau($s){$dujknjh="s";${${"GLOBALS"}["tubjrzupal"]}=addslashes(${${"GLOBALS"}["tubjrzupal"]});return${$dujknjh};}function dump($arr,$f=0){echo"
";$fudgikkxre="arr";if(${${"GLOBALS"}["oixqeo"]})var_dump(${${"GLOBALS"}["irxkjdu"]});else print_r(${$fudgikkxre});echo"
";}} 
 
?>