mb2k01 (22nd October 2009)
Hi All,
I hope the strange title grabbed your attention - I wasn't very sure how to ask the question!
Basically, I want to be able to boot up a computer and have it autostart a html page in kiosk mode (and I've managed to get that far!), but then for the html page to have some code in it which polls the computers date and redirects to a date-specific webpage.
E.G.
- Computer turns on and autostarts index.htm in kiosk mode (I can already do this)
- index.htm has code which polls the computers date
- the poll result then allows an automatic redirection from index.htm to monday.htm or tuesday.htm etc
Do any of you ultra clever coders know a way of achieving this?
Many thanks,

any language preference?
mb2k01 (22nd October 2009)
Like that? PHP that is...Code:<?php $day = date("w"); switch($day){ case 0: include("sunday.php"); break; case 1: include("monday.php"); break; case 2: include("tuesday.php"); break; case 3: include("wednesday.php"); break; default: include("nodate.php"); break; } ?>
mb2k01 (22nd October 2009)

This should do - stick it in a blank HTML page.
Source: CGIScript.net :: Automate your website for less!Code:<SCRIPT LANGUAGE="Javascript"><!-- // *********************************************** // AUTHOR: WWW.CGISCRIPT.NET, LLC // URL: http://www.cgiscript.net // Use the script, just leave this message intact. // Download your FREE CGI/Perl Scripts today! // ( http://www.cgiscript.net/scripts.htm ) // *********************************************** function initArray() { this.length = initArray.arguments.length; for (var i = 0; i < this.length; i++) this[i+1] = initArray.arguments[i]; } var weekDayArray = new; initArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); var today = new Date(); var day = weekDayArray[today.getDay()+1]; if (day == "Monday") window.location = "Monday.htm" if (day == "Tuesday") window.location = "Tuesday.htm" if (day == "Wednesday") window.location = "Wednesday.htm" if (day == "Thursday") window.location = "Thursday.htm" if (day == "Friday") window.location = "Friday.htm" if (day == "Saturday") window.location = "Saturday.htm" if (day == "Sunday") window.location = "Sunday.htm" //--> </SCRIPT>
mb2k01 (22nd October 2009)
Wow that was a quick response - thank you all!
Webman I'll give yours a go but it certainly looks like it will do the job - thanks!
(For those keeping an eye on recent posts this is for my in-house digital signage solution - one day soon I'll upload some screenshots!)

Not sure if you can achieve this with HTML, but if you got the machine to run this little VBS script at startup, and named the files 2.html, 3.html, 4.html etc. (VBS returns Sunday as day 1) then it would open up the correct file on the correct day.
Mike.Code:Set WshShell = WScript.CreateObject("WScript.Shell") file = "C:\PATH\" & WeekDay(Now) & ".html" WshShell.Run file
mb2k01 (22nd October 2009)

mb2k01: Seen this? Xibo Open Source Digital Signage
I did - infact I have residual error messages clogging up my win7 machine where I installed it as a test lol. It looked promising but wasn't as customisable as I wanted, so as I'd half produced my own I continued with that.
Although it's blurred for anonymity the screenshot gives the idea! Large video section, scrolling daily messages and two advert areas.
(Once it's finished 100% i'll make up a generic template and possibly make available if I can confirm all codes are free to distribute etc)
Ok; let's be really flash :-) (well, a little bit ...)
and then you can have "monday.html", "tuesday.html" etcCode:Set WshShell = WScript.CreateObject("WScript.Shell") file = "C:\PATH\" & weekdayname(WeekDay(Now)) & ".html" WshShell.Run file
mb2k01 (22nd October 2009)

Hmm, I just installed Xibo in ten minutes flat (having seen it but not played with it before), very impressive (we have our first sign going on the wall.. well, when somebody decides where).

This is a screen shot of one of our screens powered by Xibo, scrolling news across the bottom (RSS feed from BBC) 2 small areas and 1 large area for whatever content you want - Power point, text, images, web pages, flash objects - xibo will display them all.
The key to making digital signage work is keeping it simple, and producing a good template to use for all the screens for consistancy.
There are currently 1 users browsing this thread. (0 members and 1 guests)