"; $var_Mingcheng=""; $var_Guan_商品店首页的php代码是什么">
赞
踩
<?php require "conn.php"; //获取网站标题等信息 $sql_xg="select * from web_key where id=1"; $jieguo_xg=mysqli_query($conn,$sql_xg); if(!$jieguo_xg){ die("不能获取数据"); } //echo "<hr>"; $var_Mingcheng=""; $var_Guanjianzi=""; $var_Miaoshu=""; while ($row_xg=mysqli_fetch_array($jieguo_xg,MYSQLI_ASSOC)){ //echo "{$row["id"]}"."{$row["cn"]}"."{$row["en"]}"."<br>"; $var_Mingcheng=$row_xg["Mingcheng"]; $var_Guanjianzi=$row_xg["Guanjianzi"]; $var_Miaoshu=$row_xg["Miaoshu"]; } //广告数据 $sql_ad="select * from guanggao where id=1"; $jieguo_ad=mysqli_query($conn,$sql_ad); if(!$jieguo_ad){ die("不能获取数据"); } while ($row_ad=mysqli_fetch_array($jieguo_ad,MYSQLI_ASSOC)){ //echo "{$row["id"]}"."{$row["cn"]}"."{$row["en"]}"."<br>"; $wz1=$row_ad["wz1"]; $tpdz1=$row_ad["tpdz1"]; $ljdz1=$row_ad["ljdz1"]; $wz2=$row_ad["wz2"]; $tpdz2=$row_ad["tpdz2"]; $ljdz2=$row_ad["ljdz2"]; $wz3=$row_ad["wz3"]; $tpdz3=$row_ad["tpdz3"]; $ljdz3=$row_ad["ljdz3"]; $wz4=$row_ad["wz4"]; $tpdz4=$row_ad["tpdz4"]; $ljdz4=$row_ad["ljdz4"]; } ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title><?php echo $var_Mingcheng ?></title> <meta name="keywords" content="<?php echo $var_Guanjianzi ?>" /> <meta name="description" content="<?php echo $var_Miaoshu ?>" /> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <link rel="stylesheet" href="css/shouye.css"> <link rel="stylesheet" href="css/dibu_caidan.css"> <link rel="stylesheet" type="text/css" href="css2/normalize.css" /> <link rel="stylesheet" type="text/css" href="css2/style.css"> <link rel="stylesheet" type="text/css" href="css2/entypo.css"> </head> <body> <!--查询功能--> <form method="post" action="index_cx.php"> <div class="chaxun"> <input class="chaxun_neirong" name="cx_neirong" type="text" placeholder=" 请输入要查询的内容" /> <button class="chaxun_anniu">查询</button> </div> </form> <!--轮播图片--> <div class='o-sliderContainer' id="pbSliderWrap0" style="margin-top:0;"> <div class='o-slider' id='pbSlider0'> <a href="<?php echo $ljdz1?>" target="_blank"> <div class="o-slider--item" data-image="/up/<?php echo $tpdz1?>"> <div class="o-slider-textWrap"> <h1 class="o-slider-title"><?php echo $wz1?></h1> <span class="a-divider"></span> <!--h2 class="o-slider-subTitle">--限时打折活动开启--</h2--> </div> </div></a> <a href="<?php echo $ljdz2?>" target="_blank"> <div class="o-slider--item" data-image="/up/<?php echo $tpdz2?>"> <div class="o-slider-textWrap"> <h1 class="o-slider-title"><?php echo $wz2?></h1> <span class="a-divider"></span> <span class="a-divider"></span> </div> </div></a> <a href="<?php echo $ljdz3?>" target="_blank"> <div class="o-slider--item" data-image="/up/<?php echo $tpdz3?>"> <div class="o-slider-textWrap"> <h1 class="o-slider-title"><?php echo $wz3?></h1> <span class="a-divider"></span> <span class="a-divider"></span> </div> </div></a> <a href="<?php echo $ljdz4?>" target="_blank"> <div class="o-slider--item" data-image="/up/<?php echo $tpdz4?>"> <div class="o-slider-textWrap"> <h1 class="o-slider-title"><?php echo $wz4?></h1> <span class="a-divider"></span> <span class="a-divider"></span> </div> </div></a> </div> <script src="js2/jquery-1.11.0.min.js" type="text/javascript"></script> <script src='js2/hammer.min.js'></script> <script src='js2/slider.js'></script> <script> $('#pbSlider0').pbTouchSlider({ slider_Wrap: '#pbSliderWrap0', slider_Threshold: 10, slider_Speed:600, slider_Ease:'ease-out', slider_Drag : true, slider_Arrows: { enabled : true }, slider_Dots: { class :'.o-slider-pagination', enabled : true }, slider_Breakpoints: { default: { height: 500 }, tablet: { height: 350, media: 1024 }, smartphone: { height: 250, media: 768 } } }); </script> </div> <!--导航快捷菜单--> <div class="caidan" > <a href="cp_list.php" class="caidan_lianjie"> <img src="img/menu01.png" class="caidan_img" /> <p>所有商品</p> </a> <a href="xinxi_list.php?cs_lxid=237&cs_lxmf=平台介绍" class="caidan_lianjie"> <img src="img/menu02.png" class="caidan_img" /> <p>平台介绍</p> </a> <a href="xinxi_list.php?cs_lxid=236&cs_lxmf=帮助中心" class="caidan_lianjie"> <img src="img/menu03.png" class="caidan_img" /> <p>帮助中心</p> </a> <?php //检查cookie是否已设置 if(isset($_COOKIE['h_name'])){ //登录状态 ?> <a href="u_index.php" class="caidan_lianjie" > <img src="img/menu04.png" class="caidan_img" /> <p>用户中心</p> </a> <?php //echo '登录用户名:' . @$_COOKIE["u_name"]." | 用户id: " . @$_COOKIE["u_id"] . "| 分组id: " . @$_COOKIE["u_fzid"]; } else //没有登录 { ?> <a class="caidan_lianjie" style="cursor: pointer;" onclick=lg('/u_login.php') > <img src="img/menu04.png" class="caidan_img" /> <p>用户中心</p> </a> <?php } ?> <script language="javascript"> function sc(cpid) { //alert(cpid); frame01.location = "/u_shoucang.php?cs_cpid=" + cpid; } function gwc(cpid,cpmc,cpjiage1,cpjiage2) { alert(cpid+" | "+cpmc+" | "+cpjiage1+" | "+cpjiage2); frame01.location = "/gwc_add.php?cs_cpid=" + cpid + "&cs_cpmc=" + cpmc + "&cs_cpjiage1="+ cpjiage1 + "&cs_cpjiage2=" + cpjiage2; } function lg(url) { if (confirm("没有登录,点击确认跳转到登录页面!")) { window.location.href=url; } } </script> </div> <!--最新通知--> <?php $sql="select * from zixun order by id desc limit 3"; $jieguo=mysqli_query($conn,$sql); if(!$jieguo){ die("不能获取数据"); } while ($row=mysqli_fetch_array($jieguo,MYSQLI_ASSOC)) { ?> <div class="tongzhi"> <a href="xinxi_xiangqing.php?cs_xinxi_id=<?php echo $row["id"] ?>" class="tongzhi_lianjie"> <img class="tongzhi_zuo" src="img/news.png" /> <p class="tongzhi_neirong"><?php echo $row["xinxi_biaoti"] ?></p> <img class="tongzhi_you" src="img/right.png" /> </a> </div> <?php } ?> <!--区块标题--> <div class="qukuai"> <p class="qukuai_zuo"></p> <p class="qukuai_zhong">最新上架</p> <a href="cp_list.php" target="_blank" class="qukuai_you"> 更多> </a> </div> <!--最新上架产品--> <div class="cp_zuixin"> <?php $sql="select * from shangpin where zhuangtai_yn=0 and tuijian_yn=0 order by id desc limit 4"; //zhuangtai_yn 0正常 1表示下架 $jieguo=mysqli_query($conn,$sql); if(!$jieguo){ die("不能获取数据"); } while ($row=mysqli_fetch_array($jieguo,MYSQLI_ASSOC)) { ?> <a href="cp_xinxi1.php?cs_id=<?php echo $row["id"] ?>" class="cp_lianjie"> <img src="/up/<?php echo $row["cp_tupian"] ?>" class="cp_img" /> <p class="cp_mc"><?php echo $row["mingcheng"] ?></p> <p class="cp_mc2">¥<?php echo $row["jiage1"] ?></p> </a> <?php } ?> </div> <!--精品推荐--> <div class="qukuai2"> <p class="qukuai_zuo"></p> <p class="qukuai_zhong">精品推荐</p> <a href="cp_list.php" target="_blank" class="qukuai_you"> 更多> </a> </div> <div class="cp2_zuixin"> <?php //tuijian_yn 1表示推荐 0表示普通 $sql="select * from shangpin where zhuangtai_yn=0 and tuijian_yn=1 order by id desc limit 6"; $jieguo=mysqli_query($conn,$sql); if(!$jieguo){ die("不能获取数据"); } while ($row=mysqli_fetch_array($jieguo,MYSQLI_ASSOC)) { ?> <a href="cp_xinxi1.php?cs_id=<?php echo $row["id"] ?>" class="cp2_lianjie"> <img src="/up/<?php echo $row["cp_tupian"] ?>" class="cp2_img" /> <p class="cp2_mc"><?php echo $row["mingcheng"] ?></p> <p class="cp_mc2">¥<?php echo $row["jiage1"] ?></p> </a> <?php } ?> </div> <br><br><br> <!--底部菜单--> <?php include 'dibu_menu.php'; ?> </body> </html>
参考网址:www.pc-365.net
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。