Can anyone help me? I have no idea how I would do this via a script.
I’m trying to write a script to daily change my login page background.
The idea was to keep 30 small jpg files in \hotspot\img\background\ - The file names would be 1.jpg, 2.jpg - all the way to 30.jpg
Currently my hotspot login uses the file \hotspot\img\background.jpg as the background.
I would need a script that would copy \hotspot\img\background\1.jpg to \hotspot\img\background.jpg at a set time (maybe 5am) each day, but on the next day copy 2.jpg, next day 3.jpg, etc.
can’t you just create 3 directories with different login pages, and use the script to change “hotspot directory” parameter in the hotspot server settings?
Try using javascript on the page you wish to change background on.
You can easily modify this to your needs :
<!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" xml:lang="en" lang="en">
<head>
<title></title>
</head>
<body>
<script type="text/javascript">
/*<![CDATA[*/
var ToDay=new Date();
var Month=ToDay.getMonth();
var Date=ToDay.getDate();
var Image=false;
if (ToDay.getFullYear()==2010){
if (Month==0){ // January
if (Date>=20&&Date<=30){
Image='One.gif';
}
}
if (Month==1){ // Febuary
if (Date>=20&&Date<=25){
Image='Three.gif';
}
}
}
if (Image){
document.body.style.backgroundImage='url(http://192.168.88.1/img/'+Image+')';
}
/*]]>*/
</script>
</body>
</html>