diff options
| author | unknown <andrew@.cern.ch> | 2011-06-21 16:33:26 +0200 |
|---|---|---|
| committer | unknown <andrew@.cern.ch> | 2011-06-21 16:33:26 +0200 |
| commit | fa170afd817648f306e322802ca85b6abbd37f74 (patch) | |
| tree | 44a68e68859429bc5f6bcb164111bcb8df1ee165 /templates | |
Initial commit
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/album.template | 58 | ||||
| -rw-r--r-- | templates/albumnarrow.template | 46 | ||||
| -rw-r--r-- | templates/artist.template | 59 | ||||
| -rw-r--r-- | templates/artistnarrow.template | 56 | ||||
| -rw-r--r-- | templates/error.template | 17 | ||||
| -rw-r--r-- | templates/front.template | 216 | ||||
| -rw-r--r-- | templates/hosts.template | 38 | ||||
| -rw-r--r-- | templates/news.template | 86 | ||||
| -rw-r--r-- | templates/search.template | 20 | ||||
| -rw-r--r-- | templates/searchplugin.template | 13 | ||||
| -rw-r--r-- | templates/servernews.template | 99 | ||||
| -rw-r--r-- | templates/settings.template | 242 | ||||
| -rw-r--r-- | templates/trawl.template | 42 |
13 files changed, 992 insertions, 0 deletions
diff --git a/templates/album.template b/templates/album.template new file mode 100644 index 0000000..f623c7e --- /dev/null +++ b/templates/album.template @@ -0,0 +1,58 @@ +<html> +<head> + <link rel="stylesheet" href="/platdoc/platter.css"> + <script language="javascript"> + <!-- + var sources = new Array( %TOTALCOVERS% ); + var locations = new Array( %TOTALCOVERS% ); + %SOURCES% + %LOCATIONS% + + var coverIndex = Math.round(Math.random()*(locations.length-1)); + + function nextCover() { + var cover = document.getElementById("cover"); + var coverno = document.getElementById("coverno"); + var coversource = document.getElementById("coversource"); + cover.src = locations[coverIndex]; + coverno.firstChild.data = coverIndex+1; + coversource.firstChild.data = sources[coverIndex]; + coverIndex++; + if (coverIndex >= locations.length) coverIndex = 0; + } + //--> + </script> +</head> + +<body background="/platdoc/img/bars.png" topmargin=0 leftmargin=0 rightmargin=0 > +<script language="javascript"> + if (top.location == document.location) + document.write('<a href="front.plx"><img src="/platdoc/img/logo.gif" hspace=0 border=0 alt="Front Page"></a>'); +</script> + <table> + <tr valign="top"> + <td height="100%">%PLAYBUTTON%%INFOBUTTON%</td> + <td width="100%"> %HTMLALBUM%%FOREIGN%%YEAR%</td></tr></table> + <table width="100%"> + <tr valign="top"> + <td> + <ol>%TRACKS%</ol> + </td> + <td align="right" rowspan=2> + %COVER% + </td> + <tr valign="bottom"> + <td> + <small>%HOST%</small> + </td> + </tr> + <tr> + <td colspan=2> + <hr size=1 align=left color=white> + <a name="info" style="color: white"><i class="title">Info</i> + %INFO% + </td> + </tr> + </table> +</body> +</html> diff --git a/templates/albumnarrow.template b/templates/albumnarrow.template new file mode 100644 index 0000000..9c9e378 --- /dev/null +++ b/templates/albumnarrow.template @@ -0,0 +1,46 @@ +<html> +<head> + <link rel="stylesheet" href="/platdoc/platter.css"> + <script language="javascript"> + <!-- + var sources = new Array(%TOTALCOVERS%); + var locations = new Array(%TOTALCOVERS%); + %SOURCES% + %LOCATIONS% + + var coverIndex = Math.round(Math.random()*(locations.length-1)); + + function nextCover() { + var cover = document.getElementById("cover"); + var coverno = document.getElementById("coverno"); + var coversource = document.getElementById("coversource"); + cover.src = locations[coverIndex]; + coverno.firstChild.data = coverIndex+1; + coversource.firstChild.data = sources[coverIndex]; + coverIndex++; + if (coverIndex >= locations.length) coverIndex = 0; + } + //--> + </script> +</head> +<body background="/platdoc/img/bars.png" topmargin=1 leftmargin=1 rightmargin=1> +<script language="javascript"> + if (top.location == document.location) + document.write('<a href="front.plx"><img src="/platdoc/img/logo.gif" hspace=0 border=0 alt="Front Page"></a>'); +</script> + +<table> + <tr valign="top"> + <td height="100%">%PLAYBUTTON%%INFOBUTTON%</td> + <td width="100%"> %HTMLALBUM%%FOREIGN%%YEAR%</td> + </tr> +</table> +<table align=center><tr><td>%COVER%</td></tr></table> +<ol>%TRACKS%</ol> +<small>%HOST%</small> +<hr size=1 color=white width=66%> +<a name="info" style="color: white"><i class="title">Info</i> +%INFO% + +</body> +</html> diff --git a/templates/artist.template b/templates/artist.template new file mode 100644 index 0000000..a5adf18 --- /dev/null +++ b/templates/artist.template @@ -0,0 +1,59 @@ +HTTP/1.0 200 OK +Content-Type:text/html + +<html> +<head> + <meta value="platter" content="lots of lovely music and it's all free!"> + <link rel="stylesheet" href="/platdoc/platter.css"> + <title>distroplat - %ARTIST%</title> + <meta value="dixon" content="am hammy twaart"> + <script language="javascript"> + <!-- + function switchAlbum(newURL) { + if (newURL.length > 0) + album.location.href=newURL; + } + + function init() { + + top.document.title = '%JSARTIST% - distroplat'; + if (album.location.href.indexOf('loading.html') > 0) + album.location.replace('%INIT%') + } + + //--> + </script> +</head> + +<body bgcolor="#%BGCOLOUR%" topmargin=0 leftmargin=0 rightmargin=0 onLoad="init()"> +<table height="100%" width="100%"> + <tr valign="top"> + <td width="100%"> + <script language="javascript"> + if (top.location == document.location) + document.write('<a href="front.plx"><img src="/platdoc/img/logo.gif" hspace=0 border=0 alt="Front Page"></a>'); + </script> + + <h2><a href="front.plx?artist=%URLARTIST%" class="heading" target="_top" title="Platter link to %ARTIST%">%ARTIST%</a></h2> + </td> + <td>%ABC%</td> + </tr> + <tr valign="bottom"> + <td><small>Albums:</small><br>%SECTIONS%<small><i>%COUNT%</i></small> + </td> + <td> + <small>Random Selection: <a href="search.plx?searchFor=track&random=10&filter=music&artist=%URLARTIST%">10</a>, <a href="search.plx?searchFor=track&random=20&filter=music&artist=%URLARTIST%">20</a>, <a href="search.plx?searchFor=track&random=30&filter=music&artist=%URLARTIST%">30</a> + </td> + + </tr> + <tr valign="bottom"> + <td width="100%" height="100%" colspan=2> + <iframe src="/platdoc/loading.html" name="album" id="album" width="100%" height="100%" frameborder="0"></iframe> + </td> + </tr> +</table> + +</body> +</html> + + diff --git a/templates/artistnarrow.template b/templates/artistnarrow.template new file mode 100644 index 0000000..6853a5e --- /dev/null +++ b/templates/artistnarrow.template @@ -0,0 +1,56 @@ +HTTP/1.0 200 OK +Content-Type:text/html + +<html> +<head> + <meta value="platter" content="lots of lovely music and it's all free!"> + <link rel="stylesheet" href="/platdoc/platter.css"> + <meta value="dixon" content="am hammy twaart"> + <script language="javascript"> + <!-- + function switchAlbum(newURL) { + if (newURL.length > 0) + album.location.href=newURL; + } + + top.document.title = 'distroplat - %JSARTIST%'; + + function init() { + + top.document.title = 'distroplat - %JSARTIST%'; + if (album.location.href.indexOf('loading.html') > 0) + album.location.replace('%INIT%') + } + //--> + </script> +</head> + +<body bgcolor="#%BGCOLOUR%" topmargin=0 leftmargin=0 rightmargin=0 onLoad="init()"> +<table height="100%" width="100%"> + <tr valign="top"> + <td> + <script language="javascript"> + if (top.location == document.location) + document.write('<a href="front.plx"><img src="/platdoc/img/logo.gif" hspace=0 border=0 alt="Front Page"></a>'); + </script> + + <h2>%ARTIST%</h2> + <small><i>%COUNT%</i> - Random Selection: <a href="search.plx?searchFor=track&random=10&filter=music&artist=%URLARTIST%">10</a>, <a href="search.plx?searchFor=track&random=10&filter=music&artist=%URLARTIST%">20</a>, <a href="search.plx?searchFor=track&random=10&filter=music&artist=%URLARTIST%">30</a> + </td> + </tr> + <tr valign="bottom"> + <td> + %SECTIONS% + </td> + </tr> + <tr valign="bottom"> + <td width="100%" height="100%" colspan=2> + <iframe src="/platdoc/loading.html" name="album" id="album" width="100%" height="100%" frameborder="0"></iframe> + </td> + </tr> +</table> + +</body> +</html> + + diff --git a/templates/error.template b/templates/error.template new file mode 100644 index 0000000..c5eb805 --- /dev/null +++ b/templates/error.template @@ -0,0 +1,17 @@ +<html> +<head> + <link rel="stylesheet" href="/platdoc/platter.css"> +</head> + +<body bgcolor="#%BGCOLOUR%" background="/platdoc/img/bars.png"> +<script language="javascript"> + if (top.location == document.location) + document.write('<a href="front.plx"><img src="/platdoc/img/logo.gif" hspace=0 border=0 alt="Front Page"></a>'); +</script> +<h3>Invalid Renderer: '%NAME%'</h3> +<p>Distroplat either could find, or couldn't create the track renderer you were looking for. If you were expecting a playlist, please check your selection on the <a href="formats.plx">Formats page</a>. Note: The playlist cookie from distroplat v2 is not compatible with v3. You will just have to quickly check back and choose again. +<p>Otherwise, someone has been messing about with the '%NAME%' template and it is not working. Shout loudly until someone fixes it. +<p> + +</body> +</html> diff --git a/templates/front.template b/templates/front.template new file mode 100644 index 0000000..c66249f --- /dev/null +++ b/templates/front.template @@ -0,0 +1,216 @@ +HTTP/1.0 200 OK +Content-Type:text/html + +<html> +<head> + <meta value="platter" content="lots of lovely music and it's all free!"> + <link rel="stylesheet" href="/platdoc/platter.css"> + <meta value="dixon" content="am hammy twaart"> + <link rel="search" type="application/opensearchdescription+xml" href="searchplugin.plx" title="Distroplat" /> + <link rel="icon" href="/platdoc/img/searchplugin.png" type="image/png" /> + <link rel="shortcut icon" href="/platdoc/img/searchplugin.png" type="image/png" /> + <title>distroplat</title> + <script language="JavaScript"> + <!-- + function setCookie( name, value ) + { + date = new Date(); + + date.setFullYear( date.getFullYear() + 1 ); + newCookie = name + "=" + value + ";path=/; expires=" + date.toGMTString(); + document.cookie = newCookie; + } + //--> + </script> +</head> + +<body bgcolor="#%BGCOLOUR%"> + +<table border=0 cellpadding=2 cellspacing=0 width=100% height=100%> + <tr> + <td valign=top> + <img src="/platdoc/img/logo.gif"> + <small><b>Headlines:</b> + %HEADLINES% + </small> + <h4>Welcome</h4> + <ol> + <li><a href="news.plx" target="%TARGET%"><b>Platter News</b></a></li> + <li><a href="servernews.plx" target="%TARGET%"><b>Server News</b></a></li> + <li><a href="settings.plx" target="%TARGET%"><b>Settings</b></a></li> + <li><a href="trawler.plx" target="%TARGET%"><b>Content Trawler</b></a></li> + </ol> + </td> + <td rowspan=3> </td> + <td rowspan=3 width="100%"> + %IFRAME% + </td> + </tr> + <tr> + <td height="100%" > + <table border=0 cellpadding=2 cellspacing=0 width=100%> + <tr valign="top"> + <td> + <h3>Search</h3> + </td> + <td align="right" valign="bottom"> + <small><a href="javascript:showSimple()">Simple</a> - <a href="javascript:showAdvanced()">Advanced</a></small> + </td> + </tr> + </table> + <table border=0 cellpadding=2 cellspacing=0 align=center> + <tr> + <td> + <form method="get" action="search.plx" target="%TARGET%" name="advanced" style="display:none"> + <table> + <tr title="Enter all or part of an artist's name here"> + <td>Artist: </td> + <td colspan=2><input type="text" name="artist" size=20></td> + </tr> + <tr title="Enter all or part of a track title here"> + <td>Title: </td> + <td colspan=2><input type="text" name="title" size=20></td> + </tr> + <tr title="Enter all or part of an album title here"> + <td>Album: </td> + <td colspan=2><input type="text" name="album" size=20></td> + </tr> + <tr title="Distroplat can narrow searches to a date range, but only for albums that the host has dated"> + <td>Date Range: </td> + <td colspan=2><input type="text" name="dateFrom" size=4 value="1900"> - <input type="text" name="dateTo" size=4 value="2525"></td> + </tr> + <tr title="Albums only searches from tracks from albums, Misc only everything else"> + <td>Scope: </td> + <td colspan=2><input type="radio" name="scope" value="all" checked>All <input type="radio" name="scope" value="album">Albums <input type="radio" name="scope" value="misc">Misc + </tr> + <tr title="Choose whether you want a list of matching tracks or artists"> + <td>Search for: </td> + <td colspan=2><input type="radio" name="searchFor" value="artist" checked>Artists <input type="radio" name="searchFor" value="track">Tracks</td> + </tr> + <tr title="Choose whether you want your results returned as a web page, or straight to a playlist"> + <td>Results: </td> + <td colspan=2><input type="radio" name="output" value="tracks" checked>Page <input type="radio" name="output" value="">Playlist</td> + </tr> + <tr title="Setting a number here will take that many random selections from your search results"> + <td>Random: </td> + <td><select name="random"> + <option value="0"> + <option>1 + <option>10 + <option>20 + <option>30 + </select> + </td> + <td align="right" title="Search!"> + <small> + <input type="hidden" name="filter" value="music,video,shortcut"> + <input type="reset" value=" New "> <input type="submit" value=" Go "> + </small> + </td> + </tr> + </table> + </form> + <form method="get" action="search.plx" target="%TARGET%" name="simple"> + <table> + <tr title="Enter all or part of an artist's name here"> + <td>Artist: </td> + <td><input type="text" name="artist" size=20></td> + </tr> + <tr title="Enter all or part of a track title here"> + <td>Title: </td> + <td><input type="text" name="title" size=20></td> + </tr> + <tr> + <td colspan=2 align="right" title="Search!"> + <small> + <input type="hidden" name="filter" value="music,video,shortcut"> + <input type="hidden" name="scope" value="all"> + <input type="hidden" name="output" value="tracks"> + <input type="hidden" name="searchFor" value="artist" checked> + <input type="reset" value=" New "> <input type="submit" value=" Go " onClick="submitSimple()"> + </small> + </td> + </tr> + </table> + + <b>Popular Searches</b><br> + + • <a href="search.plx?searchFor=artist&filter=music,video,shortcut&output=artistlist" target="%TARGET%">Full Directory</a><br> + • <a href="search.plx?searchFor=artist&filter=music,video,shortcut&scope=album&output=artistlist" target="%TARGET%">Album Directory</a><br> + • <a href="search.plx?searchFor=artist&random=1&filter=music,video,shortcut&output=artistlist" target="%TARGET%">Random Artist</a><br> + • <a href="search.plx?searchFor=artist&random=1&filter=music,video,shortcut&scope=album&output=artistlist" target="%TARGET%">Random Artist <small>excluding misc</small></a><br> + Random Music Playlist: + <a href="search.plx?searchFor=track&random=10&filter=music">10</a>, + <a href="search.plx?searchFor=track&random=20&filter=music">20</a>, + <a href="search.plx?searchFor=track&random=30&filter=music">30</a> + </p> + </form> + </td> + </tr> + </table> + </td> + </tr> + <tr> + <td valign=bottom> + <small>%CUSTOM% + <hr width=90% size=1 color=white align=left> + Version: <b>%VERSION%</b><br> + User: <b>%USER%</b><br> + <a href="javascript:setCookie('target', '_top');location.reload();">Mobile</a></small> + </td> + </tr> +</table> + +<script language="javascript"> + <!-- + + ourCookies = document.cookie.split("; "); + + for (var i=0; i < ourCookies.length; i++) + { + var ourCrumb = ourCookies[i].split("="); + + if (ourCrumb.length == 2) + { + if (ourCrumb[0] == 'searchtype') + { + searchtype = ourCrumb[1]; + if (searchtype == 'advanced') showAdvanced(); + } + } + } + + function setCookie( name, value ) + { + date = new Date(); + + date.setFullYear( date.getFullYear() + 1 ); + newCookie = name + "=" + value + ";path=/; expires=" + date.toGMTString(); + document.cookie = newCookie; + } + + function showSimple() { + document.forms[0].style.display="none"; + document.forms[1].style.display="block"; + setCookie('searchtype', 'simple'); + } + + function submitSimple() { + if (document.forms[1].title.value.length > 0) + document.forms[1].searchFor.value = 'track'; + else + document.forms[1].searchFor.value = 'artist'; + document.forms[1].submit(); + } + + function showAdvanced() { + document.forms[1].style.display="none"; + document.forms[0].style.display="block"; + setCookie('searchtype', 'advanced'); + } + + //--> + </script> + +</body> +</html> diff --git a/templates/hosts.template b/templates/hosts.template new file mode 100644 index 0000000..9d70fa1 --- /dev/null +++ b/templates/hosts.template @@ -0,0 +1,38 @@ +HTTP/1.0 200 OK +Content-Type:text/html + +<html> +<head> + <link rel="stylesheet" href="/platdoc/platter.css"> + <title>distroplat - Hosts & Users</title> + <script language="javascript"> + <!-- + top.document.title = 'Hosts & Users - distroplat'; + //--> + </script> +</head> + +<body bgcolor="#%BGCOLOUR%" background="/platdoc/img/bars.png"> +<h3>Hosts & Users</h3> + +<p> +The following people are those who have been granted access by +<b>Adminipotato</b>. Also listed are their hostnames and IP addresses +for reference/firewall configuration purposes. Anyone else who attempts +to access your platter is a naughty hacker. +</p> + +<table border=0 cellpadding=2 cellspacing=0 width=100%> + <tr> + <td><b>User name</b></td> + <td><b>Hostname</b></td> + <td><b>IP address</b></td> + </tr> + <tr> + <td colspan=3><hr color=white size=1></td> + </tr> +%USERLIST% +</table> + +</body> +</html> diff --git a/templates/news.template b/templates/news.template new file mode 100644 index 0000000..19f5ed3 --- /dev/null +++ b/templates/news.template @@ -0,0 +1,86 @@ +HTTP/1.0 200 OK +Content-Type:text/html + +<html> +<head> + <link rel="stylesheet" href="/platdoc/platter.css"> + <title>distroplat - News</title> + <script language="JavaScript"> + <!-- + function setCookie( name, value ) + { + date = new Date(); + + date.setFullYear( date.getFullYear() + 1 ); + newCookie = name + "=" + value + ";path=/; expires=" + date.toGMTString(); + document.cookie = newCookie; + } + + function setServers() + { + var exclude = ''; + + for ( var j = 0; j < document.excludeform.elements.length; j++ ) + { + if ( document.excludeform.elements( j ).checked == false ) + exclude += document.excludeform.elements( j ).name + ','; + } + + setCookie( 'exclude', exclude ); + } + + function selectServers(state) + { + var exclude = ''; + + for ( var j = 0; j < document.excludeform.elements.length; j++ ) + { + document.excludeform.elements( j ).checked = state; + + if( !state ) + exclude+=document.excludeform.elements(j).name+','; + } + + setCookie( 'exclude', exclude ); + } + + function toggleServers() + { + var exclude=''; + + for (var j=0; j < document.excludeform.elements.length; j++) + { + document.excludeform.elements( j ).checked = !( document.excludeform.elements( j ).checked ); + + if ( document.excludeform.elements( j ).checked == false ) + exclude += document.excludeform.elements( j ).name + ','; + } + + setCookie( 'exclude', exclude ); + } + top.document.title = 'distroplat'; + //--> + </script> +</head> + +<body bgcolor="#%BGCOLOUR%" background="/platdoc/img/bars.png"> +<script language="javascript"> + if (top.location == document.location) + document.write('<a href="front.plx"><img src="/platdoc/img/logo.gif" hspace=0 border=0 alt="Front Page"></a>'); +</script> + +<h3>News</h3> + +<p> +<img border=1 src="/platdoc/img/shatner.gif" alt="Shatner"> +<br> +<small>%SHATNER%</small> +</p> + +<hr size=1 color=white align=left width=66%> +<a href="%AUDROCKET%"><img src="/platdoc/img/audioRocketman.gif" border=0></a> <a href="%VIDROCKET%"><img src="/platdoc/img/videoRocketman.gif" border=0></a> +<hr size=1 color=white align=left width=66%> + +%NEWS% +</body> +</html> diff --git a/templates/search.template b/templates/search.template new file mode 100644 index 0000000..ab04352 --- /dev/null +++ b/templates/search.template @@ -0,0 +1,20 @@ +<html> +<head> + <link rel="stylesheet" href="/platdoc/platter.css"> + <title>distroplat - Search Results</title> + <script language="javascript"> + <!-- + top.document.title = 'Search Results - distroplat'; + //--> + </script> +</head> + +<body bgcolor="#%BGCOLOUR%" background="/platdoc/img/bars.png"> +<script language="javascript"> + if (top.location == document.location) + document.write('<a href="front.plx"><img src="/platdoc/img/logo.gif" hspace=0 border=0 alt="Front Page"></a>'); +</script> +<h3>Search Results</h3> +<p>%COUNT% +%SHORTCUTS% +<p> diff --git a/templates/searchplugin.template b/templates/searchplugin.template new file mode 100644 index 0000000..de58135 --- /dev/null +++ b/templates/searchplugin.template @@ -0,0 +1,13 @@ +HTTP/1.0 200 OK +Content-Type:text/xml + +<?xml version="1.0" encoding="UTF-8"?> +<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> +<ShortName>Distroplat</ShortName> +<Description>Distroplat Artist Search</Description> +<InputEncoding>utf-8</InputEncoding> +<Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABGdBTUEAALGPC/xhBQAAAXxJREFUeJy1kk1LAmEUhWfecT50Gm0yUTIlzfzAVGgXUSEFEbSLNv2S/kK7lkGrdoVthHZtchlIVovKCkKj7G2GxtGZcfyYeVsECWWRQWd1F+fhcu85OEII60egL/dfAMvHhEyzJgn1qqjUZETQ/mCYHeC+BSQRFnJZeH9Rr6sPFTE0tUgx7Hg42hu4PM+fHWfaTVVvtBAgh90jM/Ppnm4Mw3AIn7c3NygSU7QWMgyKoYCJ7CQ+vbQWiCU5B49MZOUc3Q2lUkmSqy0DSDXF53FaAanrDdxGwavc3ekRaSEQTuuuRDQSs7K2pt60JJOpfGqucnsivDRYK4FhpqqrxbJcuH502hkCAL+Hl2VK05qarifjcRwh9CoK2d0tQYDFMuQ5hiY6HE0+VSRRkqM+Pr2wzMdmx0IRiiQpmsbfk25oSqdjqqp6kNkfRTeBUEJrMyw36J2YHPIGcYLoHv2pGoZhHO7tEIx9ZXW995e+dglCCADmcrl/C/ys/y/fG7qDqJb+EthBAAAAAElFTkSuQmCC</Image> +<SearchForm>http://%CGIROOT%/%APPNAME%/front.plx</SearchForm> +<Url type="text/html" method="GET" template="http://%CGIROOT%/%APPNAME%/front.plx?artist={searchTerms}"> +</Url> +</OpenSearchDescription>
\ No newline at end of file diff --git a/templates/servernews.template b/templates/servernews.template new file mode 100644 index 0000000..959cb83 --- /dev/null +++ b/templates/servernews.template @@ -0,0 +1,99 @@ +HTTP/1.0 200 OK +Content-Type:text/html + +<html> +<head> + <link rel="stylesheet" href="/platdoc/platter.css"> + <title>distroplat - Server News</title> + <script language="JavaScript"> + <!-- + function setCookie( name, value ) + { + date = new Date(); + + date.setFullYear( date.getFullYear() + 1 ); + newCookie = name + "=" + value + ";path=/; expires=" + date.toGMTString(); + document.cookie = newCookie; + } + + function setServers() + { + var exclude = ''; + + for ( var j = 0; j < document.excludeform.elements.length; j++ ) + { + if ( document.excludeform.elements[ j ].checked == false ) + exclude += document.excludeform.elements[ j ].name + ','; + } + + setCookie( 'exclude', exclude ); + } + + function selectServers(state) + { + var exclude = ''; + + for ( var j = 0; j < document.excludeform.elements.length; j++ ) + { + document.excludeform.elements[ j ].checked = state; + + if( !state ) + exclude+=document.excludeform.elements(j).name+','; + } + + setCookie( 'exclude', exclude ); + } + + function toggleServers() + { + var exclude=''; + + for (var j=0; j < document.excludeform.elements.length; j++) + { + document.excludeform.elements[ j ].checked = !( document.excludeform.elements[ j ].checked ); + + if ( document.excludeform.elements[ j ].checked == false ) + exclude += document.excludeform.elements[ j ].name + ','; + } + + setCookie( 'exclude', exclude ); + } + + function setStart(state) { + if (state == true) setCookie('start', 'servernews'); + else setCookie('start', 'news'); + } + + function loader() + { + if (document.cookie.indexOf( 'start=servernews' ) > -1) + document.startform.elements[ 0 ].checked = true; + } + + top.document.title = 'distroplat'; + + //--> + </script> +</head> + +<body bgcolor="#%BGCOLOUR%" background="/platdoc/img/bars.png" onLoad="loader()"> +<script language="javascript"> + if (top.location == document.location) + document.write('<a href="front.plx"><img src="/platdoc/img/logo.gif" hspace=0 border=0 alt="Front Page"></a>'); +</script> + +<h3>Server News</h3> + +To include the latest news from your own server write some HTML in to a file called +<b>info.txt</b> and save it to your platters' root folder. Then retrawl. +<br> +<form name="startform"> +<input type="checkbox" onClick="setStart(this.checked)"> Start distroplat on this page +</form> + +<form name="excludeform"> +%SERVERS% +</form> + +</body> +</html> diff --git a/templates/settings.template b/templates/settings.template new file mode 100644 index 0000000..b9343e3 --- /dev/null +++ b/templates/settings.template @@ -0,0 +1,242 @@ +HTTP/1.0 200 OK +Content-Type:text/html + +<html> +<head> + <link rel="stylesheet" href="/platdoc/platter.css"> + <title>distroplat - Settings</title> +</head> + +<script language="JavaScript"> +<!-- + top.document.title = 'Settings - distroplat'; + + var screenCookieName = 'target'; + var foundFormat = false; + var foundTarget = false; + var foundLink = false; + var foundStart = false; + + function setup() + { + ourCookies = document.cookie.split("; "); + + for (var i=0; i < ourCookies.length; i++) + { + var ourCrumb = ourCookies[i].split("="); + + if (ourCrumb.length == 2) + { + if (ourCrumb[0] == 'format') + { + playformat = ourCrumb[1]; + + for (var j=0; j < document.playerpref.elements.length; j++) + { + if (document.playerpref.elements[ j ].value == playformat) + { + document.playerpref.elements[ j ].checked = 'true'; + foundFormat = true; + } + } + } + else if (ourCrumb[0] == 'target') { + target = ourCrumb[1]; + + for (var j=0; j < document.targets.elements.length; j++) + { + if (document.targets.elements[ j ].value == target) + { + document.targets.elements[ j ].checked = 'true'; + foundTarget = true; + } + } + } + else if (ourCrumb[0] == 'start') { + target = ourCrumb[1]; + + for (var j=0; j < document.startform.elements.length; j++) + { + if (document.startform.elements[ j ].value == target) + { + document.startform.elements[ j ].checked = 'true'; + foundStart = true; + } + } + } + } + } + + // Set defaults if not found + + if (!foundFormat) { + setCookie('format', 'extm3u'); + for (var k=0; k < document.playerpref.elements.length; k++) + { + if (document.playerpref.elements[k].value == 'extm3u') + document.playerpref.elements[k].checked = 'true'; + } + } + + if (!foundTarget) { + setCookie('target', 'iframe'); + for (var k=0; k < document.targets.elements.length; k++) + { + if (document.targets.elements[k].value == 'iframe') + document.targets.elements[k].checked = 'true'; + } + } + if (!foundStart) { + setCookie('start', 'servernews'); + for (var k=0; k < document.startform.elements.length; k++) + { + if (document.startform.elements[k].value == 'news') + document.startform.elements[k].checked = 'true'; + } + } + + } + + function setCookie( name, value ) + { + date = new Date(); + + date.setFullYear( date.getFullYear() + 1 ); + newCookie = name + "=" + value + ";path=/; expires=" + date.toGMTString(); + document.cookie = newCookie; + } + + function setServers() + { + var exclude = ''; + + for ( var j = 0; j < document.excludeform.elements.length; j++ ) + { + if ( document.excludeform.elements[ j ].checked == false ) + exclude += document.excludeform.elements[ j ].name + ','; + } + + setCookie( 'exclude', exclude ); + } + + function setExts() + { + var exclude = ''; + + for ( var j = 0; j < document.extpref.elements.length; j++ ) + { + if ( document.extpref.elements[ j ].checked == false ) + exclude += document.extpref.elements[ j ].name + ','; + } + + setCookie( 'exclTypes', exclude ); + } + + function selectServers(state) + { + var exclude = ''; + + for ( var j = 0; j < document.excludeform.elements.length; j++ ) + { + document.excludeform.elements[ j ].checked = state; + + if( !state ) + exclude+=document.excludeform.elements[ j ].name+','; + } + + setCookie( 'exclude', exclude ); + } + + function toggleServers() + { + var exclude=''; + + for (var j=0; j < document.excludeform.elements.length; j++) + { + document.excludeform.elements[ j ].checked = !( document.excludeform.elements[ j ].checked ); + + if ( document.excludeform.elements[ j ].checked == false ) + exclude += document.excludeform.elements[ j ].name + ','; + } + + setCookie( 'exclude', exclude ); + } + + + //--> +</script> + +<body bgcolor="#%BGCOLOUR%" background="/platdoc/img/bars.png" onLoad="setup()"> +<script language="javascript"> + if (top.location == document.location) + document.write('<a href="front.plx"><img src="/platdoc/img/logo.gif" hspace=0 border=0 alt="Front Page"></a>'); +</script> + +<p><span class="title">Settings</span> +<br> +<small> +<a href="#servers">Servers</a> - +<a href="#playlist">Playlists</a> - +<a href="#screen">Screen Size</a> - +<a href="#start">Start Page</a> +</small></p> + +<p> +<form name="excludeform"> +<strong>Servers<a name="servers"> </a></strong> +<br> +Choose which platters you want to include in your searches and artist views. +<br> +%SERVERS% +<small>All: <a href="javascript:selectServers(true)">[on]</a> +<a href="javascript:selectServers(false)">[off]</a> +<a href="javascript:toggleServers()">[toggle]</a></small> +</form> + +<p> +<form name="playerpref"> +<strong>Playlist Formats<a name="playlist"> </a></strong> +<br> +These are the playlists currently supported in Distroplat. Choose the one that best suits your +media application. +<br> +<table border=0 cellpadding=0 cellspacing=1> +%FORMATS% +</table> +</form> + +<p> + +<p> +<form name="extpref"> +<strong>File Types<a name="ext"> </a></strong> +<br> +Uncheck any file types you cannot play. +%EXTS% +</form> + +<p> +<form name="targets"> +<strong>Screen Size<a name="screen"> </a></strong> +<br> +If this right hand frame is too small to display artist pages and search results on +your screen, select <i>'Small screen'</i> below and they will be opened full frame. +You must <a href="front.plx" target="_top"><b><i>refresh this entire window</i></b></a> +for the setting to take effect. +<br> +<input type="radio" name="screensize" value="iframe" onClick="setCookie('target', 'iframe');" title="Click to direct search and artist pages to the pane on the right"> Big Screen<br> +<input type="radio" name="screensize" value="narrow" onClick="setCookie('target', 'narrow');" title="Click to direct search and artist pages to the pane on the right but in narrow format"> Big Screen (Narrow Format)<br> +<input type="radio" name="screensize" value="_top" onClick="setCookie('target', '_top');" title="Click to open search and artist pages full frame"> Small Screen +</form> + +<p> +<form name="startform"> +<strong>Start Page<a name="start"> </a></strong> +<br> +Choose whether you want distroplat to start on platter news or server news. +<br> +<input type="radio" name="start" value="news" onClick="setCookie('start', 'news');" title="Click to start on platter news"> Platter News<br> +<input type="radio" name="start" value="servernews" onClick="setCookie('start', 'servernews');" title="Click to start on server news"> Server News +</form> +</body> +</html> diff --git a/templates/trawl.template b/templates/trawl.template new file mode 100644 index 0000000..7030756 --- /dev/null +++ b/templates/trawl.template @@ -0,0 +1,42 @@ +HTTP/1.0 200 OK +Content-Type:text/html + +<html> +<head> + <link rel="stylesheet" href="/platdoc/platter.css"> + <title>distroplat - Content Trawler</title> +</head> + +<script language="JavaScript"> +<!-- + + top.document.title = 'Content Trawler - distroplat'; + + function twat() + { + var risultato=''; + + for (var j=0; j < document.twatsource.elements.length; j++) + if (document.twatsource.elements[ j ].type == 'checkbox' && document.twatsource.elements[ j ].checked == true ) + risultato += document.twatsource.elements[ j ].name + ','; + + if ( risultato.length>0 ) + { + document.twatform.hosts.value = risultato.slice(0,risultato.length-1); + document.twatform.submit(); + } + else + alert( 'Please select some hosts to twat' ); + + } +// --> +</script> + +<body bgcolor="#%BGCOLOUR%" background="/platdoc/img/bars.png"> +<h3>Content Trawler</h3> +<p> +Use this to update a server's content. Choose servers from the list below and +hit the button. Minimum time between trawls of a specific server is <b>%MINTRAWL% minutes</b> +for the sake of the children. +</p> +<form name="twatform" method="GET"><input type="hidden" name="hosts" value=""></form> |
