Example #1
0
<body>
	<?php 
require_once "header.php";
?>
	<main>
		<?php 
UpcomingEvent::getUpcomingEvents();
if (mysqli_fetch_assoc(UpcomingEvent::$UpcomingEvents)) {
    ?>
		<section class="events upcomingevent">
			<div class="container">
			<h2>Upcoming Events</h2>
			<h3>These are the upcoming events arranged by UU ICT CLUB</h3>
				<div class="row">
					<?php 
    UpcomingEvent::getUpcomingEvents();
    while ($Event = mysqli_fetch_assoc(UpcomingEvent::$UpcomingEvents)) {
        $UpcomingEvent = new UpcomingEvent($Event['Event_ID']);
        extract($UpcomingEvent->EventInfo);
        $date = new DateTime($TimeNDate);
        $TimeNDate = $date->format('h:i A, dS F, Y');
        ?>
					<div class="columns twelve">
						<div class="box">
							<div class="title"><?php 
        echo $Title;
        ?>
</div>
							<div class="img" style="background: url('<?php 
        echo $Image;
        ?>
Example #2
0
 public static function getUpcomingEvents()
 {
     $db = new Database();
     $sql = "SELECT Event_ID FROM events WHERE TimeNDate>=date(NOW()) ORDER BY TimeNDate ASC";
     self::$UpcomingEvents = $db->query($sql);
     $db->close();
 }