00001 <?PHP
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 $page_author = $creator_name;
00018 $page_author_email = $creator_email;
00019 $page_menu = 1;
00020 $page_date = formatTime( time() );
00021 $page_title = i18n("Setup");
00022
00023 if (!auth($_REQUEST['username'], $_REQUEST['password']))
00024 $page_content = loginform($language, siteURL(true) . "setup/?globalID=setup", $auth_messages);
00025 else if (!isAllowed("global_setup"))
00026 $page_content = "<p>" . i18n("You are not allowed to setup the site") . "</p>";
00027 else
00028 {
00029 $setupPage = new setupPage;
00030
00031 if( isAllowed("global_admin") )
00032 $setupPage->addCommand( i18n("System options"), i18n("The options important to the entire system"), globalIDtoURL("setup/options") );
00033
00034 $setupPage->contents = "
00035 <table class=\"setup\">
00036 <tr class=\"setup\">
00037 <td width=\"25%\" class=\"setup\">
00038 <div align=\"left\"><em>" . i18n("Your profile") . "</em></div>
00039 </td>
00040 <td class=\"setup\">
00041 <div align=\"right\">
00042 " . drawCommand( i18n("View"), i18n("View your profile"), globalIDtoURL( "user/" . currentUser() ) );
00043 foreach( $profilemodules as $key => $value )
00044 $setupPage->contents .= "
00045 " . drawCommand( i18n(substr($value, 14)), i18n(substr($value, 14)), globalIDtoURL("user/" . currentUser() . "/" . substr($value, 14) ) );
00046
00047 $setupPage->contents .= "
00048 " . drawCommand( i18n("Edit"), i18n("Edit your profile information"), globalIDtoURL( "user/" . currentUser() . "/edit" ) ) . "
00049 </div>
00050 </td>
00051 </tr>";
00052
00053 if( isAllowed("global_pages_edit") )
00054 {
00055 $setupPage->contents .= "
00056 <tr class=\"setup\">
00057 <td width=\"25%\" class=\"setup\">
00058 <div align=\"left\"><em><a href=\"" . globalIDtoURL("setup/pagesetup") . "\">" . i18n("Pages") . "</a></em></div>
00059 </td>
00060 <td class=\"setup\">
00061 <div align=\"right\">
00062 " . drawCommand( i18n("Rebuild page index"), i18n("Rebuild page index"), globalIDtoURL("setup/pagesetup/rebuild") ) . "
00063 " . drawCommand( i18n("New"), i18n("Create a new page"), globalIDtoURL("setup/editpage/$language/") ) . "
00064 </div>
00065 </td>
00066 </tr>";
00067 }
00068
00069 if( isAllowed("global_menus") )
00070 {
00071 $setupPage->contents .= "
00072 <tr class=\"setup\">
00073 <td width=\"25%\" class=\"setup\">
00074 <div align=\"left\"><em><a href=\"" . globalIDtoURL("setup/menusetup") . "\">" . i18n("Menus") . "</a></em></div>
00075 </td>
00076 <td class=\"setup\">
00077 <div align=\"right\">
00078 " . drawCommand( i18n("New"), i18n("Create a new menu"), globalIDtoURL("setup/editmenu/" . i18n("New menu") ) ) . "
00079 </div>
00080 </td>
00081 </tr>";
00082 }
00083
00084 if( isAllowed("global_users_edit") )
00085 {
00086 $setupPage->contents .= "
00087 <tr class=\"setup\">
00088 <td width=\"25%\" class=\"setup\">
00089 <div align=\"left\"><em><a href=\"" . globalIDtoURL("setup/users") . "\">" . i18n("Users") . "</a></em></div>
00090 </td>
00091 <td class=\"setup\">
00092 <div align=\"right\">
00093 " . drawCommand( i18n("Profile options"), i18n("Profile options"), globalIDtoURL("setup/users/profile_options") ) . "
00094 " . drawCommand( i18n("Set permission defaults"), i18n("Set permission defaults"), globalIDtoURL("setup/users/default_permissions") ) . "
00095 " .drawCommand( i18n("New"), i18n("Create a new user"), globalIDtoURL("user/" . i18n("username") . "/new") ) . "
00096 </div>
00097 </td>
00098 </tr>";
00099 }
00100
00101 if( isAllowed("global_themes") )
00102 {
00103 $setupPage->contents .= "
00104 <tr class=\"setup\">
00105 <td width=\"25%\" class=\"setup\">
00106 <div align=\"left\"><em><a href=\"" . globalIDtoURL("setup/themesetup") ."\">" . i18n("Themes") . "</a></em></div>
00107 </td>
00108 <td class=\"setup\">
00109 <div align=\"right\">
00110 " . drawCommand( i18n("Options"), i18n("Theme options") , globalIDtoURL("setup/themesetup/options") ) . "
00111 </div>
00112 </td>
00113 </tr>";
00114 }
00115
00116 if( isAllowed("global_files") )
00117 {
00118 $setupPage->contents .= "
00119 <tr class=\"setup\">
00120 <td width=\"25%\" class=\"setup\">
00121 <div align=\"left\"><em><a href=\"" . globalIDtoURL("setup/filesetup") . "\">" . i18n("Files") . "</a></em></div>
00122 </td>
00123 <td class=\"setup\">
00124 <div align=\"right\">
00125 " . drawCommand( i18n("Upload file"), i18n("Upload a new file"), globalIDtoURL("setup/filesetup/upload") ) . "
00126 </div>
00127 </td>
00128 </tr>";
00129 }
00130
00131 $setupPage->contents .= "
00132 <tr class=\"setup\">
00133 <td width=\"25%\" class=\"setup\">
00134 <div align=\"left\"><em><a href=\"" . globalIDtoURL("setup/modulesetup") . "\">" . i18n("Modules") . "</a></em></div>
00135 </td>
00136 <td class=\"setup\">
00137 <div align=\"right\">
00138 " . i18n("Found modules:") . "<br />";
00139 foreach( $modules_setup as $key => $value )
00140 $setupPage->contents .= "
00141 <a href=\"" . globalIDtoURL("setup/modulesetup/" . substr( $value, 12 ) ) . "\">{$modules_names[$key]}</a><br />";
00142
00143 $setupPage->contents .= "
00144 </div>
00145 </td>
00146 </tr>";
00147
00148 $setupPage->contents .= "
00149 </table>";
00150
00151 $page_content = $setupPage->render();
00152
00153 }
00154 ?>