/php/events2_prev.php
PHP | 273 lines | 198 code | 67 blank | 8 comment | 34 complexity | 1a43275c95d3f336b884cdeb25f1015b MD5 | raw file
- <!-- Put IE into quirks mode -->
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title> College Campus Events </title>
- <link href="new.css" rel="stylesheet" type="text/css" />
- <meta name="Author" content="Isatou" />
- <script type="text/javascript" src="jquery-1.2.6.pack.js"></script>
-
- <script type="text/javascript">
- $(document).ready(function(){
-
- function last_msg_funtion()
- {
-
- var ID=$(".message_box:last").attr("id");
- $('div#last_msg_loader').html('<img src="bigLoader.gif">');
- $.post("events2.php?action=get&last_msg_id="+ID,
-
- function(data){
- if (data != "") {
- $(".message_box:last").after(data);
- }
- $('div#last_msg_loader').empty();
- });
- };
-
- $(window).scroll(function(){
- if ($(window).scrollTop() == $(document).height() - $(window).height()){
- last_msg_funtion();
- }
- });
-
- });
- </script>
- </head>
- <body>
- <?php
- //include("connect.php");
- require_once('connect.php');
- $month=$_GET["month"];
- $year=$_GET["year"];
- $free=$_GET["free"];
- $refreshments=$_GET["refreshments"];
- $giveaways=$_GET["giveaways"];
- //$qry .= ", group by month";
- if($month=='January')
- {
- $month_calendar=1;
- }
- else if($month=='February')
- {
- $month_calendar=2;
- }
- else if($month=='March')
- {
- $month_calendar=3;
- }
- else if($month=='April')
- {
- $month_calendar=4;
- }
- else if($month=='May')
- {
- $month_calendar=5;
- }
- else if($month=='June')
- {
- $month_calendar=6;
- }
- else if($month=='July')
- {
- $month_calendar=7;
- }
- else if($month=='August')
- {
- $month_calendar=8;
- }
- else if($month=='September')
- {
- $month_calenar=9;
- }
- else if($month=='October')
- {
- $month_calendar=10;
- }
- else if($month=='November')
- {
- $month_calendar=11;
- }
- else if($month=='December')
- {
- $month_calendar=12;
- }
- //promoted event
- $qry_pro="SELECT * from events WHERE month='December' and year='2012' and day='18'";
- $qry_pro .= $part_qry;
- $qry_pro .="ORDER BY year ASC, month ASC, day ASC";
- /*SELECT YEAR(GETDATE()) as "Year";
- SELECT MONTH(GETDATE()) as "Month";
- SELECT DAY(GETDATE()) as "Day"; */
- $result=@mysql_query($qry);
- ?>
- <?php
- include('promotion.php');
- ?>
- <div id="maincontainer">
- <div id="topsection"><div class="innertube">
- <?php
- include('menu.php');
- ?>
- </div></div>
- <div id="contentwrapper">
- <div id="content2column">
- <div class="innertube">
- <?php
- $result_pro=mysql_query($qry_pro);
- if($result_pro)
- {
- if(mysql_num_rows($result_pro) != 0)
- {
- ?>
- <b style="color:#0196e3";> Promoted Event: </b>
- <?php
- $row_pro=mysql_fetch_assoc($result_pro);
- $url="event_page.php?id=";
- $url .=$row_pro['id'];
- echo ' <div id="submissionPromotion" style="color:#0196e3";>
- <b #0196e3><a href="'.$url.'"> '.$row_pro['title'].' @ '.$row_pro['location'].' from '.$row_pro['start_hour'].':'.$start.' '.$row_pro['start'].' to '.$row_pro['end_hour'].':'.$end.' '.$row_pro['end'].'</a></b>
- <br/>
- '.$row_pro['details'].'
- <br/>';
- foreach ($extra as $i)
- {
- echo ' *'.$i.'* ';
- }
- }
- }
- else
- {
- die("promotion query failed!");
- }
- ?>
- <?php
- if( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count($_SESSION['ERRMSG_ARR']) >0 ) {
- echo '<ul class="err">';
- foreach($_SESSION['ERRMSG_ARR'] as $msg) {
- echo '<li>',$msg,'</li>';
- }
- echo '</ul>';
- unset($_SESSION['ERRMSG_ARR']);
- }
- ?>
- <?php
- $last_msg_id=$_GET['last_msg_id'];
- $action=$_GET['action'];
- if($action <> "get")
- {
- ?>
- <p>
- <input type="checkbox" value='0' name="free" id="free">free events
- <input type="checkbox" value='1' name="refreshments" id="refreshments">refreshments served
- <input type="checkbox" value='1' name="giveaways" id="giveaways">giveaways
- <select name="department" id="drop">
- <option style="background-color:#58B9EB"; value="choose_department">All Departments</option>
- <option style="background-color:#58B9EB"; value="Engineering">Engineering</option>
- <option style="background-color:#58B9EB"; value="Science">Science</option>
- <option style="background-color:#58B9EB"; value="Humanities">Humanities</option>
- <option style="background-color:#58B9EB"; value="Sophie Davis">Sophie Davis</option>
- <option style="background-color:#58B9EB"; value="Architecture">Architecture</option>
- <option style="background-color:#58B9EB"; value="Education">Education</option>
- </select>
- <input type="submit" id="submit" value="Update">
- </form>
- <br/>
- </p>
- <?php
- include('load_first.php');
- ?>
- <div id="last_msg_loader"></div>
- </div>
- </div>
- </div>
- </div>
- <div id="leftcolumn">
- <div class="innertube">
- <?php
- include('side_bar.php');
- ?>
- </div>
- </div>
- <div id="rightcolumn">
- <div class="innertube">
- <?php
- include('adverts.php');
- ?>
- </div>
- </div>
- <div id="footer"><a href="http://www.dynamicdrive.com/style/">Copyright 2013</a></div>
- </div>
-
-
- </body></html>
- <?php
- }
- else
- {
-
- include('load_second.php');
-
- }
- ?>