Changeset 567

Show
Ignore:
Timestamp:
04/25/05 12:17:55 (8 years ago)
Author:
fproulx
Message:

2005-04-25 Fran�ois Proulx <francois.proulx@…

  • Completed integration of new interface with new objects
Location:
trunk/wifidog-auth
Files:
22 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/ChangeLog

    r566 r567  
     12005-04-25 François Proulx <francois.proulx@gmail.com 
     2        * Completed integration of new interface with new objects 
     3         
    142005-04-25 Benoit Grégoire  <bock@step.polymtl.ca> 
    25        * Integration merge, should work, but there will be display problems everywhere.  Expect further commits today. 
  • trunk/wifidog-auth/wifidog/admin/user_log.php

    r566 r567  
    106106        require_once BASEPATH.'classes/MainUI.php'; 
    107107$ui=new MainUI(); 
    108         $ui->setToolSection('ADMIN'); 
     108$ui->setToolSection('ADMIN'); 
    109109$ui->setMainContent($smarty->fetch("admin/templates/user_log.html")); 
    110110$ui->display(); 
  • trunk/wifidog-auth/wifidog/admin/user_stats.php

    r566 r567  
    3838$smarty->assign("most_frequent_users", Statistics::getMostFrequentUsers(10)); 
    3939$smarty->assign("most_greedy_users", Statistics::getMostGreedyUsers(10)); 
    40         require_once BASEPATH.'classes/MainUI.php'; 
     40 
     41require_once BASEPATH.'classes/MainUI.php'; 
    4142$ui=new MainUI(); 
    42         $ui->setToolSection('ADMIN'); 
     43$ui->setToolSection('ADMIN'); 
    4344$ui->setMainContent($smarty->fetch("admin/templates/user_stats.html")); 
    4445$ui->display(); 
  • trunk/wifidog-auth/wifidog/change_password.php

    r530 r567  
    7878isset ($_REQUEST["auth_source"]) && $smarty->assign('selected_auth_source', $_REQUEST["auth_source"]); 
    7979 
    80 $smarty->display("templates/change_password.html"); 
     80$ui = new MainUI(); 
     81$smarty->assign('SelectNetworkUI', Network::getSelectNetworkUI('auth_source')); 
     82$ui->setMainContent($smarty->fetch("templates/change_password.html")); 
     83$ui->display(); 
     84//$smarty->display("templates/change_password.html"); 
    8185?> 
  • trunk/wifidog-auth/wifidog/classes/MainUI.php

    r566 r567  
    11<?php 
    2  
    3  
    42/********************************************************************\ 
    53 * This program is free software; you can redistribute it and/or    * 
     
    3129{ 
    3230        private $main_content; /**<Content to be displayed in the main pane */ 
    33                 private $tool_content; /**<Content to be displayed in the tool pane */ 
     31        private $tool_content; /**<Content to be displayed in the tool pane */ 
    3432        private $smarty; 
    3533        private $title; 
     
    5351        public function setToolSection($section) 
    5452        { 
    55                 if($section=='ADMIN') 
     53                if ($section == 'ADMIN') 
    5654                { 
    5755                        $current_user = User :: getCurrentUser(); 
    58                             $html = ''; 
    59     $html .= "<ul>\n"; 
    60     $html .= "<li><a href='user_log.php'>"._("User logs")."</a></li>\n"; 
    61     $html .= "<li><a href='online_users.php'>"._("Online Users")."</a></li>\n"; 
    62     $html .= "<li><a href='user_stats.php'>"._("Cumulative user statistics")."</a></li>\n"; 
    63     $html .= "<li><a href='hotspot_log.php'>"._("Hotspot logs")."</a></li>\n"; 
    64     $html .= "<li><a href='import_user_database.php'>"._("Import NoCat user database")."</a></li>\n"; 
    65     $html .= "<li><a href='hotspot.php'>"._("Hotspot creation and configuration")."</a> - Beta</li>\n"; 
    66     $html .= "<li><a href='owner_sendfiles.php'>"._("Hotspot owner administration")."</a> - Beta</li>\n"; 
    67      
    68     /* Node admin */ 
    69     $html .= "<div class='admin_section_container'>\n"; 
    70     $html .= '<form action="'.GENERIC_OBJECT_ADMIN_ABS_HREF.'" method="get">'; 
    71     $html .= "<div class='admin_section_title'>"._("Node administration:")." </div>\n"; 
    72      
    73     $html .= "<div class='admin_section_data'>\n"; 
    74     $html .= "<input type='hidden' name='action' value='edit'>\n"; 
    75     $html .= "<input type='hidden' name='object_class' value='Node'>\n"; 
    76      
    77     if ($current_user->isSuperAdmin()) 
    78     { 
    79         $sql_additional_where = ''; 
    80     } 
    81     else 
    82     { 
    83         $sql_additional_where = "AND node_id IN (SELECT node_id from node_owners WHERE user_id='".$current_user->getId()."')"; 
    84     } 
    85     $html .= Node :: getSelectNodeUI('object_id', $sql_additional_where); 
    86     $html .= "</div>\n"; 
    87     $html .= "<div class='admin_section_tools'>\n"; 
    88      
    89     $html .= "<input type=submit name='edit_submit' value='"._("Edit")."'>\n"; 
    90     $html .= "</div>\n"; 
    91     $html .= '</form>'; 
    92     $html .= "</div>\n"; 
    93      
    94     /* Network admin */ 
    95     $html .= "<div class='admin_section_container'>\n"; 
    96     $html .= '<form action="'.GENERIC_OBJECT_ADMIN_ABS_HREF.'" method="post">'; 
    97     $html .= "<div class='admin_section_title'>"._("Network administration:")." </div>\n"; 
    98      
    99     $html .= "<div class='admin_section_data'>\n"; 
    100     $html .= "<input type='hidden' name='action' value='edit'>\n"; 
    101     $html .= "<input type='hidden' name='object_class' value='Network'>\n"; 
    102     $html .= Network :: getSelectNetworkUI('object_id'); 
    103     $html .= "</div>\n"; 
    104     $html .= "<div class='admin_section_tools'>\n"; 
    105      
    106     $html .= "<input type=submit name='edit_submit' value='"._("Edit")."'>\n"; 
    107     $html .= "</div>\n"; 
    108     $html .= '</form>'; 
    109     $html .= "</div>\n"; 
    110      
    111     $html .= "<li><a href='content_admin.php'>"._("Content manager")."</a></li>\n"; 
    112     $html .= "</ul>\n"; 
     56                        $html = ''; 
     57                        $html .= "<ul>\n"; 
     58                        $html .= "<li><a href='user_log.php'>"._("User logs")."</a></li>\n"; 
     59                        $html .= "<li><a href='online_users.php'>"._("Online Users")."</a></li>\n"; 
     60                        $html .= "<li><a href='user_stats.php'>"._("Cumulative user statistics")."</a></li>\n"; 
     61                        $html .= "<li><a href='hotspot_log.php'>"._("Hotspot logs")."</a></li>\n"; 
     62                        $html .= "<li><a href='import_user_database.php'>"._("Import NoCat user database")."</a></li>\n"; 
     63                        $html .= "<li><a href='hotspot.php'>"._("Hotspot creation and configuration")."</a> - Beta</li>\n"; 
     64                        $html .= "<li><a href='owner_sendfiles.php'>"._("Hotspot owner administration")."</a> - Beta</li>\n"; 
     65 
     66                        /* Node admin */ 
     67                        $html .= "<div class='admin_section_container'>\n"; 
     68                        $html .= '<form action="'.GENERIC_OBJECT_ADMIN_ABS_HREF.'" method="get">'; 
     69                        $html .= "<div class='admin_section_title'>"._("Node administration:")." </div>\n"; 
     70 
     71                        $html .= "<div class='admin_section_data'>\n"; 
     72                        $html .= "<input type='hidden' name='action' value='edit'>\n"; 
     73                        $html .= "<input type='hidden' name='object_class' value='Node'>\n"; 
     74 
     75                        if ($current_user->isSuperAdmin()) 
     76                        { 
     77                                $sql_additional_where = ''; 
     78                        } 
     79                        else 
     80                        { 
     81                                $sql_additional_where = "AND node_id IN (SELECT node_id from node_owners WHERE user_id='".$current_user->getId()."')"; 
     82                        } 
     83                        $html .= Node :: getSelectNodeUI('object_id', $sql_additional_where); 
     84                        $html .= "</div>\n"; 
     85                        $html .= "<div class='admin_section_tools'>\n"; 
     86 
     87                        $html .= "<input type=submit name='edit_submit' value='"._("Edit")."'>\n"; 
     88                        $html .= "</div>\n"; 
     89                        $html .= '</form>'; 
     90                        $html .= "</div>\n"; 
     91 
     92                        /* Network admin */ 
     93                        $html .= "<div class='admin_section_container'>\n"; 
     94                        $html .= '<form action="'.GENERIC_OBJECT_ADMIN_ABS_HREF.'" method="post">'; 
     95                        $html .= "<div class='admin_section_title'>"._("Network administration:")." </div>\n"; 
     96 
     97                        $html .= "<div class='admin_section_data'>\n"; 
     98                        $html .= "<input type='hidden' name='action' value='edit'>\n"; 
     99                        $html .= "<input type='hidden' name='object_class' value='Network'>\n"; 
     100                        $html .= Network :: getSelectNetworkUI('object_id'); 
     101                        $html .= "</div>\n"; 
     102                        $html .= "<div class='admin_section_tools'>\n"; 
     103 
     104                        $html .= "<input type=submit name='edit_submit' value='"._("Edit")."'>\n"; 
     105                        $html .= "</div>\n"; 
     106                        $html .= '</form>'; 
     107                        $html .= "</div>\n"; 
     108 
     109                        $html .= "<li><a href='content_admin.php'>"._("Content manager")."</a></li>\n"; 
     110                        $html .= "</ul>\n"; 
    113111 
    114112                } 
    115113                else 
    116114                { 
    117                     $html .= "<p class='errormsg'>"._("Unknown section:")." $section</p>\n"; 
    118                          
    119                 } 
    120                                         $this->tool_content = $html; 
     115                        $html .= "<p class='errormsg'>"._("Unknown section:")." $section</p>\n"; 
     116 
     117                } 
     118                $this->tool_content = $html; 
    121119        } 
    122120 
     
    126124                $this->tool_content = $html; 
    127125        } 
    128          
     126 
    129127        /** Get the content to be displayed in the tool pane 
    130128         * @param section, one of:  START, LOGIN,  
     
    143141                                $html .= '<p>'._("Logged in as:").' '.$user->getUsername().'</p>'."\n"; 
    144142                                $html .= '<a class="administration" HREF="?content=myprofile"><img class="administration" src="/images/profile.gif" border="0"> My profile</a>'."\n"; 
    145                                 $html .= '<a class="administration" HREF="#"><img class="administration" src="/images/logout.gif" border="0"> Logout</a>'."\n"; 
     143                                $html .= '<a class="administration" HREF="/login/?logout=true"><img class="administration" src="/images/logout.gif" border="0"> Logout</a>'."\n"; 
    146144 
    147145                        } 
     
    149147                        { 
    150148                                $html .= '<p>'._("NOT logged in.").' <a href="'.BASE_SSL_PATH.'login/">'. ("Login?").'</a></p>'."\n"; 
    151                                 $html .= '<a class="administration" HREF="'.Network :: getCurrentNetwork()->getHomepageURL().'"><img class="administration" src="/images/lien_ext.gif">'.Network :: getCurrentNetwork()->getName().'</a>'."\n"; 
    152                                 $html .= '<a class="administration" HREF="'.BASE_NON_SSL_PATH.'/faq.php"><img class="administration" src="'.BASE_NON_SSL_PATH.'/images/where.gif">'._("Where am I?").'</a>'."\n"; 
     149                                $html .= '<a class="administration" HREF="'.Network :: getCurrentNetwork()->getHomepageURL().'"><img class="administration" src="/images/lien_ext.gif"> '.Network :: getCurrentNetwork()->getName().'</a>'."\n"; 
     150                                $html .= '<a class="administration" HREF="'.BASE_NON_SSL_PATH.'/faq.php"><img class="administration" src="'.BASE_NON_SSL_PATH.'/images/where.gif"> '._("Where am I?").'</a>'."\n"; 
    153151                        } 
    154152 
     
    166164                        $html .= '<a href="hotspots.php" class="navigation">'._("Hotspots").'</a>'."\n"; 
    167165                        */ 
     166                        $html .= '<span class="navigation">'; 
     167                        $html .= Network :: getCurrentNetwork()->getName().". Building your wireless community"; 
     168                        $html .= '</span>'; 
    168169                        $html .= "</div>"."\n"; //End navigation 
    169170 
     
    191192 
    192193                        $html .= "<div class='tool_content'>"."\n"; 
    193  
    194194                        /******************************/ 
    195 $html .= $this->tool_content; 
    196  
     195                        $html .= $this->tool_content; 
    197196                        /******************************/ 
    198  
    199197                        $html .= "</div>"."\n"; //End tool_content 
    200198                        $html .= '<div class="avis">'."\n"; 
  • trunk/wifidog-auth/wifidog/classes/Network.php

    r566 r567  
    122122                if (!$found) 
    123123                { 
    124                         throw new Exception(_("The secified network doesn't exist: ").$p_network_id); 
     124                        throw new Exception(_("The specified network doesn't exist: ").$p_network_id); 
    125125                } 
    126126                $this->id = $p_network_id; 
  • trunk/wifidog-auth/wifidog/classes/User.php

    r566 r567  
    327327                                if ($user_info['validation_grace_time_expired'] == 't') 
    328328                                { 
    329                                         $errmsg = _("Sorry, your ").$validation_grace_time._(" minutes grace period to retrieve your email and validate your account has now expired. You will have to connect to the internet and validate your account from another location or create a new account. For help, please ").'<a href="'.BASEPATH.'faq.php'.'">'._("click here.").'</a>'; 
     329                                        $errmsg = _("Sorry, your ").VALIDATION_GRACE_TIME._(" minutes grace period to retrieve your email and validate your account has now expired. You will have to connect to the internet and validate your account from another location or create a new account. For help, please ").'<a href="'.BASEPATH.'faq.php'.'">'._("click here.").'</a>'; 
    330330                                        $retval = false; 
    331331                                } 
  • trunk/wifidog-auth/wifidog/config.php

    r566 r567  
    77 * 
    88 *     $Log$ 
     9 *     Revision 1.38  2005/04/25 16:17:54  fproulx 
     10 *     2005-04-25 Fran�ois Proulx <francois.proulx@gmail.com 
     11 *      * Completed integration of new interface with new objects 
     12 * 
    913 *     Revision 1.37  2005/04/25 13:16:06  benoitg 
    1014 *     2005-04-25 Benoit Gr�goire  <bock@step.polymtl.ca> 
     
    185189define('SYSTEM_PATH', '/'); 
    186190/**< Set this to true if your server has SSL available, otherwise, passwords will be transmitted in clear text over the air */ 
    187 define('SSL_AVAILABLE', true); 
     191define('SSL_AVAILABLE', false); 
    188192/** @deprecated version - 2005-04-19 */ 
    189193define('HOTSPOT_NETWORK_NAME', 'Île sans fil'); 
  • trunk/wifidog-auth/wifidog/faq.php

    r416 r567  
    2727require_once BASEPATH.'include/common.php'; 
    2828require_once BASEPATH.'include/common_interface.php'; 
    29 $smarty->display("templates/faq.html"); 
     29require_once BASEPATH.'classes/MainUI.php'; 
     30 
     31//$smarty->display("templates/faq.html"); 
     32$ui = new MainUI(); 
     33$ui->setMainContent($smarty->fetch("templates/faq.html")); 
     34$ui->display(); 
    3035?> 
  • trunk/wifidog-auth/wifidog/index.php

    r566 r567  
    3333$smarty->assign("num_online_users", $stats->getNumOnlineUsers($node_id = null)); 
    3434 
     35$html = '<ul>'."\n"; 
     36$html .= '<li><a href="'.BASE_SSL_PATH.'lost_username.php">'._("I Forgot my username").'</a><br>'."\n"; 
     37$html .= '<li><a href="'.BASE_SSL_PATH.'lost_password.php">'._("I Forgot my password").'</a>'."\n"; 
     38$html .= '<li><a href="'.BASE_SSL_PATH.'resend_validation.php">'._("Re-send the validation email").'</a><br>'."\n"; 
     39$html .= '<li><a href="'.BASE_SSL_PATH.'resend_validation.php">'._("Change password").'</a><br>'."\n"; 
     40$html .= '<li><a href="'.BASE_SSL_PATH.'faq.php">'._("I have trouble connecting and I would like some help").'</a><br>'."\n"; 
     41$html .= '</ul>'."\n"; 
     42 
     43$ui=new MainUI(); 
     44$ui->setToolContent($html); 
    3545$smarty->assign("title", _("authentication server")); 
    36 $ui=new MainUI(); 
    3746$ui->setMainContent($smarty->fetch("templates/main.html")); 
    3847$ui->display(); 
     48 
    3949?> 
  • trunk/wifidog-auth/wifidog/login/index.php

    r566 r567  
    11<?php 
    2  
    3  
    42// $Id$ 
    53/********************************************************************\ 
     
    3432require_once BASEPATH.'classes/Network.php'; 
    3533 
     34if (!empty ($_REQUEST['logout']) && $_REQUEST['logout'] == true) 
     35{ 
     36    $session->destroy(); 
     37} 
     38 
    3639if (!empty ($_REQUEST['url'])) 
    3740{ 
     
    4548 
    4649        // Authenticating the user through the selected auth source. 
    47 $network = Network::processSelectNetworkUI('auth_source'); 
    48  
    49 $user = $network->getAuthenticator()->login($_REQUEST['username'], $_REQUEST['password'], $errmsg); 
     50        $network = Network :: processSelectNetworkUI('auth_source'); 
     51     
     52        $user = $network->getAuthenticator()->login($_REQUEST['username'], $_REQUEST['password'], $errmsg); 
    5053        if ($user != null) 
    5154        { 
     
    7679isset ($_REQUEST["auth_source"]) && $smarty->assign('selected_auth_source', $_REQUEST["auth_source"]); 
    7780 
    78 $node=null; 
     81$node = null; 
    7982if (!empty ($_REQUEST['gw_id'])) 
    8083{ 
    81         $gw_id=$_REQUEST['gw_id']; 
     84        $gw_id = $_REQUEST['gw_id']; 
    8285 
    8386        try 
     
    111114if (empty ($_REQUEST['gw_id'])) 
    112115{ 
    113         $html .= '<h3>'._("This is the 'virtual login' page you can use to get the credentials which will then give you access to management functions on the network without being at a hotspot.").'</h3>'."\n"; 
     116        $html .= '<h1>'._("Virtual login").'</h1'."\n"; 
    114117} 
    115118else 
    116119{ 
    117         $html .= '<h3>'._("Welcome! Hotspot:")." $hotspot_name</h3>\n"; 
     120        $html .= '<h1>'._("Welcome! Hotspot:")." $hotspot_name</h1>\n"; 
    118121} 
    119122 
    120 $html .= '<h3>'._("Please log-in or").'<br><a href="'.BASE_SSL_PATH.'signup.php">'._("Sign-up, it's free!").'</a></h3>'."\n"; 
     123$html .= '<h1>'._("Sign up : ").'</h1>'; 
     124$html .= '<p class="indent">'."\n"; 
     125$html .= '<a href="'.BASE_SSL_PATH.'signup.php">'._("Get an account here.").'</a><br><a href="'.BASE_SSL_PATH.'faq.php">'._("Why is this service free ?").'</a>'."\n"; 
     126$html .= '</p>'; 
    121127 
    122128$html .= '<form name="login_form" method="post">'."\n"; 
    123 if($node!=null) 
     129if ($node != null) 
    124130{ 
    125131        $html .= '<input type="hidden" name="gw_address" value="'.$gw_address.'">'."\n"; 
    126 $html .= '<input type="hidden" name="gw_port" value="'.$gw_port.'">'."\n"; 
    127 $html .= '<input type="hidden" name="gw_id" value="'.$gw_id.'">'."\n"; 
     132        $html .= '<input type="hidden" name="gw_port" value="'.$gw_port.'">'."\n"; 
     133        $html .= '<input type="hidden" name="gw_id" value="'.$gw_id.'">'."\n"; 
    128134} 
    129 $html .= '<table>'."\n"; 
    130 $html .= Network::getSelectNetworkUI('auth_source'); 
    131 $html .= '<tr>'."\n"; 
    132 $html .= '<td>'._("Username (or email)").':</td>'."\n"; 
    133 $html .= '<td><input type="text" name="username" value="'.$username.'" size="20"></td>'."\n"; 
    134 $html .= '</tr>'."\n"; 
    135 $html .= '<tr>'."\n"; 
    136 $html .= '<td>'._("Password").':</td>'."\n"; 
    137 $html .= '<td><input type="password" name="password" size="20"></td>'."\n"; 
    138 $html .= '</tr>'."\n"; 
    139 $html .= '<tr>'."\n"; 
    140 $html .= '<td></td>'."\n"; 
    141 $html .= '<td><input class="submit" type="submit" name="submit" value="'._("Login").'"></td>'."\n"; 
    142 $html .= '</tr>'."\n"; 
    143 $html .= '</table>'."\n"; 
     135$html .= '<h1>'._("Log in : ").'</h1>'; 
     136$html .= '<p class="indent">'."\n"; 
     137$html .= Network::getSelectNetworkUI('auth_source')."<br>\n"; 
     138$html .= _("Username (or email)").'<br>'."\n"; 
     139$html .= '<input type="text" name="username" value="'.$username.'" size="20"><br>'."\n"; 
     140$html .= _("Password").':<br>'."\n"; 
     141$html .= '<input type="password" name="password" size="20"><br>'."\n"; 
     142$html .= '<input class="submit" type="submit" name="submit" value="'._("Login").'"><br>'."\n"; 
     143; 
    144144$html .= '</form>'."\n"; 
     145$html .= '</p>'; 
    145146 
    146 $html .= '<h3>'._("I already have an account, but").':</h3>'."\n"; 
     147$html .= '<h1>'._("I already have an account, but").':</h1>'."\n"; 
    147148$html .= '<ul>'."\n"; 
    148149$html .= '<li><a href="'.BASE_SSL_PATH.'lost_username.php">'._("I Forgot my username").'</a><br>'."\n"; 
     
    170171require_once BASEPATH.'classes/MainUI.php'; 
    171172$ui = new MainUI(); 
    172 $ui->setMainContent($html); 
     173$ui->setToolContent($html); 
    173174$ui->display(); 
    174175?> 
    175  
    176  
    177  
  • trunk/wifidog-auth/wifidog/lost_password.php

    r530 r567  
    2828require_once BASEPATH.'include/common_interface.php'; 
    2929require_once BASEPATH.'classes/User.php'; 
     30require_once BASEPATH.'classes/MainUI.php'; 
    3031 
    3132if (isset($_REQUEST['submit'])) { 
     
    5455                 
    5556            $smarty->assign('message', _('A new password has been emailed to you.')); 
    56             $smarty->display('templates/validate.html'); 
     57            //$smarty->display('templates/validate.html'); 
     58            $ui = new MainUI(); 
     59            $ui->setMainContent($smarty->fetch("templates/validate.html")); 
     60            $ui->display(); 
    5761            exit; 
    5862        } catch (Exception $e) { 
     
    7377isset ($_REQUEST["auth_source"]) && $smarty->assign('selected_auth_source', $_REQUEST["auth_source"]); 
    7478 
    75 $smarty->display("templates/lost_password.html"); 
     79//$smarty->display("templates/lost_password.html"); 
     80$ui = new MainUI(); 
     81$smarty->assign('SelectNetworkUI', Network::getSelectNetworkUI('auth_source')); 
     82$ui->setMainContent($smarty->fetch("templates/lost_password.html")); 
     83$ui->display(); 
    7684?> 
  • trunk/wifidog-auth/wifidog/lost_username.php

    r530 r567  
    2828require_once BASEPATH.'include/common_interface.php'; 
    2929require_once BASEPATH.'classes/User.php'; 
     30require_once BASEPATH.'classes/MainUI.php'; 
    3031 
    3132if (isset($_REQUEST["submit"])) { 
     
    4748                 
    4849        $smarty->assign("message", _("Your username has been emailed to you.")); 
    49         $smarty->display("templates/validate.html"); 
     50        //$smarty->display("templates/validate.html"); 
     51        $ui = new MainUI(); 
     52        $ui->setMainContent($smarty->fetch("templates/validate.html")); 
     53        $ui->display(); 
    5054        exit; 
    5155    } catch (Exception $e) { 
     
    6569isset ($_REQUEST["auth_source"]) && $smarty->assign('selected_auth_source', $_REQUEST["auth_source"]); 
    6670 
    67 $smarty->display("templates/lost_username.html"); 
     71//$smarty->display("templates/lost_username.html"); 
     72$ui = new MainUI(); 
     73$smarty->assign('SelectNetworkUI', Network::getSelectNetworkUI('auth_source')); 
     74$ui->setMainContent($smarty->fetch("templates/lost_username.html")); 
     75$ui->display(); 
    6876?> 
  • trunk/wifidog-auth/wifidog/resend_validation.php

    r530 r567  
    2828require_once BASEPATH.'include/common_interface.php'; 
    2929require_once BASEPATH.'classes/User.php'; 
     30require_once BASEPATH.'classes/MainUI.php'; 
    3031 
    3132if (isset($_REQUEST["submit"])) { 
     
    4748                 
    4849            $smarty->assign('message', _("An email with confirmation instructions was sent to your email address.")); 
    49             $smarty->display("templates/validate.html"); 
     50            //$smarty->display("templates/validate.html"); 
     51            $ui = new MainUI(); 
     52            $ui->setMainContent($smarty->fetch("templates/validate.html")); 
     53            $ui->display(); 
    5054            exit; 
    5155        } catch (Exception $e) { 
     
    6670isset ($_REQUEST["auth_source"]) && $smarty->assign('selected_auth_source', $_REQUEST["auth_source"]); 
    6771 
    68 $smarty->display("templates/resend_validation.html"); 
     72//$smarty->display("templates/resend_validation.html"); 
     73$ui = new MainUI(); 
     74$smarty->assign('SelectNetworkUI', Network::getSelectNetworkUI('auth_source')); 
     75$ui->setMainContent($smarty->fetch("templates/resend_validation.html")); 
     76$ui->display(); 
    6977?> 
  • trunk/wifidog-auth/wifidog/signup.php

    r530 r567  
    11<?php 
    2  
    32// $Id$ 
    43/********************************************************************\ 
     
    2928require_once BASEPATH.'include/common_interface.php'; 
    3029require_once BASEPATH.'classes/User.php'; 
     30require_once BASEPATH.'classes/MainUI.php'; 
    3131 
    3232if (defined("CUSTOM_SIGNUP_URL")) 
     
    8585        try 
    8686        { 
    87                 if(empty($account_origin)) 
     87                if (empty ($account_origin)) 
    8888                        throw new Exception(_("Sorry, this network does not exist !")); 
    89                          
     89 
    9090                validate_username($username); 
    9191                validate_email($email); 
     
    101101                $user->sendValidationEmail(); 
    102102                $smarty->assign('message', _('An email with confirmation instructions was sent to your email address.  Your account has been granted 15 minutes of access to retrieve your email and validate your account.  You may now open a browser window and go to any remote Internet address to obtain the login page.')); 
    103                 $smarty->display("templates/validate.html"); 
     103                //$smarty->display("templates/validate.html"); 
     104         
     105        $ui = new MainUI(); 
     106        $ui->setMainContent($smarty->fetch("templates/validate.html")); 
     107        $ui->display(); 
    104108                exit; 
    105109        } 
     
    121125isset ($_REQUEST["auth_source"]) && $smarty->assign('selected_auth_source', $_REQUEST["auth_source"]); 
    122126 
    123 $smarty->display("templates/signup.html"); 
     127//$smarty->display("templates/signup.html"); 
     128$ui = new MainUI(); 
     129$smarty->assign('SelectNetworkUI', Network::getSelectNetworkUI('auth_source')); 
     130$ui->setMainContent($smarty->fetch("templates/signup.html")); 
     131$ui->display(); 
    124132?> 
    125  
  • trunk/wifidog-auth/wifidog/templates/change_password.html

    r566 r567  
    44        <form name="form" method="post"> 
    55        <table> 
    6         {include file="templates/auth_sources_selection.html"} 
     6        {if $SelectNetworkUI} 
     7        {$SelectNetworkUI} 
     8        {/if} 
    79        <tr> 
    810            <td>{"Your username"|_}:</td> 
  • trunk/wifidog-auth/wifidog/templates/lost_password.html

    r566 r567  
    44        <form name="form" method="post"> 
    55        <table> 
    6         {include file="templates/auth_sources_selection.html"} 
     6        {if $SelectNetworkUI} 
     7        {$SelectNetworkUI} 
     8        {/if} 
    79        <tr> 
    810            <td>{"Your username"|_}:</td> 
  • trunk/wifidog-auth/wifidog/templates/lost_username.html

    r566 r567  
    55        <form name="form" method="post"> 
    66        <table> 
    7         {include file="templates/auth_sources_selection.html"} 
     7        {if $SelectNetworkUI} 
     8        {$SelectNetworkUI} 
     9        {/if} 
    810        <tr> 
    911            <td>{"Your email address"|_}:</td> 
  • trunk/wifidog-auth/wifidog/templates/resend_validation.html

    r566 r567  
    44        <form name="form"> 
    55        <table> 
    6         {include file="templates/auth_sources_selection.html"} 
     6        {if $SelectNetworkUI} 
     7        {$SelectNetworkUI} 
     8        {/if} 
    79        <tr> 
    810            <td>{"Your username"|_}:</td> 
  • trunk/wifidog-auth/wifidog/templates/signup.html

    r566 r567  
    44        <form name="signup_form" method="post"> 
    55        <table> 
    6         {include file="templates/auth_sources_selection.html"} 
     6        {if $SelectNetworkUI} 
     7        {$SelectNetworkUI} 
     8        {/if} 
    79        <tr> 
    810            <td>{"Username desired"|_}:</td> 
  • trunk/wifidog-auth/wifidog/templates/validate.html

    r402 r567  
    1 {include file="templates/header_small.html"} 
    21    <div id="sent_validation"> 
    32        <p>{$message|nl2br}</p> 
    43    </div> 
    5 {include file="templates/footer.html"} 
  • trunk/wifidog-auth/wifidog/validate.php

    r566 r567  
    2626require_once (BASEPATH.'/include/common_interface.php'); 
    2727require_once (BASEPATH.'/classes/User.php'); 
     28require_once BASEPATH.'classes/MainUI.php'; 
    2829 
    2930try { 
     
    4849} 
    4950 
    50 $smarty->display("templates/validate.html"); 
     51$ui = new MainUI(); 
     52$ui->setMainContent($smarty->fetch("templates/validate.html")); 
     53$ui->display(); 
     54//$smarty->display("templates/validate.html"); 
    5155?>