htdocs/changetz.php
changeset 10 a97bd37e43e9
parent 8 0acb8d9a3194
child 44 73f74d395f95
equal deleted inserted replaced
9:4192954c29d1 10:a97bd37e43e9
    51   </head>
    51   </head>
    52   <body>
    52   <body>
    53     <?php
    53     <?php
    54     if ( $set_zone )
    54     if ( $set_zone )
    55     {
    55     {
    56       $target = dirname($_SERVER['PHP_SELF']) . '/';
    56       $target = rtrim(dirname($_SERVER['REQUEST_URI']), '/') . '/';
    57       echo '<div class="success">' . "Successfully set time zone to <b>{$set_zone}</b>. <a href=\"$target\">Return to the stats page</a>." . '</div>';
    57       echo '<div class="success">' . "Successfully set time zone to <b>{$set_zone}</b>. <a href=\"$target\">Return to the stats page</a>." . '</div>';
    58     }
    58     }
    59     ?>
    59     ?>
    60     <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
    60     <form action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']); ?>" method="post">
    61     Select time zone:
    61     Select time zone:
    62     <select name="tz">
    62     <select name="tz">
    63       <?php
    63       <?php
    64       $zones = get_timezone_list();
    64       $zones = get_timezone_list();
    65       foreach ( $zones as $region => $areas )
    65       foreach ( $zones as $region => $areas )