Server : nginx/1.22.1
System : Linux iZwz9daxib3w3i063fw434Z 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64
User : www ( 1000)
PHP Version : 5.6.40
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Directory :  /www/wwwroot/www.jkmold.com/phpcms/templates/default/poster/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : /www/wwwroot/www.jkmold.com/phpcms/templates/default/poster/imagechange.html
var links = new Array();

var isIE=!!window.ActiveXObject;

{loop $pinfo $k $p}

links[{intval($k+1)}] = "{APP_PATH}index.php?m=poster&c=index&a=poster_click&siteid={$siteid}&id={$p['id']}";

if (isIE){

	if (document.readyState=="complete"){

		statAD('{$siteid}', '{$p['id']}', '{$p['spaceid']}');

	} else {

		document.onreadystatechange=function(){

			if(document.readyState=="complete") statAD('{$siteid}', '{$p['id']}', '{$p['spaceid']}');

		}

	}

} else {

	statAD('{$siteid}', '{$p['id']}', '{$p['spaceid']}');

}



{/loop}

var imgs = new Array();

for(var n = 1; n <= 5; n++) imgs[n] = new Image();

{loop $pinfo $k $p}

imgs[{intval($k+1)}].src = "{$p['setting']['1']['imageurl']}";

{/loop}

var tits = new Array();

{loop $pinfo $k $p}

tits[{intval($k+1)}] ="{$p['setting']['1']['alt']}";

{/loop}

var imgwidth = {$width};//图片宽度

var imgheight = {$height};//图片宽度

var str = "";

str += "<span style='position:relative'>";

str += "<span><a id='dlink' href='" + links[1] + "' target='_blank'><img id='dimg' src='" + imgs[1].src + "' border='0' width='" + imgwidth + "' height='"+imgheight+"' style='filter:Alpha(opacity=100)' onmouseover='Pause(true)' onmouseout='Pause(false)'></a></span>";

//修改点1:循环添加内层div内容以增加个数

str += "</span>";

document.write(str);

var oi = document.getElementById("dimg");

var pause = false;

var curid = 1;

var lastid = 1;

var sw = 1;

var opacity = 100;

var speed = 15;

var delay = (document.all)? 400:700;



function SetAlpha(){

	if(document.all){

		if(oi.filters && oi.filters.Alpha) oi.filters.Alpha.opacity = opacity;

	} else {

		oi.style.MozOpacity = ((opacity >= 100)? 99:opacity) / 100;

	}

}



function statAD(siteid, id, pid) {

	var sp = document.createElement("SCRIPT");

	sp.src = "{APP_PATH}index.php?m=poster&c=index&a=show&siteid="+siteid+"&id="+id+"&spaceid="+pid;

	document.body.appendChild(sp);

}



function ImgSwitch(id, p){

	if(p){

		pause = true;

		opacity = 100;

		SetAlpha();

	}

	oi.src = imgs[id].src;

	document.getElementById("dlink").href = links[id];

	//document.getElementById("it" + lastid).className = "off";

	//document.getElementById("it" + id).className = "on";

	//document.getElementById("titnv").innerHTML = "<b>" + tits[id] + "</b>";

	curid = lastid = id;

}



function ScrollImg(){

	if(pause && opacity >= 100) return;

	if(sw == 0){

		opacity += 2;

		if(opacity > delay){ opacity = 100; sw = 1; }

	}

	if(sw == 1){

		opacity -= 3;

		if(opacity < 10){ opacity = 10; sw = 3; }

	}

	SetAlpha();

	if(sw != 3) return;

	sw = 0;

	curid++;



	if(curid > {php echo count($pinfo)}) curid = 1;

	ImgSwitch(curid, false);

}



function Pause(s){

	pause = s;

}



function StartScroll(){

	setInterval(ScrollImg, speed);

}



function CheckLoad(){

	if (imgs[1].complete == true && imgs[2].complete == true) {

		clearInterval(checkid);

		setTimeout(StartScroll, 2000);

	}

}

var checkid = setInterval(CheckLoad, 10);