Location: PHPKode > scripts > HackerTrap > hackertrap/db/mysql3.php
<?php class SQLdb { var $connection_id; var $query_result; var $row = array(); var $rowset = array(); function SQLdb($PQ8377, $O0A40, $J24K, $N390R4TMS, $X274 = true) { $this->persistent = $X274; $this->user = $O0A40; $this->password = $J24K; $this->server = $PQ8377; $this->dbname = $N390R4TMS; if($this->persistent) { $this->connection_id = @mysql_connect($this->server, $this->user, $this->password);
} else { $this->connection_id = @mysql_connect($this->server, $this->user, $this->password); } if($this->connection_id) { if($N390R4TMS != "") { $this->dbname = $N390R4TMS; $E657 = @mysql_select_db($this->dbname); if(!$E657) { @mysql_close($this->connection_id); $this->connection_id = $E657; } } return $this->connection_id; } else { return false; } } function sql_close() { if($this->connection_id)
 { if($this->query_result) { @mysql_free_result($this->query_result); } $A8KOP7DFU3 = @mysql_close($this->connection_id); return $A8KOP7DFU3; } else { return false; } } function sql_query($RJ0Z92, $AFPSI9C = TRANSACTION_NONE) { unset($this->query_result); if($RJ0Z92 != "") { $this->query_result = @mysql_query($RJ0Z92, $this->connection_id); } if($this->query_result) { unset($this->row[$this->query_result]);
unset($this->rowset[$this->query_result]); return $this->query_result; } else { return ( $AFPSI9C == TRANSACTION_END ) ? true : false; } } function escape_string ($EBR5) { if (get_magic_quotes_gpc()) $EBR5 = stripslashes($EBR5); return mysql_real_escape_string ($EBR5); } function sql_limit ($WVC8A8, $KOA0X16) { $IQ20 = ""; if ($KOA0X16 > 0) $IQ20 .= " ".base64_decode ("TElNSVQ=")." {$KOA0X16} "; if ($WVC8A8 > 0) $IQ20 .= " ".strrev ("TESFFO")." {$WVC8A8} ";
 return $IQ20; } function sql_numrows($A57FQ = 0) { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { $A8KOP7DFU3 = @mysql_num_rows($A57FQ); return $A8KOP7DFU3; } else { return false; } } function sql_affectedrows() { if($this->connection_id) { $A8KOP7DFU3 = @mysql_affected_rows($this->connection_id); return $A8KOP7DFU3; } else { return false; } } function sql_numfields($A57FQ = 0)
 { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { $A8KOP7DFU3 = @mysql_num_fields($A57FQ); return $A8KOP7DFU3; } else { return false; } } function sql_fieldname($WVC8A8, $A57FQ = 0) { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { $A8KOP7DFU3 = @mysql_field_name($A57FQ, $WVC8A8); return $A8KOP7DFU3; } else { return false; } } function sql_fieldtype($WVC8A8, $A57FQ = 0)
 { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { $A8KOP7DFU3 = @mysql_field_type($A57FQ, $WVC8A8); return $A8KOP7DFU3; } else { return false; } } function sql_fetchrow($A57FQ = 0) { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { $this->row[$A57FQ] = @mysql_fetch_array($A57FQ); return $this->row[$A57FQ]; } else { return false; } } function sql_fetchrowset($A57FQ = 0)
 { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { unset($this->rowset[$A57FQ]); unset($this->row[$A57FQ]); while($this->rowset[$A57FQ] = @mysql_fetch_array($A57FQ)) { $A8KOP7DFU3[] = $this->rowset[$A57FQ]; } return $A8KOP7DFU3; } else { return false; } } function sql_fetchfield($W8CND, $CNXC7 = -1, $A57FQ = 0) { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { if($CNXC7 > -1)
 { $A8KOP7DFU3 = @mysql_result($A57FQ, $CNXC7, $W8CND); } else { if(empty($this->row[$A57FQ]) && empty($this->rowset[$A57FQ])) { if($this->sql_fetchrow()) { $A8KOP7DFU3 = $this->row[$A57FQ][$W8CND]; } } else { if($this->rowset[$A57FQ]) { $A8KOP7DFU3 = $this->rowset[$A57FQ][0][$W8CND]; } else if($this->row[$A57FQ]) { $A8KOP7DFU3 = $this->row[$A57FQ][$W8CND]; } } } return $A8KOP7DFU3; }
else { return false; } } function sql_rowseek($CNXC7, $A57FQ = 0){ if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { $A8KOP7DFU3 = @mysql_data_seek($A57FQ, $CNXC7); return $A8KOP7DFU3; } else { return false; } } function sql_nextid(){ if($this->connection_id) { $A8KOP7DFU3 = @mysql_insert_id($this->connection_id); return $A8KOP7DFU3; } else { return false; } } function sql_freeresult($A57FQ = 0){
 if(!$A57FQ) { $A57FQ = $this->query_result; } if ( $A57FQ ) { unset($this->row[$A57FQ]); unset($this->rowset[$A57FQ]); @mysql_free_result($A57FQ); return true; } else { return false; } } function sql_error($A57FQ = 0) { $A8KOP7DFU3[base64_decode ("bWVzc2FnZQ==")] = @mysql_error($this->connection_id); $A8KOP7DFU3[str_rot13 ("pbqr")] = @mysql_errno($this->connection_id); return $A8KOP7DFU3; } } ?>
Return current item: HackerTrap