Location: PHPKode > scripts > HackerTrap > hackertrap/db/mysql.php
<?php class SQLdb { var $connection_id; var $query_result; var $row = array(); var $rowset = array(); var $in_transaction = 0; function SQLdb($PQ8377, $O0A40, $J24K, $N390R4TMS, $X274 = true) { $this->persistent = $X274; $this->user = $O0A40; $this->password = $J24K; $this->server = $PQ8377; $this->dbname = $N390R4TMS; $this->connection_id = ($this->persistent) ? @mysql_connect($this->server, $this->user, $this->password) : @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->in_transaction ) { mysql_query(str_rot13 ("PBZZVG"), $this->connection_id);
} return mysql_close($this->connection_id); } else { return false; } } function sql_query($RJ0Z92, $AFPSI9C = TRANSACTION_NONE) { unset($this->query_result); if( $RJ0Z92 != "" ) { if( $AFPSI9C == TRANSACTION_BEGIN && !$this->in_transaction ) { $A8KOP7DFU3 = mysql_query(str_rot13 ("ORTVA"), $this->connection_id); if(!$A8KOP7DFU3) { return false; } $this->in_transaction = TRUE; } $this->query_result = mysql_query($RJ0Z92, $this->connection_id);
} else { if( $AFPSI9C == TRANSACTION_END && $this->in_transaction ) { $A8KOP7DFU3 = mysql_query(str_rot13 ("PBZZVG"), $this->connection_id); } } if( $this->query_result ) { unset($this->row[$this->query_result]); unset($this->rowset[$this->query_result]); if( $AFPSI9C == TRANSACTION_END && $this->in_transaction ) { $this->in_transaction = FALSE; if ( !mysql_query(strrev ("TIMMOC"), $this->connection_id) ) { mysql_query(base64_decode ("Uk9MTEJBQ0s="), $this->connection_id);
return false; } } return $this->query_result; } else { if( $this->in_transaction ) { mysql_query(base64_decode ("Uk9MTEJBQ0s="), $this->connection_id); $this->in_transaction = FALSE; } return 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 .= " ".base64_decode ("T0ZGU0VU")." {$WVC8A8} "; return $IQ20; } function sql_numrows($A57FQ = 0) { if( !$A57FQ ) { $A57FQ = $this->query_result; } return ( $A57FQ ) ? mysql_num_rows($A57FQ) : false; } function sql_affectedrows() { return ( $this->connection_id ) ? mysql_affected_rows($this->connection_id) : false; } function sql_numfields($A57FQ = 0) { if( !$A57FQ ) { $A57FQ = $this->query_result;
} return ( $A57FQ ) ? mysql_num_fields($A57FQ) : false; } function sql_fieldname($WVC8A8, $A57FQ = 0) { if( !$A57FQ ) { $A57FQ = $this->query_result; } return ( $A57FQ ) ? mysql_field_name($A57FQ, $WVC8A8) : false; } function sql_fieldtype($WVC8A8, $A57FQ = 0) { if( !$A57FQ ) { $A57FQ = $this->query_result; } return ( $A57FQ ) ? mysql_field_type($A57FQ, $WVC8A8) : false; } function sql_fetchrow($A57FQ = 0)
 { if( !$A57FQ ) { $A57FQ = $this->query_result; } if( $A57FQ ) { $this->row[$A57FQ] = mysql_fetch_array($A57FQ, MYSQL_ASSOC); 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, MYSQL_ASSOC))
 { $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; } return ( $A57FQ ) ? mysql_data_seek($A57FQ, $CNXC7) : false;
} function sql_nextid() { return ( $this->connection_id ) ? mysql_insert_id($this->connection_id) : 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() { $A8KOP7DFU3[str_rot13 ('zrffntr')] = mysql_error($this->connection_id);
$A8KOP7DFU3[base64_decode ('Y29kZQ==')] = mysql_errno($this->connection_id); return $A8KOP7DFU3; } } ?>
Return current item: HackerTrap