<?php
require_once ("../config.inc.php");
require_once ("../includes/adminlogincheck.inc.php");
require_once ("../includes/mysql.inc.php");
require_once ("../includes/arrays.inc.php");
require_once ("../classes/miscellaneous.class.php");
require_once "../includes/fckeditor/fckeditor.php";

$page		= isset($_REQUEST['page'])	?	trim($_REQUEST['page'])	:	"1";
$id			= isset($_REQUEST['id'])	?	trim($_REQUEST['id'])	:	"0";
$message	= "";
if (!$objDB) {
	$message	= "Unable to Locate Database Server.";
} else {
	$objMisc		= new miscellaneous($objDB);
	//$objM->set_single_events($_POST);
	if (isset($_POST['BackNow'])) {
		if ($message == "") {
			header("Location: singleevents.php?page=$page");
			exit;
		}
	} else {
		$array	= $objMisc->get_single_event($id);
		$objMisc->set_single_events($array);
               
	}
}

include_once('title.inc.php');
?>
<?php include_once('tophtml.php');?>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top" class="white"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="72%" valign="top">
			<table width="100%"  border="0" cellspacing="0" cellpadding="5">
          <tr>
            <td><table width="100%"  border="0" cellspacing="0" cellpadding="5">
              <tr>
                <td width="41%" class="headings1" colspan="2">Single Event</td>
              </tr>
            </table>
			<div class="bordernew padding2">
				<form name="frmUser" method="post" action="" onSubmit="return validate();">
          <table width="100%"  border="0" cellspacing="0" cellpadding="5">
            <tr>
              <td><table width="100%" class="listing_tbl_admin"  border="0" cellspacing="0" cellpadding="0">
				<?php if ($objDB) 
					  { 
				?>
					<?php 	if(isset($message) && $message!='')
							{
					?>
                <tr align="left">
                  <td align="center" class="maintext2">&nbsp;</td>
                  <td colspan="2" class="maintext2 warning"><?php echo $message;?></td>
                  </tr>
					<?php  	}//end if?>
  				<tr align="left">
                  <td width="3%" class="maintext2">&nbsp;</td>
                  <td width="27%" class="maintext2">Event Title</td>
                  <td width="70%" class="maintext2"><?php echo htmlspecialchars($objMisc->vTitle)?></td>
  				</tr>
                 <tr align="left">
                  <td class="maintext2">&nbsp;</td>
                  <td class="maintext2">Event City</td>
                  <td class="maintext2"><?php echo htmlspecialchars($objMisc->vCity)?></td>
                 </tr>
                <tr align="left">
                  <td class="maintext2">&nbsp;</td>
                  <td class="maintext2">Event Venue</td>
                  <td class="maintext2"><?php echo htmlspecialchars($objMisc->vVenue)?></td>
                </tr>
                <tr align="left">
                  <td class="maintext2">&nbsp;</td>
                  <td class="maintext2">Event Date</td>
                  <td class="maintext2"><?php echo date("m/d/Y",strtotime($objMisc->dDate_Event))?></td>
                </tr>
                <tr align="left">
                  <td class="maintext2">&nbsp;</td>
                  <td class="maintext2">Event Description</td>
                  <td class="maintext2"><?php echo $objMisc->vDescription;?></td>
                </tr>
				<?php 			
						}//end first if
				?>
              </table>
                <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td align="right"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td>&nbsp;</td>
                      </tr>
                    </table>
                      <?php if ($objDB) 
					  { 
					?>
                      <table width="100%"  border="0" cellspacing="0" cellpadding="5">
                      <tr>
                        <td align="left"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="31%">&nbsp;</td>
                              <td>
                                  <!--input name="BackNow" type="submit" class="back-btn" value="Back" -->
                                  <input name="BackNow" type="button" class="back-btn" value="Back" onclick="window.location='singleevents.php?page=<?php echo $page?>'" />
                                  <input type="hidden" name="page" value="<?php echo $page?>"></td>
                              </tr>
                        </table></td>
                      </tr>
                    </table>
					<?php 		
						}//end first if
				?></td>
                  </tr>
                </table></td>
            </tr>
          </table></form>
			</div>
			</td>
          </tr>
        </table>
		</td>
        </tr>
    </table>      
    </td>
  </tr>
</table>
<?php include_once('bottomhtml.php');?>