<?php
// $Id: location.php,v 1.1 2004/07/11 10:27:51 Farsus Exp $
// ------------------------------------------------------------------------- //
//               E-Xoops: Content Management for the Masses                  //
//                       < http://www.e-xoops.com >                          //
// ------------------------------------------------------------------------- //
// Original Author: Nobse, Bama
// Author Website : http://www.e-xoops.de, http://service.bama-webdesign.de
// License Type   : GPL: See /manual/LICENSES/GPL.txt
// ------------------------------------------------------------------------- //
include("header.php");
include(XOOPS_ROOT_PATH."/header.php");

Global $xoopsUser, $myts;

$lid = $HTTP_GET_VARS['lid'];
$locat = $db->query("SELECT * FROM ".$db->prefix("ecal_location")." where lid=".$lid);
$location = $db->fetch_array($locat);

$row = $db->query("SELECT imgurl FROM ".$db->prefix("ecal_cat")." where cid=".$location['cid']);
$kat = $db->fetch_array($row);

$imgurl = substr($kat['imgurl'],0,4);
if ($imgurl == "http") {
	$imgurl = "<img src='".$kat['imgurl']."'>";
}else{
    if(@is_file("cache/logos/".$kat['imgurl'])){
	    $imgurl = "<img src='".XOOPS_URL."/modules/ecal/cache/logos/".$kat['imgurl']."'>";
    }else{
        $imgurl = "&nbsp;";
    }
}
OpenTable();
include ("include/nav.php");

echo "<table width='100%' class='bg2' border='0'><tr>";
echo "<td width='10%'><b>"._CAL_LOCATIONTERMIN. "</b><a href='localleve.php?lid=".$location['lid']."'> ".$location['location']."</a></td></tr></table>";

echo "<table width='100%' class='bg1' border='0'><tr>";
echo "<td width='20%'>$imgurl</td>";
echo "<td>".$myts->makeTareaData4Show($location['beschreibung'],1,1,1)."";
echo "<br><br><table>";
echo "<tr><td>"._CAL_ADRESSE."</td><td>".$location['plz']." ".$location['ort']."</td></tr>";
echo "<tr><td>"._CAL_STRASSE."</td><td>".$location['strasse']."</td></tr>";
echo "<tr><td>"._CAL_TEL."</td><td>".$location['tel']."</td></tr>";
echo "<tr><td>"._CAL_EMAIL."</td><td>".$location['email']."</td></tr>";
echo "<tr><td>"._CAL_URL."</td><td><a href='".$location['url']."'>".$location['url']."</a></td></tr></table>";



echo "</td></tr>";

	if ($xoopsUser) {
		if ($xoopsUser->isAdmin($xoopsModule->mid()) ) {
			echo "<tr><td><BR><BR><A HREF=\"admin/addlocation.php?op=editlocation&lid=$location[lid]\"><IMG SRC=\"images/edit.gif\" BORDER=0 WIDTH=16 HEIGHT=19 ALT=\""._MODREVENT."\"></A><A HREF=\"admin/addlocation.php?op=dellocation&lid=$location[lid]\"><IMG SRC=\"images/del.gif\" BORDER=0 WIDTH=16 HEIGHT=19 ALT=\""._SUPPREVENT."\"></A></td></tr>";
		}
	}
echo "</table>";

CloseTable();
include(XOOPS_ROOT_PATH."/footer.php");
?>