Файл: chmod.php
Строк: 90
<?php
error_reporting(0);
$sid=$_GET["sid"];
$k=trim($_GET['k']);
include("key.php");
$d=rawurldecode(trim($_GET['d']));
$n=rawurldecode(trim($_GET['n']));
if ($d==NULL) {$d="";} if ($n==NULL) {$n=preg_replace("~.*/([^/]*)~m","\1",$d);
$d=preg_replace("~(.*)/[^/]*~m","\1",$d);} $sv=trim($_GET['sv']);
$t=trim($_GET['t']); $ch=trim($_GET['ch']);
$rd=rawurlencode($d); $rn=rawurlencode($n);
$d=str_replace(".|htaccess",".htaccess",$d);
$n=str_replace(".|htaccess",".htaccess",$n);
if (($sv<>1)||(strlen($ch)<>3)) {
$num=@file_get_contents("allnumbd.dat"); $nar=NULL;
$num++; $nar=$num; if ($num>99999999) {$num=0;}
$f=@fopen("allnumbd.dat","w"); @fwrite($f,$num); @fclose($f);
if ($d=="/") {$d="";} $n=str_replace("$","$",$n); $d=str_replace("$","$",$d);
$title="Chmod ".$d."/".$n;
include("inc/head.php");
echo ('<div class="gmenu" align="left"><a
href="ftp.php?k='.$k.'&d='.$rd.'">'.$d.'/</a><a
href="file.php?k='.$k.'&d='.$rd.'&n='.$rn.'">'.$n.'</a></div>');
echo "<div class="bmenu" style="text-align:left"><b>Change permission</b></div><div class="menu" align="center"><p>";
echo("<div class="ads">");
include("buzz.php");
$input="<input name="ch" type="text" value="$ch" size="3" maxlength="3" format="*N"/>";
echo "</div><br/><form action="chmod.php?" method="get"><input type="hidden" name="k"value="$k"/><input type="hidden" name="d" value="$rd"/><input type="hidden" name="n" value="$rn"/><input type="hidden" name="sv" value="1"/>$input<br/><br/><input type="submit" value="change"/></form><br/>";
echo("<div class="ads">");
include("mobgold.php");
echo "</div></p></div>";
include("inc/foot.php");
} else {
if (($ftp=@ftp_connect($sr))&&(@ftp_login($ftp,$lg,$ps))) {
@ftp_pasv($ftp,true);
$cmd="chmod 0$ch $d/$n"; @ftp_site($ftp,$cmd);
@ftp_close($ftp);
header("Location:ftp.php?k=$k&d=$rd&act=pm"); exit;
} else {
$title="No Connetion...";
include("inc/in_head.php");
echo("<p class="rmenu" align="center">
no connection...
</p>");
include("inc/foot.php");
}
}
?>