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
| <?php
//******check session******
include ("auth/check.php");
//******check session******
//
// connexion à la base
//
include ("auth/connection.php");
//
//On execute la requete de selection des img_id triés par img_nom
//
$sql = "SELECT img_nom FROM images";
//execution + vérification
$req = mysql_query($sql) or die('Erreur SQL !'.$sql.'<br>'.mysql_error());
//
// on ferme la connexion à mysql
//
mysql_close();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
<!--
#hotlist {
border: 1px solid #dfdfdf;
padding: 10px;
width: 168px;
text-align: left;
color: gray;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
#hotlist a {
color: gray;
text-decoration: none;
}
#preview {
text-align: center;
display: none; /* do not change */
}
img.thumbnail {
border: 1px solid #000000;
cursor: pointer;
width: 500px; /* change to your picture width */
height: 420px; /* change to your picture height */
}
div#caption {
font-size: 8pt;
}
.arrow {
visibility: hidden; /* do not change */
color: blue;
font-family: Times New Roman, Times, serif; /* do not change */
}
-->
</style>
<script type="text/javascript" title="G1SCRIPT">
var listName='Photo(s)'; // the title of your list between single quotes
var mpic=new Array();
document.write("<script language='Javascript'>");
<?
while($row = mysql_fetch_assoc($req)){
echo "document.write(\"mpic[mpic.length] = new info('nono_nono', 'images/" .row["image"]."', 'test', 'http', 'm' + mpic.length);\");";
}
?>
document.write("</script>");
/* ------ Do not edit below this line ------ */
var minArr=new Array();
for (i=0; i<mpic.length; i++) {
minArr[i]=new Image();
minArr[i].src=mpic[i].thumb;
}
function info(nam, thumb, Title, web, markID) {
this.nam = nam;
this.thumb = thumb;
this.Title = Title;
this.web = web;
this.markID = markID;
}
function codeIt() {
document.write('<div id="hotlist"><b>' + listName + '</b>');
document.write('<hr width="100%" size="1">');
for (j=0; j<mpic.length; j++) {
document.write('<a target="offsite" href="');
document.write(mpic[j].web);
document.write('" onMouseover="preview(' + j + ',\'' + mpic[j].markID + '\')">');
document.write(mpic[j].nam);
document.write('</a><span class="arrow" id="' + mpic[j].markID + '"> ◄</span><br>');
}
document.write('<br>');
document.write('<div id="preview">');
document.write('<img class="thumbnail" alt="" name="screenshot" src="' + minArr[0].src + '" onClick="dest()">');
document.write('<div id="caption"></div>');
document.write('<P><input type="button" value="Hide preview" onClick="hide()"></p>');
document.write('</div></div>');
}
function preview(t,a) {
unmarkAll();
document.getElementById(a).style.visibility='visible';
document.getElementById('preview').style.display='block';
document.getElementById('caption').innerHTML=mpic[t].Title;
document.images.screenshot.src=minArr[t].src;
document.images.screenshot.title='Click to visit ' + mpic[t].nam + '';
}
function dest() {
for (x=0; x<mpic.length; x++) {
if (document.images.screenshot.src==minArr[x].src) {
window.open(mpic[x].web, 'offsite');
}
}
}
function hide() {
document.getElementById('preview').style.display='none';
unmarkAll();
}
function unmarkAll() {
for (c=0; c<mpic.length; c++) document.getElementById(mpic[c].markID).style.visibility='hidden';
}
// End -->
</script>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div align="center">
<SCRIPT language="JavaScript" title="G1SCRIPT" type="text/javascript">
//Script Généré sur le Site http://www.G1SCRIPT.COM
<!-- Begin
codeIt()
// End -->
//Identifiant du script: V10-252/Images
//Mis en ligne: 03/08/05
//By TANGUY
</SCRIPT>
</div>
<p><font face="arial" size="1">Powered and Generated by </font><a href="http://www.G1SCRIPT.com" target="_blank"><font face="arial,helvetica" size="1">G1Script.Com</font></a></p>
</body>
</html> |
Partager