"" && substr($file,0,strlen($root_dir)) <> $root_dir) // $true_path = "$root_dir/$user$file"; //else $file = urldecode($file); $true_path=$file; $file = str_replace("//","/",$file); grava_log($log_file,"[] Edit $true_path",$log_dir); $msg = ""; $mode=0; srand(make_seed()); $tmpfile = $downloadDir.gera_rand(); if (isset($gem)) { if (get_magic_quotes_gpc() == 1) $str = stripslashes($str); $fp = fopen($tmpfile, "w"); fwrite($fp, $str); fclose($fp); //upload file $connection = @ftp_connect($server, $port); $loggedOn = @ftp_login($connection, $ftp_user, $ftp_password); if (!ftp_put($connection, $file, $tmpfile, 0)) $msg = $TEXT['cantsave']." : ".$file; else $msg = $TEXT['savesuccess']." : ".$file; unlink($tmpfile); } $links = " :: ".$TEXT['new'].""; $links .= " :: ".$TEXT['print']; if ($true_path) { //download file: $connection = @ftp_connect($server, $port); $loggedOn = @ftp_login($connection, $ftp_user, $ftp_password); $fp = fopen($tmpfile, "w"); ftp_fget($connection,$fp,$true_path,$mode); fclose($fp); $fp = fopen($tmpfile, "r"); $content = fread($fp, filesize($tmpfile)); fclose($fp); unlink($tmpfile); $content = str_replace("\t", " ",$content); $content = htmlspecialchars($content); if (strlen($content) == 0) $msg = $TEXT['cantopen'].": ".$file; // else // $msg = "Successfully opened: ".$file; } if ($msg != null) { ?> ³»¿ë ¼öÁ¤ " method=post>
 
: