/php/event_page.php
PHP | 410 lines | 272 code | 105 blank | 33 comment | 24 complexity | 6378578d88544eddf33be9f62f968578 MD5 | raw file
- <?php
- //Start session
- session_start();
- $date=$_POST["date"];
- if($date == '')
- {
- ?>
- <script>
- //window.location.reload();
- </script>
- <?php
- $_SESSION['date'] = $date;
- }
- else
- {
- $_SESSION['date']="wrong";
- }
- /* $date=$_GET["date"];
- if($date == '')
- {
- ?>
- <script>
- window.location.reload();
- </script>
- <?php
- $_SESSION['date'] = $date;
- }
- else
- {
- $_SESSION['date']="wrong";
- } */
- //include("connect.php");
- require_once('connect.php');
- $id=$_GET["id"];
- $qry="SELECT * from events where id='$id'";
- $result=@mysql_query($qry);
- if($result)
- {
-
- $row=mysql_fetch_assoc($result)
-
- ?>
- <!-- 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" />
- <!-- Le styles -->
- <link href="twitter-bootstrap-d991ef2/docs/assets/css/bootstrap.css" rel="stylesheet">
- <style type="text/css">
- body {
- padding-top: 60px;
- padding-bottom: 40px;
- }
- .sidebar-nav {
- padding: 9px 0;
- }
- @media (max-width: 980px) {
- /* Enable use of floated navbar text */
- .navbar-text.pull-right {
- float: none;
- padding-left: 5px;
- padding-right: 5px;
- }
- }
- </style>
- <link href="twitter-bootstrap-d991ef2/docs/assets/css/bootstrap-responsive.css" rel="stylesheet">
- <link href="bootstrap.css" rel="stylesheet">
- <link href="bootstrap.min.css" rel="stylesheet">
- <link href="twitter-bootstrap-d991ef2/docs/assets/js/google-code-prettify/prettify.css" rel="stylesheet">
- <script type="text/javascript" src="twitter-bootstrap-d991ef2/docs/assets/js/bootstrap-modal.js"></script>
- <script type="text/javascript" src="twitter-bootstrap-d991ef2/docs/assets/js/bootstrap.js"></script>
- <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
- <!--[if lt IE 9]>
- <script src="../assets/js/html5shiv.js"></script>
- <![endif]-->
- <!-- Fav and touch icons -->
- <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../../../assets/ico/apple-touch-icon-144-precomposed.png">
- <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../../../assets/ico/apple-touch-icon-114-precomposed.png">
- <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../../../assets/ico/apple-touch-icon-72-precomposed.png">
- <link rel="apple-touch-icon-precomposed" href="../../../assets/ico/apple-touch-icon-57-precomposed.png">
- <link rel="shortcut icon" href="../../../assets/ico/favicon.png">
- <link href="new.css" rel="stylesheet" type="text/css" />
- <title> <?php echo ' '.$row['title'].' '; ?> </title>
- <link href="new.css" rel="stylesheet" type="text/css" />
- <meta name="Author" content="Isatou" />
- <script type="text/javascript">
- function getTime()
- {
- var d = new Date();
- var c_hour = d.getHours();
- var c_min = d.getMinutes();
- var c_sec = d.getSeconds();
- var month = d.getMonth();
- var day = d.getDay();
- var year = d.getFullYear();
- //var t = d + ":" + c_hour + ":" + c_min + ":" + c_sec;
- var t= month + ' ' + day + ' ' + year;
- document.getElementById("demo").innerHTML=t;
- return t;
- }
- function getMonth()
- {
- var d=new Date();
- var month=new Array();
- month[0]="January";
- month[1]="February";
- month[2]="March";
- month[3]="April";
- month[4]="May";
- month[5]="June";
- month[6]="July";
- month[7]="August";
- month[8]="September";
- month[9]="October";
- month[10]="November";
- month[11]="December";
- var n = month[d.getMonth()];
- document.getElementById("demo").innerHTML=n;
- return n;
- }
- function getDay()
- {
- var d=new Date();
- var day= d.getDay();
- return day;
- }
- </script>
- </head>
- <body>
- <div id="fb-root"></div>
- <script>(function(d, s, id) {
- var js, fjs = d.getElementsByTagName(s)[0];
- if (d.getElementById(id)) return;
- js = d.createElement(s); js.id = id;
- js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
- fjs.parentNode.insertBefore(js, fjs);
- }(document, 'script', 'facebook-jssdk'));</script>
- <div id="maincontainer">
- <div id="topsection"><div class="innertube">
- <?php
- include('menu.php');
- ?>
- </div></div>
- <div id="contentwrapper">
- <div id="contentcolumn">
- <div class="innertube">
-
- <?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
- /*if($result)
- {
- if(mysql_num_rows($result)==0)
- {
- echo "The are no events!";
- }
- else
- {
- while($row=mysql_fetch_assoc($result))
- {
- */
- $extra=array();
- if($row['start_minute']==0)
- {
- $start='00';
- }
- else
- {
- $start=$row['start_minute'];
- }
- if($row['end_minute']==0)
- {
- $end='00';
- }
- else
- {
- $end=$row['end_minute'];
- }
- if($row['admission']==0)
- {
- $admission='free';
- }
- else
- {
- $admission='$';
- $admission .=$row['amount'];
- }
- if($row['reservation']==0)
- {
- $reservation='No';
- }
- else
- {
- $reservation="Yes";
- }
-
- if($row['refreshments']==1)
- {
- $extra[]='refreshments';
- }
- if($row['raffle']==1)
- {
- $extra[]="raffle";
- }
- echo '
- <IMG SRC="pin.jpg" HEIGHT="20" WIDTH="20" BORDER="0" style="margin-left: 200px;">
- <h1 align="center">'.$row['title'].'</h1>
- '.$row['details'].'
- <p><b>Date:</b> '.$row['month'].' '.$row['day'].' '.$row['year'].'</p>
- <p><b>Start Time:</b> '.$row['start_hour'].':'.$start.' '.$row['start'].'</p>
- <p><b>End Time:</b> '.$row['end_hour'].':'.$end.' '.$row['end'].'</p>
- <p><b>Location:</b> '.$row['location'].'</p>
- <p><b>Admission Fee:</b> '.$admission.'</p>
- <p><b>Reservation Required:</b> '.$reservation.'</p>';
-
-
- if(sizeof($extra) != 0)
- {
- echo '<p><b>Available:</b></p>';
- foreach ($extra as $i)
- {
- echo ' <li> '.$i.' </li>';
- }
- }
-
- if($row['contact_person'] != '')
- {
- echo 'Contact Person: '.$row['contact_person'].' ';
- }
- if($row['phone'] != '')
- {
- echo ' <p><b> Phone: </b>'.$row['phone'].' </p>';
- }
- if($row['email'] != '')
- {
- echo '<p><b> Email: </b>'.$row['contact_email'].' </p>';
- }
- if($row['website'] != '')
- {
- echo '<p><b> Website: </b> <a href="'.$row['website'].'" > '.$row['website'].' </a> </p>';
- }
- echo '<p><b>Event Type:</b> '.$row['category'].'</p>
-
- </div>';
- }
- else
- {
- die("Query failed!");
- }
- ?>
- <div class="fb-like" data-href="http://dagenda.phpfogapp.com/event_page.php?id=<?php echo ' '.$id.' ';?>" data-send="false" data-width="450" data-show-faces="true"></div>
- <br>
- <!-- Button to trigger modal -->
- <a href="#myModal" role="button" class="btn" data-toggle="modal">Add to board</a>
-
- <!-- Modal -->
- <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h3 id="myModalLabel">Modal header</h3>
- </div>
- <div class="modal-body">
- <p>One fine body…</p>
- </div>
- <div class="modal-footer">
- <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
- <button class="btn btn-primary">Save changes</button>
- </div>
- </div>
- <script src="http://code.jquery.com/jquery-latest.js"></script>
- <script type="text/javascript" src="js/bootstrap.js" />
- <?php include('side_bar_admin.php'); ?>
- </div>
- </div>
- </div>
- <div id="leftcolumn">
- <div class="innertube">
- <?php
- /*if ( ($_SESSION['SESS_STATUS'] == 'admin') || ($_SESSION['SESS_STATUS'] == 'superadmin') && ($row['status' == 'pending') */
- {
- 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>