editview.php

来自「开源的 库存管理系统 www.minierp.cn php+ mysql」· PHP 代码 · 共 40 行

PHP
40
字号
<?php include ("../inc/db.php"); include ("../inc/phpmkrfn.php"); include ('../inc/xtpl.php'); include ("../inc/nocache.php"); include ("../basicset/userlist.php");	 //用户列表 include ("../basicset/fupaylist.php");	 //付款方式 $t_AUTOID=$_GET['AUTOID']; if (empty($t_AUTOID)){$t_AUTOID=0;}; $xtpl=new XTemplate ("editview.html");	$conn = phpmkr_db_connect(HOST, USER, PASS, DB, PORT);    $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];   //送货明细编号		$xtpl->assign("MAST",$row);		/* assign array data */		$xtpl->assign("pshm03USERINFO",getuserlist('pshm03',$row[SHM03])); //送货人		$xtpl->assign("pshm04USERINFO",getuserlist('pshm04',$row[SHM04])); //开单人		$xtpl->assign("pshm10USERINFO",getfupaylist('pshm10',$row[SHM10])); //传款方式	    $sSql ="select * from shddelt 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;	};	$xtpl->assign("ROWTOTAL",$i-1);	$xtpl->parse("main");	$xtpl->out("main");?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?