--- docman.php 2002/07/29 12:53:50 1.30
+++ docman.php 2002/09/06 17:34:06 1.33
@@ -157,6 +157,7 @@
global $gblEditable, $gblImages,
$gblDateFmt, $gblTimeFmt,
+ $gblPermNote,
$webRoot, $html,
$HTTP_SERVER_VARS ;
$self = $HTTP_SERVER_VARS["PHP_SELF"] ;
@@ -208,25 +209,8 @@
$fstr = fread($fh,filesize($fsPath)) ;
fclose($fh) ;
$fstr = htmlentities( $fstr ) ;
-?>
-
-
-
-
+ }
+
+ if (check_perm($relDir.$fn,$gblPermNote)) {
+ include("$html/DetailPage-note.html");
+ }
-";
$name=basename("$fsDir/$fn");
$logname=dirname("$fsDir/$fn")."/.log/$name";
@@ -580,6 +535,7 @@
global $gblEditable, $gblIcon, $gblModDays, $webRoot, $gblHide,
$gblIgnoreUnknownFileType, $gblRepositoryDir,
$gblLogin, $gblUserName, $gblDateFmt, $gblTimeFmt,
+ $gblPermNote,
$fsRealmDir, $realm, $realm_sep,
$html, $realm_config,
$HTTP_GET_VARS, $HTTP_SERVER_VARS;
@@ -654,8 +610,7 @@
$text .= "
Examine list of files changed in last day or all changes.";
StartHTML("(Navigate)",$text) ;
- echo "" ;
+ print "" ;
// updir (parent) bar
if (chopsl($fsDir) != chopsl($fsRoot)) {
@@ -673,7 +628,8 @@
return $out;
}
- if (! HTTP_GET_VAR("dsort")) $dsort = "name"; // default directory sort
+ $dsort = HTTP_GET_VAR("dsort");
+ if (! isset($dsort)) $dsort = "name"; // default directory sort
$dsort_arr = array(
"name" => array ("rname", "note"),
@@ -682,7 +638,8 @@
"rnote" => array ("name", "note")
);
- if (! HTTP_GET_VAR("fsort")) $fsort = "name"; // default directory sort
+ $fsort = HTTP_GET_VAR("fsort");
+ if (! isset($fsort)) $fsort = "name"; // default directory sort
$fsort_arr = array(
"name" => array ("rname", "note", "date", "size"),
@@ -744,6 +701,12 @@
}
$dir_url=$self."?D=".urlencode(chopsl($relDir)."/".$dir);
+ if (check_perm($relDir.$dir,$gblPermNote)) {
+ $note_html="".$gblIcon("note")."".$dirNote[$key];
+ } else {
+ $note_html=$dirNote[$key];
+ }
+
include("$html/Navigate-dirEntry.html");
} // iterate over dirs
@@ -824,7 +787,11 @@
$file_url_html .= substr($file,5,strlen($file)-5) . " deleted";
}
- $note_html="".$gblIcon("note")."".ReadNote($path);
+ if (check_perm($relDir.$file,$gblPermNote)) {
+ $note_html="".$gblIcon("note")."".$fileNote[$key];
+ } else {
+ $note_html=$fileNote[$key];
+ }
$ext = strtolower(strrchr($file,".")) ;
@@ -844,9 +811,11 @@
$file_url_html = "$file $a";
}
} else {
- $b.="" ;
- $b.=$gblIcon("checkout")."";
+ if (check_perm($relDir.$file,trperm_w)) {
+ $b.="" ;
+ $b.=$gblIcon("checkout")."";
+ }
if ( $ext=="" || strstr(join(" ",$gblEditable),$ext) ) {
$b.="
- |
- No files in this directory
- |
-
+ include("$html/Navigate-noFiles.html");
}
if ($emptyDir && $relDir != "") {
-?>
-
-
-
-
-
- |
|
-
+ include("$html/Navigate-hr.html");
-if (file_exists("$fsRealmDir/$realm".$realm_sep."info.inc")) {
- print " | ";
- include("$fsRealmDir/$realm".$realm_sep."info.inc");
- print " |
|
|
";
-} elseif (file_exists("$gblRepositoryDir/.info.inc")) {
- print " | ";
- include("$gblRepositoryDir/.info.inc");
- print " |
|
|
";
-}
+ if (file_exists("$fsRealmDir/$realm".$realm_sep."info.inc")) {
+ print " | ";
+ include("$fsRealmDir/$realm".$realm_sep."info.inc");
+ print " |
";
+ include("$html/Navigate-hr.html");
+ } elseif (file_exists("$gblRepositoryDir/.info.inc")) {
+ print " | ";
+ include("$gblRepositoryDir/.info.inc");
+ print " |
";
+ include("$html/Navigate-hr.html");
+ }
+ include("$html/Navigate-createNew.html");
-?>
-
-
-
+ print "
";
-post_max_size and upload_max_filesize",1);
}
if (HTTP_POST_VAR("FILENAME")) check_filename($FILENAME);
@@ -1939,6 +1882,8 @@
case "UNLOCK" :
if ( $CONFIRM != "on" ) break ;
+ if (! check_perm("$relDir/$FN", trperm_w))
+ Error("Access denied","User $gblLogin tried to unlock $relDir/$FN without valid trustee.",1);
Unlock("$fsDir/$FN");
break ;