<?php
//v1.0.4 www.bcoos.net 2006/10 GPL
// $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");
include(XOOPS_ROOT_PATH."/header.php");
mysql_connect("localhost",
  "","") or die
  ("Keine Verbindung moeglich");
  mysql_select_db("exoops106a") or die
  ("Die Datenbank existiert nicht");
$abfrage = "SELECT * FROM ".$db->prefix("ecal_location");
  $ergebnis = mysql_query($abfrage);
    
OpenTable();
include ("include/nav.php");
//hier bitte die schleife durchlaufen lassen
while ($result=mysql_fetch_array($ergebnis)){
  $result3 = "SELECT imgurl FROM ".$db->prefix("ecal_cat")." WHERE cid=".$result['cid'];
  $ergebnis1 = mysql_query($result3);
  $result2 = mysql_fetch_array($ergebnis1);
  
  $imgurl = substr($result2['imgurl'],0,4);
if ($imgurl == "http") {
    $imgurl = "<img src='".$result2['imgurl']."'>";
}else{
    if(@is_file("cache/logos/".$result2['imgurl'])){
        $imgurl = "<img src='".XOOPS_URL."/modules/ecal/cache/logos/".$result2['imgurl']."'>";
    }else{
        $imgurl = "&nbsp;";
    }
}
    
echo "<table width='100%' class='bg2' border='0'><tr>";
echo "<td width='10%'><b>"._CAL_LOCATIONTERMIN. "</b><a href='localleve.php?lid=".$result['lid']."'> ".$result['location']."</a></td></tr></table>";
echo "<table width='100%' class='bg1' border='0'><tr>";
echo "<td width='20%'>".$imgurl."</td>";
echo "<td>".$result['beschreibung']."";
echo "<br><br><table>";
echo "<tr><td>"._CAL_ADRESSE."</td><td>".$result['plz']." ".$result['ort']."</td></tr>";
echo "<tr><td>"._CAL_STRASSE."</td><td>".$result['strasse']."</td></tr>";
echo "<tr><td>"._CAL_TEL."</td><td>".$result['tel']."</td></tr>";
echo "<tr><td>"._CAL_EMAIL."</td><td>".$result['email']."</td></tr>";
echo "<tr><td><b>Fotos: </td><td><a href='".$result['fotos']."'><img src='language/".$bcoosConfig['language']."/images/foto.gif' border='0' width='59' height='18' ALT='Fotos in der Lokation'></a></b></td></tr>";
echo "<tr><td>"._URL."</td><td><a href='".$result['url']."'>".$result['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>";
 } //while-ende
 
CloseTable();
include(XOOPS_ROOT_PATH."/footer.php");
?>