function display_success_popup() { global $result; $result = 12; // TODO: Merge this with 'display_success' logic global $title, $headline, $bodytext; $title = 'Logged in (display_success_popup)'; $headline = 'Logged in (display_success_popup)'; $bodytext = 'You should use this page to log out when you are finished.'; $bodytext .= '<h2><a href="http://' . $_GET['uamip'] . ':' . $_GET['uamport'] . '/logoff">Logout</a></h2>'; print_header(); print_body(); }
$titel = 'Logged out from FreeNET HotSpot'; $headline = 'Logged out from FreeNET HotSpot'; $bodytext = '<a href="http://' . $_GET['uamip'] . ':' . $_GET['uamport'] . '/prelogin">Login</a>'; print_header(); print_body(); print_footer(); } # 0: It was not a form request # Send out an error message if ($_GET['res'] == "") { $result = 0; $titel = 'What do you want here?'; $headline = 'HotSpot Login Failed'; $bodytext = 'Login must be performed through ChilliSpot daemon!'; print_header(); print_body(); print_footer(); } # functions function print_header() { global $titel, $loginpath; $uamip = $_GET['uamip']; $uamport = $_GET['uamport']; print "\n <html>\n <head>\n <title>{$titel}</title>\n <meta http-equiv=\"Cache-control\" content=\"no-cache\">\n <meta http-equiv=\"Pragma\" content=\"no-cache\">\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n <SCRIPT LANGUAGE=\"JavaScript\">\n var blur = 0;\n var starttime = new Date();\n var startclock = starttime.getTime();\n var mytimeleft = 0;\n function doTime() {\n window.setTimeout( \"doTime()\", 1000 );\n t = new Date();\n time = Math.round((t.getTime() - starttime.getTime())/1000);\n if (mytimeleft) {\n time = mytimeleft - time;\n if (time <= 0) {\n window.location = \"{$loginpath}?res=popup3&uamip={$uamip}&uamport={$uamport}\";\n }\n }\n if (time < 0) time = 0;\n hours = (time - (time % 3600)) / 3600;\n time = time - (hours * 3600);\n mins = (time - (time % 60)) / 60;\n secs = time - (mins * 60);\n if (hours < 10) hours = \"0\" + hours;\n if (mins < 10) mins = \"0\" + mins;\n if (secs < 10) secs = \"0\" + secs;\n title = \"Online time: \" + hours + \":\" + mins + \":\" + secs;\n if (mytimeleft) {\n title = \"Remaining time: \" + hours + \":\" + mins + \":\" + secs;\n }\n if(document.all || document.getElementById){\n document.title = title;\n }\n else { \n self.status = title;\n }\n }\n function popUp(URL) {\n if (self.name != \"chillispot_popup\") {\n chillispot_popup = window.open(URL, 'chillispot_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=350,height=300');\n }\n }\n function doOnLoad(result, URL, userurl, redirurl, timeleft) {\n if (timeleft) {\n mytimeleft = timeleft;\n }\n if ((result == 1) && (self.name == \"chillispot_popup\")) {\n doTime();\n }\n if ((result == 1) && (self.name != \"chillispot_popup\")) {\n chillispot_popup = window.open(URL, 'chillispot_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=350,height=300');\n }\n if ((result == 2) || result == 5) {\n document.form1.UserName.focus()\n }\n if ((result == 2) && (self.name != \"chillispot_popup\")) {\n chillispot_popup = window.open('', 'chillispot_popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=200');\n chillispot_popup.close();\n }\n if ((result == 12) && (self.name == \"chillispot_popup\")) {\n doTime();\n if (redirurl) {\n opener.location = redirurl;\n }\n else if (opener.home) {\n opener.home();\n }\n else {\n opener.location = \"about:home\";\n }\n self.focus();\n blur = 0;\n }\n if ((result == 13) && (self.name == \"chillispot_popup\")) {\n self.focus();\n blur = 1;\n }\n }\n function doOnBlur(result) {\n if ((result == 12) && (self.name == \"chillispot_popup\")) {\n if (blur == 0) {\n blur = 1;\n self.focus();\n }\n }\n }\n function popup_logoff(url, name)\n {\n MyNewWindow=window.open(\"http://\"+url,name);\n }\n </script>"; } function print_body() { global $headline, $bodytext, $body_onload, $result, $loginpath; $uamip = $_GET['uamip']; $uamport = $_GET['uamport'];
echo $_POST['headingInput']; ?> </h1> <h3 style="font-weight:normal;font-family:Verdana,sans-serif;margin:0px 0px 10px 10px;font-size:15px;color:rgb(68,68,68)"> <?php echo $_POST['subheadingInput']; ?> </h3></td></tr></tbody></table></td></tr> <tr><td><p style="margin:0px 10px"> <?php echo $_POST['greetingInput']; ?> </p></td></tr> <?php for ($i = 0; $i < $n; ++$i) { print_body($i); } ?> <tr id="footer"><td> <table cellspacing="0" cellpadding="0"><tbody><tr><td width="425px"> <p id="signature">Nevin Lazarus | CSE Revue | Secretary <br>Tel: 9385 5880 | Email: <a href="mailto:secretary@cserevue.org.au">secretary@cserevue.org.au </a> <br>Web: <a href="http://www.cserevue.org.au" >http://www.cserevue.org.au </a> <br>CSE Revue Society, School of Computer Science & Engineering, <br>K17 Building, University of New South Wales <br>Sydney, 2052 NSW</p> </td><td width="75px"> <a href="https://www.facebook.com/groups/2244067967/" title="Facebook Group"><img src="img/facebook.gif" width="25px" height="25px"></a> <a href="https://www.facebook.com/cserevue" title="Facebook Page"><img src="img/like.gif" width="25px" height="25px"></a> <a href="http://www.cserevue.org.au/" title="Website"><img src="img/web.gif" width="25px" height="25px"></a> <a href="https://www.facebook.com/l.php?u=https%3A%2F%2Fwww.google.com%2Fcalendar%2Fembed%3Fsrc%3Davbg7c8bc9slfp0fhg9mkgqlck%2540group.calendar.google.com%26ctz%3DAustralia%252FSydney&h=JAQEew1Sg" title="Google Calendar"><img src="img/calendar.gif" width="25px" height="25px"></a> </td><td width="100px"> <img src="img/arc_logo.gif" width="100px" height="72px"> </td></tr></tbody></table> </td></tr>