📄 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 行数
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 + -