Location: PHPKode > scripts > HackerTrap > hackertrap/db/mssql.php
<?php class SQLdb { var $connection_id; var $result; var $next_id; var $in_transaction = 0; var $row = array(); var $rowset = array(); var $limit_offset; var $query_limit_success; 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 ) ? @mssql_pconnect($this->server, $this->user, $this->password) : @mssql_connect($this->server, $this->user, $this->password);
if( $this->connection_id && $this->dbname != "" ) { if( !mssql_select_db($this->dbname, $this->connection_id) ) { mssql_close($this->connection_id); return false; } } return $this->connection_id; } function sql_close() { if($this->connection_id) { if( $this->in_transaction ) { @mssql_query(base64_decode ("Q09NTUlU"), $this->connection_id); } return @mssql_close($this->connection_id); } else { return false;
} } function sql_query($RJ0Z92, $AFPSI9C = TRANSACTION_NONE) { unset($this->result); unset($this->row); if ( $RJ0Z92 != '' ) { if ( $AFPSI9C == TRANSACTION_BEGIN && !$this->in_transaction ) { if ( !@mssql_query(base64_decode ('QkVHSU4gVFJBTlNBQ1RJ').base64_decode ('T04='), $this->connection_id) ) { return false; } $this->in_transaction = TRUE; } if( preg_match(str_rot13 ('#^FRYRPG(.*?)(Y').str_rot13 ('VZVG ([0-9]+)[, ').str_rot13 (']*([0-9]+)*)').base64_decode ('PyQjcw=='), $RJ0Z92, $N9336O9P2E) )
 { $RJ0Z92 = $N9336O9P2E[1]; if( !empty($N9336O9P2E[2]) ) { $NAVI4CV = ( $N9336O9P2E[4] ) ? $N9336O9P2E[3] : ""; $IGP11I = ( $N9336O9P2E[4] ) ? $N9336O9P2E[4] : $N9336O9P2E[3]; $RJ0Z92 = base64_decode ('VE9QIA==') . ( $NAVI4CV + $IGP11I ) . $RJ0Z92; } $this->result = @mssql_query("".base64_decode ("U0VMRUNU")." $RJ0Z92", $this->connection_id); if( $this->result ) { $this->limit_offset[$this->result] = ( !empty($NAVI4CV) ) ? $NAVI4CV : 0;
if( $NAVI4CV > 0 ) { @mssql_data_seek($this->result, $NAVI4CV); } } } else if( preg_match(str_rot13 ('#^VAFREG #v'), $RJ0Z92) ) { if( @mssql_query($RJ0Z92, $this->connection_id) ) { $this->result = time() + microtime(); $P14A9 = @mssql_query(strrev ('ITNEDI@@ TCELES').str_rot13 ('GL NF vq, @@EBJP').str_rot13 ('BHAG nf nssr').strrev ('detc'), $this->connection_id); if( $P14A9 ) { if( $HDCK = @mssql_fetch_array($P14A9) ) { $this->next_id[$this->connection_id] = $HDCK[str_rot13 ('vq')]; 
 $this->affected_rows[$this->connection_id] = $HDCK[base64_decode ('YWZmZWN0ZWQ=')]; } } } } else { if( @mssql_query($RJ0Z92, $this->connection_id) ) { $this->result = time() + microtime(); $P14A9 = @mssql_query(base64_decode ('U0VMRUNUIEBAUk9XQ09V').base64_decode ('TlQgYXMgYWZmZWN0ZWQ='), $this->connection_id); if( $P14A9 ) { if( $HDCK = @mssql_fetch_array($P14A9) ) { $this->affected_rows[$this->connection_id] = $HDCK[str_rot13 ('nssrpgrq')]; } } } } if( !$this->result )
 { if( $this->in_transaction ) { @mssql_query(base64_decode ('Uk9MTEJBQ0s='), $this->connection_id); $this->in_transaction = FALSE; } return false; } if( $AFPSI9C == TRANSACTION_END && $this->in_transaction ) { $this->in_transaction = FALSE; if( !@mssql_query(base64_decode ('Q09NTUlU'), $this->connection_id) ) { @mssql_query(base64_decode ("Uk9MTEJBQ0s="), $this->connection_id); return false; } } return $this->result; } else { if( $AFPSI9C == TRANSACTION_END && $this->in_transaction )
 { $this->in_transaction = FALSE; if( !@mssql_query(base64_decode ('Q09NTUlU'), $this->connection_id) ) { @mssql_query(str_rot13 ('EBYYONPX'), $this->connection_id); return false; } } return true; } } function escape_string ($EBR5) { return addslashes ($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->result; } if( $A57FQ ) { return ( !empty($this->limit_offset[$A57FQ]) ) ? @mssql_num_rows($A57FQ) - $this->limit_offset[$A57FQ] : @mssql_num_rows($A57FQ); } else { return false; } } function sql_numfields($A57FQ = 0) { if( !$A57FQ ) { $A57FQ = $this->result; } return ( $A57FQ ) ? @mssql_num_fields($A57FQ) : false;
} function sql_fieldname($WVC8A8, $A57FQ = 0) { if( !$A57FQ ) { $A57FQ = $this->result; } return ( $A57FQ ) ? @mssql_field_name($A57FQ, $WVC8A8) : false; } function sql_fieldtype($WVC8A8, $A57FQ = 0) { if(!$A57FQ) { $A57FQ = $this->result; } return ( $A57FQ ) ? @mssql_field_type($A57FQ, $WVC8A8) : false; } function sql_fetchrow($A57FQ = 0) { if( !$A57FQ ) { $A57FQ = $this->result; } if( $A57FQ )
 { empty($HDCK); $HDCK = @mssql_fetch_array($A57FQ); while( list($Y9X6N5KDA, $TNL9) = @each($HDCK) ) { $HDCK[$Y9X6N5KDA] = stripslashes($TNL9); } @reset($HDCK); return $HDCK; } else { return false; } } function sql_fetchrowset($A57FQ = 0) { if( !$A57FQ ) { $A57FQ = $this->result; } if( $A57FQ ) { $G06C = 0; empty($Q5Q78L89); while( $HDCK = @mssql_fetch_array($A57FQ)) { while( list($Y9X6N5KDA, $TNL9) = @each($HDCK) )
 { $Q5Q78L89[$G06C][$Y9X6N5KDA] = stripslashes($TNL9); } $G06C++; } @reset($Q5Q78L89); return $Q5Q78L89; } else { return false; } } function sql_fetchfield($W8CND, $HDCK = -1, $A57FQ) { if( !$A57FQ ) { $A57FQ = $this->result; } if( $A57FQ ) { if( $HDCK != -1 ) { if( $this->limit_offset[$A57FQ] > 0 ) { $A8KOP7DFU3 = ( !empty($this->limit_offset[$A57FQ]) ) ? @mssql_result($this->result, ($this->limit_offset[$A57FQ] + $HDCK), $W8CND) : false;
} else { $A8KOP7DFU3 = @mssql_result($this->result, $HDCK, $W8CND); } } else { if( empty($this->row[$A57FQ]) ) { $this->row[$A57FQ] = @mssql_fetch_array($A57FQ); $A8KOP7DFU3 = stripslashes($this->row[$A57FQ][$W8CND]); } } return $A8KOP7DFU3; } else { return false; } } function sql_rowseek($CNXC7, $A57FQ = 0) { if( !$A57FQ ) { $A57FQ = $this->result; } if( $A57FQ ) { return ( !empty($this->limit_offset[$A57FQ]) ) ? @mssql_data_seek($A57FQ, ($this->limit_offset[$A57FQ] + $CNXC7)) : @mssql_data_seek($A57FQ, $CNXC7);
} else { return false; } } function sql_nextid() { return ( $this->next_id[$this->connection_id] ) ? $this->next_id[$this->connection_id] : false; } function sql_affectedrows() { return ( $this->affected_rows[$this->connection_id] ) ? $this->affected_rows[$this->connection_id] : false; } function sql_freeresult($A57FQ = 0) { if( !$A57FQ ) { $A57FQ = $this->result; } return ( $A57FQ ) ? @mssql_free_result($A57FQ) : false;
} function sql_error($A57FQ = 0) { $A8KOP7DFU3[base64_decode ('bWVzc2FnZQ==')] = @mssql_get_last_message(); return $A8KOP7DFU3; } } ?>
Return current item: HackerTrap