<?php include_once "../include/module.php"; include_once "../include/linklist.php"; $m = new Module("links", 0); $m->addContent("<ul id=\"mod-links-content\"></ul>"); $m->addJs("var links = document.getElementById('mod-links-content'); links.innerHTML = '';var count = 0; var link = null;"); $m->addJs("while((link = xml.getElementsByTagName('link')[count++]) != undefined)"); $m->addJs("links.innerHTML += '<li class=\"linklist\"><a href=\"'+link.childNodes[1].childNodes[0].nodeValue+'\">' + link.childNodes[0].childNodes[0].nodeValue + '</a></li>'");
<?php include_once "../include/module.php"; include_once "../include/ventrilostatus.php"; $m = new Module("bills", 1); if ($m->u->billable) { $m->addJs("var box = document.getElementById('mod-bills');"); $m->addJs("box.innerHTML = ''; var counter = 0;"); $m->addJs("if((xml.getElementsByTagName('owing')[0]).length != 0)box.innerHTML+='s';"); } else { $m->addContent("Billing not available."); } /* $m->addJs("var box = document.getElementById('mod-ventrilo');"); $m->addJs("box.innerHTML = '<strong>'+xml.getElementsByTagName('name')[0].childNodes[0].nodeValue+'</strong><br/>';"); $m->addJs("var counter = 0; var user='';"); $m->addJs("while((user = xml.getElementsByTagName('user')[counter++])!=null)"); $m->addJs("box.innerHTML+=user.childNodes[0].nodeValue+'<br/>';"); */
<?php include_once "../include/module.php"; $m = new Module("internet", 2); $m->addContent("<strong id=\"mod-internet-plan\">time remaining</strong><div id=\"mod-internet-timebar\"></div><div id=\"mod-internet-time\"></div><br/>"); $m->addContent("<strong>onpeak remaining</strong><div id=\"mod-internet-onpeakbar\"></div><div id=\"mod-internet-onpeak\"></div><br/>"); $m->addContent("<strong>offpeak remaining</strong><div id=\"mod-internet-offpeakbar\"></div><div id=\"mod-internet-offpeak\"></div><div id=\"mod-internet-upload\"></div><div id=\"mod-internet-updated\"></div>"); //title $m->addJs("document.getElementById('mod-internet-plan').innerHTML = xml.getElementsByTagName('plan')[0].childNodes[0].nodeValue;"); //time $m->addJs("\$(\"#mod-internet-timebar\").progressbar({value: parseInt(xml.getElementsByTagName('time')[0].childNodes[0].nodeValue)});"); $m->addJs("document.getElementById('mod-internet-time').innerHTML = \"days left:\" + xml.getElementsByTagName('daysleft')[0].childNodes[0].nodeValue;"); $m->addJs("document.getElementById('mod-internet-timebar').childNodes[0].innerHTML = parseInt(xml.getElementsByTagName('time')[0].childNodes[0].nodeValue)+'%';"); //onpeak $m->addJs("\$(\"#mod-internet-onpeakbar\").progressbar({value: parseInt(xml.getElementsByTagName('onpercentage')[0].childNodes[0].nodeValue)});"); $m->addJs("document.getElementById('mod-internet-onpeakbar').childNodes[0].innerHTML = parseInt(xml.getElementsByTagName('onpercentage')[0].childNodes[0].nodeValue)+'%';"); $m->addJs("document.getElementById('mod-internet-onpeak').innerHTML = \"data used:\" + xml.getElementsByTagName('onpeakused')[0].childNodes[0].nodeValue + \"/\"+ xml.getElementsByTagName('onpeaktotal')[0].childNodes[0].nodeValue+\"<br/>gb/d remaining: \"+xml.getElementsByTagName('ongbday')[0].childNodes[0].nodeValue;"); //offpeak $m->addJs("\$(\"#mod-internet-offpeakbar\").progressbar({value: parseInt(xml.getElementsByTagName('offpercentage')[0].childNodes[0].nodeValue)});"); $m->addJs("document.getElementById('mod-internet-offpeakbar').childNodes[0].innerHTML = parseInt(xml.getElementsByTagName('offpercentage')[0].childNodes[0].nodeValue)+'%';"); $m->addJs("document.getElementById('mod-internet-offpeak').innerHTML = \"data used:\" + xml.getElementsByTagName('offpeakused')[0].childNodes[0].nodeValue + \"/\"+ xml.getElementsByTagName('offpeaktotal')[0].childNodes[0].nodeValue + \"<br/>gb/d remaining: \"+xml.getElementsByTagName('offgbday')[0].childNodes[0].nodeValue;"); //upload $m->addJs("document.getElementById('mod-internet-upload').innerHTML = \"<br/>data uploaded: \" + xml.getElementsByTagName('uploaded')[0].childNodes[0].nodeValue+'gb';"); $m->addJs("document.getElementById('mod-internet-updated').innerHTML = xml.getElementsByTagName('updated')[0].childNodes[0].nodeValue;");
<?php include_once "../include/module.php"; include_once "../include/linklist.php"; $m = new Module("minecraft", 0); $m->addContent("<ul id=\"mod-minecraft-content\"></ul>"); $m->addJs("var minecraft = document.getElementById('mod-minecraft-content'); minecraft.innerHTML = '';var count = 0; var line = null;"); $m->addJs("while((line = xml.getElementsByTagName('line')[count++]) != undefined)"); $m->addJs("minecraft.innerHTML += '<li>' + line.childNodes[0].nodeValue + '</li>'");
<?php include_once "../include/module.php"; include_once "../include/userobject.php"; $m = new Module("shoutbox", 0); $u = new UserObject(); if ($u->canAccess(1)) { $m->addContent("<form id=\"mod-shoutbox-form\" name=\"Shoutblog\" onsubmit=\"if(document.getElementById('mod-shoutbox-form').message.value == ''){\r\n errorMsg('Please enter a message in the field before pressing enter..'); return false;}\r\n else{sendForm(this, 'shoutbox'); document.getElementById('mod-shoutbox-message').value = ''};\">\r\n <table>\r\n <tr>Message:</tr>\r\n <tr><input type=\"text\" name=\"message\" id=\"mod-shoutbox-message\"></tr>\r\n <tr>\r\n <td><input type=\"submit\" value=\"Shout\" class=\"ui-buttonui-widget ui-state-default ui-corner-all\"/></td>\r\n </tr>\r\n </table>\r\n </form>"); } $m->addContent("<div id=\"mod-shoutbox-contents\"></div>"); $m->addJs("var shoutbox = document.getElementById('mod-shoutbox-contents'); shoutbox.innerHTML = ''; var count = 0;"); $m->addJs("while((message = xml.getElementsByTagName('message')[count++]) != undefined)"); $m->addJs("shoutbox.innerHTML += '<p><b>' + message.childNodes[0].childNodes[0].nodeValue + '</b> ' + message.childNodes[1].childNodes[0].nodeValue + '<br />' + message.childNodes[2].childNodes[0].nodeValue + '</p>'");
<?php include_once "../include/module.php"; $m = new Module("bandwidth", 0); //create placeholders $m->addContent("<table><tr><td width=10><span class=\"ui-icon ui-icon-carat-1-n\"></span></td><td width=60>\r\n<span id=\"mod-bandwidth-upload\">...</span></td><td width=10><span class=\"ui-icon ui-icon-carat-1-s\"></span></td><td width=60>\r\n<span id=\"mod-bandwidth-download\">...</span></td></tr></table>"); //Add in data $m->addJs("document.getElementById('mod-bandwidth-upload').innerHTML = xml.getElementsByTagName('liveupload')[0].childNodes[0].nodeValue;"); $m->addJs("document.getElementById('mod-bandwidth-download').innerHTML = xml.getElementsByTagName('livedownload')[0].childNodes[0].nodeValue;");
<?php include_once "../include/module.php"; include_once "../include/linklist.php"; $m = new Module("user", 0); $l = new LinkList($m->u); //Login box $m->addContent("<div id=\"mod-user-loginbox\" style=\"display:none;\">\r\n<form id=\"mod-user-login\" name=\"login\" method=\"get\" onsubmit=\"\r\n\t\tif(\r\n\t\t validatePopulated(document.getElementById('mod-user-login-username').value) \r\n\t\t&& validatePopulated(document.getElementById('mod-user-login-password').value)){\r\n\t\t\t\tsendForm(this,'register'); \r\n\t\t\t} else {\r\n\t\t\t\terrorMsg('Please take this seriously.', 'To log in you need to type in your username and password.');\r\n\t\t\t}\r\n\t\treturn false; \">\r\n\t\t<table>\r\n\t\t<tr>\r\n\t\t<td>\r\n\t\t<label for=\"username\">user</label>\r\n\t\t</td>\r\n\t\t<td>\r\n\t\t<input type=\"text\" name=\"username\" id=\"mod-user-login-username\" />\r\n\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t<td>\r\n\t\t<label for=\"password\">code</label>\r\n\t\t</td>\r\n\t\t<td>\r\n\t\t<input type=\"password\" name=\"password\" id=\"mod-user-login-password\" />\r\n\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t<td>\r\n\t\t</td>\r\n\t\t<td>\r\n\t\t<input type=\"submit\" value=\"login\" class=\"ui-button ui-widget ui-state-default ui-corner-all\" />\r\n\t\t<input type=\"button\" class=\"ui-button ui-widget ui-state-default ui-corner-all\" onclick=\"javascript:grabContent('register','action=wanttoregister')\" value=\"register\" />\r\n\t\t</td></tr></table></form></div>"); //User Info section $m->addContent("<div id=\"mod-user-info\" style=\"display:inline;\">\r\n\tLogged in as: <div id=\"mod-user-info-username\" style=\"display:inline;\">...</div><br/>\r\n\t<div id=\"mod-user-info-connection\">still loading...</div>\r\n\t<input type=\"button\" value=\"logout\" class=\"ui-button ui-widget ui-state-default ui-corner-all\" onclick=\"javascript:document.cookie = 'azaka_user=;path=/';grabModules(); grabSidebar();grabContent(window.location.hash.substring(1,99));false;\"/>\r\n\t</div>"); //Show/hide relevant area. $m->addJs("if(xml.getElementsByTagName('username')[0].childNodes[0].nodeValue == 'guest') {"); $m->addJs("document.getElementById('mod-user-info').style.display = 'none';"); $m->addJs("document.getElementById('mod-user-loginbox').style.display = 'inline';"); $m->addJs("} else {"); $m->addJs("document.getElementById('mod-user-info').style.display = 'inline';"); $m->addJs("document.getElementById('mod-user-loginbox').style.display = 'none';}"); //Fill in userdata $m->addJs("document.getElementById('mod-user-info-username').innerHTML = xml.getElementsByTagName('username')[0].childNodes[0].nodeValue;"); $m->addJs("document.getElementById('mod-user-info-connection').innerHTML = xml.getElementsByTagName('connection')[0].childNodes[0].nodeValue;"); $m->addJs("document.getElementById('mod-user-info-connection').innerHTML += ' - ' + xml.getElementsByTagName('ip')[0].childNodes[0].nodeValue;"); $m->addJs("document.getElementById('skin').href = xml.getElementsByTagName('skin')[0].childNodes[0].nodeValue;"); //$m->addJs("document.getElementById('mod-user-content').innerHTML = xml.getElementsByTagName('content')[0].nodeValue;");