<?php if($ctrlAction=='pastevents'){$lbl='Past'; }else{$lbl='JPC'; }?>
<script>
function submitform(start,limit)
{
	document.searchfrm.act.value=document.location.href;
	document.getElementById("start").value=start;
	document.getElementById("limit").value=limit;
		
	//document.searchfrm.action = u;
	
	document.searchfrm.submit();
}
function gotolink(u,event_id)
{
	document.searchfrm.act.value=document.location.href;
	document.getElementById("event_id").value=event_id;
	document.searchfrm.action = u;
	
	document.searchfrm.submit();
}
function PrintFun(ID)
{
	window.open('','formpopup',"height=350,width=600,scrollbars=yes,left=50");
	document.searchfrm.act.value='printevent';
	document.getElementById("event_id").value=ID;
	document.searchfrm.action = 'printevent';
	document.searchfrm.target = 'formpopup';
	document.searchfrm.submit();
	
}
function EmailToFrined(ID)
{
	window.open('','formpopup',"height=350,width=600,scrollbars=yes,left=50");
	document.searchfrm.act.value='emailevent';
	document.getElementById("event_id").value=ID;
	document.searchfrm.action = 'emailevent';
	document.searchfrm.target = 'formpopup';
	document.searchfrm.submit();
}
</script>
<form name="searchfrm" id="searchfrm" action="<?php echo $page_name?>" method="post" target="_parent">
<input type="hidden" name="start" id="start" value="<?=$_REQUEST["start"]?>" />
<input type="hidden" name="limit" id="limit" value="<?=$_REQUEST["limit"]?>" />
<input type="hidden" name="act" id="act" value="" />
<input type="hidden" name="event_id" id="event_id" value="" />
<div style="padding-top:100px;">
<table width="99%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td colspan="2" align="left" class="breadcrumb"><a href="index.php">Home</a> &raquo; Events</td>
                </tr>
              <tr>
                <td colspan="2">&nbsp;</td>
                </tr>
              <tr>
                <td width="75%"><h3>Event Detail</h3></td>
                <td width="25%" align="right"><table width="100%" border="0" cellspacing="3" cellpadding="0" class="table table-bordered table-striped">
                  <tr>
                    <td width="45%" align="center"><a href="eventlist" class="btn btn-primary">JPC Events</a></td>
                    <td width="55%" align="center"><a href="pastevents" class="btn btn-primary">Past Events</a></td>
                  </tr>
                </table></td>
                </tr>
              <tr>
                <td colspan="2">&nbsp;</td>
                </tr>
              <tr>
                <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="86%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td><h4><?php echo $eventdetail->title?>,</h4></td>
                      </tr>
                      <tr>
                        <td align="right"></td>
                      </tr>
                    </table></td>
                    <td width="14%" align="center">
					<?php if($eventdetail->photo!='' and file_exists('./static/uploadfiles/members/'.$eventdetail->photo)){?>
						<img src="./utility/processImage.php?imageName=<?php echo urlencode($eventdetail->photo); ?>&w=80&h=80&mod=4&type=2&<?php echo date("HisdmY");?>" />
					<?php }else{?>
						<img src="images/noimg.jpg" width="80px" height="80px" /></td>
					<?php }?>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td colspan="2">&nbsp;</td>
              </tr>
              <tr>
                <td colspan="2" class="font"><?php echo $eventdetail->description?></td>
              </tr>
			  <tr>
                <td colspan="2" class="font"><?php if($eventdetail->simage!='' and file_exists('./static/uploadfiles/events/'.$eventdetail->simage)){?>
						<img src="./utility/processImage.php?imageName=<?php echo urlencode($eventdetail->simage); ?>&w=300&h=300&mod=5&type=1&<?php echo date("HisdmY");?>" />
					<?php }?></td>
              </tr>
			   <tr>
                <td colspan="2">&nbsp;</td>
              </tr>
			  <tr>
                <td colspan="2" class="font"><?php if($eventdetail->simage2!='' and file_exists('./static/uploadfiles/events/'.$eventdetail->simage2)){?>
						<img src="./utility/processImage.php?imageName=<?php echo urlencode($eventdetail->simage2); ?>&w=300&h=300&mod=5&type=1&<?php echo date("HisdmY");?>" />
					<?php }?></td>
              </tr>
			  <tr>
                        <td class="subsubtitle"><?php if($eventdetail->extlink!=''){?>External Link : <a href="<?php echo $eventdetail->extlink?>" target="_blank">Click here</a><?php }?></td>
                      </tr>
              <tr>
                <td colspan="2">&nbsp;</td>
              </tr>
              
              <tr>
                <td colspan="2" align="center"><table width="30%" border="0" cellspacing="3" cellpadding="0">
                  <tr>
                    <td align="right"><a href="#" class="btn btn-primary" onclick="PrintFun('<?php echo $eventdetail->id?>');">Print Events</a></td>
                    <td align="center"><a href="#" class="btn btn-primary" onclick="EmailToFrined('<?php echo $eventdetail->id?>');">Email to Friend</a></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td colspan="2">&nbsp;</td>
              </tr>
              <tr>
                <td colspan="2">&nbsp;</td>
              </tr>
              </table>
</form>