00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 require_once 'diogenes.barrel.inc.php';
00023
00026 class DiogenesAdmin extends DiogenesBarrel
00027 {
00032 function DiogenesAdmin($dir = "")
00033 {
00034 global $globals;
00035
00036 $this->DiogenesBarrel();
00037 $this->assign('page',__("Administration"));
00038
00039
00040 $this->startSession();
00041 if (!empty($dir)) {
00042 $res = $globals->db->query("select wperms from {$this->barrel->table_page} where PID='$dir'");
00043 if (!list($wperms) = mysql_fetch_row($res))
00044 $this->kill(__("Directory not found"));
00045 $this->checkPerms($wperms);
00046 } else {
00047 $this->checkPerms('admin');
00048 }
00049 }
00050
00051
00054 function getTemplate()
00055 {
00056 return DiogenesPage::getTemplate('master.tpl');
00057 }
00058
00059
00062 function makeMenu() {
00063 global $globals;
00064
00065
00066 $homepage = $this->barrel->getPID('');
00067
00068 array_push($this->menu, array( 1, __("Home"), $this->urlSite("") ) );
00069 array_push($this->menu, array( 1, __("Admin manual"), __("http://diogenes-doc.polytechnique.org/en-admin/") ) );
00070 array_push($this->menu, array( 0, __("Administration"), "", 1 ) );
00071 array_push($this->menu, array( 1, __("Activity"), "./") );
00072 array_push($this->menu, array( 1, __("Options"), "options") );
00073 if ($this->barrel->hasFlag('plug'))
00074 {
00075 array_push($this->menu, array( 1, __("Plugins"), "plugins") );
00076 }
00077 array_push($this->menu, array( 1, __("Users"), "users") );
00078 array_push($this->menu, array( 1, __("WebDAV"), "webdav") );
00079 array_push($this->menu, array( 0, __("Content"), "", 1 ) );
00080 array_push($this->menu, array( 1, __("Pages catalog"), "files?dir={$homepage}&file={$globals->cssfile}") );
00081 array_push($this->menu, array( 1, __("Edit style sheet"), "edit?dir={$homepage}&file={$globals->cssfile}") );
00082 array_push($this->menu, array( 1, __("Edit menu"), "menus") );
00083 }
00084
00085 }
00086
00087 ?>