File: C:/xampp/htdocs/PBN/G7RGB/Rank.php
<?php
/*
All source code copyright and proprietary Melonfire, 2002. All content, brand names and trademarks copyright and proprietary Melonfire, 2002. All rights reserved. Copyright infringement is a violation of law.
This source code is provided with NO WARRANTY WHATSOEVER. It is produced and meant for illustrative purposes only, and is NOT recommended for use in production environments.
Read more articles like this one at http://www.melonfire.com/community/columns/trog/ and http://www.melonfire.com/
*/
// add.php - add a new press release
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>G7 TVI報表 </title><basefont face="Verdana">
</head>
<body>
<!-- standard page header begins -->
<p>
<a name="DETAILS"></a>
<table width="1280" cellspacing="0" cellpadding="5">
<tr>
<td></td>
</tr>
<tr>
<td bgcolor="Navy"><font size="-1" color="White"><b>G7 TVI報表 : List</b></font></td>
</tr>
</table>
<!-- standard page header ends -->
<p>
<table nowrap style="width=1280; text-align:left; table-layout:fixed" cellspacing="1" >
<tbody>
<tr>
<font size="-1">
<td nowrap style="width:100;">公司名稱</td>
<td nowrap style="width:76;">聯絡人</td>
<td nowrap style="width:150px;">參考亮度(L)</td>
<td nowrap style="width:100px;">量測儀器</td>
<td nowrap style="width:80px;">儀器序號</td>
<td nowrap style="width:120px;">機型</td>
<td nowrap style="width:80px;">紙張</td>
<td nowrap style="width:80px;">墨</td>
<td nowrap style="width:80px;">分數</td>
<td nowrap style="width:40px;">通過</td>
<td nowrap style="width:100px;">時間</td>
<td nowrap style="width:80px;">現場</td>
<td nowrap style="width:180px;">檔案</td>
<td nowrap style="width:80px;">說明</td>
</font>
</tr>
</tbody>
</table>
<?php
$host="127.0.0.1";
$user="root";
$pass="fredsql";
$db="tvicheck";
$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
mysql_query("SET NAMES 'utf8'");
//$link = mssql_connect("MACBOOK7", "sa", "fred5697");
mysql_select_db($db) or die ("Unable to select database!");
// generate and execute query
$query = "SELECT * from grgb order by id desc";
$result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());
// if records present
// iterate iii through resultset
// print title with links to edit and delete scripts
while($row = mysql_fetch_object($result))
{
?>
<table nowrap style="width=1280; text-align:left; table-layout:fixed" cellspacing="1" >
<tbody>
<tr>
<td nowrap style="width:100px;"><?php echo $row->company; ?> </td>
<td nowrap style="width:76px;"><?php echo $row->contact; ?> </td>
<td nowrap style="width:150;"><?php echo $row->level; ?> </td>
<td nowrap style="width:100px;"><?php echo $row->device; ?> </td>
<td nowrap style="width:80px;"><?php echo $row->dsn; ?> </td>
<td nowrap style="width:120px; "><?php echo substr($row->printer,0,10).".."; ?> </td>
<td nowrap style="width:80px;"><?php echo $row->paper;?> </td>
<td nowrap style="width:80px;"><?php echo substr($row->ink,0,7);?> </td>
<td nowrap style="width:80px;"><?php echo $row->score;?> </td>
<?php if ($row->passbit==1) { ?>
<td nowrap style="width:40px;"><?php echo "Yes";?> </td>
<?php }
else{ ?>
<td nowrap style="width:40px;"><?php echo "No";?> </td>
<?php } ?>
<td nowrap style="width:100px;"><?php echo $row->date;?> </td>
<td nowrap style="width:80px;">
<?php if ($row->onsite==1) { ?>
<img style="display: inline; border: 0px;" title="on site" src="./onsite.png" border="0" alt="on site" width="80"> </td>
<?php }
else{
echo "No";?> </td>
<?php } ?>
<td nowrap style="width:180px;"> <a href="tvireport.php?tvifile=<?php echo $row->filename;?>&level=<?php echo $row->level;?> ">
<?php echo $row->filename;?> </a> </td>
<td nowrap style="width:80px;"><?php echo $row->cmmt;?> </td>
</tr>
</tbody>
</table>
<p>
<?php
}
mysql_close($connection);
?>
<!-- standard page footer begins -->
<p>
<table width="1280" cellspacing="0" cellpadding="5">
<tr>
<td align="center"><font size="-2">Everything here is copyright © <a href="http://www.fredkuo.idv.tw/wordpress/">Fred Kuo</a>, 2010. All rights reserved.<br> <a href="http://www.fredkuo.idv.tw/wordpress/?tag=fogra">Read more.</a></td>
</tr>
</table>
<!-- standard page footer ends -->
</body>
</html>