Файл: slideshow.php
Строк: 143
<?php
error_reporting(0);
include("config.inc.php");
include("leng.inc.php");
include ("$yaz");
$ftalb=$ftalb+0;
$data_arrai = file("data/album.dat");
foreach($data_arrai as $i=>$string)
{
list($albom[],$alname[])= explode("::","$string");
}
$data_array = file("data/$albom[$ftalb]/photo.dat");
if (isset($data_array)):
foreach($data_array as $i=>$string)
{
list($name[],$comment[],$album[])= explode("::","$string");
}
endif;
?>
<html>
<head>
<title><?=$slideshow_title;?> - <?=$alname[$ftalb];?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$kodirovka_of_phpmailer;?>">
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<link href="img/layout.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
var slideShowSpeed = <?=$slideshowspeed;?>;
var isrunning = true;
var crossFadeDuration = 3;
var Pic = new Array();
i = 0;
<?php
for ($hhh=0;$hhh<count($name);$hhh++)
{
echo "Pic[i] = 'data/$albom[$ftalb]/$name[$hhh]';i++;
";
}
?>
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++){
preLoad[i] = new Image()
// preLoad[i].src = Pic[i]
}
preLoad[0].src = Pic[0]; // Preload Image 1
function runSlideShow(){
if (document.all){
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all){
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p-1)) j=0;
preLoad[j].src = Pic[j];
t = setTimeout('runSlideShow()', slideShowSpeed);
}
function startstop() {
if (isrunning) {
isrunning = false;
clearTimeout(t);
document.startstopimage.src = "img/start.gif";
}
else {
isrunning = true;
document.startstopimage.src = "img/pause.gif";
t = setTimeout('runSlideShow()', 1)
}
}
function qicpreloadimages() {
var thisdoc = document;
if(!thisdoc.myimages) thisdoc.myimages = new Array();
var i,j=thisdoc.myimages.length;
var a = qicpreloadimages.arguments;
for(i=0; i<a.length; i++) {
if (a[i].indexOf("#")!=0) {
thisdoc.myimages[j] = new Image;
thisdoc.myimages[j++].src=a[i];
}
}
}
function fullscreen(Ie,other){
clearTimeout(t);
document.startstopimage.src = "img/start.gif";
x=screen.availWidth;
y=screen.availHeight;
target = parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf('.')-1,navigator.appVersion.length));
if((navigator.appVersion.indexOf("Mac")!=-1) &&(navigator.userAgent.indexOf("MSIE")!=-1) &&(parseInt(navigator.appVersion)==4))
window.open(other,"sub",'scrollbars=yes');
if (target >= 4){
if (navigator.appName=="Netscape"){
var fullscreen=window.open(other,"fullscreen",'scrollbars=yes','width='+x+',height='+y+',top=0,left=0');
fullscreen.moveTo(0,0);
fullscreen.resizeTo(x,y);
}
if (navigator.appName=="Microsoft Internet Explorer") window.open(Ie,"fullscreen","fullscreen=yes");
}
else window.open(other,"sub",'scrollbars=yes');
}
//-->
</script>
</head>
<body bgcolor="#DEEBE9" onload="runSlideShow();qicpreloadimages('img/start.gif','img/pause.gif')">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20" align="center" valign="middle">
<div align="left">
<a href="javascript:top.close();" target="_self"><img src="img/closewin.gif" alt="<?=$slideshow_ex;?>" width="12" height="12" hspace="2" border="0"></a>
<a href="javascript:startstop();" onFocus="if(this.blur)this.blur()"><img src="img/pause.gif" alt="<?=$slideshow_st;?>" name="startstopimage" width="12" height="12" hspace="2" border="0" id="startstopimage"></a>
</div>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<div align="center"><a href="javascript:startstop();"><img src="data/<?=$albom[$ftalb];?>/<?=$name[0];?>" alt="<?=$slideshow_st;?>" name="SlideShow" border="0" align="absmiddle" id="SlideShow"></a></div>
</td>
</tr>
</table>
</body>
</html>