增加产品
<?php require_once 'base.php';?>
<?php
// 连接数据库
require_once 'dbconfig.php';
// 访问基本情况
$query = "select * from basicsituation";
$result = @mysql_query($query);
$aquery = "select * from appearanceparameter";
$aresult = @mysql_query($aquery);
$cquery = "select * from cellparameters";
$cresult = @mysql_query($cquery);
$lquery = "select * from circuitparameters";
$lresult = @mysql_query($lquery);
$oquery = "select * from otherfeatures";
$oresult = @mysql_query($oquery);
$bbquery = "select * from bproductcategory";
$bbresult = @mysql_query($bbquery);
$ffquery = "select * from fappearancematerial";
$ffresult = @mysql_query($ffquery);
$xtquery = "select * from xcelltype";
$xtresult = @mysql_query($xtquery);
$xmquery = "select * from xcellmaterial";
$xmresult = @mysql_query($xmquery);
$xiquery = "select * from xcycleindex";
$xiresult = @mysql_query($xiquery);
$xlquery = "select * from xcellmodel";
$xlresult = @mysql_query($xlquery);
$liquery = "select * from linputcircuitscheme";
$liresult = @mysql_query($liquery);
$loquery = "select * from loutputcircuitscheme";
$loresult = @mysql_query($loquery);
//输入
$lfquery = "select * from linterfacetype";
$lfresult = @mysql_query($lfquery);
$lpquery = "select * from lparameter";
$lpresult = @mysql_query($lpquery);
$lfbquery = "select * from linterfacetype";
$lfbresult = @mysql_query($lfbquery);
$lpbquery = "select * from lparameter";
$lpbresult = @mysql_query($lpbquery);
$lfcquery = "select * from linterfacetype";
$lfcresult = @mysql_query($lfcquery);
$lpcquery = "select * from lparameter";
$lpcresult = @mysql_query($lpcquery);
$lfdquery = "select * from linterfacetype";
$lfdresult = @mysql_query($lfdquery);
$lpdquery = "select * from lparameter";
$lpdresult = @mysql_query($lpdquery);
// 输出
$lofquery = "select * from linterfacetype";
$lofresult = @mysql_query($lofquery);
$lopquery = "select * from lparameter";
$lopresult = @mysql_query($lopquery);
//
$lofbquery = "select * from linterfacetype";
$lofbresult = @mysql_query($lofbquery);
$lopbquery = "select * from lparameter";
$lopbresult = @mysql_query($lopbquery);
//
$lofcquery = "select * from linterfacetype";
$lofcresult = @mysql_query($lofcquery);
$lopcquery = "select * from lparameter";
$lopcresult = @mysql_query($lopcquery);
//
$lofdquery = "select * from linterfacetype";
$lofdresult = @mysql_query($lofdquery);
$lopdquery = "select * from lparameter";
$lopdresult = @mysql_query($lopdquery);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>增加产品</title>
<link href="diyUpload/css/webuploader.css" rel="stylesheet" />
<link href="diyUpload/css/diyUpload.css" rel="stylesheet" />
</head>
<style>
*
{
margin: 0;
padding: 0;
}
#box
{
margin: 50px auto;
width: 540px;
min-height: 400px;
background: #FF9;
}
#demo
{
margin: 50px auto;
width: 540px;
min-height: 800px;
background: #CF9;
}
</style>
<body>
<div id="page-wrapper">
<div id="page-inner">
<div class="row">
<div class="col-md-12">
<h2>增加产品</h2>
</div>
</div>
<hr />
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<ul class="nav navbar-nav">
<li><a href="#BasicSituation">基本情况</a></li>
<li><a href="#AppearanceParameter">外观参数</a></li>
<li><a href="#CellParameters">电芯参数</a></li>
<li><a href="#CircuitParameters">电路参数</a></li>
<li><a href="#OtherFeatures">其他功能</a></li>
</ul>
</div>
</nav>
<form role="form" action="increaseproductdo.php" method="post" enctype="multipart/form-data">
<!-- <div class="form-group">
<label for="inputfile">产品图片</label>
<input type="file" name="myfile[]" id="inputfile" multiple>
</div> -->
<div id="box">
<div id="test"></div>
</div>
<div id="BasicSituation">
<h3>基本情况</h3>
</div>
<?php
while ($row = mysql_fetch_array($result)) {
if($row['BName'] == "产品类别"){
echo "<p>".$row['BName']."</p>";
?>
<?php
while ($bbrow = mysql_fetch_array($bbresult)) {
?>
<label><input name='' type='checkbox'' value=''/><?php echo $bbrow['BName']?></label>
<?php
}
?>
<?php
continue;
}
?>
<p><?php echo $row['BName'];?></p><input type="text" name="<?php $row['BName']?>" />
<?php
}
?>
<div id="AppearanceParameter">
<h3>外观参数</h3>
</div>
<?php
while ($row = mysql_fetch_array($aresult)) {
if ($row['FName'] == "外壳材料"){
echo "<p>".$row['FName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($ffrow = mysql_fetch_array($ffresult)) {
?>
<option value ="<?php $ffrow['FName']?>"><?php echo $ffrow['FName']?></option>
<?php
}
?>
</select>
<?php
continue;
}
?>
<p><?php echo $row['FName'];?></p><input type="text" name="<?php $row['FName']?>" />
<?php
}
?>
<div id="CellParameters">
<h3>电芯参数</h3>
</div>
<?php
while ($row = mysql_fetch_array($cresult)) {
if ($row['XName'] == "电芯类型"){
echo "<p>".$row['XName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($xtrow = mysql_fetch_array($xtresult)) {
?>
<option value ="<?php $xtrow['XName']?>"><?php echo $xtrow['XName']?></option>
<?php
}
?>
</select>
<?php
continue;
}
if ($row['XName'] == "电芯材料"){
echo "<p>".$row['XName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($xmrow = mysql_fetch_array($xmresult)) {
?>
<option value ="<?php $xmrow['XName']?>"><?php echo $xmrow['XName']?></option>
<?php
}
?>
</select>
<?php
continue;
}
if ($row['XName'] == "循环次数"){
echo "<p>".$row['XName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($xirow = mysql_fetch_array($xiresult)) {
?>
<option value ="<?php $xirow['XName']?>"><?php echo $xirow['XName']?></option>
<?php
}
?>
</select>
<?php
continue;
}
if ($row['XName'] == "电芯型号"){
echo "<p>".$row['XName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($xlrow = mysql_fetch_array($xlresult)) {
?>
<option value ="<?php $xlrow['XId']?>"><?php echo $xlrow['Xstyle']."-".$xlrow['Xbox']."-".$xlrow['Xsize']."-".$xlrow['Xm']?></option>
<?php
}
?>
</select>
<?php
continue;
}
?>
<p><?php echo $row['XName'];?></p><input type="text" name="<?php $row['XName']?>" />
<?php
}
?>
<div id="CircuitParameters">
<h3>电路参数</h3>
</div>
<?php
while ($row = mysql_fetch_array($lresult)) {
if ($row['LName'] == "输入电路方案"){
echo "<p>".$row['LName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($lirow = mysql_fetch_array($liresult)) {
?>
<option value ="<?php $lirow['LName']?>"><?php echo $lirow['LName']?></option>
<?php
}
?>
</select>
<?php
continue;
}
if ($row['LName'] == "输入A"){
echo "<p>".$row['LName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($lfrow = mysql_fetch_array($lfresult)) {
?>
<option value ="<?php $lfrow['LName']?>"><?php echo $lfrow['LName']?></option>
<?php
}
?>
</select>
<select>
<option value=""></option>
<?php
while ($lprow = mysql_fetch_array($lpresult)) {
?>
<option value ="<?php $lprow['LName']?>"><?php echo $lprow['LName']?></option>
<?php
}
?>
</select>
<?php
continue;
}
if ($row['LName'] == "输入B"){
echo "<p>".$row['LName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($lfbrow = mysql_fetch_array($lfbresult)) {
?>
<option value ="<?php $lfbrow['LName']?>"><?php echo $lfbrow['LName']?></option>
<?php
}
?>
</select>
<select>
<option value=""></option>
<?php
while ($lpbrow = mysql_fetch_array($lpbresult)) {
?>
<option value ="<?php $lpbrow['LName']?>"><?php echo $lpbrow['LName']?></option>
<?php
}
?>
</select>
<?php
continue;
}
if ($row['LName'] == "输入C"){
echo "<p>".$row['LName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($lfcrow = mysql_fetch_array($lfcresult)) {
?>
<option value ="<?php $lfcrow['LName']?>"><?php echo $lfcrow['LName']?></option>
<?php
}
?>
</select>
<select>
<option value=""></option>
<?php
while ($lpcrow = mysql_fetch_array($lpcresult)) {
?>
<option value ="<?php $lpcrow['LName']?>"><?php echo $lpcrow['LName']?></option>
<?php
}
?>
</select>
<?php
continue;
}
if ($row['LName'] == "输入D"){
echo "<p>".$row['LName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($lfdrow = mysql_fetch_array($lfdresult)) {
?>
<option value ="<?php $lfdrow['LName']?>"><?php echo $lfdrow['LName']?></option>
<?php
}
?>
</select>
<select>
<option value=""></option>
<?php
while ($lpdrow = mysql_fetch_array($lpdresult)) {
?>
<option value ="<?php $lpdrow['LName']?>"><?php echo $lpdrow['LName']?></option>
<?php
}
?>
</select>
<?php
continue;
}
if ($row['LName'] == "输出电路方案"){
echo "<p>".$row['LName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($lorow = mysql_fetch_array($loresult)) {
?>
<option value ="<?php $lorow['LName']?>"><?php echo $lorow['LName']?></option>
<?php
}
?>
</select>
<?php
continue;
}
if ($row['LName'] == "输出A"){
echo "<p>".$row['LName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($lofrow = mysql_fetch_array($lofresult)) {
?>
<option value ="<?php $lofrow['LName']?>"><?php echo $lofrow['LName']?></option>
<?php
}
?>
</select>
<select>
<option value=""></option>
<?php
while ($loprow = mysql_fetch_array($lopresult)) {
?>
<option value ="<?php $loprow['LName']?>"><?php echo $loprow['LName']?></option>
<?php
}
?>
</select>
<?php
continue;
}
if ($row['LName'] == "输出B"){
echo "<p>".$row['LName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($lofbrow = mysql_fetch_array($lofbresult)) {
?>
<option value ="<?php $lofbrow['LName']?>"><?php echo $lofbrow['LName']?></option>
<?php
}
?>
</select>
<select>
<option value=""></option>
<?php
while ($lopbrow = mysql_fetch_array($lopbresult)) {
?>
<option value ="<?php $lopbrow['LName']?>"><?php echo $lopbrow['LName']?></option>
<?php
}
?>
</select>
<?php
continue;
}
if ($row['LName'] == "输出C"){
echo "<p>".$row['LName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($lofcrow = mysql_fetch_array($lofcresult)) {
?>
<option value ="<?php $lofcrow['LName']?>"><?php echo $lofcrow['LName']?></option>
<?php
}
?>
</select>
<select>
<option value=""></option>
<?php
while ($lopcrow = mysql_fetch_array($lopcresult)) {
?>
<option value ="<?php $lopcrow['LName']?>"><?php echo $lopcrow['LName']?></option>
<?php
}
?>
</select>
<?php
continue;
}
if ($row['LName'] == "输出D"){
echo "<p>".$row['LName']."</p>";
?>
<select>
<option value=""></option>
<?php
while ($lofdrow = mysql_fetch_array($lofdresult)) {
?>
<option value ="<?php $lofdrow['LName']?>"><?php echo $lofdrow['LName']?></option>
<?php
}
?>
</select>
<select>
<option value=""></option>
<?php
while ($lopdrow = mysql_fetch_array($lopdresult)) {
?>
<option value ="<?php $lopdrow['LName']?>"><?php echo $lopdrow['LName']?></option>
<?php
}
?>
</select>
<?php
continue;
}
?>
<p><?php echo $row['LName'];?></p><input type="text" name="<?php $row['LName']?>" />
<?php
}
?>
<div id="OtherFeatures">
<h3>其他功能</h3>
</div>
<?php
while ($row = mysql_fetch_array($oresult)) {
?>
<p><?php echo $row['OName'];?></p><input type="text" name="<?php $row['OName']?>" />
<?php
}
?>
<button style="float: right;" type="submit" class="btn btn-primary">提交</button>
</form>
</div>
</div>
<script src="assets/js/jquery-1.10.2.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/jquery.metisMenu.js"></script>
<script src="assets/js/custom.js"></script>
<script src="diyUpload/js/webuploader.html5only.min.js"></script>
<script src="diyUpload/js/diyUpload.js"></script>
<script type="text/javascript">
/*
* 服务器地址,成功返回,失败返回参数格式依照jquery.ajax习惯;
* 其他参数同WebUploader
*/
$('#test').diyUpload({
url:'server/fileupload.php',
success:function( data ) {
console.info( data );
},
error:function( err ) {
console.info( err );
}
});
</script>
</body>
</html>
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 许可协议。转载请注明出处!