<?php
//v1.0.4 www.bcoos.net 2006/10 GPL
// www.bcoos.net 2006-09 1.0.2 GPL
//v1.7 www.exoops.info 2006/03 
// $Id: location.php,v 1.6 2004/02/13 19:51:04 nobse 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");
Global $xoopsUser, $myts, $db,$bcoosConfig;
$lid = $_GET['lid'];
$locat = $db->query("SELECT * FROM ".$db->prefix("ecal_location")." where lid=".$lid);
$location = $db->fetchArray($locat);
$bcoosConfig['title'] = $location['beschreibung'];
include(XOOPS_ROOT_PATH."/header.php");
$row = $db->query("SELECT imgurl FROM ".$db->prefix("ecal_cat")." where cid=".$location['cid']);
$kat = $db->fetchArray($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>"._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=\"".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."edit.gif\" BORDER=0 WIDTH=16 HEIGHT=19 ALT=\""._MODIFY."\"></A><A HREF=\"admin/addlocation.php?op=dellocation&lid=$location[lid]\"><IMG SRC=\"".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."delete.gif\" BORDER=0 WIDTH=16 HEIGHT=19 ALT=\""._DELETE."\"></A></td></tr>";
		}
	}
echo "</table>";
CloseTable();
include(XOOPS_ROOT_PATH."/footer.php");
?>