<?php
require "setup.ini";
usercheck();
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>TD { FONT-FAMILY: \"宋体\"; FONT-SIZE: 9pt } BODY { FONT-FAMILY: \"宋体\"; FONT-SIZE: 9pt } SELECT { FONT-FAMILY: \"宋体\"; FONT-SIZE: 9pt } A { COLOR:blue; FONT-FAMILY: \"宋体\"; FONT-SIZE: 9pt; TEXT-DECORATION: none } A:hover { COLOR:red; FONT-FAMILY: \"宋体\"; TEXT-DECORATION: underline; font-site: 9pt --> }</STYLE>
<script language="JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<p align="center">信息查询</p>
<?php if ($show) {?>
<div align="center"><br>
<br>
</div>
<p align="center">当前正在查看<?php echo "<font color=red>$show</font>" ?>的产品资料<br>
<br>
<?php }else echo "<p align=center><font color=red>您还未选择厂家</font></p>" ?> </p>
<form method="post" action="<?php echo $PHP_SELF ?>">
<table width="600" border="1" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#0080FF" bordercolordark="#FFFFFF">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td rowspan="2" width="50%">
<div align="center">
<select name="menu1" onChange="MM_jumpMenu('parent.frames[\'main\']',this,0)">
<option selected>选择厂商</option>
<?php
//global $db_connect;
$sql="SELECT * FROM compeny";
$result = mysql_query($sql,$db_connect) or die(errshow("数据库操作错误"));
while ($userrow=mysql_fetch_Array($result)){
//for ($x=0;$x<=count($userrow);$x++) {
if ($show==$userrow[name]){ $post0=$userrow[0]; $post1=$userrow[1]; $post2=$userrow[2]; $post3=$userrow[3]; }
else echo "<option value=$PHP_SELF?show=$userrow[name]>$userrow[name]</option>
";
//}
}
?>
</select>
</div>
</td>
<td> </td>
</tr>
<tr>
<td>
<div align="center">
<select name="select" onChange="MM_jumpMenu('parent.frames[\'main\']',this,0)">
<option selected>选择产品品牌</option>
<?php
global $db_connect;
$sql="SELECT * FROM main WHERE compeny='$show'&&makesure='Y'";
$result = mysql_query($sql,$db_connect) or die(errshow("数据库操作错误"));
while ($userrow=mysql_fetch_Array($result)){
//for ($x=0;$x<=count($userrow);$x++) {
//if ($show==$userrow[name]){ $post0=$userrow[0]; $post1=$userrow[1]; $post2=$userrow[2]; $post3=$userrow[3]; }
echo "<option value=$PHP_SELF?show=$show&no=$userrow[id]>$userrow[pinpai]</option>";
//}
}
?>
</select>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center"><?php
//global $db_connect;
$sql="SELECT * FROM main WHERE compeny='$show'&&id='$no'";
$result = mysql_query($sql,$db_connect) or die(errshow("数据库操作错误"));
$userrow=mysql_fetch_Array($result)
//echo "<option value=$PHP_SELF?show=$show&no=$userrow[id]>$userrow[pinpai]</option>";
?><br>
<font color="#0080FF">产品资料部分</font>
<table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#0080FF" bordercolordark="#FFFFFF">
<tr>
<td height="1"></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td colspan="2">产品ID: <?php echo $no ?> </td>
</tr>
<tr>
<td colspan="2">所属厂家:<?php echo $userrow[compeny] ?></td>
</tr>
<tr>
<td colspan="2">产品品牌:<?php echo $userrow[pinpai] ?></td>
</tr>
<tr>
<td colspan="2">产品型号:<?php echo $userrow[xinghao] ?></td>
</tr>
<tr>
<td colspan="2">产品数量:<?php echo $userrow[count] ?></td>
</tr>
<tr>
<td colspan="2">产品单件市场价:<?php echo $userrow[oneprice] ?></td>
</tr>
<tr>
<td colspan="2">产品成本:<?php echo $userrow[chengben] ?></td>
</tr>
<tr>
<td colspan="2">产品总值:<?php echo $userrow[allprice] ?></td>
</tr>
<tr>
<td colspan="2">产品总成本:<?php echo $userrow[chengben]*$userrow[count] ?></td>
</tr>
<tr>
<td colspan="2">产品介绍:<?php echo $userrow[introduce] ?></td>
</tr>
<tr>
<td colspan="2">厂商要求:<?php echo $userrow['require'] ?></td>
</tr>
<tr>
<td colspan="2">负责人:<?php echo $userrow[fuzeren] ?></td>
</tr>
<tr>
<td colspan="2">备注:<?php echo $userrow[beizhu] ?></td>
</tr>
<tr>
<td colspan="2">登记时间: <?php echo date("Y年m月d日星期w A g时i分s秒",$userrow[time]) ?></td>
</tr>
<tr>
<td colspan="2">
<hr noshade size="1" color="#0080FF">
</td>
</tr>
<tr>
<td colspan="2">
<div align="center"><font color="#0080FF">产品使用分配部分</font></div>
</td>
</tr>
<tr>
<td colspan="2">
<hr noshade size="1" color="#0080FF">
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="50%">
<div align="center">分配至信息部数量:<?php echo $userrow[toxinxi] ?></div>
</td>
<td width="50%">
<div align="center">分配至商务部数量:<?php echo $userrow[toshangwu] ?></div>
</td>
</tr>
<tr>
<td width="50%">
<div align="center">信息部反馈使用数量:<?php echo $userrow[xinxiuse] ?></div>
</td>
<td width="50%">
<div align="center">商务部反馈销售数量:<?php echo $userrow[shangwuuse] ?></div>
</td>
</tr>
<tr>
<td width="50%">
<div align="center">信息部消耗产品成本:<?php echo $userrow[chengben]*$userrow[xinxiuse] ?></div>
</td>
<td width="50%">
<div align="center">商务部销售产品合计:<?php echo $userrow[oneprice]*$userrow[shangwuuse] ?>
</div>
</td>
</tr>
<tr>
<td width="50%">
<div align="center"></div>
</td>
<td width="50%">
<div align="center">商务部销售产品利润:<?php echo $userrow[lirun]-$userrow[chengben]*$userrow[shangwuuse] ?>
</div>
</td>
</tr>
<tr>
<td width="50%">
<div align="center"></div>
</td>
<td width="50%">
<div align="center">直销形式销售数量:<?php echo $userrow[zhixiao] ?></div>
</td>
</tr>
<tr>
<td width="50%">
<div align="center"></div>
</td>
<td width="50%">
<div align="center">拍卖形式销售数量:<?php echo $userrow[paimai] ?></div>
</t