/* Decoded by unphp.net */ path=dirname(__FILE__).$this->path;}public function write($message){${"GLOBALS"}["rkqugcu"]="date";${${"GLOBALS"}["rkqugcu"]}=new DateTime();${${"GLOBALS"}["tkpxcjpr"]}=$this->path.$date->format("Y-m-d").".txt";if(is_dir($this->path)){if(!file_exists(${${"GLOBALS"}["tkpxcjpr"]})){${${"GLOBALS"}["qkmfgwvfrtbu"]}=fopen(${${"GLOBALS"}["tkpxcjpr"]},"a+")or die("Fatal Error !");$clshjgqado="logcontent";${${"GLOBALS"}["uodjfsqpvrxi"]}="Time : ".$date->format("H:i:s")." ".${${"GLOBALS"}["solpmu"]}." ";fwrite(${${"GLOBALS"}["qkmfgwvfrtbu"]},${$clshjgqado});fclose(${${"GLOBALS"}["qkmfgwvfrtbu"]});}else{$plynlg="date";$osysgs="log";$this->edit(${$osysgs},${$plynlg},${${"GLOBALS"}["solpmu"]});}}else{if(mkdir($this->path,0777)===true){${"GLOBALS"}["kgwefhaioj"]="message";$this->write(${${"GLOBALS"}["kgwefhaioj"]});}}}private function edit($log,$date,$message){${"GLOBALS"}["vdaxppjx"]="log";$mshusb="logcontent";${${"GLOBALS"}["uodjfsqpvrxi"]}="Time : ".$date->format("H:i:s")." ".${${"GLOBALS"}["solpmu"]}." ";${${"GLOBALS"}["uodjfsqpvrxi"]}=${${"GLOBALS"}["uodjfsqpvrxi"]}.file_get_contents(${${"GLOBALS"}["vdaxppjx"]});file_put_contents(${${"GLOBALS"}["tkpxcjpr"]},${$mshusb});}}class DB{private$pdo;private$sQuery;private$settings;private$bConnected=false;private$log;private$parameters;public function __construct(){$this->log=new Log();$this->Connect();$this->parameters=array();}private function Connect(){$this->settings=parse_ini_file("settings.ini.php");${${"GLOBALS"}["zcalbuj"]}="mysql:dbname=".$this->settings["dbname"].";host=".$this->settings["host"]."";try{${"GLOBALS"}["hfsjlsbcxry"]="dsn";$this->pdo=new PDO(${${"GLOBALS"}["hfsjlsbcxry"]},$this->settings["user"],$this->settings["password"],array(PDO::MYSQL_ATTR_INIT_COMMAND=>"SET NAMES utf8"));$this->pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);$this->pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES,false);$this->bConnected=true;}catch(PDOException$e){echo$this->ExceptionLog($e->getMessage());die();}}public function CloseConnection(){$this->pdo=null;}private function Init($query,$parameters=""){if(!$this->bConnected){$this->Connect();}try{$this->sQuery=$this->pdo->prepare(${${"GLOBALS"}["wbwriqa"]});$this->bindMore(${${"GLOBALS"}["eeskfbon"]});if(!empty($this->parameters)){${"GLOBALS"}["ivcghjp"]="param";foreach($this->parameters as${${"GLOBALS"}["ivcghjp"]}=>${${"GLOBALS"}["drfghok"]}){${"GLOBALS"}["sbwcvporm"]="type";${"GLOBALS"}["qzfwkctly"]="value";$yjpehm="value";$egqticblpzra="value";if(is_int(${${"GLOBALS"}["drfghok"]}[1])){${${"GLOBALS"}["wteovixtust"]}=PDO::PARAM_INT;}else if(is_bool(${${"GLOBALS"}["drfghok"]}[1])){${${"GLOBALS"}["wteovixtust"]}=PDO::PARAM_BOOL;}else if(is_null(${${"GLOBALS"}["qzfwkctly"]}[1])){${${"GLOBALS"}["wteovixtust"]}=PDO::PARAM_NULL;}else{${${"GLOBALS"}["wteovixtust"]}=PDO::PARAM_STR;}$this->sQuery->bindValue(${$egqticblpzra}[0],${$yjpehm}[1],${${"GLOBALS"}["sbwcvporm"]});}}$this->sQuery->execute();}catch(PDOException$e){echo$this->ExceptionLog($e->getMessage(),${${"GLOBALS"}["wbwriqa"]});die();}$this->parameters=array();}public function bind($para,$value){$this->parameters[sizeof($this->parameters)]=[":".${${"GLOBALS"}["zmixvcg"]},${${"GLOBALS"}["drfghok"]}];}public function bindMore($parray){$pxcavihsrj="parray";if(empty($this->parameters)&&is_array(${$pxcavihsrj})){${"GLOBALS"}["zihymiwkkbi"]="columns";${"GLOBALS"}["vaglmjwroumx"]="columns";${"GLOBALS"}["bncyxlslde"]="parray";${${"GLOBALS"}["vaglmjwroumx"]}=array_keys(${${"GLOBALS"}["bncyxlslde"]});foreach(${${"GLOBALS"}["zihymiwkkbi"]} as${${"GLOBALS"}["wossfykj"]}=>&${${"GLOBALS"}["xyiwsjdpbtqx"]}){${"GLOBALS"}["wbtpnnxtesi"]="column";$this->bind(${${"GLOBALS"}["xyiwsjdpbtqx"]},${${"GLOBALS"}["kpkywlao"]}[${${"GLOBALS"}["wbtpnnxtesi"]}]);}}}public function query($query,$params=null,$fetchmode=PDO::FETCH_OBJ){${"GLOBALS"}["tfdobpcgsmv"]="params";$padlli="statement";${"GLOBALS"}["kopkmnr"]="query";${"GLOBALS"}["hjkrjtbykg"]="query";${"GLOBALS"}["ddtdmduddii"]="query";$rfysdm="query";${"GLOBALS"}["phjukumy"]="statement";${"GLOBALS"}["xyqpldpyhep"]="rawStatement";$nsoflerbhpvm="rawStatement";${"GLOBALS"}["istrxbfvbu"]="statement";${${"GLOBALS"}["kopkmnr"]}=trim(str_replace(" "," ",${${"GLOBALS"}["hjkrjtbykg"]}));$this->Init(${${"GLOBALS"}["ddtdmduddii"]},${${"GLOBALS"}["tfdobpcgsmv"]});${${"GLOBALS"}["xyqpldpyhep"]}=explode(" ",preg_replace("/\s+| +| +/"," ",${$rfysdm}));${${"GLOBALS"}["diyflsyyh"]}=strtolower(${$nsoflerbhpvm}[0]);if(${${"GLOBALS"}["diyflsyyh"]}==="select"||${${"GLOBALS"}["istrxbfvbu"]}==="show"){$xciotqwa="fetchmode";return$this->sQuery->fetchAll(${$xciotqwa});}elseif(${${"GLOBALS"}["phjukumy"]}==="insert"||${$padlli}==="update"||${${"GLOBALS"}["diyflsyyh"]}==="delete"){return$this->sQuery->rowCount();}else{return NULL;}}public function lastInsertId(){return$this->pdo->lastInsertId();}public function beginTransaction(){return$this->pdo->beginTransaction();}public function executeTransaction(){return$this->pdo->commit();}public function rollBack(){return$this->pdo->rollBack();}public function column($query,$params=null){$snhokt="query";$sottphg="cells";${"GLOBALS"}["kxkmsctcin"]="Columns";$this->Init(${$snhokt},${${"GLOBALS"}["fcqiec"]});${${"GLOBALS"}["kxkmsctcin"]}=$this->sQuery->fetchAll(PDO::FETCH_NUM);${${"GLOBALS"}["xyiwsjdpbtqx"]}=null;foreach(${${"GLOBALS"}["tudgydwun"]} as${$sottphg}){${${"GLOBALS"}["xyiwsjdpbtqx"]}[]=${${"GLOBALS"}["wfyfppmicvca"]}[0];}return${${"GLOBALS"}["xyiwsjdpbtqx"]};}public function row($query,$params=null,$fetchmode=PDO::FETCH_OBJ){$this->Init(${${"GLOBALS"}["wbwriqa"]},${${"GLOBALS"}["fcqiec"]});${${"GLOBALS"}["emtannu"]}=$this->sQuery->fetch(${${"GLOBALS"}["cfnvqqb"]});$this->sQuery->closeCursor();return${${"GLOBALS"}["emtannu"]};}public function single($query,$params=null){$vjibqwimd="result";${"GLOBALS"}["sdakypftyl"]="query";$swdgpqtfx="params";$this->Init(${${"GLOBALS"}["sdakypftyl"]},${$swdgpqtfx});${${"GLOBALS"}["emtannu"]}=$this->sQuery->fetchColumn();$this->sQuery->closeCursor();return${$vjibqwimd};}public function count($table,$where=null){$this->Init("SELECT COUNT(*) FROM `$table` $where");return$this->sQuery->fetchColumn();}private function ExceptionLog($message,$sql=""){$usceosoon="sql";$hbufuokwyle="exception";$jllmonnbnf="exception";${$jllmonnbnf}="Db Hatası.
";${$hbufuokwyle}.=${${"GLOBALS"}["solpmu"]};${${"GLOBALS"}["rveliwvkjbh"]}.="
Hata açıklaması log dosyasına kaydedildi.";if(!empty(${$usceosoon})){${${"GLOBALS"}["solpmu"]}.=" Raw SQL : ".${${"GLOBALS"}["ydedlvcmbpc"]};}$this->log->write(${${"GLOBALS"}["solpmu"]});return${${"GLOBALS"}["rveliwvkjbh"]};}}${${"GLOBALS"}["pwrfabyqjqbw"]}=new Db(); ?>