Skip to main content

PHP#14MySQL#10 - Slider (Chính thức làm web)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Featured Content Slider Using jQuery - Web Developer Plus Demos</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="jquery.min.js" ></script>
<script type="text/javascript" src="jquery-ui.min.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 3000, true);
});
</script>
</head>
<body>


<h3>&raquo; Featured Content Slider Using jQuery</h3>

<div id="featured" >
<ul class="ui-tabs-nav">
<?php
include("../connect.php");
$sl="select * from slider";
$kq=mysqli_query($link,$sl);
$i=0;
while($d=mysqli_fetch_array($kq))
{
?>
<li class="ui-tabs-nav-item<?php if($i==0) echo " ui-tabs-selected"; $i=1;?>" id="nav-fragment-<?php echo $d['id'];?>">
<a href="#fragment-<?php echo $d['id'];?>">
<img src="images/<?php echo $d['hinhnho'];?>" alt="" />
<span><?php echo $d['tieude'];?></span>
</a>
</li>
<?php }?>
</ul>



<!-- Second Content -->
<?php
$kq=mysqli_query($link,$sl);
$i=0;
while($d=mysqli_fetch_array($kq))
{
?>
<div id="fragment-<?php echo $d['id'];?>" class="ui-tabs-panel<?php if($i>0) echo " ui-tabs-hide";$i=1;?>" style="">
<img src="images/<?php echo $d['hinhlon'];?>" alt="" />
<div class="info" >
<h2><a href="#" ><?php echo $d['tieude'];?></a></h2>
<p><?php echo $d['mota'];?>....
<a href="#" >đọc thêm</a>
</p>
</div>
</div>
<?php }?>





</div>


</body>
</html>

Comments

Popular posts from this blog

PHP#33MySQL#29 - Đếm lượt truy cập (KẾT THÚC KHÓA HỌC)

//hitcounter.php <?php session_start();  ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> </head> <body> <?php  include("../connect.php"); //cập nhật số luowhtj truy cập: $sl="update counter set cnt=cnt+1"; mysqli_query($link,$sl); //Lấy dữ liệu số lượt truy cập để hiển thị ra web: $sl2="select * from counter"; $kq=mysqli_query($link,$sl2); $d=mysqli_fetch_array($kq); //Định dạng: $chuoi=str_pad($d['cnt'],6,"0",STR_PAD_LEFT); $luottrycap=""; for($i=0;$i<strlen($chuoi);$i++) { $tam=substr($chuoi,$i,1); $luottrycap.="<img src='images/$tam.png'/>"; } /*-Khi user truy cập vào website: +lần đầu tuy cập: Lưu thông tin của user lên csdl +Sau lần đầu tiên: cập nhtaaj lastvisit - Xóa các dòng dữ liệu quá 1 phút (Quy ước thời gian để khẳng định online hay offline: 1 phút) - Thống kê số liệu người dùng o...

2 (giao diện Visual C#) Solution Explorer

Bài 2 - SOME OTHER TIME - Vào dịp khác