PageRenderTime 37ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/registration/delegate/conference/index.php

https://github.com/damanlovett/SEAHO
PHP | 119 lines | 110 code | 9 blank | 0 comment | 14 complexity | c34d0aa265d366ef85e6fcd43d61b1ac MD5 | raw file
  1. <?php require_once('../../../Connections/CMS.php'); ?>
  2. <?php
  3. if (!function_exists("GetSQLValueString")) {
  4. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  5. {
  6. $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  7. $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  8. switch ($theType) {
  9. case "text":
  10. $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  11. break;
  12. case "long":
  13. case "int":
  14. $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  15. break;
  16. case "double":
  17. $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
  18. break;
  19. case "date":
  20. $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  21. break;
  22. case "defined":
  23. $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  24. break;
  25. }
  26. return $theValue;
  27. }
  28. }
  29. mysql_select_db($database_CMS, $CMS);
  30. $query_rsConferences = "SELECT conference.conference_id, conference.conference_name, conference.conference_theme, conference.location, conference.start_date, conference.end_date, conference.registration_begins, conference.registration_late, conference.registration_deadline, conference.registration_begins, conference.accept_registrations FROM conference WHERE conference.deleted = 0 AND conference.viewable = 1 AND conference.event_type = 'Conference'";
  31. $rsConferences = mysql_query($query_rsConferences, $CMS) or die(mysql_error());
  32. $row_rsConferences = mysql_fetch_assoc($rsConferences);
  33. $totalRows_rsConferences = mysql_num_rows($rsConferences);
  34. mysql_select_db($database_CMS, $CMS);
  35. $query_rsConferenceFull = "SELECT conference.conference_id, conference.conference_name, conference.conference_theme, conference.location, conference.start_date, conference.end_date, conference.registration_begins, conference.registration_late, conference.registration_deadline, conference.registration_begins, conference.accept_registrations, conference_reg_info.live_message FROM conference INNER JOIN conference_reg_info ON conference.conference_id = conference_reg_info.conference_id WHERE conference.deleted = 0 AND conference.viewable = 1 AND conference.event_type = 'Conference'";
  36. $rsConferenceFull = mysql_query($query_rsConferenceFull, $CMS) or die(mysql_error());
  37. $row_rsConferenceFull = mysql_fetch_assoc($rsConferenceFull);
  38. $totalRows_rsConferenceFull = mysql_num_rows($rsConferenceFull);
  39. ?>
  40. <?php require_once('../../includefiles/initDelegates.php'); ?>
  41. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  42. <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/second.dwt.php" codeOutsideHTMLIsLocked="false" -->
  43. <head>
  44. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  45. <!-- InstanceBeginEditable name="doctitle" -->
  46. <title>Current Conference</title>
  47. <!-- InstanceEndEditable -->
  48. <link href="../../../stylesheets/mainsheet.css" rel="stylesheet" type="text/css" />
  49. <!-- InstanceBeginEditable name="head" -->
  50. <link href="../../styles/cmsMain.css" rel="stylesheet" type="text/css" />
  51. <style type="text/css">
  52. <!--
  53. .style1 {font-weight: bold}
  54. -->
  55. </style>
  56. <!-- InstanceEndEditable -->
  57. </head>
  58. <body>
  59. <!-- DO NOT MOVE! The following AllWebMenus code must always be placed right AFTER the BODY tag-->
  60. <!-- ******** BEGIN ALLWEBMENUS CODE FOR mainnav ******** -->
  61. <span id='xawmMenuPathImg-mainnav' style='position:absolute;top:-50px;left:0px'><img name='awmMenuPathImg-mainnav' id='awmMenuPathImg-mainnav' src='../../../menu/awmmenupath.gif' alt=''></span>
  62. <script type='text/javascript'>var MenuLinkedBy='AllWebMenus [4]', awmBN='626'; awmAltUrl='';</script>
  63. <script charset='UTF-8' src='../../../menu/mainnav.js' language='JavaScript1.2' type='text/javascript'></script>
  64. <script type='text/javascript'>awmBuildMenu();</script>
  65. <!-- ******** END ALLWEBMENUS CODE FOR mainnav ******** -->
  66. <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="textheader">
  67. <?php require_once('../../../includefiles/header.inc.php'); ?>
  68. <tr>
  69. <td colspan="2" bgcolor="#FFFFFF"><!-- InstanceBeginEditable name="pageBanner" -->
  70. <?php require_once('../../includefiles/header.php'); ?>
  71. <!-- InstanceEndEditable --></td>
  72. </tr>
  73. <tr>
  74. <td colspan="2" class="texttop">&nbsp;</td>
  75. </tr>
  76. <tr>
  77. <td width="182" valign="top" id="contentleftmain"><!-- InstanceBeginEditable name="leftNav" -->
  78. <?php require_once('../../includefiles/leftNavDelegates.php'); ?>
  79. <!-- InstanceEndEditable --><img src="../../../images/dropshadowlogo.jpg" alt="Seaho Logo" /></td>
  80. <td width="582" valign="top" id="contentmain"><!-- InstanceBeginEditable name="mainContent" -->
  81. <h3><strong>Current Conference(s)</strong></h3>
  82. <?php if ($totalRows_rsConferenceFull == 0) { // Show if recordset empty ?>
  83. <p>There are no conferences available at this time.</p>
  84. <?php } // Show if recordset empty ?>
  85. <?php if ($totalRows_rsConferenceFull > 0) { // Show if recordset not empty ?>
  86. <?php do { ?>
  87. <div>
  88. <p><strong><?php echo $row_rsConferenceFull['conference_name']; ?></strong><br />
  89. <?php echo $row_rsConferenceFull['location']; ?><br />
  90. <?php echo $row_rsConferenceFull['conference_theme']; ?><br />
  91. <?php echo basicDate($row_rsConferenceFull['start_date']); ?> - <?php echo basicDate($row_rsConferenceFull['end_date']); ?> <br />
  92. </p>
  93. <?php if($row_rsConferenceFull['accept_registrations']=='Yes'){?>
  94. <p>To submit a registration for this conference, go to the <a href="registration.php?conferenceID=<?php echo $row_rsConferenceFull['conference_id']; ?>"> Registration page</a> .</p>
  95. <?php } else {?>
  96. <p><?php echo $row_rsConferenceFull['live_message']; ?></p>
  97. <?php }?>
  98. </div>
  99. <?php } while ($row_rsConferenceFull = mysql_fetch_assoc($rsConferenceFull)); ?>
  100. <?php } // Show if recordset not empty ?>
  101. <!-- InstanceEndEditable --></td>
  102. </tr>
  103. <?php require_once('../../../includefiles/footer.inc.php'); ?>
  104. </table>
  105. </body>
  106. <!-- InstanceEnd --></html>
  107. <?php
  108. mysql_free_result($rsConferences);
  109. mysql_free_result($rsConferenceFull);
  110. ?>