, Guest!
Already a Member? Login or Register.

Menu



Showcase


Due to the volume of spam happening on our forums, posting is now restricted to verified members only.  If you're not verified, drop us a note with your username.

Home > FlexCMS Support Forum > User Help > General Support Requests > PROBLEM WITH END TIMES

FlexCMS Support Forum


PROBLEM WITH END TIMES
Started February 9, 2007 @ 7:36am by cberks
Post Message 
cberks


Posts: 63
 
PROBLEM WITH END TIMESFebruary 9, 2007 @ 7:36am
If one looks at the upcoming events on http://www.bennscc.org one will see an event kid's bereavement with a start time of 3:45 and if one clicks on it one sees it has NO end time which is correct.

But if one looks at the detail evenet list one can see that the end time of the previous event is not reset and carries over to this event

http://www.gmcbennington.info/bennsccflex/index.php/pages/39.html

The correct no end time is shown in the monthly calendar presentation so it is just the full event list for which code we are using the following code -- could you point me to where the endtime is not being reset


Code


<?php
$TZO = (($Settings['TimezoneOffset']+5)*3600);
//todays date
$DateSplit = getdate();
$DayTimestamp = mktime(0,0,0,$DateSplit['mon'],$DateSplit['mday'],$DateSplit['year']);
//THIS IS GENERALIZED FOR NEXT $future days
$DayTimestampEND = mktime(0,0,0,$DateSplit['mon'],$DateSplit['mday']+$future,$DateSplit['year']);

$query55 = "select `".$Settings['DBPrefix']."cl-EventDates`.RecordNumber,`".$Settings['DBPrefix']."cl-EventDates`.DateCode,`".$Settings['DBPrefix']."cl-EventDates`.EventID from `".$Settings['DBPrefix']."cl-EventDates` left join `".$Settings['DBPrefix']."cl-Events` on `".$Settings['DBPrefix']."cl-EventDates`.EventID=`".$Settings['DBPrefix']."cl-Events`.RecordNumber where `".$Settings['DBPrefix']."cl-EventDates`.DateCode>=".($DayTimestamp+$TZO)." and `".$Settings['DBPrefix']."cl-EventDates`.DateCode<".($DayTimestamp+(86400*7)+$TZO)." order by `".$Settings['DBPrefix']."cl-EventDates`.DateCode asc, `".$Settings['DBPrefix']."cl-Events`.StartTime asc";


$result55 = mysql_query($query55) or die (mysql_error());
// ----------------------------------------------
// END of Main Query to get events header for events in the date range
// ----------------------------------------------
//
//print the table header
//

print '<table class="basicpage" width="100%" cellspacing="0">';
print "<tr><td colspan='3'><br></td></tr>";
print "<tr><td colspan='3'><font size='4'>?&nbspUpcoming Events</font><br></td></tr>";
print "<tr><td colspan='3'><br></td></tr>";
//<tr><th>Date and Description<br>click on date for more info</th>
//</tr>';
// -----------------------------------
// For each event query the details and print the table rows
// ------------------------------------
if (mysql_num_rows($result55) > 0)
{
while ($row55 = mysql_fetch_array($result55))
{

$query5 = "select * from `".$Settings['DBPrefix']."cl-Events` where RecordNumber='".$row55['EventID']."' and MinLevel<='".$UserLevel."' limit 1";
$result5 = mysql_query($query5) or die (mysql_error());
if (mysql_num_rows($result5) > 0)
{
$row5 = mysql_fetch_array($result5);
$a = date("D M j", $row55['DateCode']);
$LinkString='<a href="'.$MainURL.'/calendar/details/'.$row5['RecordNumber'].'.html">'.$a.'</a>';


if ($row5['StartTime'] >= 0) {$Hours = 0; $Minutes = 0; $Seconds = $row5['StartTime'];

while ($Seconds >= 3600) {$Seconds = $Seconds - 3600; $Hours++;}

while ($Seconds >= 60) {$Seconds = $Seconds - 60; $Minutes++;}

$Suffix = 'am';
if ($Hours >= 12) {$Hours -= 12; $Suffix = 'pm';}
if ($Hours == 0) {$Hours = 12;}
if ($Minutes < 10) {$Minutes = '0' . $Minutes;}

$TimePrint = $Hours . ':' . $Minutes . $Suffix;}


// print the table row

print '<tr><td align="left" width="24%">?? '.$LinkString.'</td>';
print '<td align="right" width="13%"><font color="green"> '.$TimePrint.'</font></td>';
print '<td align="left" width="63%">? '.$row5['Title'].'</td></tr>';
$EventsPrinted++;
}
}
}
if ($EventsPrinted < 1)
{
print '<tr><td> </td><td>No Events listed for next $future days</td></tr>';
}
// ----------------------------------------------
// end the table
// ----------------------------------------------
print "<tr><td colspan='3' align='right'><br><font size='2'><a href='http://www.gmcbennington.info/bennsccflex/index.php/pages/39.html'>[go to events list]</a>???<a href='http://www.gmcbennington.info/bennsccflex/index.php/calendar.html'>[go to monthly calendar]</a></font><br></td></tr>";
print '</table>';
print '</div>';
// ----------------------------------------------
// END CALENDER SNIPPET ---------------------------------------------
?>
 
DCSun
Administrator



Posts: 625
 
February 11, 2007 @ 2:23am
Chris,

Are you sure that's the code you're using on the full listing view? It looks like the summary view from the main page to me, as there's no mention of EndTime anywhere in, and the table structures don't seem to match up to what it looks like on the site.


David


FlexCMS v3.2 Has Been Released!
 
cberks


Posts: 63
 
OK NOWFebruary 14, 2007 @ 11:03am
David,

You are correct I posted the wrong bit of code and have now found the place to correct the page.

Thanks, Chris

 

Post Message 




Try & Buy FeedForAll - Easy to use RSS Feed Creator - great for iTunes users!

MEMBERS




All Contents, Code, Scripts and Technologies Copyright 2003-2009 FlexCMS.
All Rights Reserved. Software License Agreement

Processing Time: 0.07876 seconds.
 
Management Login

Powered By FlexCMS
Powered By FlexCMS