Odyssey
hcu_logout.prg
1 <?php
2 # don't check for a cookie -- would be really silly to require a
3 # login before allowing logout.
4 
5 $monLibrary= dirname(__FILE__) . "/../library";
6 require_once("$monLibrary/cu_top.i");
7 
8 #
9 # Parse the variables to be used
10 #
11 
12 $cu = preg_replace("/[^A-Za-z0-9]/","",$_GET['cu']);
13 $cu = substr($cu,0,12);
14 
15 # set both the ticket cookie and the return-address cookie to null values
16 #
17 $now = time();
18  HCU_setcookie_env($SYSENV, "HCUTicket", "", $now);
19  HCU_setcookie_env($SYSENV, "Tx_hURI", "",$now);
20 
21 if ($href != '') {
22  print <<<EOF
23  <script>
24  {
25  location.replace('$href');
26  }
27  </script>
28 EOF;
29 }
30 
31  cu_header("Logout Monitor");
32 print <<< print_logout
33  <table align='center' cellpadding="3" cellspacing="0" border="0" width="500" class='dmsbg'><tr><td>
34  <table cellpadding="1" cellspacing="0" border="0" width="100%" bgcolor=white>
35  <tr>
36  <td colspan="2" class="bar" align="center">
37  LOGOUT MONITOR
38  </td>
39  </tr>
40  <tr>
41  <td nowrap align="center" class="hdr">
42  Thank you for using HomeCU Monitor.<br>
43  You have successfully logged off.<br>
44  <a href='$produrl/monitor/mindex.html'>Return to Monitor</a>
45  </td>
46 
47  </table>
48  </td></tr></table>
49  </body>
50 </html>
51 print_logout;