⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setup.php

📁 BBWPS 宾馆管理系统 php+mysql
💻 PHP
字号:
<?php
/*
    [BBWPS!] (C)2006-2010 小蜜蜂版权所有.
	This is NOT a freeware, use is subject to license terms
*/
if(!isset($T_haveico,$T_editext,$T_perrows,$path,$currentpath,$ifdelete)){
	//header('HTTP/1.1 404 not found');
	exit("Access Denied!");
}
$treeid=$_GET['id'];
$dir   = array();
$files = array();
$allparent = historypath($path);
$realpath  = truepath($path);
//获得文件及文件夹数组
$handle = opendir($realpath);
do{
	$file = readdir($handle);
	clearstatcache();
	if($file=="."||$file=="..") continue;
	if(is_dir($realpath."/".$file)&&$file!=""){
		$dir[]=$path."/".$file;
	}elseif(is_file($realpath."/".$file)){
		$files[] =$path."/".$file;
	}
}while($file!="");
closedir($handle);
$IdValue = 1;
/*输出文件夹开始*/
$num_dir = 0;
if($dir){
	$dirlist .= "<tr>";
	foreach($dir as $path){
		$fulldirname = basename($path);  
		$dirname     = limitname($fulldirname);
		if(($num_dir%$T_perrows)==0&&$num_dir!=0){
			$dirlist .= "</tr><tr>";
		}
		if(strtolower(truepath($path))==strtolower(truepath($T_Recycled,2))){
			$dirlist .= "
			<td width=\"{$T_percent}\" style=\"white-space:nowrap;\" >
				<a href=\"javascript:;\" id=\"element_".$IdValue."\" class=\"default\" title=\"{$fulldirname}\" onmouseover=\"setvars(3,'".urlencode($path)."',".$IdValue.")\" onmouseout=\"setvars(0,'{$currentpath}',null)\" ondblclick=\"window.location='{$T_main}?path=".urlencode($path)."'\">
					<img src=\"{$T_images}/Recycled.gif\" height=\"32\" width=\"32\" align=absmiddle>{$dirname}
				</a>	
			</td>
			";
		}else{
			$dirlist .= "
			<td width=\"{$T_percent}\" style=\"white-space:nowrap;\">
				<a href=\"javascript:;\" id=\"element_".$IdValue."\" class=\"default\" title=\"{$fulldirname}\" onmouseover=\"setvars(".(2+$ifdelete).",'".urlencode($path)."',".$IdValue.")\" onmouseout=\"setvars(0,'{$currentpath}',null)\" ondblclick=\"window.location='{$T_main}?path=".urlencode($path)."'\">
				  <img src=\"{$T_images}/folder.gif\" height=\"32\" width=\"32\" align=absmiddle>{$dirname}
				</a>
			</td>
			";
		}
		$num_dir++;
		$IdValue++;
	}
	if($num_dir%$T_perrows){
		$colspan  = $T_perrows-$num_dir%$T_perrows;
		$colwidth = ((int)(100/$T_perrows)*$colspan)."%";
		$dirlist .= "<td colspan=\"{$colspan}\" width=\"$colwidth\">&nbsp;</td>";
	}
	$dirlist .= "</tr>";
}
/*输出文件夹结束*/

/*输出文件开始*/
$num_file = 0;
if($files){
	$filelist .= "<tr>";
	foreach($files as $path){
		$fulldirname = basename($path);  
		$dirname     = limitname($fulldirname);
		if(($num_file%$T_perrows)==0&&$num_file!=0){
			$filelist .= "</tr><tr>";
		}
		$ext = strtolower(fileext($fulldirname));
		if(in_array($ext,$T_haveico)){
			$thisico = $ext;
		}else{
			$thisico = "none";
		}
		$filelist .= "
		<td width=\"{$T_percent}\">
		 <a href=\"javascript:;\" id=\"element_".$IdValue."\" class=\"default\" title=\"{$fulldirname}\" onmouseover=\"setvars(".(1+$ifdelete).",'".urlencode($path)."',".$IdValue.")\" onmouseout=\"setvars(0,'{$currentpath}',null)\" ondblclick=\"Tasks('".urlencode($path)."','rewrite')\">
		  <img src={$T_images}/".$thisico.".gif border=0 align=absmiddle>&nbsp;$dirname
		 </a>
		</td>
		";
		$num_file++;
		$IdValue++;
	}
	if($num_file%$T_perrows){
		$colspan = $T_perrows-$num_file%$T_perrows;
		$colwidth = ((int)(100/$T_perrows)*$colspan)."%";
		$filelist .= "<td colspan=\"{$colspan}\" width=\"$colwidth\">&nbsp;</td>";
	}
	$filelist .= "</tr>";
}
/*输出文件结束*/
$T_URL_RC    = urlencode(visualpath(truepath($T_Recycled,2)));//路径URL编码
//调用模版
require_once($T_index);
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -