<?php session_start(); ?><!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
<title>文件資料之內容查閱</title>
</head><body>
<?php  
  if(!isset($_GET['meetingid']))
  {	die("無法查閱1"); }
  else
  { $meetingid=$_GET['meetingid'];	}
  if($meetingid=='')
  {	die("無法查閱2");	  }
 include("server1.php");
?>	
<table width="100%" border="0">
  <tr><td>
   <table width="100%" border="0"><tr><td>
	<?php  
	$years=$_SESSION['years'];
           $num=$_GET['num']; 
		   $meetingid=$_GET['meetingid'];
	 ?></td></tr>
   <tr><td>文件資料：
   <?php  echo $years; ?>年<?php  echo $num; ?>月</td></tr>
   <?php  
    if ($stmt = $mysqli2->prepare("select pdfname,docutitle from "
            . "document where meetingid = ? " )) {
    $stmt->bind_param("i", $meetingid);
    $stmt->execute();
    $stmt->bind_result($col1,$col2);  	                                     	                    
    while ($stmt->fetch())
      {           ?>   
     <tr><td>文件主題：<?php echo $col2;?><br> 
     <iframe src=
     "http://docs.google.com/gview?url=http://localhost/PhpProject17/
     <?php echo $col1; ?>&embedded=true" 
     style="width:600px; height:500px;"
      frameborder="0"></iframe>
     </td></tr>   		
     <?php    }	   }     ?>
      </table></td></tr>
      <tr><td>
      <button onClick="javascript:window.close()">關閉視窗</button></td></tr>
</table>
</body></html>