/gen_pages/films.php
<?php
//---------------------
//---Header
//---------------------
?>
<html>
<? include ("{$_SERVER["DOCUMENT_ROOT"]}/headers/header.php"); ?>
<body link="#003399" vlink="#022B7D" alink="#022B7D">
<?php
//---------------------
//---CSS
//---------------------
?>
<style>
.rightcolumn a:link { color: #003399; text-decoration: underline}
.rightcolumn a:visited { color: #022B7D; text-decoration: underline}
.rightcolumn a:hover { color: #FF0000; text-decoration: underline}
.rightcolumn a:active { color: #800080; text-decoration: underline}
</style>
<div align="left">
<div align="left">
<table cellpadding="0" style="border-collapse: collapse; border-right-style:solid; border-right-width:1px; border-left-style:solid; border-left-width:1px; border-top-width:1px; border-bottom-width:1px" id="AutoNumber2" bgcolor="#FFFFFF" width="100%" bordercolor="#000000" class="rightcolumn">
<tr>
<td>
<div align="left">
<?php
//---------------------
//---Set Up Variables
//---------------------
$now = "";
$absurlx = explode("/",$REQUEST_URI);
foreach($absurlx as $absurl){
if ($next) {
$now .= "{$next}/";
$fldrn = "{$next}";
}
$next = $absurl;
$file = $next;
}
$folder = stripslashes($now);
$absurl = $now;
$folder = "{$DOCUMENT_ROOT}/{$folder}";
$filename = explode(".",$file);
$title ="$filename[0]";
//---------------------
//---Variables
//---------------------
//- Current Filename (current.php)
$url_a = "$file";
//- Current Folder (path/to/folder/)
$url_b = "$absurl";
//- Current Directory, Folder (/home/magic/public_html/path/to/folder/)
$url_c = "$folder";
//- Current Folder, File (/path/to/folder/current.php)
$url_d = "$REQUEST_URI";
//- Current URL (http://members.lycos.co.uk/ultimatedisneyfan/path/to/folder/current.php)
$url_e = "http://members.lycos.co.uk/ultimatedisneyfan{$REQUEST_URI}";
//- Current Root, Directory (/home/magic/public_html/path/to/folder/current.php)
$url_f = "/home/magic/public_html{$REQUEST_URI}";
//- Current Folder URL (http://members.lycos.co.uk/ultimatedisneyfan/path/to/folder/)
$url_g = "http://members.lycos.co.uk/ultimatedisneyfan/{$url_b}";
//- Current Filename (current)
$url_h = "$title";
//- Current Folder name (folder)
$url_i = "$fldrn";
//---------------------
//---Parse Variables
//---------------------
$url_a = explode("%20",$url_a);
foreach($url_a as $spaced){
if ($count == "") {
$final .="$spaced";
$count = 1;
} else {
$final .=" $spaced";
}
}
$url_a = stripslashes($final);
$final = "";
$count = "";
$url_b = explode("%20",$url_b);
foreach($url_b as $spaced){
if ($count == "") {
$final .="$spaced";
$count = 1;
} else {
$final .=" $spaced";
}
}
$url_b = stripslashes($final);
$final = "";
$count = "";
$url_c = explode("%20",$url_c);
foreach($url_c as $spaced){
if ($count == "") {
$final .="$spaced";
$count = 1;
} else {
$final .=" $spaced";
}
}
$url_c = $final;
$final = "";
$count = "";
$url_d = explode("%20",$url_d);
foreach($url_d as $spaced){
if ($count == "") {
$final .="$spaced";
$count = 1;
} else {
$final .=" $spaced";
}
}
$url_d = stripslashes($final);
$final = "";
$count = "";
$url_e = explode("%20",$url_e);
foreach($url_e as $spaced){
if ($count == "") {
$final .="$spaced";
$count = 1;
} else {
$final .=" $spaced";
}
}
$url_e = stripslashes($final);
$final = "";
$count = "";
$url_f = explode("%20",$url_f);
foreach($url_f as $spaced){
if ($count == "") {
$final .="$spaced";
$count = 1;
} else {
$final .=" $spaced";
}
}
$url_f = stripslashes($final);
$final = "";
$count = "";
$url_g = explode("%20",$url_g);
foreach($url_g as $spaced){
if ($count == "") {
$final .="$spaced";
$count = 1;
} else {
$final .=" $spaced";
}
}
$url_g = stripslashes($final);
$final = "";
$count = "";
$url_h = explode("%20",$url_h);
foreach($url_h as $spaced){
if ($count == "") {
$final .="$spaced";
$count = 1;
} else {
$final .=" $spaced";
}
}
$url_h = stripslashes($final);
$final = "";
$count = "";
$url_i = explode("%20",$url_i);
foreach($url_i as $spaced){
if ($count == "") {
$final .="$spaced";
$count = 1;
} else {
$final .=" $spaced";
}
}
$url_i = stripslashes($final);
$final = "";
$count = "";
?>
<table border="0" align="left" cellpadding="5" cellspacing="5">
<tr>
<td width="150" valign="top"><?
$findbasepath ="/home/magic/public_html";
$findbasepathn ="http://members.lycos.co.uk/";
$findbasepathn2 ="http://members.lycos.co.uk/";
$findbase = explode("/",$url_b);
foreach($findbase as $findbasesplit){
$findbasepath .="/$findbasesplit";
if (! $namefolder) {
$findbasepathn .="/$findbasesplit";
}
$findbasepathn2 .="/$findbasesplit";
$findbasesplit2 =$findbasesplit[1];
if ($findbasesplit2) { $finalfolder = $findbasesplit; }
$basefound = "{$findbasepath}/base.php";
$folderfound = $findbasepath;
if ((file_exists($basefound)) AND ($findbasesplit2)) {
$fbpath = $folderfound;
$namefolder = $findbasesplit;
}
}
if (! file_exists("$findbasepath/base.php")) {
if (is_dir($url_c)) {
if ($dh = opendir($url_c)) {
while (($file = readdir($dh)) !== false) {
if ((filetype("{$url_c}/{$file}") == "dir") AND ($file != ".") AND ($file != ".."))
{
$final_links .= "<br>-<a href='{$url_g}{$file}'>$file</a>";
}
}
}
}
if ($final_links) {
print ("<strong><a href='$findbasepathn2'>$finalfolder</a></strong><br><br>$final_links");
}
}
$levelup = explode("$finalfolder/",$url_c);
$levelup = $levelup[0];
$levelupu = explode("$finalfolder/",$url_g);
$levelupu = $levelupu[0];
$levelupn = explode("/",$url_g);
foreach($levelupn as $levelupna)
{
if ($levelupna == $finalfolder) {
$finallevelup = $showname;
}
$showname = $levelupna;
}
$levelupn = $finallevelup;
if (file_exists("$levelup/levelup.php")) {
if (is_dir($levelup)) {
if ($dh = opendir($levelup)) {
while (($file = readdir($dh)) !== false) {
if ((filetype("{$levelup}/{$file}") == "dir") AND ($file != ".") AND ($file != ".."))
{
$show = str_replace("$url_i/", "", "-<a href='{$url_g}{$file}'>$file</a><br>");
$levelup_links[$file] = $show;
}
}
}
}
if ($levelup_links) {
print ("<strong><a href='$levelupu'>$levelupn</a></strong><br>");
asort($levelup_links);
foreach($levelup_links as $levelup_link){
print ("$levelup_link");
}
}
}
print ("<br><br>");
if (is_dir($fbpath)) {
if ($dh = opendir($fbpath)) {
while (($file = readdir($dh)) !== false) {
if ((filetype("{$fbpath}/{$file}") == "dir") AND ($file != ".") AND ($file != ".."))
{
$showfolders[$file] = "-<a href='$findbasepathn/$file'>$file</a><br>";
}
}
}
}
if ($showfolders) {print ("<strong><a href='$findbasepathn'>$namefolder</a></strong><br>");
asort($showfolders);
foreach($showfolders as $showfolder){
print ("$showfolder");
}
}
?></td>
<td valign="top"> <div align="justify">
<table border="0" style="border-collapse: collapse" width="100%" id="table1">
<tr>
<td valign="top"><font face="Arial">
<?
//---------------------
//---Get Title/Logo
//---------------------
//-This will get the logo if logo.jpg exists in the folder
//-If not, it will get the title.jpg. If not, it will display the text title (Folder name, followed by Filename, if not index.php)
if (file_exists("{$url_c}logo.jpg")) {
print ("<br><img src=\"{$url_g}logo.jpg\" alt=\"{$url_i}\">");
} elseif (file_exists("{$url_c}title.jpg")) {
print ("<br><img src=\"{$url_g}title.jpg\" alt=\"{$url_i}\">");
} else {
print ("<br><font size=5><b>$url_i</b>");
if ($url_h != index) {
print (" <b>$url_h</b></font>");
}
}
//---------------------
//---Get Image
//---------------------
//-This will display image.jpg
if (file_exists("{$url_c}image.jpg")) {
print ("<br><br><img src=\"{$url_g}image.jpg\">");
}
//-------------------
//---Get Description
//-------------------
//-This will display the description
//-The description is inclosed in description.php
if (file_exists("{$url_c}description.php")) {
print ("<br><font size=3><br>");
include ("{$url_c}description.php");
}