${
"GLOBALS"
}
["uewiqdopl"]="val";
${
"GLOBALS"
}
["fvfsonpso"]="str";
${
"GLOBALS"
}
["iasusyqbxo"]="arr";
${
"GLOBALS"
}
["bueufkjb"]="query_id";
${
"GLOBALS"
}
["ikflsgbn"]="values";
${
"GLOBALS"
}
["aqrhxwmnt"]="key";
${
"GLOBALS"
}
["qyhxxhsqtel"]="data";
${
"GLOBALS"
}
["hoohyqgpxa"]="value";
${
"GLOBALS"
}
["sjssvbvnw"]="sql";
${
"GLOBALS"
}
["hcrfupx"]="v";
${
"GLOBALS"
}
["vmbqbmlgp"]="k";
${
"GLOBALS"
}
["xxkcynp"]="config";
if(!defined("_lib"))die("Error");
class database{
var$db;
var$result;
var$insert_id;
var$sql="";
var$refix="";
var$servername;
var$username;
var$password;
var$database;
var$table="";
var$where="";
var$order="";
var$limit="";
var$error=array();
function database($config=array()){
if(!empty(${
${
"GLOBALS"
}
["xxkcynp"]
}
)){
$this->init(${
${
"GLOBALS"
}
["xxkcynp"]
}
);
$this->connect();
}
}
function init($config=array()){
foreach(${
${
"GLOBALS"
}
["xxkcynp"]
}
as${
${
"GLOBALS"
}
["vmbqbmlgp"]
}
=>${
${
"GLOBALS"
}
["hcrfupx"]
}
)$this->${
${
"GLOBALS"
}
["vmbqbmlgp"]
}
=${
${
"GLOBALS"
}
["hcrfupx"]
};
}
function connect(){
$this->db=@mysql_connect($this->servername,$this->username,$this->password);
if(!$this->db){
die("Could not connect: ".mysql_error());
}
if(!mysql_select_db($this->database,$this->db)){
die(mysql_errno($this->db).": ".mysql_error($this->db));
return false;
}
mysql_query("SET NAMES "utf8"",$this->db);
}
function query($sql=""){
${
"GLOBALS"
}
["belwojutfsd"]="sql";
if(${
${
"GLOBALS"
}
["sjssvbvnw"]
}
)$this->sql=str_replace("#_",$this->refix,${
${
"GLOBALS"
}
["belwojutfsd"]
}
);
$this->result=mysql_query($this->sql,$this->db);
if(!$this->result){
die("syntax error: ".$this->sql);
}
return$this->result;
}
function insert($data=array()){
$krcdvtrnamug="key";
${
$krcdvtrnamug
}
="";
${
"GLOBALS"
}
["ikkiknx"]="key";
${
${
"GLOBALS"
}
["hoohyqgpxa"]
}
="";
${
"GLOBALS"
}
["tgrsskdt"]="key";
$pqxwtejofsmn="value";
$niyprkpkqn="key";
foreach(${
${
"GLOBALS"
}
["qyhxxhsqtel"]
}
as${
${
"GLOBALS"
}
["vmbqbmlgp"]
}
=>${
${
"GLOBALS"
}
["hcrfupx"]
}
){
$ruaujbv="k";
$nxckcljiir="key";
${
$nxckcljiir
}
.=",".${
$ruaujbv
};
${
${
"GLOBALS"
}
["hoohyqgpxa"]
}
.=",'".${
${
"GLOBALS"
}
["hcrfupx"]
}
."'";
}
${
"GLOBALS"
}
["cxidcotcd"]="value";
if(${
$niyprkpkqn
}
{
0
}
==",")${
${
"GLOBALS"
}
["ikkiknx"]
}
{
0
}
="(";
${
${
"GLOBALS"
}
["aqrhxwmnt"]
}
.=")";
if(${
$pqxwtejofsmn
}
{
0
}
==",")${
${
"GLOBALS"
}
["cxidcotcd"]
}
{
0
}
="(";
${
${
"GLOBALS"
}
["hoohyqgpxa"]
}
.=")";
$this->sql="insert into ".$this->refix.$this->table.${
${
"GLOBALS"
}
["tgrsskdt"]
}
." values ".${
${
"GLOBALS"
}
["hoohyqgpxa"]
};
$this->query();
$this->insert_id=mysql_insert_id();
return$this->result;
}
function update($data=array()){
$xctjojbnnew="values";
${
"GLOBALS"
}
["xbffor"]="values";
$idqkrbt="data";
${
$xctjojbnnew
}
="";
foreach(${
$idqkrbt
}
as${
${
"GLOBALS"
}
["vmbqbmlgp"]
}
=>${
${
"GLOBALS"
}
["hcrfupx"]
}
){
${
"GLOBALS"
}
["vqqgop"]="values";
${
"GLOBALS"
}
["xhjzjx"]="v";
${
${
"GLOBALS"
}
["vqqgop"]
}
.=", ".${
${
"GLOBALS"
}
["vmbqbmlgp"]
}
." = '".${
${
"GLOBALS"
}
["xhjzjx"]
}
."' ";
}
if(${
${
"GLOBALS"
}
["ikflsgbn"]
}
{
0
}
==",")${
${
"GLOBALS"
}
["xbffor"]
}
{
0
}
=" ";
$this->sql="update ".$this->refix.$this->table." set ".${
${
"GLOBALS"
}
["ikflsgbn"]
};
$this->sql.=$this->where;
return$this->query();
}
function delete(){
$this->sql="delete from ".$this->refix.$this->table.$this->where;
return$this->query();
}
function select($str="*"){
${
"GLOBALS"
}
["xwtysxf"]="str";
$this->sql="select ".${
${
"GLOBALS"
}
["xwtysxf"]
};
$this->sql.=" from ".$this->refix.$this->table;
$this->sql.=$this->where;
$this->sql.=$this->order;
$this->sql.=$this->limit;
return$this->query();
}
function num_rows(){
return mysql_num_rows($this->result);
}
function num_fields($query_id){
return mysql_num_fields(${
${
"GLOBALS"
}
["bueufkjb"]
}
);
}
function fetch_array(){
return mysql_fetch_assoc($this->result);
}
function result_array(){
${
"GLOBALS"
}
["bcggttieut"]="row";
$xkhqnsp="arr";
$tdxwlvkhei="row";
${
$xkhqnsp
}
=array();
${
"GLOBALS"
}
["dlnktdu"]="arr";
while(${
$tdxwlvkhei
}
=mysql_fetch_assoc($this->result))${
${
"GLOBALS"
}
["iasusyqbxo"]
}
[]=${
${
"GLOBALS"
}
["bcggttieut"]
};
return${
${
"GLOBALS"
}
["dlnktdu"]
};
}
function setTable($str){
${
"GLOBALS"
}
["jflidgphius"]="str";
$this->table=${
${
"GLOBALS"
}
["jflidgphius"]
};
}
function setWhere($key,$value=""){
if(${
${
"GLOBALS"
}
["hoohyqgpxa"]
}
!=""){
${
"GLOBALS"
}
["nwyhjcrx"]="value";
${
"GLOBALS"
}
["ydsqioovdj"]="key";
$vlrilwq="value";
${
"GLOBALS"
}
["uyopcrypfxc"]="key";
if($this->where=="")$this->where=" where ".${
${
"GLOBALS"
}
["ydsqioovdj"]
}
." = '".${
${
"GLOBALS"
}
["nwyhjcrx"]
}
."'";
else$this->where.=" and ".${
${
"GLOBALS"
}
["uyopcrypfxc"]
}
." = '".${
$vlrilwq
}
."'";
}
else{
if($this->where=="")$this->where=" where ".${
${
"GLOBALS"
}
["aqrhxwmnt"]
};
else$this->where.=" and ".${
${
"GLOBALS"
}
["aqrhxwmnt"]
};
}
}
function setWhereOr($key,$value){
if(${
${
"GLOBALS"
}
["hoohyqgpxa"]
}
!=""){
${
"GLOBALS"
}
["quhziy"]="key";
$otluflstqhyw="key";
if($this->where=="")$this->where=" where ".${
${
"GLOBALS"
}
["quhziy"]
}
." = ".${
${
"GLOBALS"
}
["hoohyqgpxa"]
};
else$this->where.=" or ".${
$otluflstqhyw
}
." = ".${
${
"GLOBALS"
}
["hoohyqgpxa"]
};
}
else{
$qryciirheg="key";
$lehkurjz="key";
if($this->where=="")$this->where=" where ".${
$qryciirheg
};
else$this->where.=" or ".${
$lehkurjz
};
}
}
function setOrder($str){
$this->order=" order by ".${
${
"GLOBALS"
}
["fvfsonpso"]
};
}
function setLimit($str){
${
"GLOBALS"
}
["dlwcpmegpin"]="str";
$this->limit=" limit ".${
${
"GLOBALS"
}
["dlwcpmegpin"]
};
}
function setError($msg){
$khzdfrgp="msg";
$this->error[]=${
$khzdfrgp
};
}
function showError(){
${
"GLOBALS"
}
["vpbubzpgqqy"]="value";
${
"GLOBALS"
}
["iibflpc"]="value";
foreach($this->error as${
${
"GLOBALS"
}
["vpbubzpgqqy"]
}
)echo"<br>".${
${
"GLOBALS"
}
["iibflpc"]
};
}
function reset(){
$this->sql="";
$this->result="";
$this->where="";
$this->order="";
$this->limit="";
$this->table="";
}
function debug(){
echo"<br> servername: ".$this->servername;
echo"<br> username: ".$this->username;
echo"<br> password: ".$this->password;
echo"<br> database: ".$this->database;
echo"<br> ".$this->sql;
}
function escape_str($str){
if(is_array(${
${
"GLOBALS"
}
["fvfsonpso"]
}
)){
${
"GLOBALS"
}
["mrwevvcsd"]="str";
foreach(${
${
"GLOBALS"
}
["fvfsonpso"]
}
as${
${
"GLOBALS"
}
["aqrhxwmnt"]
}
=>${
${
"GLOBALS"
}
["uewiqdopl"]
}
){
${
${
"GLOBALS"
}
["fvfsonpso"]
}
[${
${
"GLOBALS"
}
["aqrhxwmnt"]
}
]=$this->escape_str(${
${
"GLOBALS"
}
["uewiqdopl"]
}
);
}
return${
${
"GLOBALS"
}
["mrwevvcsd"]
};
}
if(function_exists("mysql_real_escape_string")AND is_resource($this->db)){
return mysql_real_escape_string(${
${
"GLOBALS"
}
["fvfsonpso"]
}
,$this->db);
}
elseif(function_exists("mysql_escape_string")){
return mysql_escape_string(${
${
"GLOBALS"
}
["fvfsonpso"]
}
);
}
else{
$kofchhkofh="str";
return addslashes(${
$kofchhkofh
}
);
}
}
function xssClean($str){
${
"GLOBALS"
}
["nablonvh"]="str";
${
"GLOBALS"
}
["zpqmerw"]="str";
$qphkdcdy="str";
${
"GLOBALS"
}
["iwyjbefft"]="str";
$oohfdddbn="str";
${
${
"GLOBALS"
}
["fvfsonpso"]
}
=str_replace("'","'
",${
${
"GLOBALS"
}
["fvfsonpso"]
}
);
${
$qphkdcdy
}
=str_replace("\"",""
",${
${
"GLOBALS"
}
["nablonvh"]
}
);
${
${
"GLOBALS"
}
["zpqmerw"]
}
=str_replace("<","<
",${
$oohfdddbn
}
);
${
${
"GLOBALS"
}
["fvfsonpso"]
}
=str_replace(">",">
",${
${
"GLOBALS"
}
["iwyjbefft"]
}
);
return${
${
"GLOBALS"
}
["fvfsonpso"]
};
}
}
${
"GLOBALS"
}
["uewiqdopl"]="val";
${
"GLOBALS"
}
["fvfsonpso"]="str";
${
"GLOBALS"
}
["iasusyqbxo"]="arr";
${
"GLOBALS"
}
["bueufkjb"]="query_id";
${
"GLOBALS"
}
["ikflsgbn"]="values";
${
"GLOBALS"
}
["aqrhxwmnt"]="key";
${
"GLOBALS"
}
["qyhxxhsqtel"]="data";
${
"GLOBALS"
}
["hoohyqgpxa"]="value";
${
"GLOBALS"
}
["sjssvbvnw"]="sql";
${
"GLOBALS"
}
["hcrfupx"]="v";
${
"GLOBALS"
}
["vmbqbmlgp"]="k";
${
"GLOBALS"
}
["xxkcynp"]="config";
if(!defined("_lib"))die("Error");
class database{
var$db;
var$result;
var$insert_id;
var$sql="";
var$refix="";
var$servername;
var$username;
var$password;
var$database;
var$table="";
var$where="";
var$order="";
var$limit="";
var$error=array();
function database($config=array()){
if(!empty(${
${
"GLOBALS"
}
["xxkcynp"]
}
)){
$this->init(${
${
"GLOBALS"
}
["xxkcynp"]
}
);
$this->connect();
}
}
function init($config=array()){
foreach(${
${
"GLOBALS"
}
["xxkcynp"]
}
as${
${
"GLOBALS"
}
["vmbqbmlgp"]
}
=>${
${
"GLOBALS"
}
["hcrfupx"]
}
)$this->${
${
"GLOBALS"
}
["vmbqbmlgp"]
}
=${
${
"GLOBALS"
}
["hcrfupx"]
};
}
function connect(){
$this->db=@mysql_connect($this->servername,$this->username,$this->password);
if(!$this->db){
die("Could not connect: ".mysql_error());
}
if(!mysql_select_db($this->database,$this->db)){
die(mysql_errno($this->db).": ".mysql_error($this->db));
return false;
}
mysql_query("SET NAMES "utf8"",$this->db);
}
function query($sql=""){
${
"GLOBALS"
}
["belwojutfsd"]="sql";
if(${
${
"GLOBALS"
}
["sjssvbvnw"]
}
)$this->sql=str_replace("#_",$this->refix,${
${
"GLOBALS"
}
["belwojutfsd"]
}
);
$this->result=mysql_query($this->sql,$this->db);
if(!$this->result){
die("syntax error: ".$this->sql);
}
return$this->result;
}
function insert($data=array()){
${
"key"
}
="";
${
"GLOBALS"
}
["ikkiknx"]="key";
${
${
"GLOBALS"
}
["hoohyqgpxa"]
}
="";
${
"GLOBALS"
}
["tgrsskdt"]="key";
foreach(${
${
"GLOBALS"
}
["qyhxxhsqtel"]
}
as${
${
"GLOBALS"
}
["vmbqbmlgp"]
}
=>${
${
"GLOBALS"
}
["hcrfupx"]
}
){
${
"key"
}
.=",".${
"k"
};
${
${
"GLOBALS"
}
["hoohyqgpxa"]
}
.=",'".${
${
"GLOBALS"
}
["hcrfupx"]
}
."'";
}
${
"GLOBALS"
}
["cxidcotcd"]="value";
if(${
"key"
}
{
0
}
==",")${
${
"GLOBALS"
}
["ikkiknx"]
}
{
0
}
="(";
${
${
"GLOBALS"
}
["aqrhxwmnt"]
}
.=")";
if(${
"value"
}
{
0
}
==",")${
${
"GLOBALS"
}
["cxidcotcd"]
}
{
0
}
="(";
${
${
"GLOBALS"
}
["hoohyqgpxa"]
}
.=")";
$this->sql="insert into ".$this->refix.$this->table.${
${
"GLOBALS"
}
["tgrsskdt"]
}
." values ".${
${
"GLOBALS"
}
["hoohyqgpxa"]
};
$this->query();
$this->insert_id=mysql_insert_id();
return$this->result;
}
function update($data=array()){
${
"GLOBALS"
}
["xbffor"]="values";
${
"values"
}
="";
foreach(${
"data"
}
as${
${
"GLOBALS"
}
["vmbqbmlgp"]
}
=>${
${
"GLOBALS"
}
["hcrfupx"]
}
){
${
"GLOBALS"
}
["vqqgop"]="values";
${
"GLOBALS"
}
["xhjzjx"]="v";
${
${
"GLOBALS"
}
["vqqgop"]
}
.=", ".${
${
"GLOBALS"
}
["vmbqbmlgp"]
}
." = '".${
${
"GLOBALS"
}
["xhjzjx"]
}
."' ";
}
if(${
${
"GLOBALS"
}
["ikflsgbn"]
}
{
0
}
==",")${
${
"GLOBALS"
}
["xbffor"]
}
{
0
}
=" ";
$this->sql="update ".$this->refix.$this->table." set ".${
${
"GLOBALS"
}
["ikflsgbn"]
};
$this->sql.=$this->where;
return$this->query();
}
function delete(){
$this->sql="delete from ".$this->refix.$this->table.$this->where;
return$this->query();
}
function select($str="*"){
${
"GLOBALS"
}
["xwtysxf"]="str";
$this->sql="select ".${
${
"GLOBALS"
}
["xwtysxf"]
};
$this->sql.=" from ".$this->refix.$this->table;
$this->sql.=$this->where;
$this->sql.=$this->order;
$this->sql.=$this->limit;
return$this->query();
}
function num_rows(){
return mysql_num_rows($this->result);
}
function num_fields($query_id){
return mysql_num_fields(${
${
"GLOBALS"
}
["bueufkjb"]
}
);
}
function fetch_array(){
return mysql_fetch_assoc($this->result);
}
function result_array(){
${
"GLOBALS"
}
["bcggttieut"]="row";
${
"arr"
}
=array();
${
"GLOBALS"
}
["dlnktdu"]="arr";
while(${
"row"
}
=mysql_fetch_assoc($this->result))${
${
"GLOBALS"
}
["iasusyqbxo"]
}
[]=${
${
"GLOBALS"
}
["bcggttieut"]
};
return${
${
"GLOBALS"
}
["dlnktdu"]
};
}
function setTable($str){
${
"GLOBALS"
}
["jflidgphius"]="str";
$this->table=${
${
"GLOBALS"
}
["jflidgphius"]
};
}
function setWhere($key,$value=""){
if(${
${
"GLOBALS"
}
["hoohyqgpxa"]
}
!=""){
${
"GLOBALS"
}
["nwyhjcrx"]="value";
${
"GLOBALS"
}
["ydsqioovdj"]="key";
${
"GLOBALS"
}
["uyopcrypfxc"]="key";
if($this->where=="")$this->where=" where ".${
${
"GLOBALS"
}
["ydsqioovdj"]
}
." = '".${
${
"GLOBALS"
}
["nwyhjcrx"]
}
."'";
else$this->where.=" and ".${
${
"GLOBALS"
}
["uyopcrypfxc"]
}
." = '".${
"value"
}
."'";
}
else{
if($this->where=="")$this->where=" where ".${
${
"GLOBALS"
}
["aqrhxwmnt"]
};
else$this->where.=" and ".${
${
"GLOBALS"
}
["aqrhxwmnt"]
};
}
}
function setWhereOr($key,$value){
if(${
${
"GLOBALS"
}
["hoohyqgpxa"]
}
!=""){
${
"GLOBALS"
}
["quhziy"]="key";
if($this->where=="")$this->where=" where ".${
${
"GLOBALS"
}
["quhziy"]
}
." = ".${
${
"GLOBALS"
}
["hoohyqgpxa"]
};
else$this->where.=" or ".${
"key"
}
." = ".${
${
"GLOBALS"
}
["hoohyqgpxa"]
};
}
else{
if($this->where=="")$this->where=" where ".${
"key"
};
else$this->where.=" or ".${
"key"
};
}
}
function setOrder($str){
$this->order=" order by ".${
${
"GLOBALS"
}
["fvfsonpso"]
};
}
function setLimit($str){
${
"GLOBALS"
}
["dlwcpmegpin"]="str";
$this->limit=" limit ".${
${
"GLOBALS"
}
["dlwcpmegpin"]
};
}
function setError($msg){
$this->error[]=${
"msg"
};
}
function showError(){
${
"GLOBALS"
}
["vpbubzpgqqy"]="value";
${
"GLOBALS"
}
["iibflpc"]="value";
foreach($this->error as${
${
"GLOBALS"
}
["vpbubzpgqqy"]
}
)echo"<br>".${
${
"GLOBALS"
}
["iibflpc"]
};
}
function reset(){
$this->sql="";
$this->result="";
$this->where="";
$this->order="";
$this->limit="";
$this->table="";
}
function debug(){
echo"<br> servername: ".$this->servername;
echo"<br> username: ".$this->username;
echo"<br> password: ".$this->password;
echo"<br> database: ".$this->database;
echo"<br> ".$this->sql;
}
function escape_str($str){
if(is_array(${
${
"GLOBALS"
}
["fvfsonpso"]
}
)){
${
"GLOBALS"
}
["mrwevvcsd"]="str";
foreach(${
${
"GLOBALS"
}
["fvfsonpso"]
}
as${
${
"GLOBALS"
}
["aqrhxwmnt"]
}
=>${
${
"GLOBALS"
}
["uewiqdopl"]
}
){
${
${
"GLOBALS"
}
["fvfsonpso"]
}
[${
${
"GLOBALS"
}
["aqrhxwmnt"]
}
]=$this->escape_str(${
${
"GLOBALS"
}
["uewiqdopl"]
}
);
}
return${
${
"GLOBALS"
}
["mrwevvcsd"]
};
}
if(function_exists("mysql_real_escape_string")AND is_resource($this->db)){
return mysql_real_escape_string(${
${
"GLOBALS"
}
["fvfsonpso"]
}
,$this->db);
}
elseif(function_exists("mysql_escape_string")){
return mysql_escape_string(${
${
"GLOBALS"
}
["fvfsonpso"]
}
);
}
else{
return addslashes(${
"str"
}
);
}
}
function xssClean($str){
${
"GLOBALS"
}
["nablonvh"]="str";
${
"GLOBALS"
}
["zpqmerw"]="str";
${
"GLOBALS"
}
["iwyjbefft"]="str";
${
${
"GLOBALS"
}
["fvfsonpso"]
}
=str_replace("'","'
",${
${
"GLOBALS"
}
["fvfsonpso"]
}
);
${
"str"
}
=str_replace("\"",""
",${
${
"GLOBALS"
}
["nablonvh"]
}
);
${
${
"GLOBALS"
}
["zpqmerw"]
}
=str_replace("<","<
",${
"str"
}
);
${
${
"GLOBALS"
}
["fvfsonpso"]
}
=str_replace(">",">
",${
${
"GLOBALS"
}
["iwyjbefft"]
}
);
return${
${
"GLOBALS"
}
["fvfsonpso"]
};
}
}
© 2023 Quttera Ltd. All rights reserved.