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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
| <!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>slidenews</title>
<style>
#galerie {
border:1px double #CCCCCC ;
background:#FFFFFF;
width:650px;
height:400px;
margin-left:1%;
top:5px;
position:relative;
overflow:hidden;
background-color:#C8C8C8;
font-size:12;
font-family:Verdana, Arial, Helvetica, sans-serif;
color:#0000FF;
}
#petit_img{
position:relative;
width:5000px;
}
#petit_img img{
width:120px;
height:95px;
margin:0;
margin-top:0px;
}
#grand_img{
position:absolute;
width:5000px;
margin-left:10px;
}
#grand_img img{
cursor:pointer;
position:absolute;
width:620px;
height:120px;
border:2px solid #44828c;
left: 2px;
}
.arriere{
background-color:#0033FF;
border:1px #0033FF
}
a{
margin:0 ;
padding:0 ;
text-decoration:none;
color:#000000;
}
ul{
padding:0;
margin:0;
list-style:none;
}
#petit_img li {
position:relative;
float: left;
width: 128px;
padding: 0;
margin: 1px;
top:160px;
text-align:center;
text-align:center;
color:#000080;
font-size:11px;
font-style:inherit;
font:Verdana, Helvetica, sans-serif;
background-color:#E0E0E0;
}
#grand_img li {
position:relative;
width:500px;
float: left;
padding: 0 0 1px 0;
margin: 1px;
text-align:center;
display:none;
}
p{
margin:0;
padding:0px;
color:#000000;
}
#grand_img .active{
display:block;
}
.suiv{
margin:0;
color:#00003C;
font-weight:normal;
font-size:10px;
text-decoration:underline;
}
.prev{
margin:0;
font-weight:normal;
font-size:10px;
text-decoration:underline;
}
</style>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="func1.js"></script>
</head>
<?php
function recup_info(){
$infos[]=array();
$id=mysql_connect("localhost","root","");
mysql_select_db("gonbook",$id);
$req="select image,id,soustitre, titre from koactualite ORDER by id DESC";
$resultat=mysql_query($req)or die('Erreur SQL !'.$req.'<br />'.mysql_error());
while($row=mysql_fetch_assoc($resultat)){
$infos[]=$row;
}
return $infos;
$y=mysql_num_rows($resultat);
}
?>
<body>
<div id='galerie'>
<div id="grand_img">
<ul>
<?php
$infos1=recup_info();
foreach($infos1 as $cle=> $infos1){
$image =$infos1['image'];
$id_info=$infos1['id'];
$titre_info=$infos1['titre'];
if($cle===1){
echo"<li><a class='active' href='act1.php?id=".$id_info."'>";
echo"<img src='membres/Photos/".$image."' > <p>".$titre_info."</p>";
echo"</a></li>";
}
else if($cle!=0 && $cle!=1){
echo"<li id='img".$id_info."'>";
echo"<img src='membres/Photos/".$image."'>";
echo"</li>";
}//fin else
}
?>
</ul>
</div>
<div id="petit_img">
<ul>
<?php
$infos2=recup_info();
foreach($infos2 as $cle1=> $infos2){
$image1 =$infos2['image'];
$stitre_info=$infos2['soustitre'];
$id=$infos2['id'];
if($cle1===1){
echo"<li class='arriere' id='pimg".$id."'><a rel='img".$id."' href='act1.php?id=".$id."'><img src='membres/Photos/".$image1."'><p>".$stitre_info."</p></a></li>";
}
else if($cle1!=0 && $cle1!=1){
echo"<li id='pimg".$id."'><a rel='img".$id."' href='act1.php?id=".$id."'><img src='membres/Photos/".$image1."'><p>".$stitre_info."</p></a></li>";
}
}
?>
</ul>
</div>
</div>
<div align="center">
<a align="center" class="prev" href="#">Precedent </a>|<a class="suiv" href="#"> Suivant</a>
</div>
</body>
</html> |
Partager