Subversion Repositories travelsized

Rev

Rev 176 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?PHP
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * This file is part of Travelsized CMS
 *              A content management system with modules, based on wiki syntax
 *
 * Author: Dan Jensen <admin@leinir.dk>
 * Copyright 2003/2004
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * The GNU General Public License is available at: http://www.gnu.org/copyleft/
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */


$page_author = $creator_name;
$page_author_email = $creator_email;
$page_menu = 1;
$page_date = formatTime( time() );
$page_title = i18n("Module management");

if( array_key_exists( "username", $_REQUEST ) && array_key_exists( "password", $_REQUEST ) && !auth( $_REQUEST["username"], $_REQUEST["password"] ) )
        $page_content = loginform($language, globalIDtoURL("setup/modulesetup"), $auth_messages);
else if (isauth())
{
        $modulefunction = "modulesetup_$theModule";
        //Manage modules
        if( array_key_exists( "theme", $_REQUEST ) && $_REQUEST["theme"] == "empty" )
                $page_content = $modulefunction();
        else if( $theModule != "" )
        {
                $setupPage = new setupPage();
                $setupPage->addBreadcrumb( i18n("Modules"), globalIDtoURL("setup/modulesetup") );
                $setupPage->addBreadcrumb( i18n(i18n($theModule)), globalIDtoURL("setup/modulesetup/$theModule") );
                if( $theModuleSection != "" )
                        $setupPage->addBreadcrumb( i18n($theModuleSection), globalIDtoURL("setup/modulesetup/$theModule/$theModuleSection") );
                if( $theModuleSubsection != "" )
                        $setupPage->addBreadcrumb( i18n($theModuleSubsection), globalIDtoURL("setup/modulesetup/$theModule/$theModuleSection/$theModuleSubsection") );
                if( $theModuleAction != "" )
                        $setupPage->addBreadcrumb( i18n($theModuleAction), globalIDtoURL("setup/modulesetup/$theModule/$theModuleSection/$theModuleSubsection/$theModuleAction") );
               
                $setupPage->contents .= $modulefunction();
                $page_content = $setupPage->render();
        }
        else
        {
                $setupPage = new setupPage();
                $setupPage->addBreadcrumb( i18n("Modules"), globalIDtoURL("setup/modulesetup") );
               
                $setupPage->contents .= "
                        <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"setup\">
                        <tr class=\"setup\">
                        <th class=\"setup\" style=\"border-bottom: 1px solid gray;\">"
. i18n("Module") . "</th>
                        <th class=\"setup\" style=\"border-bottom: 1px solid gray;\">"
. i18n("Description") . "</th>
                        </tr>"
;
                global $modules_setup, $modules_descriptions, $modules_names;
                foreach( $modules_setup as $key => $value )
                {
                        $modulename = substr( $value, 12 );
                        $setupPage->contents .= "
                        <tr class=\"setup\">
                                <td class=\"setup\">
                                        <div><a href=\""
. globalIDtoURL("setup/modulesetup/$modulename") . "\">{$modules_names[$key]}</a></div>
                                </td>
                                <td class=\"setup\">
                                        <div>{$modules_descriptions[$key]}</div>
                                </td>
                        </tr>"
;
                }
                $setupPage->contents .= "
                </td></tr></table>"
;
                $page_content = $setupPage->render();
        }
}
?>