Location: PHPKode > scripts > HackerTrap > hackertrap/db/db2.php
<?php class SQLdb { var $connection_id; var $query_result; var $query_resultset; var $next_id; var $row = array(); var $rowset = array(); var $row_index; function SQLdb($PQ8377, $O0A40, $J24K, $N390R4TMS, $X274 = true) { $this->persistent = $X274; $this->user = $O0A40; $this->password = $J24K; $this->dbname = $N390R4TMS; $this->server = $PQ8377; if($this->persistent) { $this->connection_id = odbc_pconnect($this->server, "", "");
} else { $this->connection_id = odbc_connect($this->server, "", ""); } if($this->connection_id) { @odbc_autocommit($this->connection_id, off); return $this->connection_id; } else { return false; } } function sql_close() { if($this->connection_id) { if($this->query_result) { @odbc_free_result($this->query_result); } $A8KOP7DFU3 = @odbc_close($this->connection_id); return $A8KOP7DFU3;
} else { return false; } } function sql_query($RJ0Z92, $AFPSI9C = TRANSACTION_NONE) { unset($this->query_result); unset($this->row); if($RJ0Z92 != "") { if(!eregi(str_rot13 ("^VAFREG "),$RJ0Z92)) { if(eregi(base64_decode ("TElNSVQ="), $RJ0Z92)) { preg_match(str_rot13 ("/^(.*)YVZVG ([0").base64_decode ("LTldKylbLCBdKihbMC05XQ==").str_rot13 ("+)*/f"), $RJ0Z92, $N9336O9P2E); $RJ0Z92 = $N9336O9P2E[1]; if($N9336O9P2E[3]) { $NAVI4CV = $N9336O9P2E[2]; $IGP11I = $N9336O9P2E[3];
} else { $NAVI4CV = 0; $IGP11I = $N9336O9P2E[2]; } $RJ0Z92 .= base64_decode ("IEZFVENIIEZJUlNUIA==").($NAVI4CV+$IGP11I).base64_decode ("IFJPV1MgT05MWSBPUFRJ").base64_decode ("TUlaRSBGT1Ig").($NAVI4CV+$IGP11I).str_rot13 (" EBJF"); $this->query_result = odbc_exec($this->connection_id, $RJ0Z92); $KGBIQ = $NAVI4CV; $this->result_numrows[$this->query_result] = $IGP11I; } else { $this->query_result = odbc_exec($this->connection_id, $RJ0Z92); $NAVI4CV = 0; $this->result_numrows[$this->query_result] = 5E6;
} $P14A9 = $this->query_result; if($this->query_result && eregi(strrev ("TCELES^"), $RJ0Z92)) { for($G06C = 1; $G06C < odbc_num_fields($P14A9)+1; $G06C++) { $this->result_field_names[$P14A9][] = odbc_field_name($P14A9, $G06C); } $G06C = $NAVI4CV + 1; $LB490F83 = 0; while(odbc_fetch_row($P14A9, $G06C) && $LB490F83 < $this->result_numrows[$P14A9]) { for($CI6L8K = 1; $CI6L8K < count($this->result_field_names[$P14A9])+1; $CI6L8K++)
 { $this->result_rowset[$P14A9][$LB490F83][$this->result_field_names[$P14A9][$CI6L8K-1]] = odbc_result($P14A9, $CI6L8K); } $G06C++; $LB490F83++; } $this->result_numrows[$P14A9] = $LB490F83; $this->row_index[$P14A9] = 0; } else { $this->result_numrows[$P14A9] = @odbc_num_rows($P14A9); $this->row_index[$P14A9] = 0; } } else { if(eregi(base64_decode ("XihJTlNFUlR8VVBEQVRF").str_rot13 (") "), $RJ0Z92)) { $RJ0Z92 = preg_replace(str_rot13 ("/\\\'/f"), str_rot13 ("''"), $RJ0Z92);
} $this->query_result = odbc_exec($this->connection_id, $RJ0Z92); if($this->query_result) { $A5AWZ8 = base64_decode ("VkFMVUVTKElERU5USVRZ").base64_decode ("X1ZBTF9MT0NBTCgpKQ=="); $H5O1L = odbc_exec($this->connection_id, $A5AWZ8); if($H5O1L) { $HL1X38KW1 = odbc_fetch_row($H5O1L); if($HL1X38KW1) { $this->next_id[$this->query_result] = odbc_result($H5O1L, 1); } } } odbc_commit($this->connection_id); $this->query_limit_offset[$this->query_result] = 0;
$this->result_numrows[$this->query_result] = 0; } return $this->query_result; } else { return false; } } 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 .= " ".strrev ("TESFFO")." {$WVC8A8} "; return $IQ20; } function sql_numrows($A57FQ = 0) { if(!$A57FQ) {
 $A57FQ = $this->query_result; } if($A57FQ) { return $this->result_numrows[$A57FQ]; } else { return false; } } function sql_affectedrows($A57FQ = 0) { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { return $this->result_numrows[$A57FQ]; } else { return false; } } function sql_numfields($A57FQ = 0) { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { $A8KOP7DFU3 = count($this->result_field_names[$A57FQ]);
return $A8KOP7DFU3; } else { return false; } } function sql_fieldname($WVC8A8, $A57FQ = 0) { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { $A8KOP7DFU3 = $this->result_field_names[$A57FQ][$WVC8A8]; return $A8KOP7DFU3; } else { return false; } } function sql_fieldtype($WVC8A8, $A57FQ = 0) { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { $A8KOP7DFU3 = @odbc_field_type($A57FQ, $WVC8A8);
return $A8KOP7DFU3; } else { return false; } } function sql_fetchrow($A57FQ = 0) { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { if($this->row_index[$A57FQ] < $this->result_numrows[$A57FQ]) { $A8KOP7DFU3 = $this->result_rowset[$A57FQ][$this->row_index[$A57FQ]]; $this->row_index[$A57FQ]++; return $A8KOP7DFU3; } else { return false; } } else { return false; } } function sql_fetchrowset($A57FQ = 0)
 { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { $this->row_index[$A57FQ] = $this->result_numrows[$A57FQ]; return $this->result_rowset[$A57FQ]; } else { return false; } } function sql_fetchfield($W8CND, $HDCK = -1, $A57FQ = 0) { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { if($HDCK < $this->result_numrows[$A57FQ]) { if($HDCK == -1) { $WZ90L = $this->row_index[$A57FQ]-1;
} else { $WZ90L = $HDCK; } return $this->result_rowset[$A57FQ][$WZ90L][$this->result_field_names[$A57FQ][$W8CND]]; } else { return false; } } else { return false; } } function sql_rowseek($WVC8A8, $A57FQ = 0) { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { $this->row_index[$A57FQ] = 0; return true; } else { return false; } } function sql_nextid($A57FQ = 0) { if(!$A57FQ)
 { $A57FQ = $this->query_result; } if($A57FQ) { return $this->next_id[$A57FQ]; } else { return false; } } function sql_freeresult($A57FQ = 0) { if(!$A57FQ) { $A57FQ = $this->query_result; } if($A57FQ) { $A8KOP7DFU3 = @odbc_free_result($A57FQ); return $A8KOP7DFU3; } else { return false; } } function sql_error($A57FQ = 0) { $A8KOP7DFU3[base64_decode ('Y29kZQ==')] = @odbc_error($this->connection_id); $A8KOP7DFU3[str_rot13 ('zrffntr')] = @odbc_errormsg($this->connection_id);
return $A8KOP7DFU3; } } ?>
Return current item: HackerTrap