?? print.php
字號:
<?php
include ("../inc/db.php");
include ("../inc/phpmkrfn.php");
include ('../inc/xtpl.php');
include ("../userset/userlist.php"); //用戶列表
$t_AUTOID=$_GET['AUTOID'];
if (empty($t_AUTOID)){$t_AUTOID=0;};
$xtpl=new XTemplate ("print.html");
$conn = phpmkr_db_connect(HOST, USER, PASS, DB, PORT);
//$sSql ="select * from shdmast where AUTOID=".$t_AUTOID;
$sSql ="select shdmast.*,accounts.ACC01 from shdmast LEFT JOIN accounts ON shdmast.SHM02 = accounts.ID where shdmast.AUTOID= $t_AUTOID ";
$rs = phpmkr_query($sSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
$row = mysql_fetch_array($rs, MYSQL_ASSOC);
$deltid=$row[SHMID]; //送貨明細編號
$row[SHM03]=getusername($row[SHM03]);
$row[SHM04]=getusername($row[SHM04]);
$xtpl->assign("MAST",$row); /* assign array data */
$sSql ="select shddelt.*,products.* from shddelt LEFT JOIN products ON shddelt.SHD01 = products.ID where shdid='".$deltid."'";
$rs = phpmkr_query($sSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
$i=1; //ROWNUM 行數(shù)
while($row = mysql_fetch_array($rs, MYSQL_ASSOC)){
$xtpl->assign("ROWNUM",$i);
$xtpl->assign("DATA",$row);
$xtpl->parse("main.row");
$i=$i+1;
};
//專用打印 5 行
while ($i<8+1){
$xtpl->assign("ROWNUM",$i);
$xtpl->parse("main.rowblank");
$i=$i+1;
//echo $i;
}
$xtpl->assign("ROWTOTAL",$i-1);
$xtpl->parse("main");
$xtpl->out("main");
?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -