<?php require_once 'base.php';?>
<?php
// 连接数据库
require_once 'dbconfig.php';
$id = $_REQUEST ['id'];
$query = "select * from myproduct where id=$id";
$result = mysql_query ( $query );
$row = mysql_fetch_array ( $result );
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>产品详情</title>
<style type="text/css">
div img:hover{
transform: scale(1.7);
-webkit-transform: scale(1.7);
}
</style>
</head>
<body>
<div id="page-wrapper">
<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>
</ul>
</div>
</nav>
<form action="editmyproductdo.php" method='post'>
<input type='hidden' name='id' value='<?=$row ['id']?>' />
<div class="form-group">
<h3>产品图片</h3><br/>
<img alt="主图" class="img-thumbnail" style=' 200px; height: 200px;' src ="<?php echo 'upload/' . $row['name']; ?>" />
<img alt="图1" class="img-thumbnail" style=' 200px; height: 200px;' src ="<?php echo 'upload/' . $row['name1']; ?>" />
<img alt="图2" class="img-thumbnail" style=' 200px; height: 200px;' src ="<?php echo 'upload/' . $row['name2']; ?>" />
<img alt="图3" class="img-thumbnail" style=' 200px; height: 200px;' src ="<?php echo 'upload/' . $row['name3']; ?>" />
<img alt="图4" class="img-thumbnail" style=' 200px; height: 200px;' src ="<?php echo 'upload/' . $row['name4']; ?>" />
<img alt="图5" class="img-thumbnail" style=' 200px; height: 200px;' src ="<?php echo 'upload/' . $row['name5']; ?>" />
</div>
<div class="panel panel-primary" id="BasicSituation">
<div class="panel-heading">基本情况</div>
<table class="table">
<th>型号</th><th>版本号 </th><th>产品类别</th><th>产品容量</th><th>输入总功率</th><th>输出总功率</th>
<tr><td><?php echo $row ['name6'] ?></td><td><?php echo $row ['name7'] ?></td><td><?php echo $row ['name8'] ?></td><td><?php echo $row ['name16']*$row ['name17'] ?></td><td><?php echo $row ['name18'] ?></td><td><?php echo $row ['name24'] ?></td></tr>
</table>
</div>
<div class="panel panel-primary" id="AppearanceParameter">
<div class="panel-heading">外观参数</div>
<table class="table">
<th>外观尺寸</th><th>产品重量 </th><th>外壳材料</th>
<tr><td><?php echo $row ['name9'] ?></td><td><?php echo $row ['name10'] ?></td><td><?php echo $row ['name11'] ?></td></tr>
</table>
</div>
<div class="panel panel-primary" id="CellParameters">
<div class="panel-heading">电芯参数</div>
<table class="table">
<th>电芯类型</th><th>电芯材料 </th><th>循环次数</th><th>电芯型号</th><th>个数</th><th>电芯容量</th>
<tr><td><?php echo $row ['name12'] ?></td><td><?php echo $row ['name13'] ?></td><td><?php echo $row ['name14'] ?></td>
<td><?php echo $row ['name15'] ?></td><td><?php echo $row ['name16'] ?></td><td><?php echo $row ['name17'] ?></td></tr>
</table>
</div>
<div class="panel panel-primary" id="CircuitParameters">
<div class="panel-heading">电路参数</div>
<table class="table">
<th>总输入功率</th><th>输入电路方案 </th><th>输入a</th><th>输入b</th><th>输入c</th><th>输入d</th>
<th>总输出功率</th><th>输出电路方案</th><th>输出a</th><th>输出b</th><th>输出c</th><th>输出d</th>
<tr><td><?php echo $row ['name18'] ?></td><td><?php echo $row ['name19'] ?></td><td><?php echo $row ['name20'] ?></td>
<td><?php echo $row ['name21'] ?></td><td><?php echo $row ['name22'] ?></td><td><?php echo $row ['name23'] ?></td>
<td><?php echo $row ['name24'] ?></td><td><?php echo $row ['name25'] ?></td><td><?php echo $row ['name26'] ?></td>
<td><?php echo $row ['name27'] ?></td><td><?php echo $row ['name28'] ?></td><td><?php echo $row ['name29'] ?></td></tr>
</table>
</div>
</form>
</div>
<script src="assets/js/bootstrap.min.js"></script>
</body>
</html>