getlist.php
资源名称:minierp.rar [点击查看]
上传用户:yantgcom
上传日期:2013-07-19
资源大小:478k
文件大小:2k
源码类别:
MySQL数据库
开发平台:
PHP
- <?php
- include ("../inc/db.php");
- include ("../inc/phpmkrfn.php");
- include ('../inc/xtpl.php');
- include("../inc/pageft.php");
- include ("../inc/nocache.php");
- $t_rowid=$_GET[curr_row];
- $t_jspath=$_GET[jspath];
- $t_jsname=$_GET[jsname];
- $t_LEI =$_GET[LEI];
- if (empty($t_LEI)){$t_WHERE="";}
- else
- {$t_WHERE="WHERE PROD02='$t_LEI'";} ;
- $xtpl=new XTemplate ("getlist.html");
- $m_tablename="kuchen";
- $conn = phpmkr_db_connect(HOST, USER, PASS, DB, PORT);
- //总页数
- $sSql ="select kuchen.AUTOID,ID ,PROD02 from kuchen LEFT JOIN products ON kuchen.KUC01 = products.ID $t_WHERE group by kuchen.KUC01 ";
- $result=phpmkr_query($sSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
- $total=phpmkr_num_rows($result);
- //调用pageft(),每页显示10条信息(使用默认的20时,可以省略此参数),使用本页URL(默认,所以省略掉)。
- pageft($total,15);
- $sSql ="select kuchen.*,ID,SUM(KUC02) AS KUCTOL,PROD01,PROD02,PROD03,PROD04,PROD05 from kuchen LEFT JOIN products ON kuchen.KUC01 = products.ID $t_WHERE group by kuchen.KUC01 limit $firstcount,$displaypg";
- $rs = phpmkr_query($sSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
- //{JSPATH}/{JSNAME}
- $xtpl->assign("JSPATH",$t_jspath);
- $xtpl->assign("JSNAME",$t_jsname);
- while ($row = mysql_fetch_array($rs, MYSQL_ASSOC)) {
- $t_jsclick="GetProdSNlist('$row[KUC01]','$t_rowid','$t_jspath','$t_jsname')";
- // if ($row[PROD03]==1){$t_jsclick="GetProdSNlist('$row[KUC01]','$t_rowid','$t_jspath','$t_jsname')";}
- // else{$t_jsclick="SetProd('$row[KUCID]','$row[KUC01]','$row[PROD01]','$row[PROD04]','$row[PROD05]','','','$t_rowid')";};
- //序号管制 批号管制
- $xtpl->assign("JSCLICK",$t_jsclick);
- $xtpl->assign("JSPATH",$t_jspath);
- $xtpl->assign("JSNAME",$t_jsname);
- $xtpl->assign("ROWID",$t_rowid);
- $xtpl->assign("DATA",$row); /* assign array data */
- $xtpl->assign("ROWID",$t_rowid);
- $xtpl->parse("main.table.row"); /* parse a row */
- }
- $xtpl->parse("main.table"); /* parse the table */
- $xtpl->assign("PAGEINFO",$pagenav); //分页
- $xtpl->parse("main");
- $xtpl->out("main");
- ?>