--- docman.php 2001/06/19 11:08:20 1.42
+++ docman.php 2002/01/11 16:02:06 1.54
@@ -78,6 +78,11 @@
// from where to include auth_*.php modules?
$gblIncDir = "/home/httpd/docman";
+ // do we want to force download? (default is 0 for backward
+ // compatibility, but it's defined as 1 in docman.conf for all
+ // future applications!
+ $gblForceDownload = 0;
+
// username/password should not be system
// usernames/passwords !!
@@ -120,8 +125,16 @@
$gblImages = array( ".jpg",".jpeg",".gif",".png",".ico",
".bmp",".xbm") ;
+ // which files to hide (separated by ,)
+ $gblHide = "";
+
+ // Where are users? (by default in .htusers file)
+ $gblUsers = "htusers_file";
+
//////////////////////////////////////////////////////////////////
+ $gblVersion = "1.8";
+
function StartHTML($title,$text="") {
$title = "Document Manager " . $title ;
@@ -132,7 +145,7 @@
= $host . " " . $title ?>
-
+
@@ -151,20 +164,39 @@
//////////////////////////////////////////////////////////////////
function EndHTML() {
+
+global $gblDateFmt, $gblTimeFmt, $gblUserName, $PHP_SELF, $gblPw, $gblVersion;
+
?>
-= date($GLOBALS[gblDateFmt]) ?> -
-= date($GLOBALS[gblTimeFmt]) ?> -
-= $GLOBALS[gblUserName] ?>
- [?relogin== $GLOBALS[gblPw] ?>">logout]
+= date($gblDateFmt) ?> -
+= date($gblTimeFmt) ?> -
+= $gblUserName ?>
+
+ [= $url_title ?>]
-
ANYPORTAL(php) Site Manager
-
+
+Document Manager = $gblVersion ?>, based on ANYPORTAL(php) Site Manager
+
© 1999 by ANYPORTAL,
© 2000 by d@nger.org,
-© 2000 by DbP
+© 2000-2002 by DbP
@@ -354,7 +386,7 @@
$log=fopen($logname,"r");
$cl1=" class=LST"; $cl2="";
$logarr = array();
- while($line = fgetcsv($log,255,"\t")) {
+ while($line = fgetcsv($log,512,"\t")) {
$cl=$cl1; $cl1=$cl2; $cl2=$cl;
array_unshift($logarr,array($cl,$line[0],$line[1],$line[2],$line[3]));
}
@@ -630,7 +662,7 @@
function Navigate($fsRoot,$relDir) {
- global $gblEditable, $gblIcon, $gblModDays, $webRoot ;
+ global $gblEditable, $gblIcon, $gblModDays, $webRoot, $gblHide ;
$self = $GLOBALS["PHP_SELF"] ;
@@ -638,11 +670,13 @@
if (!is_dir($fsDir)) Error("Dir not found",$relDir) ;
+ $hide_items=",$gblHide,";
+
// read directory contents
if ( !($dir = @opendir($fsDir)) )
Error("Read Access denied",$relDir) ;
while ($item = readdir($dir)) {
- if ( $item == ".." || $item == "." || substr($item,0,1) == "." ) continue ;
+ if ( substr($item,0,1) == "." || strstr($hide_items,",$item,") ) continue ;
if ( is_dir($fsDir . $item) ) {
$dirList[] = $item ;
} else if ( is_file($fsDir . $item) ) {
@@ -661,7 +695,7 @@
// scan deleted files
if ( $GLOBALS[show_deleted] == 1 && ($dir = @opendir("$fsDir/.del")) ) {
while ($item = readdir($dir)) {
- if ( substr($item,0,1) == "." ) continue ;
+ if ( substr($item,0,1) == "." || strstr($hide_items,",$item,") ) continue ;
$fileList[] = ".del/$item" ;
}
closedir($dir) ;
@@ -682,7 +716,7 @@
CELLSPACING=3 WIDTH=\"100%\">" ;
// updir bar
- if ($fsDir != $fsRoot) {
+ if (chopsl($fsDir) != chopsl($fsRoot)) {
$parent = dirname($relDir) ;
if ($parent == "") $parent = "/" ;
?>
@@ -830,7 +864,7 @@
}
- if ($emptyDir) {
+ if ($emptyDir && $relDir != "") {
?>