<?php if($ctrlAction=='pastupdates'){$lbl='Past'; }else{$lbl='All'; }?>
<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,exp_id)
{
	document.searchfrm.act.value=document.location.href;
	document.getElementById("exp_id").value=exp_id;
	document.searchfrm.action = u;
	document.searchfrm.target = '';
	document.searchfrm.submit();
}
function PrintFun(ID)
{
	window.open('','formpopup',"height=350,width=600,scrollbars=yes,left=50");
	document.searchfrm.act.value='printmsg';
	document.getElementById("msg_id").value=ID;
	document.searchfrm.action = 'printmsg';
	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='emailmsg';
	document.getElementById("msg_id").value=ID;
	document.searchfrm.action = 'emailmsg';
	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="exp_id" id="exp_id" value="<?php echo $_REQUEST["exp_id"]?>" />
<input type="hidden" name="msg_id" id="msg_id" value="" />
<table width="99%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td colspan="2" align="left"><span class="td"><a href="index.php" class="bnav">Home</a> &raquo; Message Detail</span></td>
                </tr>
              <tr>
                <td colspan="2">&nbsp;</td>
                </tr>
              <tr>
                <td width="75%"><h2>Message Detail</h2></td>
                <td width="25%" align="right"><table width="100%" border="0" cellspacing="3" cellpadding="0">
                  <tr>
                    <td width="45%" align="center"><a href="#" onclick="gotolink('expdetails','<?php echo $msgdetail->expid;?>')" class="button-grey">Back to List </a></td>
                    <td width="55%" align="center"></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 class="subsubtitle">Topic: <?php echo $msgdetail->topic?></td>
                      </tr>
					  <tr>
                        <td class="subsubtitle">&nbsp;</td>
                      </tr>
					  <tr>
                        <td class="subsubtitle">Date: <?php echo date('d.m.Y',strtotime($msgdetail->tdate))?></td>
                      </tr><tr>
                        <td class="subsubtitle">&nbsp;</td>
                      </tr>
					  <tr>
                        <td class="subsubtitle">Message: <?php echo $msgdetail->title?></td>
                      </tr>
					  <tr>
                        <td class="subsubtitle">&nbsp;</td>
                      </tr>
					  <tr>
                        <td class="subsubtitle">Description: <?php echo $msgdetail->description?></td>
                      </tr>
                      <tr>
                        <td align="right"><span class="td"><strong>- by <?php echo $msgdetail->member?></strong></span></td>
                      </tr>
                    </table></td>
                    <td width="14%" align="center"><?php if($msgdetail->photo!='' and file_exists('./static/uploadfiles/members/'.$msgdetail->photo)){?>
						<img src="./utility/processImage.php?imageName=<?php echo urlencode($msgdetail->photo); ?>&w=80&h=80&mod=4&type=2&<?php echo date("HisdmY");?>" width="80px" height="80px" />
					<?php }else{?>
						<img src="images/noimg.jpg" width="80px" height="80px" /></td>
					<?php }?></td>
                  </tr>
                </table></td>
              </tr>
			  <tr>
                        <td class="subsubtitle"><?php if($msgdetail->extlink!=''){?>External Link : <a href="<?php echo $msgdetail->extlink?>" target="_blank">Click here</a><?php }?></td>
                      </tr>
              <tr>
                <td colspan="2">&nbsp;</td>
              </tr>
             
              <tr>
                <td colspan="2" class="font"><?php if($msgdetail->simage!='' and file_exists('./static/uploadfiles/expquotes/'.$msgdetail->simage)){?>
						<img src="./utility/processImage.php?imageName=<?php echo urlencode($msgdetail->simage); ?>&w=300&h=300&mod=7&type=1&<?php echo date("HisdmY");?>" />
					<?php }?></td>
              </tr><tr>
                <td colspan="2">&nbsp;</td>
              </tr>
			  <tr>
                <td colspan="2" class="font"><?php if($msgdetail->simage2!='' and file_exists('./static/uploadfiles/expquotes/'.$msgdetail->simage2)){?>
						<img src="./utility/processImage.php?imageName=<?php echo urlencode($msgdetail->simage2); ?>&w=300&h=300&mod=7&type=1&<?php echo date("HisdmY");?>" />
					<?php }?></td>
              </tr>
              
              <tr>
                <td colspan="2" align="center"><table width="30%" border="0" cellspacing="3" cellpadding="0">
                  <tr>
                    <td align="right"><a href="#" class="button1" onclick="PrintFun('<?php echo $msgdetail->id?>');">Print Events</a></td>
                    <td align="center"><a href="#" class="button1" onclick="EmailToFrined('<?php echo $msgdetail->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>