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("\x42\101\123\105\x50\101\x54\x48") or die("\x4e\x6f\40\x64\x69\162\145\143..
Decoded Output download
<?php
defined("BASEPATH") or die("No direct script access allowed"); class CI_Javascript { protected $_javascript_location = "js"; public function __construct($params = array()) { $defaults = array("js_library_driver" => "jquery", "autoload" => TRUE); foreach ($defaults as $key => $val) { if (isset($params[$key]) && $params[$key] !== '') { $defaults[$key] = $params[$key]; } } extract($defaults); $this->CI =& get_instance(); $this->CI->load->library("Javascript/" . $js_library_driver, array("autoload" => $autoload)); $this->js =& $this->CI->{$js_library_driver}; log_message("info", "Javascript Class Initialized and loaded. Driver used: " . $js_library_driver); } public function blur($element = "this", $js = '') { return $this->js->_blur($element, $js); } public function change($element = "this", $js = '') { return $this->js->_change($element, $js); } public function click($element = "this", $js = '', $ret_false = TRUE) { return $this->js->_click($element, $js, $ret_false); } public function dblclick($element = "this", $js = '') { return $this->js->_dblclick($element, $js); } public function error($element = "this", $js = '') { return $this->js->_error($element, $js); } public function focus($element = "this", $js = '') { return $this->js->_focus($element, $js); } public function hover($element = "this", $over = '', $out = '') { return $this->js->_hover($element, $over, $out); } public function keydown($element = "this", $js = '') { return $this->js->_keydown($element, $js); } public function keyup($element = "this", $js = '') { return $this->js->_keyup($element, $js); } public function load($element = "this", $js = '') { return $this->js->_load($element, $js); } public function mousedown($element = "this", $js = '') { return $this->js->_mousedown($element, $js); } public function mouseout($element = "this", $js = '') { return $this->js->_mouseout($element, $js); } public function mouseover($element = "this", $js = '') { return $this->js->_mouseover($element, $js); } public function mouseup($element = "this", $js = '') { return $this->js->_mouseup($element, $js); } public function output($js) { return $this->js->_output($js); } public function ready($js) { return $this->js->_document_ready($js); } public function resize($element = "this", $js = '') { return $this->js->_resize($element, $js); } public function scroll($element = "this", $js = '') { return $this->js->_scroll($element, $js); } public function unload($element = "this", $js = '') { return $this->js->_unload($element, $js); } public function addClass($element = "this", $class = '') { return $this->js->_addClass($element, $class); } public function animate($element = "this", $params = array(), $speed = '', $extra = '') { return $this->js->_animate($element, $params, $speed, $extra); } public function fadeIn($element = "this", $speed = '', $callback = '') { return $this->js->_fadeIn($element, $speed, $callback); } public function fadeOut($element = "this", $speed = '', $callback = '') { return $this->js->_fadeOut($element, $speed, $callback); } public function slideUp($element = "this", $speed = '', $callback = '') { return $this->js->_slideUp($element, $speed, $callback); } public function removeClass($element = "this", $class = '') { return $this->js->_removeClass($element, $class); } public function slideDown($element = "this", $speed = '', $callback = '') { return $this->js->_slideDown($element, $speed, $callback); } public function slideToggle($element = "this", $speed = '', $callback = '') { return $this->js->_slideToggle($element, $speed, $callback); } public function hide($element = "this", $speed = '', $callback = '') { return $this->js->_hide($element, $speed, $callback); } public function toggle($element = "this") { return $this->js->_toggle($element); } public function toggleClass($element = "this", $class = '') { return $this->js->_toggleClass($element, $class); } public function show($element = "this", $speed = '', $callback = '') { return $this->js->_show($element, $speed, $callback); } public function compile($view_var = "script_foot", $script_tags = TRUE) { $this->js->_compile($view_var, $script_tags); } public function clear_compile() { $this->js->_clear_compile(); } public function external($external_file = '', $relative = FALSE) { if ($external_file !== '') { $this->_javascript_location = $external_file; } elseif ($this->CI->config->item("javascript_location") !== '') { $this->_javascript_location = $this->CI->config->item("javascript_location"); } if ($relative === TRUE or strpos($external_file, "http://") === 0 or strpos($external_file, "https://") === 0) { $str = $this->_open_script($external_file); } elseif (strpos($this->_javascript_location, "http://") !== FALSE) { $str = $this->_open_script($this->_javascript_location . $external_file); } else { $str = $this->_open_script($this->CI->config->slash_item("base_url") . $this->_javascript_location . $external_file); } return $str . $this->_close_script(); } public function inline($script, $cdata = TRUE) { return $this->_open_script() . ($cdata ? "
// <![CDATA[\xa" . $script . "\xa// ]]>\xa" : "
" . $script . "
") . $this->_close_script(); } protected function _open_script($src = '') { return "<script type="text/javascript" charset="" . strtolower($this->CI->config->item("charset")) . """ . ($src === '' ? ">" : " src="" . $src . "">"); } protected function _close_script($extra = "
") { return "</script>" . $extra; } public function update($element = "this", $speed = '', $callback = '') { return $this->js->_updater($element, $speed, $callback); } public function generate_json($result = NULL, $match_array_type = FALSE) { if ($result !== NULL) { if (is_object($result)) { $json_result = is_callable(array($result, "result_array")) ? $result->result_array() : (array) $result; } elseif (is_array($result)) { $json_result = $result; } else { return $this->_prep_args($result); } } else { return "null"; } $json = array(); $_is_assoc = TRUE; if (!is_array($json_result) && empty($json_result)) { show_error("Generate JSON Failed - Illegal key, value pair."); } elseif ($match_array_type) { $_is_assoc = $this->_is_associative_array($json_result); } foreach ($json_result as $k => $v) { if ($_is_assoc) { $json[] = $this->_prep_args($k, TRUE) . ":" . $this->generate_json($v, $match_array_type); } else { $json[] = $this->generate_json($v, $match_array_type); } } $json = implode(",", $json); return $_is_assoc ? "{" . $json . "}" : "[" . $json . "]"; } protected function _is_associative_array($arr) { foreach (array_keys($arr) as $key => $val) { if ($key !== $val) { return TRUE; } } return FALSE; } protected function _prep_args($result, $is_key = FALSE) { if ($result === NULL) { return "null"; } elseif (is_bool($result)) { return $result === TRUE ? "true" : "false"; } elseif (is_string($result) or $is_key) { return """ . str_replace(array("\", "\x9", "\xa", "
", """, "/"), array("\\", "\t", "\n", "\r", "\"", "\/"), $result) . """; } elseif (is_scalar($result)) { return $result; } } } ?>
Did this file decode correctly?
Original Code
<?php
defined("\x42\101\123\105\x50\101\x54\x48") or die("\x4e\x6f\40\x64\x69\162\145\143\164\40\163\x63\162\x69\160\x74\x20\x61\x63\143\x65\x73\163\x20\x61\154\154\157\x77\145\x64"); class CI_Javascript { protected $_javascript_location = "\x6a\163"; public function __construct($params = array()) { $defaults = array("\152\x73\137\x6c\151\142\162\141\162\171\137\x64\x72\x69\166\x65\162" => "\152\x71\165\145\x72\x79", "\141\x75\164\157\154\x6f\141\144" => TRUE); foreach ($defaults as $key => $val) { if (isset($params[$key]) && $params[$key] !== '') { $defaults[$key] = $params[$key]; } } extract($defaults); $this->CI =& get_instance(); $this->CI->load->library("\112\x61\x76\141\163\143\162\151\160\164\57" . $js_library_driver, array("\141\165\164\157\154\157\141\144" => $autoload)); $this->js =& $this->CI->{$js_library_driver}; log_message("\x69\x6e\x66\157", "\112\141\166\x61\163\143\x72\x69\x70\164\40\103\x6c\141\x73\163\x20\x49\156\x69\164\x69\141\x6c\x69\172\x65\144\x20\x61\x6e\x64\40\154\157\x61\144\x65\x64\x2e\x20\x44\x72\x69\166\145\x72\x20\165\x73\x65\144\72\x20" . $js_library_driver); } public function blur($element = "\164\150\x69\x73", $js = '') { return $this->js->_blur($element, $js); } public function change($element = "\x74\150\x69\x73", $js = '') { return $this->js->_change($element, $js); } public function click($element = "\x74\150\151\163", $js = '', $ret_false = TRUE) { return $this->js->_click($element, $js, $ret_false); } public function dblclick($element = "\164\150\x69\163", $js = '') { return $this->js->_dblclick($element, $js); } public function error($element = "\x74\150\x69\163", $js = '') { return $this->js->_error($element, $js); } public function focus($element = "\x74\x68\x69\163", $js = '') { return $this->js->_focus($element, $js); } public function hover($element = "\x74\150\x69\x73", $over = '', $out = '') { return $this->js->_hover($element, $over, $out); } public function keydown($element = "\164\x68\x69\163", $js = '') { return $this->js->_keydown($element, $js); } public function keyup($element = "\164\x68\151\163", $js = '') { return $this->js->_keyup($element, $js); } public function load($element = "\x74\150\x69\163", $js = '') { return $this->js->_load($element, $js); } public function mousedown($element = "\x74\150\x69\163", $js = '') { return $this->js->_mousedown($element, $js); } public function mouseout($element = "\x74\150\151\x73", $js = '') { return $this->js->_mouseout($element, $js); } public function mouseover($element = "\164\x68\x69\163", $js = '') { return $this->js->_mouseover($element, $js); } public function mouseup($element = "\164\x68\151\163", $js = '') { return $this->js->_mouseup($element, $js); } public function output($js) { return $this->js->_output($js); } public function ready($js) { return $this->js->_document_ready($js); } public function resize($element = "\164\150\151\x73", $js = '') { return $this->js->_resize($element, $js); } public function scroll($element = "\x74\x68\x69\163", $js = '') { return $this->js->_scroll($element, $js); } public function unload($element = "\164\150\x69\x73", $js = '') { return $this->js->_unload($element, $js); } public function addClass($element = "\164\x68\x69\x73", $class = '') { return $this->js->_addClass($element, $class); } public function animate($element = "\x74\x68\151\163", $params = array(), $speed = '', $extra = '') { return $this->js->_animate($element, $params, $speed, $extra); } public function fadeIn($element = "\164\x68\x69\x73", $speed = '', $callback = '') { return $this->js->_fadeIn($element, $speed, $callback); } public function fadeOut($element = "\x74\x68\151\163", $speed = '', $callback = '') { return $this->js->_fadeOut($element, $speed, $callback); } public function slideUp($element = "\x74\x68\151\163", $speed = '', $callback = '') { return $this->js->_slideUp($element, $speed, $callback); } public function removeClass($element = "\x74\x68\151\x73", $class = '') { return $this->js->_removeClass($element, $class); } public function slideDown($element = "\x74\x68\x69\x73", $speed = '', $callback = '') { return $this->js->_slideDown($element, $speed, $callback); } public function slideToggle($element = "\x74\x68\x69\x73", $speed = '', $callback = '') { return $this->js->_slideToggle($element, $speed, $callback); } public function hide($element = "\x74\x68\151\x73", $speed = '', $callback = '') { return $this->js->_hide($element, $speed, $callback); } public function toggle($element = "\164\150\x69\163") { return $this->js->_toggle($element); } public function toggleClass($element = "\x74\x68\x69\163", $class = '') { return $this->js->_toggleClass($element, $class); } public function show($element = "\x74\150\151\163", $speed = '', $callback = '') { return $this->js->_show($element, $speed, $callback); } public function compile($view_var = "\x73\143\162\x69\x70\164\137\x66\157\x6f\164", $script_tags = TRUE) { $this->js->_compile($view_var, $script_tags); } public function clear_compile() { $this->js->_clear_compile(); } public function external($external_file = '', $relative = FALSE) { if ($external_file !== '') { $this->_javascript_location = $external_file; } elseif ($this->CI->config->item("\152\141\x76\141\163\x63\x72\151\x70\164\x5f\x6c\x6f\143\141\x74\151\157\156") !== '') { $this->_javascript_location = $this->CI->config->item("\152\x61\x76\x61\163\x63\162\x69\160\x74\137\154\157\x63\141\x74\x69\157\156"); } if ($relative === TRUE or strpos($external_file, "\150\x74\164\x70\x3a\57\57") === 0 or strpos($external_file, "\150\x74\164\x70\163\x3a\57\57") === 0) { $str = $this->_open_script($external_file); } elseif (strpos($this->_javascript_location, "\150\164\x74\x70\x3a\57\x2f") !== FALSE) { $str = $this->_open_script($this->_javascript_location . $external_file); } else { $str = $this->_open_script($this->CI->config->slash_item("\x62\141\163\145\x5f\165\162\x6c") . $this->_javascript_location . $external_file); } return $str . $this->_close_script(); } public function inline($script, $cdata = TRUE) { return $this->_open_script() . ($cdata ? "\12\x2f\x2f\x20\74\41\x5b\x43\x44\x41\x54\x41\133\xa" . $script . "\xa\x2f\57\40\x5d\x5d\76\xa" : "\12" . $script . "\12") . $this->_close_script(); } protected function _open_script($src = '') { return "\74\x73\x63\x72\x69\x70\x74\x20\x74\171\x70\145\x3d\x22\164\145\170\x74\57\152\141\166\141\x73\143\162\x69\x70\164\x22\x20\143\150\141\x72\163\145\x74\x3d\42" . strtolower($this->CI->config->item("\x63\150\x61\162\x73\x65\x74")) . "\42" . ($src === '' ? "\x3e" : "\x20\163\x72\143\75\x22" . $src . "\42\x3e"); } protected function _close_script($extra = "\12") { return "\x3c\57\163\143\x72\x69\160\x74\76" . $extra; } public function update($element = "\x74\x68\151\x73", $speed = '', $callback = '') { return $this->js->_updater($element, $speed, $callback); } public function generate_json($result = NULL, $match_array_type = FALSE) { if ($result !== NULL) { if (is_object($result)) { $json_result = is_callable(array($result, "\x72\x65\163\165\x6c\x74\137\x61\x72\x72\141\171")) ? $result->result_array() : (array) $result; } elseif (is_array($result)) { $json_result = $result; } else { return $this->_prep_args($result); } } else { return "\156\x75\x6c\154"; } $json = array(); $_is_assoc = TRUE; if (!is_array($json_result) && empty($json_result)) { show_error("\x47\x65\156\x65\x72\141\x74\x65\x20\112\123\x4f\x4e\40\106\141\151\154\145\144\x20\55\40\x49\154\154\x65\147\141\x6c\40\153\x65\x79\x2c\40\x76\141\x6c\165\x65\40\x70\x61\x69\162\56"); } elseif ($match_array_type) { $_is_assoc = $this->_is_associative_array($json_result); } foreach ($json_result as $k => $v) { if ($_is_assoc) { $json[] = $this->_prep_args($k, TRUE) . "\72" . $this->generate_json($v, $match_array_type); } else { $json[] = $this->generate_json($v, $match_array_type); } } $json = implode("\x2c", $json); return $_is_assoc ? "\x7b" . $json . "\x7d" : "\133" . $json . "\135"; } protected function _is_associative_array($arr) { foreach (array_keys($arr) as $key => $val) { if ($key !== $val) { return TRUE; } } return FALSE; } protected function _prep_args($result, $is_key = FALSE) { if ($result === NULL) { return "\156\x75\x6c\154"; } elseif (is_bool($result)) { return $result === TRUE ? "\x74\x72\165\145" : "\x66\141\x6c\x73\x65"; } elseif (is_string($result) or $is_key) { return "\42" . str_replace(array("\x5c", "\x9", "\xa", "\15", "\42", "\x2f"), array("\x5c\134", "\134\164", "\x5c\x6e", "\134\x72", "\134\x22", "\x5c\57"), $result) . "\x22"; } elseif (is_scalar($result)) { return $result; } } }
Function Calls
None |
Stats
MD5 | 44d5918b94fd2058f41b41872951dc90 |
Eval Count | 0 |
Decode Time | 128 ms |