-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduct_show.php
91 lines (73 loc) · 2.42 KB
/
product_show.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
include_once "php/connect.php";
$page="product";
if (isset($_POST["product_id"])){
$product_id=$_POST["product_id"];
}
if (isset($_GET["product_id"])){
$product_id=$_GET["product_id"];
}
//本条产品内容
$sql_hot="SELECT * FROM product WHERE product_id='{$product_id}'";
$result=mysqli_query($link, $sql_hot);
while ($row=mysqli_fetch_assoc($result)){
$show_product_class=$row["product_class"];
$show_product_title=$row["product_name"];
$show_product_img_url=$row["product_img_url"];
$show_product_all=$row["product_all"];
$show_product_addtime=substr($row["product_addtime"],0,20);
//伪静态?
$show_product_url="product_show.php?product_id=".$product_id;
}
//关键词 标题 description
$sql_key="SELECT * FROM page WHERE page_class='{$page}_{$website}'";
$result=mysqli_query($link, $sql_key);
while ($row=mysqli_fetch_assoc($result)){
$page_title=$row["page_title"];
$page_keywords=$row["page_keywords"];
$page_description=$row["page_description"];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php echo $show_product_title;?> - <?php echo $page_title;?></title>
<meta name="keywords" content="<?php echo $page_keywords;?>" />
<meta name="description" content="<?php echo $page_description;?>">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery.slides.min.js"></script>
<script type="text/javascript" src="js/base.js"></script>
</head>
<body>
<!-- header -->
<?php include_once "php/header.php";?>
<!-- header end -->
<!-- banner -->
<?php include_once "php/banner.php";?>
<!-- banner end -->
<div class="content product_content main">
<div class="pc_left"><img src="<?php echo $show_product_img_url;?>"></div>
<div class="pc_right">
<div class="pc_more">
<p class="p_title"><?php echo $show_product_title;?></p>
<p class="p_remark"><?php echo $show_product_all;?></p>
</div>
<div class="con">
</div>
</div>
</div>
<!-- footer -->
<?php include_once "php/footer.php";?>
<!-- footer end -->
<div class="return_top">
<a href="javascript:void(0)" title="回到顶部"></a>
</div>
</body>
</html>
<?php
mysqli_close($link);
?>