<?php require_once 'include.php'; $id = $_REQUEST['id']; $proInfo = getProById($id); $proImgs = getAllImgByProId($id); print_r($proImgs); ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>商品介绍</title> <link type="text/css" rel="stylesheet" href="styles/reset.css"> <link type="text/css" rel="stylesheet" href="styles/main.css"> <link type="text/css" rel="stylesheet" media="all" href="styles/jquery.jqzoom.css"/> <script src="scripts/jquery-1.6.js" type="text/javascript"></script> <script src="scripts/jquery.jqzoom-core.js" type="text/javascript"></script> <!--[if IE 6]> <script type="text/javascript" src="js/DD_belatedPNG_0.0.8a-min.js"></script> <script type="text/javascript" src="js/ie6Fixpng.js"></script> <![endif]--> <script type="text/javascript"> $(document).ready(function() { $('.jqzoom').jqzoom({ zoomType: 'standard', lens:true, preloadImages: false, alwaysOn:false, title:false, zoomWidth:410,
function delPro($id) { $where = "id={$id}"; $res = delete("imooc_pro", $where); $proImgs = getAllImgByProId($id); if ($proImgs && is_array($proImgs)) { foreach ($proImgs as $proImg) { if (file_exists("uploads/" . $proImg['albumPath'])) { unlink("uploads/" . $proImg['albumPath']); } if (file_exists("../image_50/" . $proImg['albumPath'])) { unlink("../image_50/" . $proImg['albumPath']); } if (file_exists("../image_220/" . $proImg['albumPath'])) { unlink("../image_220/" . $proImg['albumPath']); } if (file_exists("../image_350/" . $proImg['albumPath'])) { unlink("../image_350/" . $proImg['albumPath']); } if (file_exists("../image_800/" . $proImg['albumPath'])) { unlink("../image_800/" . $proImg['albumPath']); } } } $where1 = "pid={$id}"; $res1 = delete("imooc_album", $where1); if ($res && $res1) { $mes = "删除成功!<br/><a href='listPro.php' target='mainFrame'>查看商品列表</a>"; } else { $mes = "删除失败!<br/><a href='listPro.php' target='mainFrame'>重新删除</a>"; } return $mes; }
echo $row['mPrice']; ?> </td> </tr> <tr> <td width="20%" align="right">幕课网价格</td> <td><?php echo $row['iPrice']; ?> </td> </tr> <tr> <td width="20%" align="right">商品图片</td> <td> <?php $proImgs = getAllImgByProId($row['id']); foreach ($proImgs as $img) { ?> <img width="100" height="100" src="uploads/<?php echo $img['albumPath']; ?> " alt=""/> <?php } ?> </td> </tr> <tr> <td width="20%" align="right">是否上架</td> <td> <?php