<?php
// $Id: displayform.php,v 1.1 2004/07/11 10:27:56 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("./cache/config.php");
if ($xoopsUser) {
				if ($row['privat'] == 1 and $row['username'] == $xoopsUser->uname()) {
					echo "<hr>";
					echo "<table width='100%' class='bg2' border='0'><tr>";
					echo "<td width='40%'><b>"._CAL_KATTERMIN."</b><a href='display.php?katid=".$kategorie['cid']."&day1=$currentday&month1=$currentmonth&year1=$currentyear&day=$day&month=$month&year=$year'>".$kategorie['title']."</a></td>";
					echo "<td width='60%'><b>"._CAL_TITLE."</b> ".$row['subject']."</td>";
					if ($row['high'] == 1) {
						echo "<td>"._CAL_TIPP."</td></tr></table>";
					}
					
					echo "<table width='100%' class='bg3' border='0'><tr>";
					echo "<td width='10%'><b>"._CAL_AUTOR."</td>";
					echo "<td width='20%'><a href='".XOOPS_URL."/userinfo.php?uid=".$uid."'><img src='language/".$xoopsConfig['language']."/images/icon_profile.gif' border='0' width='59' height='18' ALT='".$row['username']."'></a></td>";
        			echo "<td width='10%'>&nbsp;</td>";
					echo "<td width='60%'>&nbsp;</td></tr>";
					
					echo "<tr><td width='10%'><b>"._CAL_DATE."</b></td> ";
					echo "<td width='20%'>$date</td>";
                    if (intval($locat_yn) == 1){
    					echo "<td width='10%'><b>"._CAL_LOCATION."</b></td>";
    					echo "<td width='60%'><a href='location.php?lid=".$location[lid]."'>".$location['location']."</a></td></tr>";
					}else{
                        echo "<td colspan='2'>&nbsp;</td></tr>";
                    }
					echo "<tr><td width='10%'><b>"._CAL_BEGINN."</b></td> ";
					echo "<td width='20%'>$heurmin "._CAL_UHR."</td>";
					if (intval($locat_yn) == 1){
						echo "<td width='10%'><b>"._CAL_KONTACT."</td>";
						echo "<td width='60%'><a href='kontact.php?umail=".$location['email']."&title=".$row['subject']."&auth=".$row['username']."'><img src='language/".$xoopsConfig['language']."/images/icon_email.gif' border='0' width='59' height='18' ALT='".$location['email']."'></a></td></tr>";
        			}else{
                        echo "<td colspan='2'>&nbsp;</td></tr>";
                    }
					
					echo "<tr><td width='10%'><b>"._CAL_END."</b></td> ";
					echo "<td width='20%'>".$row['eventend']." "._CAL_UHR."</td>";
					if (intval($locat_yn) == 1){
						echo "<td width='10%'><b>"._CAL_WWW."</td>";
						echo "<td width='60%'><a href=".$location['url']."><img src='language/".$xoopsConfig['language']."/images/icon_www.gif' border='0' width='59' height='18' ALT='".$location['url']."'></a></td></tr>";
        			}else{
                        echo "<td colspan='2'>&nbsp;</td></tr>";
                    }
					echo "</table><br>";
			
					echo "<table width='100%' class='bg1' border='0'><tr>";
					if ($row['flayer'] != "") {
					    echo "<td width='20'%><img src=".$row['flayer']."></td>";
					}else{
						echo "<td width='20%'></td>";
					}
					
					echo "<td width='70%'>".$myts->makeTareaData4Show($row[description],1,1,1)."</td></tr>";
					echo "<tr>";
					
					if (strtotime("$year-$month-$day") > $usertimevent ) {
						if ($user_remind == 1) {
							echo "<td><br><br><a href='remind.php?op=remindadd&id=$row[id]&month=$month&year=$year'><img src='".XOOPS_URL."/modules/ecal/language/".$xoopsConfig['language']."/images/icon_remind_add.gif'></a></td>";
						} else {
							echo "<td></td>";
						}
						if ($showteiln == 1) {
							echo "<td><br><br><a href='teilnehmen.php?op=teiladd&id=$row[id]&month=$month&year=$year'><img src='".XOOPS_URL."/modules/ecal/language/".$xoopsConfig['language']."/images/icon_teiln_add.gif'></a></td>";
						} else {
							echo "<td></td>";
						}
					} else {
						echo "<td></td><td></td>";
					}
					if ($xoopsUser) {
						 $calusern = $xoopsUser->getVar("uname", "E") ;
				 			if ($nomuser == $calusern or $xoopsUser->isAdmin($xoopsModule->mid()) ) {
							echo "<td><BR><BR><A HREF=\"modifevent.php?id=$row[id]\"><IMG SRC=\"images/edit.gif\" BORDER=0 WIDTH=16 HEIGHT=19 ALT=\""._MODREVENT."\"></A><A HREF=\"action.php?pa=DelEvent&id=$row[id]\"><IMG SRC=\"images/del.gif\" BORDER=0 WIDTH=16 HEIGHT=19 ALT=\""._SUPPREVENT."\"></A></td>";
							}
					}
					echo "</tr></table>";
				}
			}
			if ($row['privat'] == 0) {
				echo "<hr>";
					echo "<table width='100%' class='bg2' border='0'><tr>";
					echo "<td width='40%'><b>"._CAL_KATTERMIN."</b><a href='display.php?katid=".$kategorie['cid']."&day1=$currentday&month1=$currentmonth&year1=$currentyear&day=$day&month=$month&year=$year'>".$kategorie['title']."</a></td>";
					echo "<td width='60%'><b>"._CAL_TITLE."</b> ".$row['subject']."</td>";
					if ($row['high'] == 1) {
						echo "<td>"._CAL_TIPP."</td></tr></table>";
					}
		
					echo "<table width='100%' class='bg3' border='0'><tr>";
					echo "<td width='10%'><b>"._CAL_AUTOR."</td>";
					echo "<td width='20%'><a href='".XOOPS_URL."/userinfo.php?uid=".$uid."'><img src='language/".$xoopsConfig['language']."/images/icon_profile.gif' border='0' width='59' height='18' ALT='".$row['username']."'></a></td>";
    				echo "<td width='10%'>&nbsp;</td>";
					echo "<td width='60%'>&nbsp;</td></tr>";
					
					echo "<tr><td width='10%'><b>"._CAL_DATE."</b></td> ";
					echo "<td width='20%'>$date</td>";
                    if (intval($locat_yn) == 1){                    
					    echo "<td width='10%'><b>"._CAL_LOCATION."</b></td>";
					    echo "<td width='60%'><a href='location.php?lid=".$location[lid]."'>".$location['location']."</a></td></tr>";
					}else{
                        echo "<td colspan='2'>&nbsp;</td></tr>";
                    }
					echo "<tr><td width='10%'><b>"._CAL_BEGINN."</b></td> ";
					echo "<td width='20%'>$heurmin "._CAL_UHR."</td>";
					if (intval($locat_yn) == 1){ 
						echo "<td width='10%'><b>"._CAL_KONTACT."</td>";
						echo "<td width='60%'><a href='kontact.php?umail=".$location['email']."&title=".$row['subject']."&auth=".$row['username']."'><img src='language/".$xoopsConfig['language']."/images/icon_email.gif' border='0' width='59' height='18' ALT='".$location['email']."'></a></td></tr>";
    				}else{
                        echo "<td colspan='2'>&nbsp;</td></tr>";
                    }
					
					echo "<tr><td width='10%'><b>"._CAL_END."</b></td> ";
					echo "<td width='20%'>".$row['eventend']." "._CAL_UHR."</td>";
					if (intval($locat_yn) == 1){ 
						echo "<td width='10%'><b>"._CAL_WWW."</td>";
						echo "<td width='60%'><a href=".$location['url']."><img src='language/".$xoopsConfig['language']."/images/icon_www.gif' border='0' width='59' height='18' ALT='".$location['url']."'></a></td></tr>";
    				}else{
                        echo "<td colspan='2'>&nbsp;</td></tr>";
                    }
					echo "</table><br>";
			
					echo "<table width='100%' class='bg1' border='0'><tr>";
					if ($row['flayer'] != "") {
					    echo "<td width='20%'><img src=".$row['flayer']."></td>";
					}else{
						echo "<td width='20%'></td>";
					}
					echo "<td width='70%'>".$myts->makeTareaData4Show($row[description],1,1,1)."</td><td></td></tr>";
					echo "<tr>";
					if (strtotime("$year-$month-$day") > $usertimevent ) {
						if ($user_remind == 1) {
							echo "<td><br><br><a href='remind.php?op=remindadd&id=$row[id]&month=$month&year=$year'><img src='".XOOPS_URL."/modules/ecal/language/".$xoopsConfig['language']."/images/icon_remind_add.gif'></a></td>";
						} else {
							echo "<td></td>";
						}
						if ($showteiln == 1) {
							echo "<td><br><br><a href='teilnehmen.php?op=teiladd&id=$row[id]&month=$month&year=$year'><img src='".XOOPS_URL."/modules/ecal/language/".$xoopsConfig['language']."/images/icon_teiln_add.gif'></a></td>";
						} else {
							echo "<td></td>";
						}
					} else {
						echo "<td></td><td></td>";
					}
					if ($xoopsUser) {
						 $calusern = $xoopsUser->getVar("uname", "E") ;
				 			if ($nomuser == $calusern or $xoopsUser->isAdmin($xoopsModule->mid()) ) {
							echo "<td><br><br><A HREF=\"modifevent.php?id=$row[id]\"><IMG SRC=\"images/edit.gif\" BORDER=0 WIDTH=16 HEIGHT=19 ALT=\""._MODREVENT."\"></A><A HREF=\"action.php?pa=DelEvent&id=$row[id]\"><IMG SRC=\"images/del.gif\" BORDER=0 WIDTH=16 HEIGHT=19 ALT=\""._SUPPREVENT."\"></A></td>";
							}
					}
					echo "</tr></table>";
			}					
?>