Changeset 1030

Show
Ignore:
Timestamp:
05/09/06 16:01:17 (7 years ago)
Author:
benoitg
Message:
  • Finish content assignation system
  • Content ordering is now global (network, nodes and everywhere content cand now be in mixed order).
    • Implement 'everywhere' content
    • Change MainUI::apendContent to MainUI::addContent
Location:
trunk/wifidog-auth
Files:
32 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/CHANGELOG

    r1029 r1030  
     12006-05-09 Benoit Grégoire  <bock@step.polymtl.ca> 
     2        * Finish content assignation system 
     3        * Content ordering is now global (network, nodes and everywhere content cand now be in mixed order). 
     4        * Implement 'everywhere' content 
     5        * Change MainUI::apendContent to MainUI::addContent 
     6 
    172006-04-28 François Proulx <francois.proulx@gmail.com>   
    28        * Fixed error in initial data script 
  • trunk/wifidog-auth/wifidog/admin/generic_object_admin.php

    r1025 r1030  
    427427$ui->setHtmlHeader($_htmlHeader); 
    428428$ui->setToolSection('ADMIN'); 
    429 $ui->appendContent('main_area_middle', "<div>" . $html . "</div>"); 
     429$ui->addContent('main_area_middle', "<div>" . $html . "</div>"); 
    430430$ui->display(); 
    431431 
  • trunk/wifidog-auth/wifidog/admin/hotspot_location_map.php

    r1009 r1030  
    7171    $html .= "<div id=\"map_frame\"></div>\n"; 
    7272    $html .= "<input type='button' value='"._("Use these coordinates")."' onClick='setLocationInOriginalWindow();'>\n"; 
    73     $ui->appendContent('main_area_middle', $html); 
     73    $ui->addContent('main_area_middle', $html); 
    7474 
    7575    if($node->getGisLocation() !== null) 
  • trunk/wifidog-auth/wifidog/admin/import_user_database.php

    r1009 r1030  
    264264    $ui=new MainUI(); 
    265265    $ui->setToolSection('ADMIN'); 
    266     $ui->appendContent('main_area_middle', $html); 
     266    $ui->addContent('main_area_middle', $html); 
    267267    $ui->display(); 
    268268 
  • trunk/wifidog-auth/wifidog/admin/index.php

    r1009 r1030  
    6767} 
    6868 
    69 $ui->appendContent('main_area_middle', $html); 
     69$ui->addContent('main_area_middle', $html); 
    7070$ui->display(); 
    7171 
  • trunk/wifidog-auth/wifidog/admin/online_users.php

    r1009 r1030  
    5959$ui = new MainUI(); 
    6060$ui->setToolSection('ADMIN'); 
    61 $ui->appendContent('main_area_middle', $smarty->fetch("admin/templates/online_users.html")); 
     61$ui->addContent('main_area_middle', $smarty->fetch("admin/templates/online_users.html")); 
    6262$ui->display(); 
    6363 
  • trunk/wifidog-auth/wifidog/admin/stats.php

    r1009 r1030  
    125125$ui = new MainUI(); 
    126126$ui->setToolSection('ADMIN'); 
    127 $ui->appendContent('main_area_middle', $html); 
     127$ui->addContent('main_area_middle', $html); 
    128128$ui->display(); 
    129129 
  • trunk/wifidog-auth/wifidog/admin/user_log.php

    r1009 r1030  
    121121    $ui=new MainUI(); 
    122122    $ui->setToolSection('ADMIN'); 
    123     $ui->appendContent('main_area_middle', $html); 
     123    $ui->addContent('main_area_middle', $html); 
    124124    $ui->display(); 
    125125} 
  • trunk/wifidog-auth/wifidog/change_password.php

    r1018 r1030  
    131131 
    132132        $ui = new MainUI(); 
    133         $ui->appendContent('main_area_middle', $smarty->fetch("templates/sites/validate.tpl")); 
     133        $ui->addContent('main_area_middle', $smarty->fetch("templates/sites/validate.tpl")); 
    134134        $ui->display(); 
    135135 
     
    154154$ui = new MainUI(); 
    155155$smarty->assign('SelectNetworkUI', Network::getSelectNetworkUI('auth_source')); 
    156 $ui->appendContent('main_area_middle', $smarty->fetch("templates/change_password.html")); 
     156$ui->addContent('main_area_middle', $smarty->fetch("templates/change_password.html")); 
    157157$ui->display(); 
    158158 
  • trunk/wifidog-auth/wifidog/classes/Content.php

    r1013 r1030  
    969969    } 
    970970 
    971     /** Is this Content element displayable at this hotspot, many classer override this 
     971    /** Is this Content element displayable at this hotspot, many classes override this 
    972972     * @param $node Node, optionnal 
    973973     * @return true or false */ 
  • trunk/wifidog-auth/wifidog/classes/MainUI.php

    r1018 r1030  
    7070 */ 
    7171class MainUI { 
    72     /** 
    73      * Available structural display areas where content can be placed 
    74      * 
    75      * @var array 
    76      * @access private 
    77      */ 
    78     private $available_display_areas; 
    7972 
    8073    /** 
     
    8477    * @access private 
    8578    */ 
    86     private $contentArray; 
     79    private $_contentDisplayArray; 
     80 
     81    /** 
     82    * Content to be displayed on the page, before ordering 
     83    * 
     84    * @var array 
     85    * @access private 
     86    */ 
     87    private $_contentArray; 
    8788 
    8889    /** 
     
    104105     * Additional class of the <body> of the HTML page 
    105106     */ 
    106     private $page_name; 
     107    private $_pageName; 
    107108 
    108109    /** 
     
    112113     * @access private 
    113114     */ 
    114     private $html_headers; 
     115    private $_htmlHeaders; 
    115116 
    116117    /** 
     
    120121     * @access private 
    121122     */ 
    122     private $tool_section_enabled = true; 
     123    private $_toolSectionEnabled = true; 
    123124 
    124125    /** 
     
    128129     * @access private 
    129130     */ 
    130     private $footer_scripts = array (); 
    131  
    132         private $shrink_left_area = false; 
     131    private $_footerScripts = array (); 
     132 
     133    private $_shrinkLeftArea = false; 
    133134 
    134135    /** 
     
    151152        $db->execSql($current_content_sql, $rows, false); 
    152153        foreach ($rows as $row) { 
    153             $this->contentArray[$row['display_area']] = ''; 
     154            $this->_contentDisplayArray[$row['display_area']] = ''; 
    154155        } 
    155156    } 
     
    163164     *  
    164165     * @param string $content HTML content to be added to the area 
    165      * 
    166      * @return void 
    167      */ 
    168     public function appendContent($display_area, $content) { 
    169         if (!isset ($this->contentArray[$display_area])) { 
    170             throw new exception(sprintf(_('%s is not a valid structural display area'), $display_area)); 
    171         } 
    172         $this->contentArray[$display_area] .= $content; 
     166     *  
     167     * @param integer $display_order_index The order in which the content should 
     168     * be displayed 
     169     * 
     170     * @return void 
     171     */ 
     172    public function addContent($displayArea, $content, $displayOrderIndex = 1) { 
     173            //echo "MainUI::addContent(): Debug: displayArea: $displayArea, displayOrderIndex: $displayOrderIndex, content: $content<br/>"; 
     174    if (!isset ($this->_contentDisplayArray[$displayArea])) { 
     175            throw new exception(sprintf(_('%s is not a valid structural display area'), $displayArea)); 
     176        } 
     177        $this->_contentArray[] = array ('display_area' => $displayArea, 'display_order' => $displayOrderIndex, 'content' => $content); 
     178    } 
     179 
     180    /** Private compare function for sorting the _contentArray() */ 
     181    private static function _contentArrayCmp($a, $b) { 
     182        if ($a['display_order'] == $b['display_order']) { 
     183            return 0; 
     184        } 
     185        return ($a['display_order'] < $b['display_order']) ? -1 : 1; 
     186    } 
     187 
     188    /** 
     189     * Orders the content and put it in the _contentDisplayArray array 
     190     * 
     191     * @return void 
     192     */ 
     193    private function generateDisplayContent() { 
     194        //pretty_print_r($this->_contentArray); 
     195        usort($this->_contentArray, array ('MainUI', '_contentArrayCmp')); 
     196        foreach ($this->_contentArray as $content_fragment) { 
     197            $this->_contentDisplayArray[$content_fragment['display_area']] .= $content_fragment['content']; 
     198        } 
     199 
     200    } 
     201 
     202    /** 
     203     * Add the content marked "everywhere" from both the current node and the 
     204     * current network. 
     205     * 
     206     * @return void 
     207     */ 
     208    private function addEverywhereContent() { 
     209        global $db; 
     210        // Get all network content and node "everywhere" content 
     211        $content_rows = null; 
     212        $network_id = $db->escapeString(Network :: getCurrentNetwork()->getId()); 
     213        $sql_network = "(SELECT content_id, display_area, display_order, subscribe_timestamp FROM network_has_content WHERE network_id='$network_id'  AND display_page='everywhere') "; 
     214        $node = Node :: getCurrentNode(); 
     215        $sql_node = null; 
     216        if ($node) { 
     217            // Get all node content 
     218            $node_id = $db->escapeString($node->getId()); 
     219            $sql_node = "UNION (SELECT content_id, display_area, display_order, subscribe_timestamp FROM node_has_content WHERE node_id='$node_id'  AND display_page='everywhere')"; 
     220        } 
     221        $sql = "SELECT * FROM ($sql_network $sql_node) AS content_everywhere ORDER BY display_area, display_order, subscribe_timestamp DESC"; 
     222 
     223        $db->execSql($sql, $content_rows, false); 
     224        if ($content_rows) { 
     225            foreach ($content_rows as $content_row) { 
     226                $content = Content :: getObject($content_row['content_id']); 
     227                if ($content->isDisplayableAt($node)) { 
     228                    $this->addContent($content_row['display_area'], $content->getUserUI(), $content_row['display_order']); 
     229                } 
     230            } 
     231        } 
     232 
     233    } 
     234 
     235    /** 
     236    * Check if the tool section is enabled 
     237    * 
     238    * @return bool True or false 
     239    * 
     240    * @access public 
     241    */ 
     242    public function isToolSectionEnabled() { 
     243        return $this->_toolSectionEnabled; 
    173244    } 
    174245 
     
    180251     * @access public 
    181252     */ 
    182     public function isToolSectionEnabled() { 
    183         return $this->tool_section_enabled; 
    184     } 
    185  
    186     /** 
    187      * Check if the tool section is enabled 
    188      * 
    189      * @return bool True or false 
    190      * 
    191      * @access public 
    192      */ 
    193253    public function setToolSectionEnabled($status) { 
    194         $this->tool_section_enabled = $status; 
     254        $this->_toolSectionEnabled = $status; 
    195255    } 
    196256 
     
    209269 
    210270    public function shrinkLeftArea() { 
    211                 $this->shrink_left_area = true; 
    212         } 
     271        $this->_shrinkLeftArea = true; 
     272    } 
    213273 
    214274    /** 
     
    222282     */ 
    223283    public function setPageName($page_name_string) { 
    224         $this->page_name = $page_name_string; 
     284        $this->_pageName = $page_name_string; 
    225285    } 
    226286 
     
    240300    */ 
    241301    public function addFooterScript($script) { 
    242         $this->footer_scripts[] = $script; 
     302        $this->_footerScripts[] = $script; 
    243303    } 
    244304 
     
    253313     */ 
    254314    public function setHtmlHeader($headers_string) { 
    255         $this->html_headers = $headers_string; 
     315        $this->_htmlHeaders = $headers_string; 
    256316    } 
    257317 
     
    281341                    // The user has no permission to access the administrative functions 
    282342                    $_html = _("You do not have permissions to access any administration functions."); 
    283                 } else { 
     343                } 
     344                else { 
    284345                    // Init values 
    285346                    $_sqlAdditionalWhere = ""; 
    286347 
    287348                    // Init ALL smarty values 
    288                                         User::assignSmartyValues($this->smarty, $_currentUser); 
     349                    User :: assignSmartyValues($this->smarty, $_currentUser); 
    289350                    $this->smarty->assign('formAction', ""); 
    290351                    $this->smarty->assign('nodeUI', ""); 
     
    327388        } 
    328389 
    329         $this->appendContent('left_area_middle', $_html); 
     390        $this->addContent('left_area_middle', $_html); 
    330391    } 
    331392 
     
    338399     */ 
    339400    private function getToolContent() { 
    340             // Define globals 
    341     global $session; 
     401        // Define globals 
     402        global $session; 
    342403        global $AVAIL_LOCALE_ARRAY; 
    343404 
     
    354415        $this->smarty->assign('sectionLOGIN', false); 
    355416 
    356                 // Set section of Smarty template 
    357                 $this->smarty->assign('sectionSTART', true); 
    358  
    359                 // Get information about user 
    360                 $_currentUser = User :: getCurrentUser(); 
    361  
    362                                 User::assignSmartyValues($this->smarty, $_currentUser); 
    363  
    364                 $this->smarty->assign('logoutParameters', ""); 
    365                 $this->smarty->assign('loginParameters', ""); 
    366                 $this->smarty->assign('formAction', ""); 
    367                 $this->smarty->assign('toolContent', ""); 
    368                 $this->smarty->assign('accountInformation', ""); 
    369                 $this->smarty->assign('techSupportInformation', ""); 
    370                 $this->smarty->assign('shrinkLeftArea', $this->shrink_left_area); 
    371  
    372                 // Provide Smarty with information about the network 
    373                                 Network::assignSmartyValues($this->smarty); 
    374  
    375                 /* 
    376                  * Provide Smarty information about the user's login/logout status 
    377                  */ 
    378  
    379                 if ($_currentUser != null) { 
    380                     // User is logged in 
    381  
    382                     // Detect gateway information 
    383                     $_gwId = $session->get(SESS_GW_ID_VAR); 
    384                     $_gwAddress = $session->get(SESS_GW_ADDRESS_VAR); 
    385                     $_gwPort = $session->get(SESS_GW_PORT_VAR); 
    386  
    387                     // If gateway information could be detected tell them Smarty 
    388                     if ($_gwId && $_gwAddress && $_gwPort) { 
    389                         $this->smarty->assign('logoutParameters', "&amp;gw_id=".$_gwId."&amp;gw_address=".$_gwAddress."&amp;gw_port=".$_gwPort); 
    390                     } 
    391                 } else { 
    392                     // Detect gateway information 
    393                     $_gwId = !empty ($_REQUEST['gw_id']) ? $_REQUEST['gw_id'] : $session->get(SESS_GW_ID_VAR); 
    394                     $_gwAddress = !empty ($_REQUEST['gw_address']) ? $_REQUEST['gw_address'] : $session->get(SESS_GW_ADDRESS_VAR); 
    395                     $_gwPort = !empty ($_REQUEST['gw_port']) ? $_REQUEST['gw_port'] : $session->get(SESS_GW_PORT_VAR); 
    396  
    397                     // If gateway information could be detected tell them Smarty 
    398                     if (!empty ($_gwId) && !empty ($_gwAddress) && !empty ($_gwPort)) { 
    399                         $this->smarty->assign('loginParameters', "?gw_id=".$_gwId."&amp;gw_address=".$_gwAddress."&amp;gw_port=".$_gwPort); 
    400                     } 
    401                 } 
    402  
    403                 /* 
    404                  * Provide Smarty information for the language chooser 
    405                  */ 
    406  
    407                 // Assign the action URL for the form 
    408                 $this->smarty->assign('formAction', $_SERVER['REQUEST_URI']); 
    409  
    410                 foreach ($AVAIL_LOCALE_ARRAY as $_langIds => $_langNames) { 
    411                     if (Locale :: getCurrentLocale()->getId() == $_langIds) { 
    412                         $_selected = ' selected="selected"'; 
    413                     } else { 
    414                         $_selected = ""; 
    415                     } 
    416  
    417                     $_languageChooser[] = '<option label="'.$_langNames.'" value="'.$_langIds.'"'.$_selected.'>'.$_langNames.'</option>'; 
    418                 } 
    419  
    420                 // Provide Smarty all available languages 
    421                 $this->smarty->assign('languageChooser', $_languageChooser); 
    422  
    423                 /* 
    424                  * Provide Smarty information for the language chooser 
    425                  */ 
    426                   
    427                 // Provide information 
    428                 $this->smarty->assign('accountInformation', sprintf(_("Accounts on %s are and will stay completely free."), Network :: getCurrentNetwork()->getName())); 
    429                 $this->smarty->assign('techSupportInformation', sprintf(_("Please inform us of any problem or service interruption at: %s"), '<a href="mailto:'.Network :: getCurrentNetwork()->getTechSupportEmail().'">'.Network :: getCurrentNetwork()->getTechSupportEmail().'</a>')); 
    430  
    431                 // Compile HTML code 
    432                 $_html = $this->smarty->fetch("templates/classes/MainUI_ToolContent.tpl"); 
    433   
     417        // Set section of Smarty template 
     418        $this->smarty->assign('sectionSTART', true); 
     419 
     420        // Get information about user 
     421        $_currentUser = User :: getCurrentUser(); 
     422 
     423        User :: assignSmartyValues($this->smarty, $_currentUser); 
     424 
     425        $this->smarty->assign('logoutParameters', ""); 
     426        $this->smarty->assign('loginParameters', ""); 
     427        $this->smarty->assign('formAction', ""); 
     428        $this->smarty->assign('toolContent', ""); 
     429        $this->smarty->assign('accountInformation', ""); 
     430        $this->smarty->assign('techSupportInformation', ""); 
     431        $this->smarty->assign('shrinkLeftArea', $this->_shrinkLeftArea); 
     432 
     433        // Provide Smarty with information about the network 
     434        Network :: assignSmartyValues($this->smarty); 
     435 
     436        /* 
     437         * Provide Smarty information about the user's login/logout status 
     438         */ 
     439 
     440        if ($_currentUser != null) { 
     441            // User is logged in 
     442 
     443            // Detect gateway information 
     444            $_gwId = $session->get(SESS_GW_ID_VAR); 
     445            $_gwAddress = $session->get(SESS_GW_ADDRESS_VAR); 
     446            $_gwPort = $session->get(SESS_GW_PORT_VAR); 
     447 
     448            // If gateway information could be detected tell them Smarty 
     449            if ($_gwId && $_gwAddress && $_gwPort) { 
     450                $this->smarty->assign('logoutParameters', "&amp;gw_id=".$_gwId."&amp;gw_address=".$_gwAddress."&amp;gw_port=".$_gwPort); 
     451            } 
     452        } 
     453        else { 
     454            // Detect gateway information 
     455            $_gwId = !empty ($_REQUEST['gw_id']) ? $_REQUEST['gw_id'] : $session->get(SESS_GW_ID_VAR); 
     456            $_gwAddress = !empty ($_REQUEST['gw_address']) ? $_REQUEST['gw_address'] : $session->get(SESS_GW_ADDRESS_VAR); 
     457            $_gwPort = !empty ($_REQUEST['gw_port']) ? $_REQUEST['gw_port'] : $session->get(SESS_GW_PORT_VAR); 
     458 
     459            // If gateway information could be detected tell them Smarty 
     460            if (!empty ($_gwId) && !empty ($_gwAddress) && !empty ($_gwPort)) { 
     461                $this->smarty->assign('loginParameters', "?gw_id=".$_gwId."&amp;gw_address=".$_gwAddress."&amp;gw_port=".$_gwPort); 
     462            } 
     463        } 
     464 
     465        /* 
     466         * Provide Smarty information for the language chooser 
     467         */ 
     468 
     469        // Assign the action URL for the form 
     470        $this->smarty->assign('formAction', $_SERVER['REQUEST_URI']); 
     471 
     472        foreach ($AVAIL_LOCALE_ARRAY as $_langIds => $_langNames) { 
     473            if (Locale :: getCurrentLocale()->getId() == $_langIds) { 
     474                $_selected = ' selected="selected"'; 
     475            } 
     476            else { 
     477                $_selected = ""; 
     478            } 
     479 
     480            $_languageChooser[] = '<option label="'.$_langNames.'" value="'.$_langIds.'"'.$_selected.'>'.$_langNames.'</option>'; 
     481        } 
     482 
     483        // Provide Smarty all available languages 
     484        $this->smarty->assign('languageChooser', $_languageChooser); 
     485 
     486        /* 
     487         * Provide Smarty information for the language chooser 
     488         */ 
     489 
     490        // Provide information 
     491        $this->smarty->assign('accountInformation', sprintf(_("Accounts on %s are and will stay completely free."), Network :: getCurrentNetwork()->getName())); 
     492        $this->smarty->assign('techSupportInformation', sprintf(_("Please inform us of any problem or service interruption at: %s"), '<a href="mailto:'.Network :: getCurrentNetwork()->getTechSupportEmail().'">'.Network :: getCurrentNetwork()->getTechSupportEmail().'</a>')); 
     493 
     494        // Compile HTML code 
     495        $_html = $this->smarty->fetch("templates/classes/MainUI_ToolContent.tpl"); 
     496 
    434497        return $_html; 
    435498    } 
     
    446509     */ 
    447510    public function display() { 
     511 
    448512        // Init values 
    449513        $_stylesheetFile = ""; 
     
    461525 
    462526        // Add HTML headers 
    463         $this->smarty->assign('htmlHeaders', $this->html_headers); 
     527        $this->smarty->assign('htmlHeaders', $this->_htmlHeaders); 
    464528 
    465529        // Asign title 
     
    467531 
    468532        // Asign CSS class for body 
    469         $this->smarty->assign('page_name', $this->page_name); 
     533        $this->smarty->assign('page_name', $this->_pageName); 
    470534 
    471535        // Asign path to CSS stylesheet 
     
    477541        if (is_file(NODE_CONTENT_PHP_RELATIVE_PATH.STYLESHEET_NAME)) { 
    478542            $_stylesheetFile = NODE_CONTENT_SMARTY_PATH.STYLESHEET_NAME; 
    479         } else { 
     543        } 
     544        else { 
    480545            $_stylesheetFile = DEFAULT_CONTENT_SMARTY_PATH.STYLESHEET_NAME; 
    481546        } 
     
    490555 
    491556        // Get information about user 
    492                 User::assignSmartyValues($this->smarty); 
    493  
    494                 $this->appendContent('page_header', $this->customBanner()); 
    495  
     557        User :: assignSmartyValues($this->smarty); 
     558 
     559        //Handle content 
     560 
     561        $this->addContent('page_header', $this->customBanner()); 
    496562        /* 
    497563         * Build tool pane if it has been enabled 
    498564         */ 
    499565        if ($this->isToolSectionEnabled()) { 
    500             $this->appendContent('left_area_top', $this->getToolContent()); 
    501         } 
    502  
     566            $this->addContent('left_area_top', $this->getToolContent()); 
     567        } 
     568        $this->addEverywhereContent(); 
     569        $this->generateDisplayContent(); 
    503570        // Provide the content array to Smarty 
    504         $this->smarty->assign('contentArray', $this->contentArray); 
     571        $this->smarty->assign('contentDisplayArray', $this->_contentDisplayArray); 
    505572 
    506573        // Provide footer scripts to Smarty 
    507         $this->smarty->assign('footerScripts', $this->footer_scripts); 
     574        $this->smarty->assign('footerScripts', $this->_footerScripts); 
    508575 
    509576        // Compile HTML code and output it 
     
    523590     */ 
    524591    function displayError($errmsg, $show_tech_support_email = true) { 
    525         // Init ALL smarty values 
    526         $this->smarty->assign("error", ""); 
     592            // Init ALL smarty values 
     593    $this->smarty->assign("error", ""); 
    527594        $this->smarty->assign("show_tech_support_email", false); 
    528595        $this->smarty->assign("tech_support_email", ""); 
     
    541608        $_html = $this->smarty->fetch("templates/sites/error.tpl"); 
    542609 
    543         $this->appendContent('page_header', $_html); 
     610        $this->addContent('page_header', $_html); 
    544611        $this->display(); 
    545612    } 
    546613 
    547         static public function redirect($redirect_url, $redirect_to_title=null, $timeout=60) { 
    548                 if (!$redirect_to_title) { 
    549                         $network = Network :: getCurrentNetwork(); 
    550                         $redirect_to_title = $network ? sprintf(_("%s Login"), $network->getName()) : _("Login"); 
    551                 } 
    552  
    553                 header("Location: $redirect_url"); 
    554                 echo "<html>\n" . 
    555                         "<head><meta http-equiv='Refresh' content='$timeout; URL=$redirect_url'/></head>\n". 
    556                         "<body>\n" . 
    557                         "<noscript>\n" . 
    558                         "<span style='display:none;'>\n" . 
    559                         "<h1>" . $redirect_to_title . "</h1>\n" . 
    560                         sprintf(_("Click <a href='%s'>here</a> to continue"), $redirect_url) . "<br/>\n" . 
    561                         _("The transfer from secure login back to regular http may cause a warning.") . "\n" . 
    562                         "</span>\n" . 
    563                         "</noscript>\n" . 
    564                         "</body>\n" . 
    565                         "</html>\n" 
    566                         ; 
    567                 exit; 
    568         } 
    569  
    570         public function customBanner() { 
    571                 $custom_banner = ''; 
    572  
    573                 return $custom_banner; 
    574         } 
     614    static public function redirect($redirect_url, $redirect_to_title = null, $timeout = 60) { 
     615        if (!$redirect_to_title) { 
     616            $network = Network :: getCurrentNetwork(); 
     617            $redirect_to_title = $network ? sprintf(_("%s Login"), $network->getName()) : _("Login"); 
     618        } 
     619 
     620        header("Location: $redirect_url"); 
     621        echo "<html>\n"."<head><meta http-equiv='Refresh' content='$timeout; URL=$redirect_url'/></head>\n"."<body>\n"."<noscript>\n"."<span style='display:none;'>\n"."<h1>".$redirect_to_title."</h1>\n".sprintf(_("Click <a href='%s'>here</a> to continue"), $redirect_url)."<br/>\n"._("The transfer from secure login back to regular http may cause a warning.")."\n"."</span>\n"."</noscript>\n"."</body>\n"."</html>\n"; 
     622        exit; 
     623    } 
     624 
     625    public function customBanner() { 
     626        $custom_banner = ''; 
     627 
     628        return $custom_banner; 
     629    } 
    575630} 
    576631 
  • trunk/wifidog-auth/wifidog/classes/NodeLists/NodeListHTML.php

    r1013 r1030  
    232232        $this->_mainUI->setTitle(_("Hotspot list")); 
    233233        $this->_mainUI->SetHtmlHeader('<link rel="alternate" type="application/rss+xml" title="' . $this->_network->getName() . ": " . _("Newest Hotspots") . '" href="' . BASE_SSL_PATH . 'hotspot_status.php?format=RSS">'); 
    234         $this->_mainUI->appendContent('left_area_middle', $_html); 
    235         $this->_mainUI->appendContent('main_area_middle', $_html_body); 
     234        $this->_mainUI->addContent('left_area_middle', $_html); 
     235        $this->_mainUI->addContent('main_area_middle', $_html_body); 
    236236 
    237237        $this->_mainUI->display(); 
  • trunk/wifidog-auth/wifidog/content/PatternLanguage/archives.php

    r1009 r1030  
    9898 
    9999$ui = new MainUI(); 
    100 $ui->appendContent('left_area_middle', $tool_html); 
     100$ui->addContent('left_area_middle', $tool_html); 
    101101$ui->setTitle(_("Pattern Language - Archives")); 
    102 $ui->appendContent('main_area_middle', $body_html); 
     102$ui->addContent('main_area_middle', $body_html); 
    103103$ui->display(); 
    104104 
  • trunk/wifidog-auth/wifidog/content/PatternLanguage/hotspots.php

    r1009 r1030  
    103103 
    104104$ui=new MainUI(); 
    105 $ui->appendContent('left_area_middle', $tool_html); 
     105$ui->addContent('left_area_middle', $tool_html); 
    106106$ui->setTitle(_("Pattern Language - Hotspots list")); 
    107 $ui->appendContent('main_area_middle', $body_html); 
     107$ui->addContent('main_area_middle', $body_html); 
    108108$ui->display(); 
    109109 
  • trunk/wifidog-auth/wifidog/content/PatternLanguage/index.php

    r1009 r1030  
    9393 
    9494$ui=new MainUI(); 
    95 $ui->appendContent('left_area_middle', $tool_html); 
     95$ui->addContent('left_area_middle', $tool_html); 
    9696$ui->setTitle(_("Pattern Language - About")); 
    97 $ui->appendContent('main_area_middle', $body_html); 
     97$ui->addContent('main_area_middle', $body_html); 
    9898$ui->display(); 
    9999 
  • trunk/wifidog-auth/wifidog/content/PatternLanguage/narrative.php

    r1009 r1030  
    114114 
    115115$ui = new MainUI(); 
    116 $ui->appendContent('left_area_middle', $tool_html); 
     116$ui->addContent('left_area_middle', $tool_html); 
    117117$ui->setTitle(_("Pattern Language - Narrative")); 
    118 $ui->appendContent('main_area_middle', $body_html); 
     118$ui->addContent('main_area_middle', $body_html); 
    119119$ui->display(); 
    120120 
  • trunk/wifidog-auth/wifidog/content/PatternLanguage/subscription.php

    r1009 r1030  
    142142 
    143143$ui = new MainUI(); 
    144 $ui->appendContent('left_area_middle', $tool_html); 
     144$ui->addContent('left_area_middle', $tool_html); 
    145145$ui->setTitle(_("Pattern Language - Subscription")); 
    146 $ui->appendContent('main_area_middle', $body_html); 
     146$ui->addContent('main_area_middle', $body_html); 
    147147$ui->display(); 
    148148 
  • trunk/wifidog-auth/wifidog/content/index.php

    r1009 r1030  
    114114$tool_html .= "</p>"."\n"; 
    115115*/ 
    116 $ui->appendContent('left_area_middle', $tool_html); 
     116$ui->addContent('left_area_middle', $tool_html); 
    117117 
    118118 
     
    149149} 
    150150 
    151 $ui->appendContent('main_area_middle', $html); 
     151$ui->addContent('main_area_middle', $html); 
    152152$ui->display(); 
    153153 
  • trunk/wifidog-auth/wifidog/faq.php

    r1009 r1030  
    5353 
    5454$ui = new MainUI(); 
    55 $ui->appendContent('main_area_middle', $smarty->fetch("templates/faq.html")); 
     55$ui->addContent('main_area_middle', $smarty->fetch("templates/faq.html")); 
    5656$ui->display(); 
    5757 
  • trunk/wifidog-auth/wifidog/help.php

    r1020 r1030  
    5858 
    5959$ui = new MainUI(); 
    60 $ui->appendContent('main_area_middle', $smarty->fetch("templates/sites/help.tpl")); 
     60$ui->addContent('main_area_middle', $smarty->fetch("templates/sites/help.tpl")); 
    6161$ui->display(); 
    6262 
  • trunk/wifidog-auth/wifidog/hotspots_map.php

    r1024 r1030  
    169169$ui->setTitle(_("Hotspots status map")); 
    170170$ui->setHtmlHeader($html_headers); 
    171 $ui->appendContent('left_area_middle', $html); 
    172 $ui->appendContent('main_area_middle', $html_body); 
     171$ui->addContent('left_area_middle', $html); 
     172$ui->addContent('main_area_middle', $html_body); 
    173173$ui->addFooterScript($script); 
    174174$ui->display(); 
  • trunk/wifidog-auth/wifidog/index.php

    r1018 r1030  
    103103 */ 
    104104$ui = new MainUI(); 
    105 $ui->appendContent('left_area_middle', $html); 
    106 $ui->appendContent('main_area_middle', $html_body); 
     105$ui->addContent('left_area_middle', $html); 
     106$ui->addContent('main_area_middle', $html_body); 
    107107$ui->display(); 
    108108 
  • trunk/wifidog-auth/wifidog/login/index.php

    r1028 r1030  
    262262$ui->setPageName('login'); 
    263263$ui->shrinkLeftArea(); 
    264 $ui->appendContent('left_area_middle', $html); 
     264$ui->addContent('left_area_middle', $html); 
    265265 
    266266/* 
    267267 * Main content 
    268268 */ 
    269 // Get all network content 
    270 $content_rows = null; 
    271 $network_id = $db->escapeString($network->getId()); 
    272     $sql = "SELECT content_id, display_area FROM network_has_content WHERE network_id='$network_id'  AND display_page='login' ORDER BY display_area, display_order, subscribe_timestamp DESC"; 
    273 $db->execSql($sql, $content_rows, false); 
    274 if ($content_rows) { 
    275     foreach ($content_rows as $content_row) { 
    276         $content = Content :: getObject($content_row['content_id']); 
    277         if ($content->isDisplayableAt($node)) { 
    278             $ui->appendContent($content_row['display_area'], $content->getUserUI()); 
     269  
     270         // Get all network content and node "login" content 
     271        $content_rows = null; 
     272        $network_id = $network->getId(); 
     273        $sql_network = "(SELECT content_id, display_area, display_order, subscribe_timestamp FROM network_has_content WHERE network_id='$network_id'  AND display_page='login') "; 
     274        $sql_node = null; 
     275        if ($node) { 
     276            // Get all node content 
     277            $node_id = $db->escapeString($node->getId()); 
     278            $sql_node = "UNION (SELECT content_id, display_area, display_order, subscribe_timestamp FROM node_has_content WHERE node_id='$node_id'  AND display_page='login')"; 
    279279        } 
    280     } 
    281 } 
    282  
    283 if($node) 
    284 { 
    285 // Get all node content 
    286 $content_rows = null; 
    287 $node_id = $db->escapeString($node->getId()); 
    288     $sql = "SELECT content_id, display_area FROM node_has_content WHERE node_id='$node_id'  AND display_page='login' ORDER BY display_area, display_order, subscribe_timestamp DESC"; 
    289 $db->execSql($sql, $content_rows, false); 
    290 $showMoreLink = false; 
    291 if ($content_rows) { 
    292     foreach ($content_rows as $content_row) { 
    293         $content = Content :: getObject($content_row['content_id']); 
    294         if ($content->isDisplayableAt($node)) { 
    295             $ui->appendContent($content_row['display_area'], $content->getUserUI()); 
     280        $sql = "SELECT * FROM ($sql_network $sql_node) AS content_everywhere ORDER BY display_area, display_order, subscribe_timestamp DESC"; 
     281 
     282        $db->execSql($sql, $content_rows, false); 
     283        if ($content_rows) { 
     284            foreach ($content_rows as $content_row) { 
     285                $content = Content :: getObject($content_row['content_id']); 
     286                if ($content->isDisplayableAt($node)) { 
     287                    $ui->addContent($content_row['display_area'], $content->getUserUI(), $content_row['display_order']); 
     288                } 
     289            } 
    296290        } 
    297     } 
    298 } 
    299 } 
    300  
    301 $ui->appendContent('main_area_middle', 
    302         "\n<h1>" . sprintf(_("Welcome to the %s Hotspot network."), $network->getName()) . "</h1>\n" . 
    303  
    304         "<p>" . 
    305         _("Please use the login/signup form on the left to activate your connection with the internet.") . 
    306         "</p>\n". 
    307  
    308         "<p>" . 
    309         _("If you already have an account please use that to login.") . " " . 
    310         _("Thanks to the hospitality of your proprietor, this is a surfing free zone.") . " " . 
    311         _("Once you login you are welcome to use the internet as long as you like.") . 
    312         "</p>\n" . 
    313  
    314         "<p>" . 
    315         sprintf(_("If you are new to %s, please use the form on the left to create a new account."), $network->getName()) . " " . 
    316         _("There will be no charge for this service.") . 
    317         "</p>\n" 
    318 ); 
    319291 
    320292/* 
  • trunk/wifidog-auth/wifidog/lost_password.php

    r1018 r1030  
    141141         */ 
    142142        $ui = new MainUI(); 
    143         $ui->appendContent('left_area_middle', $html); 
    144         $ui->appendContent('main_area_middle', $html_body); 
     143        $ui->addContent('left_area_middle', $html); 
     144        $ui->addContent('main_area_middle', $html_body); 
    145145        $ui->display(); 
    146146 
     
    211211 */ 
    212212$ui = new MainUI(); 
    213 $ui->appendContent('left_area_middle', $html); 
    214 $ui->appendContent('main_area_middle', $html_body); 
     213$ui->addContent('left_area_middle', $html); 
     214$ui->addContent('main_area_middle', $html_body); 
    215215$ui->display(); 
    216216 
  • trunk/wifidog-auth/wifidog/lost_username.php

    r1018 r1030  
    125125         */ 
    126126        $ui = new MainUI(); 
    127         $ui->appendContent('left_area_middle', $html); 
    128         $ui->appendContent('main_area_middle', $html_body); 
     127        $ui->addContent('left_area_middle', $html); 
     128        $ui->addContent('main_area_middle', $html_body); 
    129129        $ui->display(); 
    130130 
     
    195195 */ 
    196196$ui = new MainUI(); 
    197 $ui->appendContent('left_area_middle', $html); 
    198 $ui->appendContent('main_area_middle', $html_body); 
     197$ui->addContent('left_area_middle', $html); 
     198$ui->addContent('main_area_middle', $html_body); 
    199199$ui->display(); 
    200200 
  • trunk/wifidog-auth/wifidog/node_list.php

    r1009 r1030  
    133133 
    134134$ui = new MainUI(); 
    135 $ui->appendContent('main_area_middle', $smarty->fetch("templates/node_list.html")); 
     135$ui->addContent('main_area_middle', $smarty->fetch("templates/node_list.html")); 
    136136$ui->display(); 
    137137 
  • trunk/wifidog-auth/wifidog/portal/index.php

    r1009 r1030  
    211211$ui->setTitle(sprintf(_("%s portal for %s"), $network->getName(), $node->getName())); 
    212212$ui->setPageName('portal'); 
    213 $ui->appendContent('left_area_middle', $tool_html); 
     213$ui->addContent('left_area_middle', $tool_html); 
    214214/* 
    215215 * Main content 
     
    221221    $validationMsgHtml .= sprintf(_("Your account has been granted %s minutes of access to retrieve your email and validate your account."), ($current_user->getNetwork()->getValidationGraceTime() / 60)); 
    222222    $validationMsgHtml .= "</div>\n"; 
    223     $ui->appendContent('page_header', $validationMsgHtml); 
     223    $ui->addContent('page_header', $validationMsgHtml); 
    224224} 
    225225 
     
    229229if ($current_user) { 
    230230    $user_id = $db->escapeString($current_user->getId()); 
    231     $sql = "SELECT content_id, display_area FROM network_has_content WHERE network_id='$network_id' AND display_page='portal' AND content_id NOT IN (SELECT content_id FROM user_has_content WHERE user_id = '{$user_id}') ORDER BY display_area, display_order, subscribe_timestamp DESC"; 
     231    $sql = "SELECT content_id, display_area, display_order FROM network_has_content WHERE network_id='$network_id' AND display_page='portal' AND content_id NOT IN (SELECT content_id FROM user_has_content WHERE user_id = '{$user_id}') ORDER BY display_area, display_order, subscribe_timestamp DESC"; 
    232232} else { 
    233     $sql = "SELECT content_id, display_area FROM network_has_content WHERE network_id='$network_id'  AND display_page='portal' ORDER BY display_area, display_order, subscribe_timestamp DESC"; 
     233    $sql = "SELECT content_id, display_area, display_order FROM network_has_content WHERE network_id='$network_id'  AND display_page='portal' ORDER BY display_area, display_order, subscribe_timestamp DESC"; 
    234234} 
    235235$db->execSql($sql, $content_rows, false); 
     
    238238        $content = Content :: getObject($content_row['content_id']); 
    239239        if ($content->isDisplayableAt($node)) { 
    240             $ui->appendContent($content_row['display_area'], $content->getUserUI()); 
     240            $ui->addContent($content_row['display_area'], $content->getUserUI(), $content_row['display_order']); 
    241241        } 
    242242    } 
     
    248248if ($current_user) { 
    249249    $user_id = $db->escapeString($current_user->getId()); 
    250     $sql = "SELECT content_id, display_area FROM node_has_content WHERE node_id='$node_id' AND display_page='portal' AND content_id NOT IN (SELECT content_id FROM user_has_content WHERE user_id = '{$user_id}') ORDER BY display_area, display_order, subscribe_timestamp DESC"; 
     250    $sql = "SELECT content_id, display_area, display_order FROM node_has_content WHERE node_id='$node_id' AND display_page='portal' AND content_id NOT IN (SELECT content_id FROM user_has_content WHERE user_id = '{$user_id}') ORDER BY display_area, display_order, subscribe_timestamp DESC"; 
    251251} else { 
    252     $sql = "SELECT content_id, display_area FROM node_has_content WHERE node_id='$node_id'  AND display_page='portal' ORDER BY display_area, display_order, subscribe_timestamp DESC"; 
     252    $sql = "SELECT content_id, display_area, display_order FROM node_has_content WHERE node_id='$node_id'  AND display_page='portal' ORDER BY display_area, display_order, subscribe_timestamp DESC"; 
    253253} 
    254254$db->execSql($sql, $content_rows, false); 
     
    258258        $content = Content :: getObject($content_row['content_id']); 
    259259        if ($content->isDisplayableAt($node)) { 
    260             $ui->appendContent($content_row['display_area'], $content->getUserUI()); 
     260            $ui->addContent($content_row['display_area'], $content->getUserUI(), $content_row['display_order']); 
    261261        } 
    262262        // Check for content requirements to show the "Show all contents" link 
     
    283283            $content = Content :: getObject($content_row['content_id']); 
    284284            if ($content->isDisplayableAt($node)) { 
    285                 $ui->appendContent('main_area_middle', $content->getUserUI()); 
     285                $ui->addContent('main_area_middle', $content->getUserUI()); 
    286286            } 
    287287        } 
     
    291291if ($showMoreLink) { 
    292292    $link_html = "<a href='{$base_ssl_path}content/?gw_id={$currentNodeId}'>"._("Show all available contents for this hotspot")."</a>\n"; 
    293     $ui->appendContent('main_area_middle', $link_html); 
     293    $ui->addContent('main_area_middle', $link_html); 
    294294} 
    295295$ui->display(); 
  • trunk/wifidog-auth/wifidog/resend_validation.php

    r1018 r1030  
    124124         */ 
    125125        $ui = new MainUI(); 
    126         $ui->appendContent('left_area_middle', $html); 
    127         $ui->appendContent('main_area_middle', $html_body); 
     126        $ui->addContent('left_area_middle', $html); 
     127        $ui->addContent('main_area_middle', $html_body); 
    128128        $ui->display(); 
    129129 
     
    194194 */ 
    195195$ui = new MainUI(); 
    196 $ui->appendContent('left_area_middle', $html); 
    197 $ui->appendContent('main_area_middle', $html_body); 
     196$ui->addContent('left_area_middle', $html); 
     197$ui->addContent('main_area_middle', $html_body); 
    198198$ui->display(); 
    199199 
  • trunk/wifidog-auth/wifidog/signup.php

    r1018 r1030  
    258258        $ui = new MainUI(); 
    259259 
    260         $ui->appendContent('left_area_middle', $html); 
    261         $ui->appendContent('main_area_middle', $html_body); 
    262  
    263                 // $ui->appendContent('page_header', $validationMsgHtml); 
    264                 $ui->appendContent('main_area_top', $validationMsgHtml); 
     260        $ui->addContent('left_area_middle', $html); 
     261        $ui->addContent('main_area_middle', $html_body); 
     262 
     263                // $ui->addContent('page_header', $validationMsgHtml); 
     264                $ui->addContent('main_area_top', $validationMsgHtml); 
    265265 
    266266        $ui->display(); 
     
    345345 */ 
    346346$ui = new MainUI(); 
    347 $ui->appendContent('left_area_middle', $html); 
    348 $ui->appendContent('main_area_middle', $html_body); 
     347$ui->addContent('left_area_middle', $html); 
     348$ui->addContent('main_area_middle', $html_body); 
    349349$ui->display(); 
    350350 
  • trunk/wifidog-auth/wifidog/templates/classes/MainUI_Display.tpl

    r1020 r1030  
    6868 
    6969    <body id='page' class='{$page_name}'> 
    70         {if !empty($contentArray.page_header) || $debugRequested} 
     70        {if !empty($contentDisplayArray.page_header) || $debugRequested} 
    7171                <div class='page_header'> 
    7272            {if $debugRequested} 
    7373                <pre>{$debugOutput}</pre> 
    7474                {/if} 
    75                         {if !empty($contentArray.page_header)} 
    76                                 {$contentArray.page_header} 
     75                        {if !empty($contentDisplayArray.page_header)} 
     76                                {$contentDisplayArray.page_header} 
    7777                {/if} 
    7878                </div> 
     
    8181 
    8282        <div id="page_body"> 
    83         {if !empty($contentArray.left_area_top) ||  !empty($contentArray.left_area_middle) ||  !empty($contentArray.left_area_middle)} 
     83        {if !empty($contentDisplayArray.left_area_top) ||  !empty($contentDisplayArray.left_area_middle) ||  !empty($contentDisplayArray.left_area_middle)} 
    8484                <div id="left_area"> 
    85                         {if !empty($contentArray.left_area_top)} 
     85                        {if !empty($contentDisplayArray.left_area_top)} 
    8686                        <div id="left_area_top"> 
    87                             {$contentArray.left_area_top} 
     87                            {$contentDisplayArray.left_area_top} 
    8888                        </div> 
    8989                        {/if} 
    90                         {if !empty($contentArray.left_area_middle)} 
     90                        {if !empty($contentDisplayArray.left_area_middle)} 
    9191                        <div id="left_area_middle"> 
    92                             {$contentArray.left_area_middle} 
     92                            {$contentDisplayArray.left_area_middle} 
    9393                        </div> 
    9494                        {/if} 
    95                         {if !empty($contentArray.left_area_bottom)} 
     95                        {if !empty($contentDisplayArray.left_area_bottom)} 
    9696                        <div id="left_area_bottom"> 
    97                             {$contentArray.left_area_bottom} 
     97                            {$contentDisplayArray.left_area_bottom} 
    9898                        </div> 
    9999                        {/if}    
     
    101101        {/if} 
    102102         
    103         {if !empty($contentArray.main_area_top) ||  !empty($contentArray.main_area_middle) ||  !empty($contentArray.main_area_middle)} 
     103        {if !empty($contentDisplayArray.main_area_top) ||  !empty($contentDisplayArray.main_area_middle) ||  !empty($contentDisplayArray.main_area_middle)} 
    104104                <div id="main_area"> 
    105                         {if !empty($contentArray.main_area_top)} 
     105                        {if !empty($contentDisplayArray.main_area_top)} 
    106106                        <div id="main_area_top"> 
    107                             {$contentArray.main_area_top} 
     107                            {$contentDisplayArray.main_area_top} 
    108108                        </div> 
    109109                        {/if} 
    110                         {if !empty($contentArray.main_area_middle)} 
     110                        {if !empty($contentDisplayArray.main_area_middle)} 
    111111                        <div id="main_area_middle"> 
    112                             {$contentArray.main_area_middle} 
     112                            {$contentDisplayArray.main_area_middle} 
    113113                        </div> 
    114114                        {/if} 
    115                         {if !empty($contentArray.main_area_bottom)} 
     115                        {if !empty($contentDisplayArray.main_area_bottom)} 
    116116                        <div id="main_area_bottom"> 
    117                             {$contentArray.main_area_bottom} 
     117                            {$contentDisplayArray.main_area_bottom} 
    118118                        </div> 
    119119                        {/if}    
     
    121121        {/if}         
    122122 
    123           {if !empty($contentArray.right_area_top) ||  !empty($contentArray.right_area_middle) ||  !empty($contentArray.right_area_bottom)} 
     123          {if !empty($contentDisplayArray.right_area_top) ||  !empty($contentDisplayArray.right_area_middle) ||  !empty($contentDisplayArray.right_area_bottom)} 
    124124                <div id="right_area"> 
    125                         {if !empty($contentArray.right_area_top)} 
     125                        {if !empty($contentDisplayArray.right_area_top)} 
    126126                        <div id="right_area_top"> 
    127                             {$contentArray.right_area_top} 
     127                            {$contentDisplayArray.right_area_top} 
    128128                        </div> 
    129129                        {/if} 
    130                         {if !empty($contentArray.right_area_middle)} 
     130                        {if !empty($contentDisplayArray.right_area_middle)} 
    131131                        <div id="right_area_middle"> 
    132                             {$contentArray.right_area_middle} 
     132                            {$contentDisplayArray.right_area_middle} 
    133133                        </div> 
    134134                        {/if} 
    135                         {if !empty($contentArray.right_area_bottom)} 
     135                        {if !empty($contentDisplayArray.right_area_bottom)} 
    136136                        <div id="right_area_bottom"> 
    137                             {$contentArray.right_area_bottom} 
     137                            {$contentDisplayArray.right_area_bottom} 
    138138                        </div> 
    139139                        {/if}    
     
    141141        {/if}    
    142142        </div> 
    143     {if !empty($contentArray.page_footer)} 
     143    {if !empty($contentDisplayArray.page_footer)} 
    144144        <div class='page_footer'> 
    145                         {$contentArray.page_footer} 
     145                        {$contentDisplayArray.page_footer} 
    146146        </div> 
    147147    {/if}  
  • trunk/wifidog-auth/wifidog/user_profile.php

    r1009 r1030  
    8080 
    8181$ui=new MainUI(); 
    82 $ui->appendContent('left_area_middle', $tool_html); 
     82$ui->addContent('left_area_middle', $tool_html); 
    8383$smarty->assign("title", _("User Profile")); 
    8484//TODO: Write User profiles 
    85 $ui->appendContent('main_area_middle', $body_html); 
     85$ui->addContent('main_area_middle', $body_html); 
    8686$ui->display(); 
    8787 
  • trunk/wifidog-auth/wifidog/validate.php

    r1009 r1030  
    8686 
    8787$ui = new MainUI(); 
    88 $ui->appendContent('main_area_middle', $smarty->fetch("templates/sites/validate.tpl")); 
     88$ui->addContent('main_area_middle', $smarty->fetch("templates/sites/validate.tpl")); 
    8989$ui->display(); 
    9090