'; echo "确定 返回上一页

"; exit; }elseif($type=="dell"){ //清空照片函数 $handle = opendir($path); while (false !== ($file = readdir($handle))) { list($filesname,$ext)=explode(".",$file); if($ext=="png" and explode('_', $filesname)[0]==$id) { if (!is_dir('./'.$file)) { unlink('./img/'.$file); } } } echo '该ID下的所有照片已经清除!

'; } $handle = opendir($path); $i=0; while (false !== ($file = readdir($handle))) { list($filesname,$ext)=explode(".",$file); if($ext=="png" and explode('_', $filesname)[0]==$id) { if (!is_dir('./'.$file)) { $array[]=$file;//保存图片名称 ++$i; } } } if($array){ rsort($array);//修改日期倒序排序 echo "清空所有照片

"; } else{ echo "该ID下没有任何照片

"; } for($j=$imgnums*$page; $j<($imgnums*$page+$imgnums)&&$j<$i; ++$j){ echo '
'; echo "

"; echo '
'; } $realpage = @ceil($i / $imgnums) - 1; $Prepage = $page-1; $Nextpage = $page+1; if($Prepage<0){ echo "上一页 "; echo "下一页 "; echo "末页 "; }elseif($Nextpage >= $realpage){ echo "首页 "; echo " 上一页 "; echo " 下一页"; }else{ echo "首页 "; echo "上一页 "; echo "下一页 "; echo "末页 "; } ?>