source: temp/test-xoops.ec-cube.net/html/session_confirm.php @ 405

Revision 405, 2.0 KB checked in by root, 20 years ago (diff)
Line 
1<?php
2
3include "mainfile.php";
4
5// security check
6if( ! isset( $_SESSION['AUTOLOGIN_REQUEST_URI'] ) ) exit ;
7
8// get URI
9$url = $_SESSION['AUTOLOGIN_REQUEST_URI'] ;
10unset( $_SESSION['AUTOLOGIN_REQUEST_URI'] ) ;
11if( preg_match('/javascript:/si', $url) ) exit ; // black list of url
12$url4disp = preg_replace("/&amp;/i", '&', htmlspecialchars($url, ENT_QUOTES));
13
14
15if( isset( $_SESSION['AUTOLOGIN_POST'] ) ) {
16
17    // posting confirmation
18
19    $old_post = $_SESSION['AUTOLOGIN_POST'] ;
20    unset( $_SESSION['AUTOLOGIN_POST'] ) ;
21
22    $hidden_str = '' ;
23    foreach( $old_post as $k => $v ) {
24        $hidden_str .= "\t".'      <input type="hidden" name="'.htmlspecialchars($k,ENT_QUOTES).'" value="'.htmlspecialchars($v,ENT_QUOTES).'" />'."\n" ;
25    }
26
27    echo '
28    <html>
29    <head>
30    <meta http-equiv="Content-Type" content="text/html; charset='._CHARSET.'" />
31    <title>'.$xoopsConfig['sitename'].'</title>
32    </head>
33    <body>
34    <div style="text-align:center; background-color: #EBEBEB; border-top: 1px solid #FFFFFF; border-left: 1px solid #FFFFFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight : bold;">
35      <h4>'._RETRYPOST.'</h4>
36      <form action="'.$url4disp.'" method="POST">
37      '.$hidden_str.'
38        <input type="submit" name="timeout_repost" value="'._SUBMIT.'" />
39      </form>
40    </div>
41    </body>
42    </html>
43    ' ;
44    exit ;
45
46} else {
47
48    // just redirecting
49
50    $time = 1 ;
51    // $message = empty( $message ) ? _TAKINGBACK : $message ;
52    $message = _TAKINGBACK ;
53
54    echo '
55    <html>
56    <head>
57    <meta http-equiv="Content-Type" content="text/html; charset='._CHARSET.'" />
58    <meta http-equiv="Refresh" content="'.$time.'; url='.$url4disp.'" />
59    <title>'.$xoopsConfig['sitename'].'</title>
60    </head>
61    <body>
62    <div style="text-align:center; background-color: #EBEBEB; border-top: 1px solid #FFFFFF; border-left: 1px solid #FFFFFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight : bold;">
63      <h4>'.$message.'</h4>
64      <p>'.sprintf(_IFNOTRELOAD, $url4disp).'</p>
65    </div>
66    </body>
67    </html>
68    ' ;
69    exit ;
70
71}
72
73?>
Note: See TracBrowser for help on using the repository browser.