免费主页管理程序
Jun 21, 2016 am 09:02 AM
下面的只是一些升级程序、
/*list.php3*/
session_start();
require("func.php3");
connect();
if (strstr($tpath,".."))
{echo "不要试图破坏我的站点";exit;}
If ($user=='')
{Header("Location: login.php3");}
echo "
————修改用户个人资料————退出登陆
";
echo "你好{$user}。";
if ($bf"")
{
$date=date(Y).date(m).date(d);
$backupcommand="e:hubomysqlbinmysqldump --opt -u $user -p{$pass} {$user} >e:homepage\{$user}\{$user}数据库备份.日期{$date}";
//echo $backupcommand;
exec($backupcommand) ;
echo "数据库导出成功!
导出文件为:你的主页根目录下:{$user}数据库导出.日期{$date}";
}
$dbs = mysql_list_dbs();
$dbcount=mysql_numrows($dbs);
$flag=0;
for ($i=0;$i {
if ($user==mysql_dbname($dbs, $i))
{$flag=1;break;}
}
if ($flag==0)
{
$dbuser=$user;
$dbpassword=$pass;
session_register("dbuser");
session_register("dbpassword");
echo "您还没有创建自己的数据库。请点击创建数据库按钮,请不要关掉弹出窗口创建自己的mysql数据库 onclick=window.open("createdb.php3","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=50,height=50,top=40,left=30"); class=no>";
}
else
{echo "
echo "
数据库导出 class=no>
数据库导入 class=no onclick=window.open("import.php3","newwin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=270,height=50");>
";
}
?>
你确认要删除这些目录或者文件吗?"))
{
form2.submit();
}
}
//-->
$df = diskfreespace("/");
$freespace=ceil($df/1024/1024);
echo "
磁盘剩余空间:{$freespace}M
";
if ($tpath=="")
{ $path=$basepath; }
else if ($tpath=="/")
{
if ($basepath"/homepage/{$user}")
{
$splitpath=explode("/",$basepath);
for ($i=1;$i
}
else
{$path="/homepage/$user";}
}
else
{ $path=$basepath.$tpath; }
if ($stoppath"")
{$path=$stoppath;}
if ($directpath"")
{$path=$directpath;}
//echo "path={$path}"."
";
//echo "basepath:$basepath
";
$basepath=$path;
if (!strstr($basepath,"/homepage/$user"))
{echo "你上别人的目录干什么?";exit;}
session_register("basepath");
$splitpath=explode("/",$path);
$newpath="你的主页";
for ($i=1;$i
$temppath=$temppath."/{$splitpath[$i]}";
if ($i==1)
{$newpath=$newpath;}
else if ($i==2)
{$newpath=$newpath."/根目录";}
else
{$newpath=$newpath."/{$splitpath[$i]}";}
}
echo $newpath."
";
if (!file_exists($path))
{mkdir($path,0000) or die("目录创建错误,可能是你的用户名里有非法的字符
请于站长联系");}
chdir($path);
$handle = opendir(".");
//上传文件
if ($remark=="shangchuan")
{
If($file1 != "none")
{
$filesize=ceil(filesize($file1)/1024);
if ($filesize==0)
{
$dx=filesize($file1)."byte";
}
else
{$dx=$filesize."K";}
copy($file1,"{$path}/{$file1_name}");
if ($unzip=="true")
{
$commandstring="echo a | e:/homepage/pkunzip -d e:{$path}/{$file1_name} e:{$path}/";
$commandstring=strtr($commandstring,"/","\");
system($commandstring) ;
$unzipok="解压成功!";
$delcommand=strtr("del e:{$path}/{$file1_name}","/","");
system($delcommand);
}
unlink($file1);
$sqls="update upfile_user set dx=dx+{$filesize} where username='$user'";
@mysql_query($sqls);
echo "文件:".$file1_name."({$dx})";
if ($unzipok"")
{echo $unzipok;}
else
{ echo "上传成功,可以继续上传";}
}
}
//创建目录
if ($remark=="chuangjian")
{
if (!$dir)
{echo "创建目录不能为空!";}
else
{
if (!file_exists($dir))
{
mkdir($dir,0000);
echo "目录{$dir}创建成功";
}
else
{
echo "目录{$dir}已经存在";
}
}
}
//删除文件和目录
if ($remark=="del")
{
for ($i=1;$i {
$check="checkbox".$i;
if ($$check=="on")
{
$del="del".$i;
if (is_dir($$del))
{rmdir("{$$del}");}
if (is_file($$del))
{unlink($$del);}
echo "{$$del}被删除
";
}
}
}
while ($file = readdir($handle))
{
if (is_dir($file)){$dirlist[]=$file;}
if (is_file($file)){$filelist[]=$file;}
}
closedir($handle);
?>
if ($gg=="")
{
$gg="ok";
session_register("gg");
require("gg.html");
}
?>

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Solution: Your organization requires you to change your PIN

How to adjust window border settings on Windows 11: Change color and size
![Acer Care Center service is still initializing [Fixed]](https://img.php.cn/upload/article/000/465/014/171055772117927.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
Acer Care Center service is still initializing [Fixed]

How to enable or disable taskbar thumbnail previews on Windows 11

How to change title bar color on Windows 11?

OOBELANGUAGE Error Problems in Windows 11/10 Repair

What are the differences between Huawei GT3 Pro and GT4?
