_rootDir . "themes/"; $handle = opendir($path); while ($entry = readdir($handle) ) { if ($entry == ".." || $entry == ".") continue; else if (is_dir($path . $entry)) array_push($themes, $entry); } closedir($handle); return $themes; } $theme = $settings->_theme; function printHTMLHead($title) { global $theme; $GLOBALS['phpgw_info']['flags'] = array( 'currentapp' => 'mydms', 'noheader' => True, 'nonavbar' => True ); include_once('../../header.inc.php'); if(!@is_object($GLOBALS['phpgw']->js)) { $GLOBALS['phpgw']->js =& CreateObject('phpgwapi.javascript'); } $GLOBALS['phpgw']->js->validate_file('dhtmlxtree','js/dhtmlXCommon'); $GLOBALS['phpgw']->js->validate_file('dhtmlxtree','js/dhtmlXTree'); $GLOBALS['phpgw']->js->validate_file('jscode','mydms','mydms'); $GLOBALS['phpgw']->common->phpgw_header(); echo parse_navbar(); if ( is_file("../themes/$theme/styles.css") ) $stylesheet="../themes/$theme/styles.css"; else $stylesheet="../themes/default/styles.css"; if ( is_file("../themes/$theme/HTMLHead.html" ) ) include("../themes/$theme/HTMLHead.html"); else include("../themes/default/HTMLHead.html"); } function printHTMLFoot() { global $theme; $GLOBALS['phpgw']->common->phpgw_footer(); if ( is_file("../themes/$theme/HTMLFoot.html" ) ) { include("../themes/$theme/HTMLFoot.html"); } else { include("../themes/default/HTMLFoot.html"); } } function printStartBox($header) { global $theme; if ( is_file("../themes/$theme/StartBox.html" ) ) { include("../themes/$theme/StartBox.html"); } else { include("../themes/default/StartBox.html"); } } function printNextBox($header) { global $theme; if ( is_file("../themes/$theme/NextBox.html" ) ) { include("../themes/$theme/NextBox.html"); } else { include("../themes/default/NextBox.html"); } } function printEndBox() { global $theme; if ( is_file("../themes/$theme/EndBox.html" ) ) { include("../themes/$theme/EndBox.html"); } else { include("../themes/default/EndBox.html"); } } function printCenterStart() { print "
"; } function printCenterEnd() { print " |
".getMLText("back").""; } function printGoto($targets) { print "
".getMLText("goto").": "; for ($i = 0; $i < count($targets); $i++) { print "".$targets[$i][0].""; if ($i+1 < count($targets)) print " | "; } } function printTitleBar($folder) { return; global $user, $settings, $theme; $options=array(); $options[getMLText("content")]=$settings->_httpRoot . "out/out.ViewFolder.php?folderid=" . $folder->getID(); $options[getMLText("search")]=$settings->_httpRoot . "out/out.SearchForm.php?folderid=" . $folder->getID(); if ($user->getID() != $settings->_guestID) //$options[getMLText("my_account")]=$settings->_httpRoot . "out/out.EditUserData.php"; if ($user->isAdmin()) { $options[getMLText("admin_tools")] = $settings->_httpRoot . "out/out.AdminTools.php"; // $options[getMLText("user_management")]=$settings->_httpRoot . "out/out.UsrMgr.php"; // $options[getMLText("group_management")]=$settings->_httpRoot . "out/out.GroupMgr.php"; } else $options[getMLText("user_list")]=$settings->_httpRoot . "out/out.UserList.php"; //$options[getMLText("logout")]=$settings->_httpRoot . "op/op.Logout.php"; $title=getMLText("logged_in_as")." ".$user->getFullName(); $menu = buildMenu( $options, "titlebar" ); if ( is_file("../themes/$theme/TitleBar.html" ) ) { include("../themes/$theme/TitleBar.html"); } else { include("../themes/default/TitleBar.html"); } } function printFolderTree($path, $level = 0, $activeObj, $isFolder) { GLOBAL $user; #$folder = $path[$level]; #$subFolders = $folder->getSubFolders(); #$subFolders = filterAccess($subFolders, $user, M_READ); $allSubFolders = array(); foreach($path as $folderObject) { $allSubFolders['_id'.$folderObject->getID()] = $folderObject; $subFoldersL1 = $folderObject->getSubFolders(); foreach((array)$subFoldersL1 as $subFolderL1Object) { $allSubFolders['_id'.$subFolderL1Object->getID()] = $subFolderL1Object; $subFoldersL2 = $subFolderL1Object->getSubFolders(); foreach((array)$subFoldersL2 as $subFolderL2Object) { $allSubFolders['_id'.$subFolderL2Object->getID()] = $subFolderL2Object; } } } $uimydms =& CreateObject('mydms.uimydms'); print $uimydms->folderChooser($allSubFolders, $activeObj); return; } function printFolderPageStart($folder) { global $theme; $uimydms =& CreateObject('mydms.uimydms'); $title1 = getMLText("foldertree"); $title2 = " ". getMLText("selected_folder") . ": " . $folder->getName(); $path = $folder->getPathNew(); $txtpath = ''; if($path!=''){ foreach($path as $folderObject) { if(!empty($txtpath)) $txtpath .= " / "; $txtpath .= "getID()."\">". $folderObject->getName().""; } } $txtpath = getMLText("folder_path") . ": " . $txtpath; if ( is_file("../themes/$theme/FolderPageStart.html" ) ) { include("../themes/$theme/FolderPageStart.html"); } else { include("../themes/default/FolderPageStart.html"); } } function printFolderPageEnd($folder) { GLOBAL $user, $theme; $title = getMLText("edit_folder"); $options=array(); $accessMode = $folder->getAccessMode($user); if ($accessMode >= M_READWRITE) { $options[getMLText("add_subfolder")] = "out.AddSubFolder.php?folderid=" . $folder->getID(); $options[getMLText("add_document")] = "out.AddDocument.php?folderid=" . $folder->getID(); $options[getMLText("edit_folder_props")] = "out.EditFolder.php?folderid=" . $folder->getID(); $options[getMLText("edit_folder_notify")] = "out.FolderNotify.php?folderid=" . $folder->getID(); $options[getMLText("move_folder")] = "out.MoveFolder.php?folderid=" . $folder->getID(); } if ($accessMode == M_ALL) { $options[getMLText("rm_folder")] = "out.RemoveFolder.php?folderid=" . $folder->getID(); $options[getMLText("edit_folder_access")] = "out.FolderAccess.php?folderid=" . $folder->getID(); } $menu=buildMenu( $options, "editfolder" ); if ( is_file("../themes/$theme/FolderPageEnd.html" ) ) { include("../themes/$theme/FolderPageEnd.html"); } else { include("../themes/default/FolderPageEnd.html"); } } function printPageHeader($header) { print "