root/wifidog/tags/wifidog-auth_1.0/gw_message.php

Revision 395, 4.3 kB (checked in by syrus, 1 year ago)

Version Prod 20071208

Line 
1 <?php
2
3 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4
5 // +-------------------------------------------------------------------+
6 // | WiFiDog Authentication Server                                     |
7 // | =============================                                     |
8 // |                                                                   |
9 // | The WiFiDog Authentication Server is part of the WiFiDog captive  |
10 // | portal suite.                                                     |
11 // +-------------------------------------------------------------------+
12 // | PHP version 5 required.                                           |
13 // +-------------------------------------------------------------------+
14 // | Homepage:     http://www.wifidog.org/                             |
15 // | Source Forge: http://sourceforge.net/projects/wifidog/            |
16 // +-------------------------------------------------------------------+
17 // | This program is free software; you can redistribute it and/or     |
18 // | modify it under the terms of the GNU General Public License as    |
19 // | published by the Free Software Foundation; either version 2 of    |
20 // | the License, or (at your option) any later version.               |
21 // |                                                                   |
22 // | This program is distributed in the hope that it will be useful,   |
23 // | but WITHOUT ANY WARRANTY; without even the implied warranty of    |
24 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     |
25 // | GNU General Public License for more details.                      |
26 // |                                                                   |
27 // | You should have received a copy of the GNU General Public License |
28 // | along with this program; if not, contact:                         |
29 // |                                                                   |
30 // | Free Software Foundation           Voice:  +1-617-542-5942        |
31 // | 59 Temple Place - Suite 330        Fax:    +1-617-542-2652        |
32 // | Boston, MA  02111-1307,  USA       gnu@gnu.org                    |
33 // |                                                                   |
34 // +-------------------------------------------------------------------+
35
36 /**
37  * Gateway messages
38  *
39  * @package    WiFiDogAuthServer
40  * @author     Philippe April
41  * @copyright  2004-2006 Philippe April
42  * @version    Subversion $Id: gw_message.php 979 2006-02-28 14:21:36Z max-horvath $
43  * @link       http://www.wifidog.org/
44  */
45
46 /**
47  * Load required files
48  */
49 require_once(dirname(__FILE__) . '/include/common.php');
50
51 require_once('include/common_interface.php');
52 require_once('classes/User.php');
53 require_once('classes/Network.php');
54 require_once('classes/MainUI.php');
55
56 $ui = new MainUI();
57 $errmsg = "";
58
59 if (isset($_REQUEST["message"])) {
60     switch ($_REQUEST["message"]) {
61     case "failed_validation":
62         $errmsg .= "<p>" . sprintf(_("You have failed to validate your account in %d minutes."), (User::getCurrentUser()->getNetwork()->getValidationGraceTime() / 60)) . "</p>";
63         $errmsg .= "<p>" . _("Please validate your account from somewhere else or create a new one.") . "</p>";
64         $ui->displayError($errmsg);
65         break;
66
67     case "denied":
68         $errmsg .= _("Access denied!");
69         $ui->displayError($errmsg);
70         break;
71
72     case "activate":
73         $errmsg .= "<p>" . sprintf(_("You have now been granted %d minutes of Internet access without being validated to go and activate your account."), (User::getCurrentUser()->getNetwork()->getValidationGraceTime() / 60)) . "</p>";
74         $errmsg .= "<p>" . _("If you fail to validate your account in 15 minutes, you will have to validate it from somewhere else.") . "</p>";
75         $errmsg .= "<p>" . _("If you do not receive an email from our validation server in the next minute, perhaps you have made a typo in your email address, you might have to create another account.") . "</p>";
76         $ui->displayError($errmsg);
77         break;
78
79     default:
80         $errmsg .= _("No message has been specified! (this is probably an error)");
81         $ui->displayError($errmsg);
82         break;
83     }
84 } else {
85     $errmsg .= _("No message has been specified! (this is probably an error)");
86     $ui->displayError($errmsg);
87 }
88
89 /*
90  * Local variables:
91  * tab-width: 4
92  * c-basic-offset: 4
93  * c-hanging-comment-ender-p: nil
94  * End:
95  */
96
97 ?>
Note: See TracBrowser for help on using the browser.