<?php
if(!defined("FORMS")){
	echo "<pre>Access denied!";
	exit();
}
$tmpl->assign('e_date_top', date("d.m.Y", $row->end_top));
$tmpl->assign('e_date_top_hour', date("H", $row->end_top));
$tmpl->assign('e_date_top_minute', date("i", $row->end_top));

// <<-- PLATFORM -->>
$sql = new dbc("SELECT id,platform FROM " . PREFIX . "_downloads WHERE id = '$_REQUEST[id]'" );
$linked_platforms = $sql->fetchrow();
$linked_platforms->id = explode(";", $linked_platforms->platform);
$tmpl->assign("pforms", $linked_platforms);


// <<-- VERKNÜPFTE GALERIEN -->>
$r_navi = new dbc("SELECT id,gallery FROM " . PREFIX . "_downloads  WHERE id = '$_REQUEST[id]'" );
$row_linked_gals = $r_navi->fetchrow();
$row_linked_gals->id = explode(";", $row_linked_gals->gallery);
$tmpl->assign("linkedgals", $row_linked_gals);

$cat_sel= array();
getDownloadcategs_simple(0, "", $cat_sel, $area);
$tmpl->assign('cat_sel', $cat_sel);

$gallery = array();
getGallery(0, "", $gallery, $area, $dummy, $dummy, $dummy);
$tmpl->assign('gallery', $gallery);
// <<-- BILD -->>
$imgpath = $row->image;
$std  = $imgpath;


if ($std=="") {
	$stdimage = "templates/".ADMINTHEME."/image/pixel.gif"; 
	} else {
	$stdimage = "../" . $std; 
} 
if(is_file($stdimage)){
	$tmpl->assign('std',$std);
	$dyn = '<img src="'.$stdimage.'" border="0" id="pic">';
}

$imgpath_top = $row->image_top;
$std_top  = $imgpath_top;
if ($std_top=="") { $stdimage_top = "templates/".ADMINTHEME."/image/pixel.gif"; } else {
	$stdimage_top = "../" . $std_top;
} 
$dyn_top = '<img src="'.$stdimage_top.'" border="0" id="pic_top">';


$tmpl->assign('dyn',$dyn);
$tmpl->assign('dyn_top',$dyn_top);
?>