header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0"); // Proxies.
?>
global
$arr_uTitle,
$arr_uSource,
$arr_uType,
$arr_uWidth,
$arr_uHeight,
$mUnit;
$arr_uTitle = Array();
$arr_uSource = Array();
$arr_uType = Array();
$arr_uWidth = Array();
$arr_uHeight = Array();
$arr_uTitle[] = "Coda and DoubleShot Combos";
$arr_uSource[] = "";
$arr_uType[] = "title";
$arr_uWidth[] = "";
$arr_uHeight[] = "";
$arr_uTitle[] = "";
$arr_uSource[] = "";
$arr_uType[] = "";
$arr_uWidth[] = "";
$arr_uHeight[] = "";
$arr_uTitle[] = "320x100";
$arr_uSource[] = "deploy%20talkbass-ds2-c2r-combos-320x100/talkbass-ds2-c2r-combos-320x100.html";
$arr_uType[] = "iframe";
$arr_uWidth[] = "320";
$arr_uHeight[] = "100";
$arr_uTitle[] = "728x90";
$arr_uSource[] = "deploy%20talkbass-ds2-c2r-combos-728x90/talkbass-ds2-c2r-combos-728x90.html";
$arr_uType[] = "iframe";
$arr_uWidth[] = "728";
$arr_uHeight[] = "90";
$arr_uTitle[] = "";
$arr_uSource[] = "";
$arr_uType[] = "";
$arr_uWidth[] = "";
$arr_uHeight[] = "";
$arr_ALL = Array();
$arr_ALL[] = $arr_uTitle;
$arr_ALL[] = $arr_uSource;
$arr_ALL[] = $arr_uType;
$arr_ALL[] = $arr_uWidth;
$arr_ALL[] = $arr_uHeight;
function buildMenu($mUnit, $arr_ALL) {
$aN = count($arr_ALL);
$cN = count($arr_ALL[0]);
echo "
";
for ($n = 0; $n < $cN; $n++) {
//----------------------------------------
// index values
// 0 = title
// 1 = source
// 2 = type
//----------------------------------------
$title = $arr_ALL[0][$n];
$source = $arr_ALL[1][$n];
$type = $arr_ALL[2][$n];
createMenu($n, $title, $type);
}
}
function createMenu($n, $title, $type) {
if ($type == "title") {
echo "
" . $title . "
";
} else {
echo "" . $title . "
";
}
}
function createItem($mUnit, $arr_ALL) {
//----------------------------------------
// index values
// 0 = title
// 1 = source
// 2 = type
// 3 = width
// 4 = height
//----------------------------------------
$title = $arr_ALL[0][$mUnit];
$source = $arr_ALL[1][$mUnit];
$type = $arr_ALL[2][$mUnit];
$width = $arr_ALL[3][$mUnit];
$height = $arr_ALL[4][$mUnit];
// echo $title . "
";
// echo $source . "
";
// echo $type . "
";
// echo $width . "
";
// echo $height . "
";
if ($type == 'flash') {
$source = 'flash/' . $source;
$cT_res = "";
$cT_acc = "";
$cT_att = "";
echo "\n";
}
if ($type == 'image') {
$source = 'images/' . $source;
echo "
";
}
if ($type == 'voken') {
$source = 'flash/' . $source;
echo "";
}
if ($type == 'quicktime') {
echo "\n";
}
if ($type == 'html') {
echo "";
}
if ($type == 'iframe') {
$source = "html/" . $source;
echo "";
}
if ($type == 'txt') {
echo "";
}
if ($type == 'download') {
echo "";
$source = 'pub/' . $source;
}
$type_size = Array('bytes', 'kilobytes', 'megabytes', 'gigabytes');
$filesize = filesize($source);
for ($i = 0; $filesize > 1024; $i++)
$filesize /= 1024;
/*echo "
filesize = " . round ($filesize, 2)." $type_size[$i]
";
echo $title . "
";*/
}
?>
Preview
 |
if (empty($_GET['mUnit'])) {
$_GET['mUnit'] = "";
}
buildMenu($_GET['mUnit'], $arr_ALL);
?>
|
|
if (!empty($_GET['mUnit'])) {
createItem($_GET['mUnit'], $arr_ALL);
}
?>
|