PageRenderTime 79ms CodeModel.GetById 9ms RepoModel.GetById 1ms app.codeStats 0ms

/php/reu-page.php

https://bitbucket.org/isanneh/campus-pages
PHP | 265 lines | 161 code | 83 blank | 21 comment | 17 complexity | 49e2f78ae8bb3cdb3a216ac6135884e6 MD5 | raw file
  1. <?php
  2. //Start session
  3. session_start();
  4. $date=$_POST["date"];
  5. if($date == '')
  6. {
  7. ?>
  8. <script>
  9. //window.location.reload();
  10. </script>
  11. <?php
  12. $_SESSION['date'] = $date;
  13. }
  14. else
  15. {
  16. $_SESSION['date']="wrong";
  17. }
  18. /* $date=$_GET["date"];
  19. if($date == '')
  20. {
  21. ?>
  22. <script>
  23. window.location.reload();
  24. </script>
  25. <?php
  26. $_SESSION['date'] = $date;
  27. }
  28. else
  29. {
  30. $_SESSION['date']="wrong";
  31. } */
  32. //include("connect.php");
  33. require_once('connect.php');
  34. $id=$_GET["id"];
  35. $qry="SELECT * from reu where id='$id'";
  36. $result=@mysql_query($qry);
  37. if($result)
  38. {
  39. $row=mysql_fetch_assoc($result)
  40. ?>
  41. <!-- Put IE into quirks mode -->
  42. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  43. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  44. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  45. <head>
  46. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  47. <title> <?php echo ' '.$row['title'].' '; ?> </title>
  48. <link href="new.css" rel="stylesheet" type="text/css" />
  49. <meta name="Author" content="Isatou" />
  50. <script type="text/javascript">
  51. function getTime()
  52. {
  53. var d = new Date();
  54. var c_hour = d.getHours();
  55. var c_min = d.getMinutes();
  56. var c_sec = d.getSeconds();
  57. var month = d.getMonth();
  58. var day = d.getDay();
  59. var year = d.getFullYear();
  60. //var t = d + ":" + c_hour + ":" + c_min + ":" + c_sec;
  61. var t= month + ' ' + day + ' ' + year;
  62. document.getElementById("demo").innerHTML=t;
  63. return t;
  64. }
  65. function getMonth()
  66. {
  67. var d=new Date();
  68. var month=new Array();
  69. month[0]="January";
  70. month[1]="February";
  71. month[2]="March";
  72. month[3]="April";
  73. month[4]="May";
  74. month[5]="June";
  75. month[6]="July";
  76. month[7]="August";
  77. month[8]="September";
  78. month[9]="October";
  79. month[10]="November";
  80. month[11]="December";
  81. var n = month[d.getMonth()];
  82. document.getElementById("demo").innerHTML=n;
  83. return n;
  84. }
  85. function getDay()
  86. {
  87. var d=new Date();
  88. var day= d.getDay();
  89. return day;
  90. }
  91. </script>
  92. </head>
  93. <body>
  94. <div id="fb-root"></div>
  95. <script>(function(d, s, id) {
  96. var js, fjs = d.getElementsByTagName(s)[0];
  97. if (d.getElementById(id)) return;
  98. js = d.createElement(s); js.id = id;
  99. js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  100. fjs.parentNode.insertBefore(js, fjs);
  101. }(document, 'script', 'facebook-jssdk'));</script>
  102. <div id="maincontainer">
  103. <div id="topsection"><div class="innertube">
  104. <?php
  105. include('menu.php');
  106. ?>
  107. </div></div>
  108. <div id="contentwrapper">
  109. <div id="contentcolumn">
  110. <div class="innertube">
  111. <?php
  112. if( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count($_SESSION['ERRMSG_ARR']) >0 ) {
  113. echo '<ul class="err">';
  114. foreach($_SESSION['ERRMSG_ARR'] as $msg) {
  115. echo '<li>',$msg,'</li>';
  116. }
  117. echo '</ul>';
  118. unset($_SESSION['ERRMSG_ARR']);
  119. }
  120. ?>
  121. <?php
  122. /*<div style="background:url("pin.jpg") #FFFF00; background-repeat: no-repeat;">
  123. </div> */
  124. echo '
  125. <IMG SRC="pin.jpg" HEIGHT="20" WIDTH="20" BORDER="0" style="margin-left: 200px;">
  126. <h1 align="center">'.$row['title'].'</h1>
  127. '.$row['details'].'
  128. <br/>
  129. <br/>';
  130. if( $row['month'] != '')
  131. {
  132. echo '<p><b>Deadline:</b> '.$row['month'].' '.$row['day'].','.$row['year'].' </p>';
  133. }
  134. if( $row['website'] != '')
  135. {
  136. echo '<p><b>Website:</b> <a href= " '.$row['website'].' " > '.$row['website'].' </p>';
  137. }
  138. if($row['name'] != '')
  139. {
  140. echo '<p><b>Contact Person: </b> '.$row['name'].' </p>' ;
  141. }
  142. if($row['phone'] != '')
  143. {
  144. echo ' <p><b> Phone: </b>'.$row['phone'].' </p>';
  145. }
  146. if($row['contact_email'] != '')
  147. {
  148. echo '<p><b> Email: </b>'.$row['contact_email'].'. </p>';
  149. }
  150. }
  151. else
  152. {
  153. die("Query failed!");
  154. }
  155. ?>
  156. <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>
  157. <?php
  158. include('side_bar_classified_admin.php');
  159. ?>
  160. </div>
  161. </div>
  162. </div>
  163. <div id="leftcolumn">
  164. <div class="innertube">
  165. <?php
  166. include('side_bar_classified.php');
  167. ?>
  168. </div>
  169. </div>
  170. <div id="rightcolumn">
  171. <div class="innertube">
  172. <?php
  173. include('adverts.php');
  174. ?>
  175. </div>
  176. </div>
  177. <div id="footer"><a href="http://www.dynamicdrive.com/style/">Copyright 2013</a></div>
  178. </div>
  179. </body></html>