Auszug aus dem Script .... befindet sich in einer SWITCH Schleife:
Code: Select all
case "unterkunft":
$qry_1="SELECT * FROM ".$prefix."_freizeiten
WHERE (eventDate>= '$qrydate' or endDate>= '$qrydate')
$whereoption
order by eventDate asc, endDate asc limit 0,$icount";
//echo $qry_1;
$result_1=sql_query($qry_1, $dbi);
while($zeile = sql_fetch_array($result_1, $dbi)) {
// echo $zeile[unterkunft]."<br>";
if (strcmp($zeile['unterkunft'], $AktuelleUnterkunft) != 0) {
if (strcmp($AktuelleUnterkunft, '') != 0) {
echo('</table>');
}
$AktuelleUnterkunft = $zeile['unterkunft'];
echo "<br><br><b>Unterkunft: $AktuelleUnterkunft</b><br>";
echo "<table width="100%" border="$listtableborder" cellspacing="$listtablecellspacing" cellpadding="$listtablecellpadding" bgcolor="$listbordercolor" bordercolor="$listbordercolor">";
echo "<tr bgcolor="$listheadbgcolor"><td colspan="3" valign="middle"><font color="$listheadtxtcolor" class="content"><b>"._FREVENTDATETEXT."</b></font></td><td valign="middle"><font color="$listheadtxtcolor" class="content"><b>"._FRSUBTITLE."</b></font>";
echo "</td></tr>";
$qry_2="SELECT eid, aid, title, time, hometext, topic, informant, year(eventDate), month(eventDate), dayofmonth(eventDate), hour(startTime), minute(startTime), year(endDate), month(endDate), dayofmonth(endDate), hour(endTime), minute(endTime), alldayevent, barcolor
FROM ".$prefix."_freizeiten
WHERE (eventDate>= '$qrydate' or endDate>= '$qrydate') $whereoption AND unterkunft='$AktuelleUnterkunft'
order by eventDate asc ";
$result_2=sql_query($qry_2, $dbi);
while(list($eid, $postadmin, $subject, $datePosted, $hometext, $topic, $informant, $y1, $m1, $d1, $h1, $mi1, $y2, $m2, $d2, $h2, $mi2, $alldayevent, $barcolor) = sql_fetch_row($result_2, $dbi)) {
//HIERR
// echo "<tr><td colspan="4">UNTERKUNFT: $unterkunft</td></tr>";
if ($hometext){
$hometext= "$hometext";
}
else {
$hometext= "";
}
$dateStart = strftime(""._FRSHORTDATEFORMAT."", mktime(0, 0, 0, $m1, $d1, $y1));
if ($callistStarttime && !$alldayevent) {
$dateStart.= "<br>".strftime(""._FRTIMEFORMAT."", mktime($h1, $mi1, 0, $m1, $d1, $y1));
}
$dateEnd = strftime(""._FRSHORTDATEFORMAT."", mktime(0, 0, 0, $m2, $d2, $y2));
if ($callistEndtime && !$alldayevent) {
$dateEnd.= "<br>".strftime(""._FRTIMEFORMAT."", mktime($h2, $mi2, 0, $m2, $d2, $y2));
}
$popuptext = " onMouseover="pop('".valueToText($subject)."','".valueToText($hometext)."')" onMouseout="kill()"";
if ($i==0) { $bgcolornew=$listbgcolor1; $txtcolornew=$listtxtcolor1; $i=1; }
else { $bgcolornew=$listbgcolor2; $txtcolornew=$listtxtcolor2; $i=0; }
echo "<tr bgcolor="$bgcolornew">
<td align="center" nowrap><font color="$txtcolornew" class="content">$dateStart</font></td>
<td align="center"><font color="$txtcolornew" class="tiny">"._FRLISTRANGE."</font></td>
<td align="center" nowrap><font color="$txtcolornew" class="content">$dateEnd</font></td>
<td><font color="$txtcolornew" class="content">";
if ($caladmin){
echo "<a href="admin.php?op=FreizeitenRemoveEvent&eid=$eid"><img src="$calimagepath/delete.gif" alt=""._FRDELETESTORY."" width="20" height="16" border="0" align="right"></a><a href="admin.php?op=FreizeitenEditEvent&eid=$eid"><img src="$calimagepath/edit.gif" alt=""._EDIT."" width="19" height="17" border="0" align="right"></a>";
}
echo "&<a href="modules.php?op=modload&name=$module_name&file=index&type=view&eid=$eid" $popuptext>$subject</a>
</font></td></tr>";
$morelink="modules.php?op=modload&name=$module_name&file=index&type=list&d=$d1&m=$m1&y=$y1&col=$col";
}
}
} // erste while schleife
//sql_free_result($result);
//sql_free_result($result_1);
echo "</table>";
break;