/////////config////////// $disp_type=0; // WinXP--'1' / Simple--'0' $gdv=0; //GD Ver. 1.x--'1' 2.x--'0' $title='Viewer'; //Page title $home='.'; //Home URL $maxdist=70; //thumbnail size $charset='Shift_JIS'; ///////////////////////// $dir = $_GET["dir"]; $t_self = explode("/",$_SERVER["SCRIPT_NAME"]); $q = count($t_self)-1; $self = $t_self[$q]; function showmenu_s(){ echo "
\n"; global $disp_type; global $dir; global $self; global $home; if (preg_match("/\.\./","$dir")){ $lock ='1';} if((!$lock)&&($dir)){echo "Index of $dir";} if(($lock)&&($dir)){echo "Wrong Action !";} if (!$dir) {echo "! Parent Dir";} else { $dd = explode("/",$dir); echo " | Foward to Parent Dir"; if ($dd[2]){ $tdir=array_pop($dd); $back_dir = explode("/$tdir",$dir); echo " | Foward to Upper Dir"; } } echo " | Home
\n";
}
function showmenu_w(){
global $disp_type;
global $dir;
global $self;
global $home;
echo "
\n
";
if((!$lock)&&($dir)){ echo " $dir"; } else { echo " Parent Dir.";} echo " |
\n \nFoward to: \n"; if(($lock)&&($dir)){ echo "Wrong Action ! \n";} if ($dir){ $dd = explode("/",$dir); echo "Parent Dir. \n"; if ($dd[2]){ $tdir=array_pop($dd); $back_dir = explode("/$tdir",$dir); echo "Upper Dir. \n"; } } echo "Home \n |
$c\n"; } global $self; $c = 'GDS Viewer'; $mode = $_GET["mode"]; if ($mode == "popup"){ $filename = $_GET["filename"]; global $dir; if (!$dir){ $d='.'; } echo "\n
\n\n"; showmenu_w(); echo " | \n\n";
} else {
echo "\n \n"; showmenu_s(); echo "
$c\n"; } echo "\n\n"; } } ?> |