暂时只实现了查询功能 这几天现实有事 抽时间补上后台增加 修改 功能 和 用户管理
代码
DB.PHP:
<?php
//命名空间
namespace mvc;
//创建类
class Db{
//配置数据库信息
private $db = [
'type' => 'mysql',
'host' => '127.0.0.1',
'dbname' => 'php1212',
'username' => 'php1212',
'password' => 'php1212',
];
public static $pdo;
//构造方法
private function __construct(...$params)
{
$dsn = $this->db['type'] . ':host=' .$this->db['host'] . ';dbname=' . $this->db['dbname'];
$username = $this->db['username'];
$password = $this->db['password'];
try{
self::$pdo = new \PDO($dsn,$username,$password);
// echo '测试连接成功';
}catch (\PDOException $e){
die('数据库失败 错误信息:' . $e->getMessage());
}
}
//单例模式判断重复连接
public static function connect(...$params){
//判断是否已经实例化
if (is_null(self::$pdo)){
new self(...$params);
}
return self::$pdo;
}
//禁止外部克隆方法
private function __clone()
{
// ****
}
// //新增,更新,删除数据库操作
// public static function exec($sql){
// $stmt = self::$pdo->prepare($sql);
// $stmt->execute();
// }
//获取单条数据
public static function fetch($sql){
$stmt = self::$pdo->prepare($sql);
$stmt->execute();
return $stmt->fetch(\PDO::FETCH_ASSOC);
}
//获取多条数据
public static function fetchAll($sql){
$stmt = self::$pdo->prepare($sql);
$stmt->execute();
return $stmt->fetchAll(\PDO::FETCH_ASSOC);
}
}
//new Db();
Model.php:
<?php
//命名空间
namespace mvc;
//引入Db文件
require __DIR__ . '/Db.php';
class Model{
public $data;
// 构造方法 连接数据库
public function __construct()
{
Db::connect();
}
//获取多条数据
public function getAll($from){
$sql = "SELECT * FROM {$from}";
$this->data = Db::fetchAll($sql);
return $this->data;
}
//获取指定行数数据
public function getLimit($from,$limit){
$sql = "SELECT * FROM {$from} LIMIT {$limit}";
$this->data = Db::fetchAll($sql);
return $this->data;
}
//获取单条数据
public function get($from,$id){
$sql = "SELECT * FROM {$from} WHERE id= {$id}";
$this->data = Db::fetch($sql);
return $this->data;
}
}
view.php:
<?php
namespace mvc;
class View{
//获取多条数据
public function fetch($data){
return $data;
}
//获取单条数据
public function find($data){
return $data;
}
}
Container.php:
<?php
namespace mvc;
require __DIR__ . '/Model.php';
require __DIR__ . '/View.php';
//创建服务容器
class Container{
public $int = [];
public function bind($alias,\Closure $process){
$this->int[$alias] = $process;
}
public function make($alias, $params = []){
return call_user_func_array($this->int[$alias],$params);
}
}
$container = new Container();
$container->bind('model',function (){
return new Model();
});
$container->bind('view',function (){
return new View();
});
//门面模式
class Facade{
//接受实例化容器
protected static $container;
//绑定数据
protected static $data;
protected static $id;
public static function initialize(Container $container){
static::$container = $container;
}
//查询多条数据
public static function getAll($from){
static::$data = static::$container->make('model')->getAll($from);
}
//查询多条指定行数数据
public static function getLimit($from,$limit){
static::$data = static::$container->make('model')->getLimit($from,$limit);
}
//查询单条数据
public static function get($from,$id){
static::$id = static::$container->make('model')->get($from,$id);
}
public static function fetch(){
return static::$container->make('view')->fetch(static::$data);
}
public static function find(){
return static::$container->make('view')->find(static::$id);
}
}
//创建控制器
class Controller{
public function __construct(Container $container)
{
Facade::initialize($container);
}
//多条数据config全部文章
public function getAll($from){
Facade::getAll($from);
return Facade::fetch();
}
//指定行数文章数据表
public function getLimit($from,$limit){
Facade::getLimit($from,$limit);
return Facade::fetch();
}
//调用单条文章数据
public function get($from,$id)
{
//获取数据
Facade::get($from,$id);
//渲染模板
return Facade::find();
}
}
$controller = new Controller($container);
$Articlen = $controller->getLimit('Article',"0,1")[0];
$Articlez = $controller->getLimit('Article',"0,8");
$Articley = $controller->getLimit('Article',"8,8");
$config = $controller->getAll('config')[0];
$Articled = $controller->get('Article',"$_GET[id]");
$imglista1 = $controller->getLimit('image',"0,2");
$imglista2 = $controller->getLimit('image',"2,2");
$imglistb1 = $controller->getLimit('image',"4,2");
$imglistb2 = $controller->getLimit('image',"6,2");
$imglistc1 = $controller->getLimit('image',"8,2");
$imglistc2 = $controller->getLimit('image',"10,2");
$imgd = $controller->get('image',"$_GET[id]");
$shoplist1 = $controller->getLimit('shop',"0,4");
$shoplist2 = $controller->getLimit('shop',"4,4");
$shopd = $controller->get('shop',"$_GET[id]");
index.php:
<?php
require __DIR__ . '/centre/Container.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>首页-<?php echo $config['name']; ?></title>
<meta name="keywords" content="<?php echo $config['keyword']; ?>">
<meta name="description" content="<?php echo $config['describe']; ?>">
<!-- <link rel="stylesheet" href="static/css/reset.css">-->
<link rel="stylesheet" href="static/font/iconfont.css">
<link rel="stylesheet" href="static/css/index.css">
</head>
<body>
<!--公共顶部导航区-->
<header>
<a href="">网站首页</a>
<a href="">专题</a>
<a href="">网站导航</a>
<a href="">二手商品</a>
<a href="">讨论区</a>
<span><a href=""><i class="iconfont icon-huiyuan2"></i>登陆</a><a href="">免费注册</a></span>
</header>
<!--logo+搜索框+快捷入口区-->
<div class="logo">
<img src="static/images/logo.png" alt="">
<label>
<input type="search">
<a href="" class="iconfont icon-jinduchaxun"></a>
</label>
<span>
<a href="" class="iconfont icon-huiyuan1"></a>
<a href="" class="iconfont icon-danmu"></a>
<a href="" class="iconfont icon-duoxuankuang"></a>
<a href="" class="iconfont icon-jishufuwu"></a>
<a href="" class="iconfont icon-peiwangyindao"></a>
<a href="" class="iconfont icon-wenjianjia"></a>
<a href="" class="iconfont icon-huiyuan1"></a>
</span>
</div>
<!--主导航区-->
<nav>
<div>
<span class="iconfont icon-gongdan"></span>
<span>资讯 <br> 看学</span>
<a href="">器材</a>
<a href="">大师</a>
<a href="">学院</a>
<a href="">影赛</a>
<a href="">器材</a>
<a href="">大师</a>
<a href="">学院</a>
<a href="">影赛</a>
</div>
<div>
<span class="iconfont icon-renwujincheng"></span>
<span>资讯 <br> 看学</span>
<a href="">器材</a>
<a href="">大师</a>
<a href="">学院</a>
<a href="">影赛</a>
<a href="">器材</a>
<a href="">大师</a>
<a href="">学院</a>
<a href="">影赛</a>
</div>
<div>
<span class="iconfont icon-gongdan"></span>
<span>资讯 <br> 看学</span>
<a href="">器材</a>
<a href="">大师</a>
<a href="">学院</a>
<a href="">影赛</a>
<a href="">器材</a>
<a href="">大师</a>
<a href="">学院</a>
<a href="">影赛</a>
</div>
<div>
<span class="iconfont icon-DOC"></span>
<span>资讯 <br> 看学</span>
<a href="">器材</a>
<a href="">大师</a>
<a href="">学院</a>
<a href="">影赛</a>
<a href="">器材</a>
<a href="">大师</a>
<a href="">学院</a>
<a href="">影赛</a>
</div>
</nav>
<!--轮播图-->
<div class="slider">
<img src="static/images/1.jpg" alt="">
<img src="static/images/banner-right.jpg" alt="">
</div>
<!--新闻资讯区-->
<div class="news">
<div class="title">
<a>新闻资讯</a>
<a href="">更多</a>
</div>
<div class="content">
<div class="pic">
<a href=""><img src="static/images/news.jpg" alt="" class="first-img"></a>
<a href=""><img src="static/images/n-2.jpg" alt=""></a>
<a href=""><img src="static/images/n-3.jpg" alt=""></a>
<a href="">三星Note10/10+发布 <br> 搭载挖孔前摄</a>
<a href="">小米公布6400万 <br> 和1亿像素手机信息</a>
</div>
<div class="list">
<a href="">[new]<?php echo $Articlen['title']; ?></a>
<ul>
<?php
//循环数组
foreach ($Articlez as $v) {
echo "<li><span>[新闻]</span><a href='article.php?id=$v[id]'>" . $v['title'] . "</a></li>";
}
?>
</ul>
</div>
<div class="list">
<a href="">[new]<?php echo $Articlen['title']; ?></a>
<ul>
<?php
//循环数组
foreach ($Articley as $v) {
echo "<li><span>[新闻]</span><a href='article.php?id=$v[id]'>" . $v['title'] . "</a></li>";
}
?>
</ul>
</div>
</div>
</div>
<!--图片专区-->
<div class="title">
<span>图片专区</span>
</div>
<div class="picture">
<div>
<div>
<a href="">壁纸</a>
<span>纵观摄影艺术</span>
</div>
<?php
foreach ($imglista1 as $v) {
echo "<a href='image-content.php?id=$v[id]'><img src='$v[cover]' alt='' width='162' height='122'></a>";
}
?>
<?php
foreach ($imglista1 as $v) {
echo "<a href='image-content.php?id=$v[id]'><span>$v[title]</span></a>";
}
?>
<?php
foreach ($imglista2 as $v) {
echo "<a href='image-content.php?id=$v[id]'><img src='$v[cover]' alt='' width='162' height='122'></a>";
}
?>
<?php
foreach ($imglista2 as $v) {
echo "<a href='image-content.php?id=$v[id]'><span>$v[title]</span></a>";
}
?>
</div>
<div>
<div>
<a href="">壁纸</a>
<span>纵观摄影艺术</span>
</div>
<?php
foreach ($imglistb1 as $v) {
echo "<a href='image-content.php?id=$v[id]'><img src='$v[cover]' alt='' width='162' height='122'></a>";
}
?>
<?php
foreach ($imglistb1 as $v) {
echo "<a href='image-content.php?id=$v[id]'><span>$v[title]</span></a>";
}
?>
<?php
foreach ($imglistb2 as $v) {
echo "<a href='image-content.php?id=$v[id]'><img src='$v[cover]' alt='' width='162' height='122'></a>";
}
?>
<?php
foreach ($imglistb2 as $v) {
echo "<a href='image-content.php?id=$v[id]'><span>$v[title]</span></a>";
}
?>
</div>
<div>
<div>
<a href="">壁纸</a>
<span>纵观摄影艺术</span>
</div>
<?php
foreach ($imglistc1 as $v) {
echo "<a href='image-content.php?id=$v[id]'><img src='$v[cover]' alt='' width='162' height='122'></a>";
}
?>
<?php
foreach ($imglistc1 as $v) {
echo "<a href='image-content.php?id=$v[id]'><span>$v[title]</span></a>";
}
?>
<?php
foreach ($imglistc2 as $v) {
echo "<a href='image-content.php?id=$v[id]'><img src='$v[cover]' alt='' width='162' height='122'></a>";
}
?>
<?php
foreach ($imglistc2 as $v) {
echo "<a href='image-content.php?id=$v[id]'><span>$v[title]</span></a>";
}
?>
</div>
</div>
<!--二手交易专区-->
<div class="title">
<span>二手交易</span>
</div>
<div class="second-hand">
<div>
<a href="">抢好货</a>
<span>0低价, 便捷,安全,快速</span>
</div>
<div>
<span>热门分类</span>
<a href="">美女写真</a>
<a href="">日本美女</a>
<a href="">美国美女</a>
<a href="">国内美女</a>
<a href="">AV美女</a>
</div>
<?php
foreach ($shoplist1 as $v) {
echo "<a href='shop-content.php?id=$v[id]'><img src='$v[cover]' alt='' width='176' height='120'></a>";
}
?>
<?php
foreach ($shoplist1 as $v) {
echo "<div class='detail'>
<a href=''>$v[title]</a>
<div>
<a href=''><span>¥ $v[price]</span><span>$v[classification]</span></a>
</div>
</div>";
}
?>
<?php
foreach ($shoplist2 as $v) {
echo "<a href='shop-content.php?id=$v[id]'><img src='$v[cover]' alt='' width='176' height='120'></a>";
}
?>
<?php
foreach ($shoplist2 as $v) {
echo "<div class='detail'>
<a href=''>$v[title]</a>
<div>
<a href=''><span>¥ $v[price]</span><span>$v[classification]</span></a>
</div>
</div>";
}
?>
<div>
<a href=""><img src="static/images/ad/1.png" alt="" width="180" height="112"></a>
<a href=""><img src="static/images/ad/2.png" alt="" width="180" height="112"></a>
<a href=""><img src="static/images/ad/3.png" alt="" width="180" height="112"></a>
<a href=""><img src="static/images/ad/4.png" alt="" width="180" height="112"></a>
<a href=""><img src="static/images/ad/image.png" alt="" width="393" height="56"></a>
<a href=""><img src="static/images/ad/ad2.jpg" alt="" width="393" height="56"></a>
</div>
</div>
<!--合作网站-->
<div class="title" style="background:#fff">
<span>合作网站</span>
</div>
<div class="my-links">
<a href="https://www.php.cn">php中文网</a>
<a href="https://www.html.cn">html中文网</a>
<a href="https://www.py.cn">python中文网</a>
<a href="https://www.php.cn">php中文网</a>
<a href="https://www.html.cn">html中文网</a>
<a href="https://www.py.cn">python中文网</a>
<a href="https://www.php.cn">php中文网</a>
<a href="https://www.html.cn">html中文网</a>
<a href="https://www.py.cn">python中文网</a>
<a href="https://www.php.cn">php中文网</a>
<a href="https://www.html.cn">html中文网</a>
<a href="https://www.py.cn">python中文网</a>
<a href="https://www.py.cn">python中文网</a>
<a href="https://www.php.cn">php中文网</a>
<a href="https://www.html.cn">html中文网</a>
<a href="https://www.py.cn">python中文网</a>
<a href="https://www.php.cn">php中文网</a>
<a href="https://www.html.cn">html中文网</a>
<a href="https://www.py.cn">python中文网</a>
<a href="https://www.php.cn">php中文网</a>
<a href="https://www.html.cn">html中文网</a>
<a href="https://www.py.cn">python中文网</a>
<a href="https://www.php.cn">php中文网</a>
<a href="https://www.html.cn">html中文网</a>
<a href="https://www.py.cn">python中文网</a>
<a href="https://www.py.cn">python中文网</a>
</div>
<!--页底部-->
<footer>
<div>
<a href="">简介</a>
<a href="">联系我们</a>
<a href="">招聘信息</a>
<a href="">友情链接</a>
<a href="">用户服务协议</a>
<a href="">隐私权声明</a>
<a href="">法律投诉声明</a>
</div>
<div><span>LOGO</span></div>
<div>
<p>2019 fengniao.com. All rights reserved . 安徽闹着玩有限公司(无聊网)版权所有</p>
<p>皖ICP证150110号 京ICP备14323013号-2 皖公网安备110108024357788号</p>
<p>违法和不良信息举报电话: 0551-1234567 举报邮箱: admin@baidu.com</p>
</div>
<div>
<p>关注公众号</p>
<img src="static/images/erwei-code.png" alt="">
</div>
</footer>
</body>
</html>
article.php:
<?php
require __DIR__ . '/centre/Container.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php echo $Articled['title']; ?>-<?php echo $config['name']; ?></title>
<meta name="keywords" content="<?php echo $Articled['keyword']; ?>">
<meta name="description" content="<?php echo $Articled['describe']; ?>">
<link rel="stylesheet" href="static/font/iconfont.css">
<link rel="stylesheet" href="static/css/article.css">
</head>
<body>
<!--公共顶部导航区-->
<header>
<a href="">网站首页</a>
<a href="">专题</a>
<a href="">网站导航</a>
<a href="">二手商品</a>
<a href="">讨论区</a>
<span><a href=""><i class="iconfont icon-huiyuan2"></i>登陆</a><a href="">免费注册</a></span>
</header>
<div class="main">
<div class="top">
<img src="static/images/ar-logo.png" alt="">
<a href="">财经</a>><span>正文</span>
<label><input type="search"><span class="iconfont icon-sousuo2"></span></label>
</div>
<!-- 正文-->
<article>
<h1><?php echo $Articled['title']; ?></h1>
<div>
<span>发布时间:<?php echo date('Y-m-s h:i:s',$Articled['time']); ?></span>
<span>来源:转发</span>
<span>阅读量:<?php echo $Articled['browse']; ?></span>
<span>评论数:99+</span>
</div>
<div>
<?php echo $Articled['content']; ?>
</div>
</article>
<!-- 右侧列表-->
<div class="list1">
<h3>网页评论</h3>
<ul>
<li><a href="">惠若琪 |坚持热爱,活成一束光,照亮自己</a></li>
<li><a href="">小米公布6400万像素手机信息 1亿像素新品</a></li>
<li><a href="">富士变焦镜皇 富士16-55 f/2.8售7490元</a></li>
<li><a href="">惠若琪 |坚持热爱,活成一束光,照亮自己</a></li>
<li><a href="">小米公布6400万像素手机信息 1亿像素新品</a></li>
<li><a href="">富士变焦镜皇 富士16-55 f/2.8售7490元</a></li>
</ul>
</div>
<div class="list2">
<h3>网页评论</h3>
<ul>
<li><a href="">惠若琪 |坚持热爱,活成一束光,照亮自己</a></li>
<li><a href="">小米公布6400万像素手机信息 1亿像素新品</a></li>
<li><a href="">富士变焦镜皇 富士16-55 f/2.8售7490元</a></li>
<li><a href="">惠若琪 |坚持热爱,活成一束光,照亮自己</a></li>
<li><a href="">小米公布6400万像素手机信息 1亿像素新品</a></li>
<li><a href="">富士变焦镜皇 富士16-55 f/2.8售7490元</a></li>
</ul>
</div>
<div class="ding">
<span>赞</span>
<span>踩</span>
</div>
<div class="comment">
<h3>网页评论</h3>
<img src="static/images/user.png" alt="" width="60">
<textarea name="" id="" cols="30" rows="10"></textarea>
<button>发表评论</button>
</div>
<div class="recommend">
<h3>推荐阅读</h3>
<a href=""><img src="static/images/img1.jpg" alt="" width="195" height="130"></a>
<a href=""><img src="static/images/img1.jpg" alt="" width="195" height="130"></a>
<a href=""><img src="static/images/img1.jpg" alt="" width="195" height="130"></a>
<a href=""><img src="static/images/img1.jpg" alt="" width="195" height="130"></a>
<a href="">惠若琪 |坚持热爱,活成一束光,照亮自己,成就更好的他</a>
<a href="">惠若琪 |坚持热爱,活成一束光,照亮自己,成就更好的他</a>
<a href="">惠若琪 |坚持热爱,活成一束光,照亮自己,成就更好的他</a>
<a href="">惠若琪 |坚持热爱,活成一束光,照亮自己,成就更好的他</a>
<a href=""><img src="static/images/img1.jpg" alt="" width="195" height="130"></a>
<a href=""><img src="static/images/img1.jpg" alt="" width="195" height="130"></a>
<a href=""><img src="static/images/img1.jpg" alt="" width="195" height="130"></a>
<a href=""><img src="static/images/img1.jpg" alt="" width="195" height="130"></a>
<a href="">惠若琪 |坚持热爱,活成一束光,照亮自己,成就更好的他</a>
<a href="">惠若琪 |坚持热爱,活成一束光,照亮自己,成就更好的他</a>
<a href="">惠若琪 |坚持热爱,活成一束光,照亮自己,成就更好的他</a>
<a href="">惠若琪 |坚持热爱,活成一束光,照亮自己,成就更好的他</a>
</div>
</div>
<!--页底部-->
<footer>
<div>
<a href="">简介</a>
<a href="">联系我们</a>
<a href="">招聘信息</a>
<a href="">友情链接</a>
<a href="">用户服务协议</a>
<a href="">隐私权声明</a>
<a href="">法律投诉声明</a>
</div>
<div><span>LOGO</span></div>
<div>
<p>2019 fengniao.com. All rights reserved . 安徽闹着玩有限公司(无聊网)版权所有</p>
<p>皖ICP证150110号 京ICP备14323013号-2 皖公网安备110108024357788号</p>
<p>违法和不良信息举报电话: 0551-1234567 举报邮箱: admin@baidu.com</p>
</div>
<div>
<p>关注公众号</p>
<img src="static/images/erwei-code.png" alt="">
</div>
</footer>
</body>
</html>
image-content.php:
<?php
require __DIR__ . '/centre/Container.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php echo $imgd['title']; ?>-<?php echo $config['name']; ?></title>
<meta name="keywords" content="<?php echo $imgd['keyword']; ?>">
<meta name="description" content="<?php echo $imgd['describe']; ?>">
<link rel="stylesheet" href="static/font/iconfont.css">
<link rel="stylesheet" href="static/css/image-content.css">
</head>
<body>
<!--公共顶部导航区-->
<header>
<a href="">网站首页</a>
<a href="">专题</a>
<a href="">网站导航</a>
<a href="">二手商品</a>
<a href="">讨论区</a>
<span><a href=""><i class="iconfont icon-huiyuan2"></i>登陆</a><a href="">免费注册</a></span>
</header>
<div class="top">
<h2>PHP中文网<span>图片站</span></h2>
<label>
<input type="search">
<a href="" class="iconfont icon-jinduchaxun"></a>
</label>
</div>
<div class="main">
<div class="slider">
<h2><?php echo $imgd['title']; ?></h2>
<div class="show">
<img src="<?php echo $imgd['content']; ?>" alt="" height="300">
</div>
</div>
<!--评论复制文章详情页代码-->
<div class="comment">
<h3>网页评论</h3>
<img src="static/images/user.png" alt="" width="60">
<textarea name="" id="" cols="30" rows="10"></textarea>
<button>发表评论</button>
</div>
<!-- 回复复制商城详情页-->
<!-- 最新评论-->
<div class="reply">
<h3>最新评论</h3>
<div>
<img src="static/images/user.png" alt="" width="60" height="60">
<span>用户昵称</span>
<span>留言内容</span>
<div>
<span>2019-12-12 15:34:23发表</span>
<span><i class="iconfont icon-dianzan"></i>回复</span>
</div>
</div>
<div>
<img src="static/images/user.png" alt="" width="60" height="60">
<span>用户昵称</span>
<span>留言内容</span>
<div>
<span>2019-12-12 15:34:23发表</span>
<span><i class="iconfont icon-dianzan"></i>回复</span>
</div>
</div>
<div>
<img src="static/images/user.png" alt="" width="60" height="60">
<span>用户昵称</span>
<span>留言内容</span>
<div>
<span>2019-12-12 15:34:23发表</span>
<span><i class="iconfont icon-dianzan"></i>回复</span>
</div>
</div>
<div>
<img src="static/images/user.png" alt="" width="60" height="60">
<span>用户昵称</span>
<span>留言内容</span>
<div>
<span>2019-12-12 15:34:23发表</span>
<span><i class="iconfont icon-dianzan"></i>回复</span>
</div>
</div>
</div>
</div>
<!--页底部-->
<footer>
<div>
<a href="">简介</a>
<a href="">联系我们</a>
<a href="">招聘信息</a>
<a href="">友情链接</a>
<a href="">用户服务协议</a>
<a href="">隐私权声明</a>
<a href="">法律投诉声明</a>
</div>
<div><span>LOGO</span></div>
<div>
<p>2019 fengniao.com. All rights reserved . 安徽闹着玩有限公司(无聊网)版权所有</p>
<p>皖ICP证150110号 京ICP备14323013号-2 皖公网安备110108024357788号</p>
<p>违法和不良信息举报电话: 0551-1234567 举报邮箱: admin@baidu.com</p>
</div>
<div>
<p>关注公众号</p>
<img src="static/images/erwei-code.png" alt="">
</div>
</footer>
</body>
</html>
shop-content.php:
<?php
require __DIR__ . '/centre/Container.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php echo $shopd['title']; ?>-<?php echo $config['name']; ?></title>
<meta name="keywords" content="<?php echo $shopd['keyword']; ?>">
<meta name="description" content="<?php echo $shopd['describe']; ?>">
<link rel="stylesheet" href="static/font/iconfont.css">
<link rel="stylesheet" href="static/css/shop-content.css">
</head>
<body>
<!--公共顶部导航区-->
<header>
<a href="">网站首页</a>
<a href="">专题</a>
<a href="">网站导航</a>
<a href="">二手商品</a>
<a href="">讨论区</a>
<span><a href=""><i class="iconfont icon-huiyuan2"></i>登陆</a><a href="">免费注册</a></span>
</header>
<!--logo+搜索框+快捷入口区-->
<div class="logo">
<img src="static/images/logo.png" alt="">
<input type="search" id="search"><label for="search">搜索</label>
<a href="">免费入驻</a>
</div>
<main>
<!--导航-->
<nav>
<h3>所有产品分类 <span class="iconfont icon-liebiao"></span></h3>
<a href="" class="active">首页</a>
<a href="">3C</a>
<a href="">生活用品</a>
<a href="">名字名画</a>
</nav>
<!-- 商品展示-->
<div class="goods">
<div class="top-nav">
<a href="">首页</a>->>
<a href="">3C数码</a>->>
<a href="">笔记本电脑</a>->>
</div>
<img src="<?php echo $shopd['cover']; ?>" alt="">
<h2><?php echo $shopd['title']; ?></h2>
<p>本站特惠: <span>¥<?php echo $shopd['price']; ?></span></p>
<p>
销量: <span><?php echo $shopd['sales']; ?></span> |
累积评价: <span>3</span> |
好评率: <span>199%</span>
</p>
<p>
<label for="num">购买数量:</label><input type="number" id="num" value="1">
</p>
<div>
<button>立即购买</button>
<button><i class="iconfont icon-icon_tianjia"></i>加入购物车</button>
</div>
<div>
<span><i class="iconfont icon-zhanghaoquanxianguanli"></i>本站保障</span>
<span><i class="iconfont icon-icon_safety"></i>企业认证</span>
<span><i class="iconfont icon-tianshenpi"></i>退款承诺</span>
<span><i class="iconfont icon-kuaisubianpai"></i>免费换货</span>
</div>
</div>
<!-- 商品详情-->
<div class="detail">
<aside>
<div><span>商品详情</span><span>案例演示</span></div>
<div>
<a href=""><img src="static/images/shop/shop1.jpg" alt=""></a>
<a href="">美女美女性感写真海报墙面贴画艺</a>
<div><span>热销:11</span><span>¥1299.00</span></div>
</div>
<div>
<a href=""><img src="static/images/shop/shop2.jpg" alt=""></a>
<a href="">美女美女性感写真海报墙面贴画艺</a>
<div><span>热销:11</span><span>¥1299.00</span></div>
</div>
<div>
<a href=""><img src="static/images/shop/shop2.jpg"></a>
<a href="">美女美女性感写真海报墙面贴画艺</a>
<div><span>热销:11</span><span>¥1299.00</span></div>
</div>
<div>
<a href=""><img src="static/images/shop/shop4.jpg" alt=""></a>
<a href="">美女美女性感写真海报墙面贴画艺</a>
<div><span>热销:11</span><span>¥1299.00</span></div>
</div>
<div>
<a href=""><img src="static/images/shop/shop5.jpg" alt=""></a>
<a href="">美女美女性感写真海报墙面贴画艺</a>
<div><span>热销:11</span><span>¥1299.00</span></div>
</div>
</aside>
<article>
<div class="nav">
<a href="">商品详情</a>
<a href="">案例/演示</a>
<a href="">常见问题</a>
<a href="">累计评价</a>
<a href="">产品咨询</a>
</div>
<?php echo $shopd['content']; ?>
<div class="comment">
<h3>网页评论</h3>
<img src="static/images/user.png" alt="" width="60">
<textarea name="" id="" cols="30" rows="10"></textarea>
<button>发表评论</button>
</div>
<!-- 最新评论-->
<div>
<h3>最新评论</h3>
<div>
<img src="static/images/user.png" alt="" width="60" height="60">
<span>用户昵称</span>
<span>留言内容</span>
<div>
<span>2019-12-12 15:34:23发表</span>
<span><i class="iconfont icon-dianzan"></i>回复</span>
</div>
</div>
<div>
<img src="static/images/user.png" alt="" width="60" height="60">
<span>用户昵称</span>
<span>留言内容</span>
<div>
<span>2019-12-12 15:34:23发表</span>
<span><i class="iconfont icon-dianzan"></i>回复</span>
</div>
</div>
<div>
<img src="static/images/user.png" alt="" width="60" height="60">
<span>用户昵称</span>
<span>留言内容</span>
<div>
<span>2019-12-12 15:34:23发表</span>
<span><i class="iconfont icon-dianzan"></i>回复</span>
</div>
</div>
<div>
<img src="static/images/user.png" alt="" width="60" height="60">
<span>用户昵称</span>
<span>留言内容</span>
<div>
<span>2019-12-12 15:34:23发表</span>
<span><i class="iconfont icon-dianzan"></i>回复</span>
</div>
</div>
</div>
</article>
</div>
</main>
<!--页底部-->
<footer>
<div>
<a href="">简介</a>
<a href="">联系我们</a>
<a href="">招聘信息</a>
<a href="">友情链接</a>
<a href="">用户服务协议</a>
<a href="">隐私权声明</a>
<a href="">法律投诉声明</a>
</div>
<div><span>LOGO</span></div>
<div>
<p>2019 fengniao.com. All rights reserved . 安徽闹着玩有限公司(无聊网)版权所有</p>
<p>皖ICP证150110号 京ICP备14323013号-2 皖公网安备110108024357788号</p>
<p>违法和不良信息举报电话: 0551-1234567 举报邮箱: admin@baidu.com</p>
</div>
<div>
<p>关注公众号</p>
<img src="static/images/erwei-code.png" alt="">
</div>
</footer>
</body>
</html>