<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?
// version : V1.0
require "inc/config.php";
require "inc/system.php";
require "inc/show_cache_s_fun.php";
require "inc/common_func.php";
if(!isset($_GET['Dir'])) $_GET['Dir']='';
$CurPath=$_GET['Dir'];
if($LockRoot){
$ii=strstr($CurPath,'../');
if($ii!=false) $CurPath='';
}
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$WebName; ?></title>
<style type="text/css">
<!--
@import url("inc/myimgbody.css");
@import url("inc/link1css.css");
-->
</style>
<SCRIPT language=javascript src="inc/popupdiv.js"></SCRIPT>
</head>
<body>
<div id="topmenu">
| <a href="index.php">首页</a> | <a href="help.php">帮助</a> | <a href="http://www.yhs8.cn/address.htm" target="_blank">联系我们</a> |</div>
<div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="6%" class="hederstyle1"> </td>
<td width="51%" height="80" class="hederstyle1"><?=$WebName; ?></td>
<td width="43%" align="right" class="hederstyle1">
<script type="text/javascript"><!--
google_ad_client = "pub-7840317202738276";
/* 468x60, 创建于 10-4-14 */
google_ad_slot = "8169701705";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
<div class="bedtitle2" id="topbar">图片网址:<a href="index.php"><?=$WebURL.$PicDir; ?></a> /
<?
$CurPaths = explode("/", $CurPath);
//print_r($CurPaths);
$Cpi='';
foreach ($CurPaths as $CurPathi) {
if($CurPathi==''){ continue; }
$Cpi .= '/'.$CurPathi;
echo '<a href="index.php?DO=ShowDir&Dir='.$Cpi.'">'.$CurPathi.'</a> / ';
}
?></div>
<div style="height:30px;"></div>
<div id="content">
<?
$PicPath=$PicDir.$CurPath;
//if($CurPath!='') $PicPath.='/'.$CurPath;
$handle=opendir($PicPath);
$PicPath.='/';
$PicNum = 0;
$DirNum = 0;
$osfiles = array("Thumbs.db", ".htaccess", ".", "..");
$Dirs = array();
$Files = array();
while (false !== ($filename = readdir($handle))) {
if (in_array($filename,$osfiles)){ continue; }
if (is_dir($PicPath.$filename)){
$Dirs[] = $filename;
$DirNum++;
}else{
$Files[] = $filename;
$PicNum++;
}
}
closedir($handle);
sort($Files);
sort($Dirs);
/*
echo $CurPath;
print_r($Dirs);
echo '<BR>----<BR>';
print_r($Files);
echo '<BR>'.$DirNum.'<BR>'.$PicNum.'<BR>';
*/
if(($DirNum>0) && ($_GET['DO']!='ShowPic')){ $ShowStat='ShowDir'; } else { $ShowStat='ShowPic'; }
?>
<table width="100%" border="0" cellpadding="0" cellspacing="15" bgcolor="#E4E4E4">
<?
if($ShowStat=='ShowDir'){
$DFiles = array();
for($i=0;$i<$DirNum;$i++){
$handle=opendir($PicPath.$Dirs[$i]);
while (false !== ($filename = readdir($handle))) {
if (in_array($filename,$osfiles)){ continue; }
if (is_dir($PicPath.$Dirs[$i].'/'.$filename)){ continue; }
else{ $DFiles[] = $filename; break;}
}
if($filename == false){ $DFiles[] = 'myimages/nopicture.gif'; }
closedir($handle);
}
//print_r($DFiles);
$i=0;
while($i<$DirNum){
?>
<tr>
<td width="25%" height="200" align="center" valign="middle" bgcolor="#FFFFFF">
<? if($i==0){ ?>
<div class="goodpic"><a href="index.php?DO=ShowPic&Dir=<?=$CurPath; ?>"><? echo browser_img_func($PicPath,$Files[$i]); ?></a> </div>
<div class="picname">本目录</div>
<? }else{ if($i<$DirNum){ ?>
<div class="goodpic"><a href="index.php?DO=ShowDir&Dir=<?=$CurPath.'/'.$Dirs[$i]; ?>"><? echo browser_img_func($PicPath.$Dirs[$i].'/',$DFiles[$i]); ?></a> </div>
<div class="picname">目录:<?=$Dirs[$i]; ?></div>
<? } $i++; } ?>
</td>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF">
<? if($i<$DirNum){ ?>
<div class="goodpic"><a href="index.php?DO=ShowDir&Dir=<?=$CurPath.'/'.$Dirs[$i]; ?>"><? echo browser_img_func($PicPath.$Dirs[$i].'/',$DFiles[$i]); ?></a> </div>
<div class="picname">目录:<?=$Dirs[$i]; ?></div>
<? } $i++;?>
</td>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF">
<? if($i<$DirNum){ ?>
<div class="goodpic"><a href="index.php?DO=ShowDir&Dir=<?=$CurPath.'/'.$Dirs[$i]; ?>"><? echo browser_img_func($PicPath.$Dirs[$i].'/',$DFiles[$i]); ?></a> </div>
<div class="picname">目录:<?=$Dirs[$i]; ?></div>
<? } $i++;?>
</td>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF">
<? if($i<$DirNum){ ?>
<div class="goodpic"><a href="index.php?DO=ShowDir&Dir=<?=$CurPath.'/'.$Dirs[$i]; ?>"><? echo browser_img_func($PicPath.$Dirs[$i].'/',$DFiles[$i]); ?></a> </div>
<div class="picname">目录:<?=$Dirs[$i]; ?></div>
<? } $i++;?>
</td>
</tr>
<? }//END while $i<$DirNum;
} else {
$i=0;
while($i<$PicNum){
?>
<tr>
<td width="25%" height="200" align="center" valign="middle" bgcolor="#FFFFFF">
<? if($i<$PicNum){ ?>
<div class="goodpic"><a href="javascript:;" onclick="PopupImg(this,'<?=$PicPath.$Files[$i]; ?>');"><? echo browser_img_func($PicPath,$Files[$i]); ?></a> </div>
<div class="picname"><? echo '<a href="'.$PicPath.$Files[$i].'" target="_blank">'.$Files[$i].'</a>'; ?></div>
<? } $i++;?>
</td>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF">
<? if($i<$PicNum){ ?>
<div class="goodpic"><a href="javascript:;" onclick="PopupImg(this,'<?=$PicPath.$Files[$i]; ?>');"><? echo browser_img_func($PicPath,$Files[$i]); ?></a> </div>
<div class="picname"><? echo '<a href="'.$PicPath.$Files[$i].'" target="_blank">'.$Files[$i].'</a>'; ?></div>
<? } $i++;?>
</td>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF">
<? if($i<$PicNum){ ?>
<div class="goodpic"><a href="javascript:;" onclick="PopupImg(this,'<?=$PicPath.$Files[$i]; ?>');"><? echo browser_img_func($PicPath,$Files[$i]); ?></a> </div>
<div class="picname"><? echo '<a href="'.$PicPath.$Files[$i].'" target="_blank">'.$Files[$i].'</a>'; ?></div>
<? } $i++;?>
</td>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF">
<? if($i<$PicNum){ ?>
<div class="goodpic"><a href="javascript:;" onclick="PopupImg(this,'<?=$PicPath.$Files[$i]; ?>');"><? echo browser_img_func($PicPath,$Files[$i]); ?></a> </div>
<div class="picname"><? echo '<a href="'.$PicPath.$Files[$i].'" target="_blank">'.$Files[$i].'</a>'; ?></div>
<? } $i++;?>
</td>
</tr>
<? } //END while $i<$PicNum;
}
?>
<!--
<tr>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF"> </td>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF"> </td>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF"> </td>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF"> </td>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF"> </td>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF"> </td>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF"> </td>
</tr>
-->
</table>
</div>
<div id="topbar"><? echo '本目录共计:'.$DirNum.' 个目录;'.$PicNum.' 张图片'; ?></div>
<div style="height:30px;"></div>
<div id="footer"><? require "inc/copyright.htm"; ?></div>
</body>
</html>
评论0
最新资源