<?
include_once("./_common.php");
if($excel == "y") {
 $title = "Report";
 header( "Content-type: application/vnd.ms-excel" );  
 header( "Content-Disposition: attachment; filename=".date("dmYmsh").".xls");  
// $title 변수명으로 저장됩니다. 원하는 이름으로 바꾸세요
 header( "Content-Description: PHP4 Generated Data" );
}
?>
<style type="text/css">
<!--
body {
font: small Verdana, Geneva, Arial, Helvetica, sans-serif;
color: #666666;
background-color: #ffffff;
border: 1px solid #999999;
}
td {font-size: 8pt;}
th {font-size: 8pt;}
-->
</style>
<script language=javascript>
  function win_print() {
              self.print();
  }
</script> 

<body onload="javascript:win_print()" oncontextmenu="return false" onselectstart="return false" ondragstart="return false"> 
<table width=100% cellpadding="5" cellspacing="0" border="1" align="center" style="border-collapse:collapse; border:1px gray solid;">
<col width="30" />

    
    <col width="12%" />
    <col width="8%" />
<col  />
    <col width="8%" />
    <col width="8%" />

    <col width="8%" />
    <col width="5%" />
    <col width="8%" />

	<tr>
        <th colspan=18  align=center>
	<table >
	<tr>
		<td  align=center><a href="print.php"> Print </a>
</td><td width=200  align=center><a href="print.php?excel=y">Export to excel</a></td>
	</tr>
	</table>
	</td>
	</tr>
	<tr bgcolor=#CCFFCC>
        <th><img src="./img/list_no.gif" border='0'></th>

        <th>Name </th>
		        <th>Employe Number</th>
        <th>Address </th>
        <th>Contact</th>
        <th>Department</th>
        <th>Position</th>
        <th>Recruit type</th>
        <th>Joining date</th>

    </tr>
<tr>
	<td>
<?
$i=1;
$query5 = "select * from g4_write_human  ";
$result5 = sql_query($query5);
while($row  = sql_fetch_array($result5)) {
	?>

<tr>
	<td align=center><?=$i?></td>
	<td><?=$row[wr_subject]?></td>
	<td  align=center><?=$row[wr_1]?></td>
	<td  align=center><?=$row[wr_2]?></td>
	<td  align=center><?=$row[wr_3]?></td>
	<td  align=center><?=$row[wr_4]?></td>
	<td  align=center><?=$row[wr_5]?></td>
	<td  align=center><?=$row[wr_6]?></td>
	<td  align=center><?=$row[wr_7]?></td>

	


</tr>

	<?
	$i++;
}
?></td>
	
</tr>
</table>

