Esempio n. 1
0
 public static function getPastEvents()
 {
     $db = new Database();
     $sql = "SELECT Event_ID FROM events WHERE TimeNDate<date(NOW()) ORDER BY TimeNDate DESC";
     self::$PastEvents = $db->query($sql);
     $db->close();
 }
Esempio n. 2
0
    ?>
#recentevent"><div id="n" class="np icon32x32 i4"><p>Next</p></div></a>
		            <?php 
} else {
    ?>
		                <a href="events.php?page=<?php 
    echo $page + 1;
    ?>
#recentevent"><div id="n" class="np icon32x32 i4"><p>Next</p></div></a>
		            <?php 
}
?>
				</div>
				<div class="row">	
            		<?php 
PastEvent::getPastEvents();
for ($i = 1; $Event = mysqli_fetch_assoc(PastEvent::$PastEvents); $i++) {
    if ($i >= $from && $i <= $to) {
        $PastEvent = new PastEvent($Event['Event_ID']);
        extract($PastEvent->EventInfo);
        $date = new DateTime($TimeNDate);
        $TimeNDate = $date->format('h:i A, dS F, Y');
        ?>
					<div class="columns twelve">
						<div id="evt<?php 
        echo $Event_ID;
        ?>
" class="box">
							<div class="title"><?php 
        echo $Title;
        ?>