<?php
Include ". /library/mfunction.php ";
/************** Select Commodity First class classification **********/
$result =mysql_query ("select * from Goodsone where xian= ' shows ' ORDER BY list desc limit 3");
while ($res = Mysql_fetch_array ($result)) {
$goodsOne []= $res;
}
Echo Mhead ();
?>
<!--head--
<div class= "header header-fixed" >
<div class= "Nesting" > <a href= "JavaScript:;" class= "header-btn header-return" ><span class= "Return-ico "></span></a>
<div class= "Align-content" >
<p class= "Align-text" > XI billion Teng Network Technology Co., Ltd. </p>
</div>
<a href= "#" class= "HEADER-BTN" ></a>
</div>
</div>
<!--//-->
<div class= "Container mui-mbottom60" >
<div class= "Content Mui-ptop45" >
<!--Carousel--
<div id= "Slidebox" class= "Slidebox" >
<div class= "Swiper-wrapper" >
<div class= ' swiper-slide ' >
<a href= ' > ' ></a>
</div>
<div class= ' swiper-slide ' >
<a href= ' > ' ></a>
</div>
<div class= ' swiper-slide ' >
<a href= ' > ' ></a>
</div>
<div class= ' swiper-slide ' >
<a href= ' > ' ></a>
</div>
</div>
<div class= "Swiper-pagination" > </div>
</div>
<!--//-->
</div>
<!--Product List--
<!--product Navigation--
<!---->
<div class= "Product" >
<!--categories--
<div class= "Row Product" >
<?php
Cyclic First class classification
foreach ($goodsOne as $key = = $value) {
?>
<div class= "Key_title" ><?php echo $value [' name '];? ></div>
<ul class= "Product-lists Mui-dis-flex" >
<?php
Cyclic first-class classification products
$result =mysql_query ("SELECT * from goods where goodsoneid= ' $value [id] ' and xian= ' show ' ORDER BY list desc limit 6");
$goods =array ();
while ($res = Mysql_fetch_array ($result))
{
$goods []= $res;
}
foreach ($goods as $k = = $v) {
$goodsSku = Query (' goodssku ', ' goodsid= ' $v [id] ');
?>
<li>
<a href= "<?php echo root;? >m/mgoodsmx.php?goodsid=<?php echo $v [id];? > ">
"/>
<p class= "NAMESPC" ><?php echo $v [' name '];? ></p>
<p class= "Textsale" >
<em class= "Text-price" >¥<?php echo $goodsSku [' price '];? ></em>
<!--<em class= "Text-sale" > Sales:60</em>--
</p>
</a>
</li>
<?php}?>
</ul>
<?php}?>
<!--//-->
</div>
<!--back to top-->
<a href= "javascript:;" title= "Back to Top" id= "GOTOP-BTN" > "/></A>
<!--//-->
</div>
<!--bottom-->
<?php Echo Warn (). Mfooter ();?
<!--//-->
<script>
$ (function () {
/**** navigation bar color ***/
Changenav ();
});
/**** Home Carousel ****/
Window.addeventlistener ("Load", function (e) {
///First-page Carousel map
var swiperobj = new Swiper (' # Slidebox ', {
autoplay:2500,
Autoplaydisableoninteraction:false,
Loop:true,
Pagination: '. Swiper-pagination ',
});
}, False);
/**** back to top ****/
Window.onload=function () {
var gotop_btn = document.getElementById ("gotop-btn");// Get back top button ID
var clientheight = document.documentelement.client;//Gets the height of the viewable area
var timer = null;//defines a timer
var Istop = true;//defines a Boolean value to determine whether to reach the top
Window.onscroll = function () {//Scroll event
Get scroll height of scroll bar
var ostop = Document.documentElement.scrollTop | | Document.body.scrollTop;
Judging back top button display and hide
if (Ostop > 0) {
Gotop_btn.style.display = "block";
}else{
Gotop_btn.style.display = "None";
}
Mainly used to determine when the scroll bar is clicked back to the top button, and if the scroll bar is manually scrolled during the rollback, the timer is cleared
if (!istop) {
Clearinterval (timer);
}
Istop = false;
}
Back to top Click event
Gotop_btn.onclick = function () {
Set a timer
Timer = setinterval (function () {
Gets the height of the scroll bar
var ostop = Document.documentElement.scrollTop | | Document.body.scrollTop;
Used to set the speed difference to produce a cache effect
var speed = Math.floor (-OSTOP/8);
Document.documentElement.scrollTop = Document.body.scrollTop = Ostop + speed;
Istop =true; To prevent scrolling events from clearing the timer
if (Ostop = = 0) {
Clearinterval (timer);
}
},30);
}
}
</script>
HTML tag Marquee for scrolling effect