<?php
// $Id: location_all.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");

mysql_connect("localhost",
  "","") or die
  ("Keine Verbindung moeglich");
  mysql_select_db("exoops106a") or die
  ("Die Datenbank existiert nicht");

$abfrage = "SELECT * FROM e_xoops_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 e_xoops_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/".$xoopsConfig['language']."/images/foto.gif' border='0' width='59' height='18' ALT='Fotos in der Lokation'></a></b></td></tr>";
echo "<tr><td>"._CAL_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=\"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>";

 } //while-ende
 

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