国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > PHP > 正文

免費主頁管理程序

2024-05-04 23:02:11
字體:
來源:轉載
供稿:網友


  
下面的只是一些升級程序、
  /*list.php3*/
  <?
  session_start();
  require("func.php3");
  connect();
  if (strstr($tpath,".."))
  {echo "
不要試圖破壞我的站點";exit;}
  if ($user=='')
  {header("location: login.php3");}
  
  echo "<head><title>====================================
主頁空間管理系統2.3====================================</title></head>
  <center><a href=sm.html target=_blank>
主頁空間管理系統2.3幫助</a>
  ————<a href="javascript:showwin('xgxxxx.php3')">
修改用戶個人資料</a>————<a href=logout.php3>退出登陸</a></div></center><br>";
  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 "<font color=red>
數據庫導出成功!</font><br>導出文件為:你的主頁根目錄下:{$user}數據庫導出.日期{$date}";
  
  }
  $dbs = mysql_list_dbs();
  $dbcount=mysql_numrows($dbs);
  $flag=0;
  for ($i=0;$i<$dbcount;$i++)
  {
  if ($user==mysql_dbname($dbs, $i))
  {$flag=1;break;}
  }
  if ($flag==0)
  {
  $dbuser=$user;
  $dbpassword=$pass;
  session_register("dbuser");
  session_register("dbpassword");
  echo "
您還沒有創建自己的數據庫。請點擊創建數據庫按鈕,請不要關掉彈出窗口<input type=button value=創建自己的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 "<center><form method=post action=list.php3 >
您的數據庫已經可以使用,數據庫名為{$user},密碼為登陸密碼,數據庫主機為202.106.104.41";
  echo "<input type=hidden name=bf value=true><br><input type=submit value=
數據庫導出 class=no>
  <input type=button value=
數據庫導入 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");>
  </form></center>";
  }
  ?>
  
  <script language="javascript">
  function showwin(htmlurl){
  var newwin=window.open(htmlurl,"newwin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=350,height=500");
  }
  function showwin2(htmlurl){
  var newwin=window.open(htmlurl,"newwin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=250,height=50");
  }
  </script>
  
  <style>
  td{font-size:9pt}
  body{font-size:9pt}
  input { background-color: #ffffff; border: 1px #000000 dashed}
  .no { background-color: #d4d0c8}
  .no1 { background-color: #e6f3f7; border-style: none}
  .no2 { background-color: #eeeeee; border-style: none}
  </style>
  <script id=clienteventhandlersjs language=javascript>
  <!--
  
  function button1_onclick()
  {
  form1.remark .value ="shangchuan";
  form1.submit() ;
  
  }
  
  function button2_onclick()
  {
  form1.remark .value ="chuangjian";
  form1.submit() ;
  
  }
  
  function del_onclick()
  {
  if (confirm("
你確認要刪除這些目錄或者文件嗎?"))
  {
  form2.submit();
  }
  }
  //-->
  
  </script>
  
  <?
  $df = diskfreespace("/");
  $freespace=ceil($df/1024/1024);
  echo "<br>
磁盤剩余空間:{$freespace}m<br>";
  if ($tpath=="")
  { $path=$basepath; }
  else if ($tpath=="/")
  {
  if ($basepath<>"/homepage/{$user}")
  {
  $splitpath=explode("/",$basepath);
  for ($i=1;$i<count($splitpath)-1;$i++)
  {$path=$path."/{$splitpath[$i]}";}
  }
  else
  {$path="/homepage/$user";}
  
  }
  else
  { $path=$basepath.$tpath; }
  
  if ($stoppath<>"")
  {$path=$stoppath;}
  if ($directpath<>"")
  {$path=$directpath;}
  //echo "path={$path}"."<br>";
  //echo "basepath:$basepath<br>";
  
  $basepath=$path;
  if (!strstr($basepath,"/homepage/$user"))
  {echo "
你上別人的目錄干什么?";exit;}
  session_register("basepath");
  $splitpath=explode("/",$path);
  $newpath="<a target=_blank>
你的主頁</a>";
  for ($i=1;$i<count($splitpath);$i++)
  {
  $temppath=$temppath."/{$splitpath[$i]}";
  if ($i==1)
  {$newpath=$newpath;}
  else if ($i==2)
  {$newpath=$newpath."/<a href=list.php3?directpath=/homepage/$user>
根目錄</a>";}
  else
  {$newpath=$newpath."/<a href=list.php3?directpath={$temppath}>{$splitpath[$i]}</a>";}
  }
  
  echo $newpath."<br>";
  
  if (!file_exists($path))
  {mkdir($path,0000) or die("
目錄創建錯誤,可能是你的用戶名里有非法的字符<br>請于<a href=mailto:[email protected]>站長</a>聯系");}
  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 "<font color=red>
文件:".$file1_name."({$dx})";
  if ($unzipok<>"")
  {echo $unzipok;}
  else
  { echo "
上傳成功,可以繼續上傳</font>";}
  
  
  }
  }
  //
創建目錄
  if ($remark=="chuangjian")
  {
  if (!$dir)
  {echo "<font color=red>
創建目錄不能為空!</font>";}
  else
  {
  if (!file_exists($dir))
  {
  mkdir($dir,0000);
  echo "<font color=red>
目錄{$dir}創建成功</font>";
  }
  else
  {
  echo "<font color=red>
目錄{$dir}已經存在</font>";
  }
  }
  }
  //
刪除文件和目錄
  if ($remark=="del")
  {
  for ($i=1;$i<=$count;$i++)
  {
  $check="checkbox".$i;
  if ($$check=="on")
  {
  $del="del".$i;
  
  if (is_dir($$del))
  {rmdir("{$$del}");}
  
  if (is_file($$del))
  {unlink($$del);}
  
  echo "<font color=red>{$$del}
被刪除</font><br>";
  }
  }
  }
  
  
  while ($file = readdir($handle))
  {
  if (is_dir($file)){$dirlist[]=$file;}
  if (is_file($file)){$filelist[]=$file;}
  }
  closedir($handle);
  ?>
  <body bgcolor="#d0d2e3">
  <form action=list.php3 method=post enctype="multipart/form-data" name=form1>
  <input type=hidden name=remark value="">
  <table width="0%" cellspacing="0" cellpadding="0" align="center">
  <tr bgcolor="#0066ff">
  <td bgcolor="#3366ff">
  <div align="center"><font color="#ffffff"><b>
文件上傳</b></font></div>
  </td>
  <td bgcolor="#d0d2e3">        </td>
  <td bgcolor="#3366ff">
  <div align="center"><font color="#ffffff"><b>
創建目錄</b></font></div>
  </td>
  </tr>
  <tr>
  <td>
  <input type=file name=file1>
  <input type=button value=
上傳 name="button1" id="button1" class=no>
  </td>
  <td bgcolor="#d0d2e3" rowspan="2">        </td>
  <td rowspan="2" valign="top">
  <input type="text" name="dir">
  <input type="button" name="button2" id="button2" value="
創建" class=no>
  </td>
  </tr>
  <tr>
  <td>
  <input type="checkbox" name="unzip" value="true" >
  
自動解壓zip文件(包括路徑) </td>
  </tr>
  </table>
  <input type=hidden name=stoppath value=<?echo $path;?>>
  </form>
  <form method="post" action="list.php3" name=form2>
  <table width="95%" border="0" cellspacing="0" cellpadding="0">
  <tr>
  <td>
  <div align="left">
  <input type=hidden name="remark" value="del">
  <input type=hidden name=stoppath value=<?echo $path;?>>
  <input type="button" name="del" value="
刪除" class=no>
  </div>
  </td>
  <td> </td>
  </tr>
  </table>
  <table width="100%" border="1" cellspacing="1" cellpadding="3" bordercolor="#666666">
  <tr bgcolor="#cccccc">
  <td width="1%" nowrap>
  <div align="center">
選定</div>
  </td>
  <td width="25%" nowrap>
  <div align="center">
文件名</div>
  </td>
  <td nowrap>
  <div align="center">
改名</div>
  </td>
  <td width="21%" nowrap>
  <div align="center">
文件類型</div>
  </td>
  <td width="21%" nowrap>
  <div align="center">
文件尺寸</div>
  </td>
  <td width="32%" nowrap>
  <div align="center">
最后修改日期</div>
  </td>
  </tr>
  <?
  $count=0;
  if ($dirlist)
  {
  asort($dirlist);
  for ($i=0;$i<count($dirlist);$i++)
  {
  $count++;
  $filename=$dirlist[$i];
  if ($filename=="abcdefghijk")
  {
  $sqls="update upfile_user set ph=ph+1,ptime=now() where username='$user'";
  @mysql_query($sqls);
  echo "<center><font color=red>
不要試圖破壞我的硬盤。你的登陸已經無效了,你的行為也許是無意的,可是你的行為已經被記錄在案。
  <br>
注意,不要到你的目錄以上,如果破壞次數超過了10次你的賬號將被取消。</font></center>";
  $user="";
  session_register("user");
  exit;}
  if ($filename<>".")
  {
  if ($filename=="..")
  {
  if ($path=="/homepage/{$user}")
  {$tfilename="
根目錄";$rename=" ";}
  else
  {$filename="
上一級目錄";$tfilename="<a href=list.php3?tpath=/>{$filename}</a>";$rename=" ";}
  }
  else
  {$tfilename="<a href=list.php3?tpath=/$filename>{$filename}</a>";$rename="<a href=javascript:showwin2("rename.php3?name={$filename}&lx=dir")>
改名</a>";}
  $filetype="
目錄";
  $filesize="
";
  $lasttime=date("y
mdh:i:s",filectime($dirlist[$i]));
  
  echo "<tr bgcolor="#e6f3f7">
  <td width=1%>
  <div align=center>
  <input type=checkbox name=checkbox{$count} class=no1>
  <input type=hidden name=del{$count} value={$filename}>
  </div>
  </td>
  <td width=25%>
  <div align=center>{$tfilename}</div>
  </td>
  <td nowrap>
  <div align=center>$rename</div>
  </td>
  <td width=21%>
  <div align=center>{$filetype}</div>
  </td>
  <td width=21%>
  <div align=center>{$filesize}</div>
  </td>
  <td width=32%>
  <div align=center>{$lasttime}</div>
  </td>
  </tr>
  ";
  }
  }
  }
  if ($filelist)
  {
  $splitpath=explode("/",$path);
  for ($i=3;$i<count($splitpath);$i++)
  {
  $temp=$temp."/{$splitpath[$i]}";
  }
  
  
  
  
  asort($filelist);
  for ($i=0;$i<count($filelist);$i++)
  {
  $count++;
  $filename=$filelist[$i];
  $tfilename="<a target=_blank>{$filename}</a>";
  $filetype=strtolower(substr(($filelist[$i]),-4));
  
  if ($filetype==".txt")
  {$filetype="
文本文件";
  $editname="——<a href=javascript:showwin("edit.php3?path=$temp&file={$filename}")>
手工編輯</a>";
  }
  
  else if ($filetype=="html" || $filetype==".htm")
  {$filetype="
超文本文件";
  $editname="——<a href=javascript:showwin("edit.php3?path=$temp&file={$filename}")>
手工編輯</a>";
  }
  else if ($filetype==".jpg" || $filetype==".gif")
  {$filetype="
圖像文件";
  $editname="";}
  else if ($filetype==".zip" || $filetype==".rar")
  {$filetype="
壓縮文件";$editname="";}
  else if ($filetype==".swf" || $filetype==".fla")
  {$filetype="flash
文件";$editname="";}
  else if ($filetype==".php" || $filetype==".php3")
  {$filetype="php
文件";
  $tfilename=$tfilename."——<a href=javascript:showwin("edit.php3?path=$temp&file=$filename")>
手工編輯</a>";
  }
  else if ($filetype==".css")
  {$filetype="
樣式表文件";
  $editname="——<a href=javascript:showwin("edit.php3?path=$temp&file=$filename")>
手工編輯</a>";
  }
  else if ($filetype==".exe" || $filetype==".com")
  {$filetype="
可執行文件";$editname="";}
  else
  {$filetype="
未知類型";$editname="";}
  $filesize=filesize($filelist[$i]);
  $lasttime=date("y
mdh:i:s",filectime($filelist[$i]));
  echo "<tr bgcolor="#eeeeee">
  <td width=1%>
  <div align=center>
  <input type=checkbox name=checkbox{$count} class=no2>
  <input type=hidden name=del{$count} value={$filename}>
  </div>
  </td>
  <td width=25%>
  <div align=center>{$tfilename}{$editname}</div>
  </td>
  <td nowrap>
  <div align=center><a href=javascript:showwin2("rename.php3?name={$filename}&lx=file")>
改名</a></div>
  </td>
  <td width=21%>
  <div align=center>{$filetype}</div>
  </td>
  <td width=21%>
  <div align=center>{$filesize}b</div>
  </td>
  <td width=32%>
  <div align=center>{$lasttime}</div>
  </td>
  </tr>
  
  ";
  }
  }
  ?>
  <input type=hidden name=count value=<?echo $count;?>>
  <tr bgcolor="#cccccc">
  <td width="1%" nowrap>
  <div align="center">
選定</div>
  </td>
  <td width="25%" nowrap>
  <div align="center">
文件名</div>
  </td>
  <td nowrap>
  <div align="center">
改名</div>
  </td>
  <td width="21%" nowrap>
  <div align="center">
文件類型</div>
  </td>
  <td width="21%" nowrap bgcolor="#cccccc">
  <div align="center">
文件尺寸</div>
  </td>
  <td width="32%" nowrap>
  <div align="center">
最后修改日期</div>
  </td>
  </tr>
  </table>
  </form>
  <?
  
  if ($gg=="")
  {
  $gg="ok";
  session_register("gg");
  require("gg.html");
  }
  ?>
  
  

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 象山县| 玉环县| 南江县| 自治县| 迁西县| 大安市| 化德县| 江永县| 多伦县| 鄂托克旗| 扶风县| 息烽县| 沁阳市| 乌兰浩特市| 姜堰市| 正镶白旗| 九龙县| 平昌县| 浑源县| 龙山县| 黄冈市| 扶绥县| 宁阳县| 明溪县| 衡山县| 德昌县| 杂多县| 南汇区| 宁南县| 东乡族自治县| 临颍县| 章丘市| 赤峰市| 太仓市| 彭阳县| 富川| 麻城市| 金寨县| 深圳市| 盘山县| 滦平县|