Вход Регистрация
Файл: create.php
Строк: 172
<?php
error_reporting
(0);$sid=trim($_GET['sid']);
$k=trim($_GET['k']); include("key.php");
$d=rawurldecode(trim($_GET['d'])); $n=rawurldecode(trim($_GET['n']));
if (
$d==NULL) {$d="";} else {if ($d=="/") {$d="";}}
if (
$n==NULL) {$n=preg_replace("~.*/([^/]*)~m","\1",$d);
$d=preg_replace("~(.*)/[^/]*~m","\1",$d);}
$rd=rawurlencode($d); $rn=rawurlencode($n);
$d=str_replace(".|htaccess",".htaccess",$d);
$n=str_replace(".|htaccess",".htaccess",$n);
/*$d=str_replace('$','$',$d); $n=str_replace('$','$',$n);*/
$tp=trim($_GET['tp']); $nm=trim($_POST['nm']);
$ch=trim($_POST['ch']); $pn=trim($_POST['pn']);
if (
$nm<>NULL) {
$repl=array("\"=>"","/"=>"",":"=>"","*"=>"","?"=>"","""=>"","<"=>"",">"=>"",
"|"=>"","`"=>""," "=>"_");
$nm=trim(strtr($nm,$repl));
include(
"repl.php"); $nm=u2t($nm);
if ((
$nm==".")||($nm=="..")) {$nm="";}
}
if (((
$tp=="f")||($tp=="d"))&&($nm<>NULL)) {
if ((
$ftp=@ftp_connect($sr))&&(@ftp_login($ftp,$lg,$ps))) {
@
ftp_pasv($ftp,true); $fnm="";
$d=str_replace('$','$',$d); $n=str_replace('$','$',$n);
if (
$tp=="f") {
$sfnm="free";
if (
$pn==1) {$sfnm="php";}
elseif (
$pn==2) {$sfnm="php_wml";}
elseif (
$pn==3) {$sfnm="php_htm";}
elseif (
$pn==4) {$sfnm="wml";}
elseif (
$pn==5) {$sfnm="htm";}
if (
strlen($ch)<>3) {$ch="644";}
@
ftp_put($ftp,"$d/$n/$nm","patterns/".$sfnm.".ptn",FTP_BINARY);
$cmd="chmod 0$ch $d/$n/$nm"; @ftp_site($ftp,$cmd);
@
ftp_close($ftp);
header("Location:ftp.php?k=$k&d=$rd&n=$rn&act=pm"); exit;
} elseif (
$tp=="d") {
if (
strlen($ch)<>3) {$ch="755";}
@
ftp_mkdir($ftp,"$d/$n/$nm");
$cmd="chmod 0$ch $d/$n/$nm"; @ftp_site($ftp,$cmd);
@
ftp_close($ftp);
header("Location:ftp.php?k=$k&d=$rd&n=$rn&act=pm"); exit;
} else {
header("Location:ftp.php?k=$k&d=$rd&n=$rn"); exit;}
} else {
$title="No Connection..";
include(
"inc/head.php");
echo(
"<div class="rmenu"><p align="center">
ga konek</p></div>
"
);
include(
"inc/foot.php");
}
} elseif (
$tp=="f") {
$num=@file_get_contents("allnumbd.dat");
$num++; if ($num>9999999) {$num=0;}
$f=@fopen("allnumbd.dat","w"); @fwrite($f,$num); @fclose($f);
$title="Create file";
include(
"inc/head.php");
echo(
"<div class="gmenu" align="left"><a href="ftp.php?k=$k&amp;d=$rd&amp;n=$rn">$d/</a><a href="ftp.php?k=$k&amp;d=$rd&amp;n=$rn">$n/</a></div>
<div class="
bmenu"><b>$title</b></div><div class="menu"><br/>
<form action="
create.php?k=$k&amp;d=$rd&amp;n=$rn&amp;tp=f" method="post">
Name:<input name="
nm" type="text" value="new.php" maxlength="150"/><br/>
CHMOD:
<input name="
ch" type="text" value="644" size="3" maxlength="3" format="*N"/><br/>
Ext:
<select name="
pn" value="0">
<option value="
0">Non</option>
<option value="
1">PHP</option>
<option value="
2">PHP_wml</option>
<option value="
3">PHP_html</option>
<option value="
4">WML</option>
<option value="
5">HTML</option>
</select>
<input type="
submit" value="create"/>
</form><br/>"
);
echo(
"<div class="ads">");
include(
"buzz.php");
echo(
"<br/></div></div>");
include(
"inc/foot.php");
} elseif (
$tp=="d") {
$num=@file_get_contents("allnumbd.dat");
$num++; if ($num>9999999) {$num=0;}
$f=@fopen("allnumbd.dat","w"); @fwrite($f,$num); @fclose($f);
$title="Create folder";
include(
"inc/head.php");
echo(
"<div class="gmenu" align="left">
<a href="
ftp.php?k=$k&amp;d=$rd">$d/</a><a href="ftp.php?k=$k&amp;d=$rd&amp;n=$rn">$n</a></div>");
$inp="Name: <input name="nm" type="text" value="new" maxlength="150"/><br/>";
$inpc="cmhod: <input name="ch" type="text" value="755" size="3" maxlength="3" format="*N"/>";
echo(
"<div class="bmenu"><b>$title</b></div>");
echo(
"<div class="menu"><br/><form action="create.php?k=$k&amp;d=$rd&amp;n=$rn&amp;tp=d" method="post">$inp$inpc<input type="submit" value="create"/>
</form><br/>
<div class="
ads">");
include(
"buzz.php");
echo(
"<br/></div></div>
"
);
include(
"inc/foot.php");
} else {
include(
"inc/head.php");
include(
"inc/foot.php");
}
?>
Онлайн: 1
Реклама