view.php
资源名称:minierp.rar [点击查看]
上传用户:yantgcom
上传日期:2013-07-19
资源大小:478k
文件大小:1k
源码类别:
MySQL数据库
开发平台:
PHP
- <?php
- include ("../inc/db.php");
- include ("../inc/phpmkrfn.php");
- include ('../inc/xtpl.php');
- include ("../inc/nocache.php");
- include ("../userset/userlist.php"); //用户列表
- include ("../basicset/fupaylist.php"); //付款方式
- $t_JHMID=$_GET['JHMID'];
- $t_AUTOID=$_GET['AUTOID'];
- if (empty($t_AUTOID)){$t_AUTOID=0;};
- $xtpl=new XTemplate ("view.html");
- $conn = phpmkr_db_connect(HOST, USER, PASS, DB, PORT);
- $sSql ="select jhdmast.*,gongyins.ACC01 from jhdmast LEFT JOIN gongyins ON jhdmast.JHM02 = gongyins.ID where jhdmast.AUTOID= $t_AUTOID or jhdmast.JHMID= '$t_JHMID' ";
- //echo $sSql;
- $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[JHMID]; //进货明细编号
- $row[JHM05]=getusername($row[JHM05]); //进货人
- $row[JHM10]=getfupayname($row[JHM10]); //付款方式
- $xtpl->assign("MAST",$row); /* assign array data */
- $sSql ="select * from jhddelt where jhdid='".$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");
- ?>