前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >增加产品

增加产品

作者头像
达达前端
发布2019-07-03 14:27:37
1.2K0
发布2019-07-03 14:27:37
举报
文章被收录于专栏:达达前端
代码语言:javascript
复制
<?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>
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019.04.01 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
数据库
云数据库为企业提供了完善的关系型数据库、非关系型数据库、分析型数据库和数据库生态工具。您可以通过产品选择和组合搭建,轻松实现高可靠、高可用性、高性能等数据库需求。云数据库服务也可大幅减少您的运维工作量,更专注于业务发展,让企业一站式享受数据上云及分布式架构的技术红利!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档