Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php defined("\102\x41\x53\105\x50\101\124\110") or die("\116\x6f\40\144\x69\x72\145\x63..
Decoded Output download
<?php
defined("BASEPATH") or die("No direct script access allowed"); class CI_DB_pdo_cubrid_forge extends CI_DB_pdo_forge { protected $_create_database = FALSE; protected $_drop_database = FALSE; protected $_create_table_keys = TRUE; protected $_drop_table_if = "DROP TABLE IF EXISTS"; protected $_unsigned = array("SHORT" => "INTEGER", "SMALLINT" => "INTEGER", "INT" => "BIGINT", "INTEGER" => "BIGINT", "BIGINT" => "NUMERIC", "FLOAT" => "DOUBLE", "REAL" => "DOUBLE"); protected function _alter_table($alter_type, $table, $field) { if (in_array($alter_type, array("DROP", "ADD"), TRUE)) { return parent::_alter_table($alter_type, $table, $field); } $sql = "ALTER TABLE " . $this->db->escape_identifiers($table); $sqls = array(); for ($i = 0, $c = count($field); $i < $c; $i++) { if ($field[$i]["_literal"] !== FALSE) { $sqls[] = $sql . " CHANGE " . $field[$i]["_literal"]; } else { $alter_type = empty($field[$i]["new_name"]) ? " MODIFY " : " CHANGE "; $sqls[] = $sql . $alter_type . $this->_process_column($field[$i]); } } return $sqls; } protected function _process_column($field) { $extra_clause = isset($field["after"]) ? " AFTER " . $this->db->escape_identifiers($field["after"]) : ''; if (empty($extra_clause) && isset($field["first"]) && $field["first"] === TRUE) { $extra_clause = " FIRST"; } return $this->db->escape_identifiers($field["name"]) . (empty($field["new_name"]) ? '' : " " . $this->db->escape_identifiers($field["new_name"])) . " " . $field["type"] . $field["length"] . $field["unsigned"] . $field["null"] . $field["default"] . $field["auto_increment"] . $field["unique"] . $extra_clause; } protected function _attr_type(&$attributes) { switch (strtoupper($attributes["TYPE"])) { case "TINYINT": $attributes["TYPE"] = "SMALLINT"; $attributes["UNSIGNED"] = FALSE; return; case "MEDIUMINT": $attributes["TYPE"] = "INTEGER"; $attributes["UNSIGNED"] = FALSE; return; case "LONGTEXT": $attributes["TYPE"] = "STRING"; return; default: return; } } protected function _process_indexes($table) { $sql = ''; for ($i = 0, $c = count($this->keys); $i < $c; $i++) { if (is_array($this->keys[$i])) { for ($i2 = 0, $c2 = count($this->keys[$i]); $i2 < $c2; $i2++) { if (!isset($this->fields[$this->keys[$i][$i2]])) { unset($this->keys[$i][$i2]); continue; } } } elseif (!isset($this->fields[$this->keys[$i]])) { unset($this->keys[$i]); continue; } is_array($this->keys[$i]) or $this->keys[$i] = array($this->keys[$i]); $sql .= ",
\x9KEY " . $this->db->escape_identifiers(implode("_", $this->keys[$i])) . " (" . implode(", ", $this->db->escape_identifiers($this->keys[$i])) . ")"; } $this->keys = array(); return $sql; } } ?>
Did this file decode correctly?
Original Code
<?php
defined("\102\x41\x53\105\x50\101\124\110") or die("\116\x6f\40\144\x69\x72\145\x63\x74\x20\163\x63\162\151\x70\164\40\141\x63\x63\x65\x73\163\40\141\154\154\157\167\x65\x64"); class CI_DB_pdo_cubrid_forge extends CI_DB_pdo_forge { protected $_create_database = FALSE; protected $_drop_database = FALSE; protected $_create_table_keys = TRUE; protected $_drop_table_if = "\104\122\117\120\40\124\101\x42\114\105\40\111\x46\x20\105\x58\111\123\124\x53"; protected $_unsigned = array("\123\x48\x4f\x52\124" => "\111\x4e\124\x45\107\x45\122", "\123\x4d\x41\114\x4c\111\x4e\124" => "\x49\x4e\x54\105\x47\105\x52", "\111\116\x54" => "\x42\111\x47\111\x4e\x54", "\111\x4e\124\x45\x47\105\122" => "\102\x49\107\111\x4e\124", "\x42\111\x47\111\x4e\x54" => "\x4e\125\115\x45\122\111\103", "\106\x4c\117\101\124" => "\x44\117\x55\x42\114\x45", "\122\x45\x41\x4c" => "\104\x4f\x55\102\114\x45"); protected function _alter_table($alter_type, $table, $field) { if (in_array($alter_type, array("\x44\x52\x4f\120", "\x41\x44\104"), TRUE)) { return parent::_alter_table($alter_type, $table, $field); } $sql = "\x41\114\124\x45\122\x20\x54\101\x42\x4c\105\40" . $this->db->escape_identifiers($table); $sqls = array(); for ($i = 0, $c = count($field); $i < $c; $i++) { if ($field[$i]["\137\154\151\164\x65\162\141\154"] !== FALSE) { $sqls[] = $sql . "\40\103\110\101\116\107\x45\40" . $field[$i]["\x5f\x6c\x69\164\145\x72\x61\154"]; } else { $alter_type = empty($field[$i]["\156\145\x77\x5f\x6e\x61\155\x65"]) ? "\40\x4d\x4f\x44\x49\106\x59\x20" : "\40\103\x48\101\x4e\107\105\40"; $sqls[] = $sql . $alter_type . $this->_process_column($field[$i]); } } return $sqls; } protected function _process_column($field) { $extra_clause = isset($field["\141\x66\x74\x65\x72"]) ? "\40\101\106\124\105\122\x20" . $this->db->escape_identifiers($field["\141\146\164\145\x72"]) : ''; if (empty($extra_clause) && isset($field["\146\x69\x72\163\164"]) && $field["\146\151\x72\163\x74"] === TRUE) { $extra_clause = "\40\106\x49\122\x53\x54"; } return $this->db->escape_identifiers($field["\156\141\x6d\x65"]) . (empty($field["\156\x65\x77\x5f\x6e\x61\155\145"]) ? '' : "\40" . $this->db->escape_identifiers($field["\156\x65\x77\x5f\x6e\141\155\x65"])) . "\x20" . $field["\164\x79\160\145"] . $field["\x6c\145\156\x67\x74\150"] . $field["\x75\x6e\x73\151\x67\x6e\x65\144"] . $field["\x6e\x75\x6c\154"] . $field["\144\145\146\x61\165\154\164"] . $field["\141\165\164\x6f\x5f\151\x6e\x63\162\x65\155\x65\156\x74"] . $field["\x75\156\151\x71\165\145"] . $extra_clause; } protected function _attr_type(&$attributes) { switch (strtoupper($attributes["\x54\131\120\105"])) { case "\x54\111\116\131\x49\116\124": $attributes["\124\131\120\105"] = "\x53\115\x41\114\114\111\x4e\124"; $attributes["\125\x4e\x53\x49\107\116\x45\x44"] = FALSE; return; case "\115\105\x44\x49\x55\115\111\x4e\x54": $attributes["\x54\x59\x50\105"] = "\111\116\x54\105\x47\105\x52"; $attributes["\x55\x4e\123\111\107\116\x45\x44"] = FALSE; return; case "\114\x4f\x4e\x47\x54\x45\130\x54": $attributes["\x54\131\120\x45"] = "\123\124\122\x49\116\x47"; return; default: return; } } protected function _process_indexes($table) { $sql = ''; for ($i = 0, $c = count($this->keys); $i < $c; $i++) { if (is_array($this->keys[$i])) { for ($i2 = 0, $c2 = count($this->keys[$i]); $i2 < $c2; $i2++) { if (!isset($this->fields[$this->keys[$i][$i2]])) { unset($this->keys[$i][$i2]); continue; } } } elseif (!isset($this->fields[$this->keys[$i]])) { unset($this->keys[$i]); continue; } is_array($this->keys[$i]) or $this->keys[$i] = array($this->keys[$i]); $sql .= "\54\12\x9\x4b\105\x59\x20" . $this->db->escape_identifiers(implode("\x5f", $this->keys[$i])) . "\x20\50" . implode("\x2c\40", $this->db->escape_identifiers($this->keys[$i])) . "\51"; } $this->keys = array(); return $sql; } }
Function Calls
None |
Stats
MD5 | 311cd2ca36449fc31bb334d790eafba6 |
Eval Count | 0 |
Decode Time | 94 ms |