74 |
////////////////////////////////////////////////////////////////// |
////////////////////////////////////////////////////////////////// |
75 |
|
|
76 |
$gblTitle = "Document Manager"; |
$gblTitle = "Document Manager"; |
77 |
$gblVersion = "2.0-pre1"; |
$gblVersion = "2.0-pre2"; |
78 |
|
|
79 |
$secHash = ""; |
$secHash = ""; |
80 |
|
|
81 |
// location of html files |
// location of html files |
82 |
$html = $gblIncDir."/html"; |
$html = $gblIncDir."/html"; |
83 |
|
|
84 |
LoadLanguage($HTTP_SERVER_VARS["HTTP_ACCEPT_LANGUAGE"]); |
if (isset($HTTP_SERVER_VARS["HTTP_ACCEPT_LANGUAGE"])) { |
85 |
|
LoadLanguage($HTTP_SERVER_VARS["HTTP_ACCEPT_LANGUAGE"]); |
86 |
|
} |
87 |
|
|
88 |
// for security and configuration |
// for security and configuration |
89 |
$realm=$HTTP_SERVER_VARS["HTTP_HOST"]; |
$realm=$HTTP_SERVER_VARS["HTTP_HOST"]; |
149 |
} |
} |
150 |
include("$html/footer.html"); |
include("$html/footer.html"); |
151 |
|
|
152 |
global $debug; |
# global $debug; |
153 |
if ($debug) print $debug; |
# if ($debug) print $debug; |
154 |
} // end function EndHTML |
} // end function EndHTML |
155 |
|
|
156 |
////////////////////////////////////////////////////////////////// |
////////////////////////////////////////////////////////////////// |
709 |
$note_html=$dirNote[$key]; |
$note_html=$dirNote[$key]; |
710 |
} |
} |
711 |
|
|
712 |
|
$dir_html = isBlank($dir,"directory"); |
713 |
|
|
714 |
include("$html/Navigate-dirEntry.html"); |
include("$html/Navigate-dirEntry.html"); |
715 |
|
|
716 |
} // iterate over dirs |
} // iterate over dirs |
721 |
$uurl = self_args(array($D,"fsort=".$fsort_arr[$fsort][2])); |
$uurl = self_args(array($D,"fsort=".$fsort_arr[$fsort][2])); |
722 |
$surl = self_args(array($D,"fsort=".$fsort_arr[$fsort][3])); |
$surl = self_args(array($D,"fsort=".$fsort_arr[$fsort][3])); |
723 |
|
|
724 |
|
$html_uri = $webRoot; |
725 |
|
|
726 |
|
if (substr($relDir,0,1) == "/") { |
727 |
|
$html_uri .= substr($relDir,1,strlen($relDir)-1); |
728 |
|
} else { |
729 |
|
$html_uri .= $relDir; |
730 |
|
} |
731 |
|
|
732 |
include("$html/Navigate-fileHeader.html"); |
include("$html/Navigate-fileHeader.html"); |
733 |
|
|
734 |
if (sizeof($fileList) > 0) { |
if (sizeof($fileList) > 0) { |
794 |
$file_url_html.="\" TITLE=\"View file\">" ; |
$file_url_html.="\" TITLE=\"View file\">" ; |
795 |
|
|
796 |
if (substr($file,0,5) != ".del/") { |
if (substr($file,0,5) != ".del/") { |
797 |
$file_url_html .= $file . "</A>" . $a ; |
$file_url_html .= isBlank($file) . "</A>" . $a ; |
798 |
} else { |
} else { |
799 |
$file_url_html .= substr($file,5,strlen($file)-5) . "</a> <a href=\"$info_url#undelete\"><SPAN CLASS=deleted TITLE=\"deleted\">deleted</span></a>"; |
$file_url_html .= isBlank(substr($file,5,strlen($file)-5)) . "</a> <a href=\"$info_url#undelete\"><SPAN CLASS=deleted TITLE=\"deleted\">deleted</span></a>"; |
800 |
} |
} |
801 |
|
|
802 |
if (check_perm($relDir.$file,$gblPermNote)) { |
if (check_perm($relDir.$file,$gblPermNote)) { |
1289 |
$l = trim(fgets($fp_conf,4096)); |
$l = trim(fgets($fp_conf,4096)); |
1290 |
if (substr($l,0,1) == "+") { // no comment |
if (substr($l,0,1) == "+") { // no comment |
1291 |
$arr=explode(":",$l); |
$arr=explode(":",$l); |
1292 |
$groups_arr[$arr[0]] = $arr[1] ; |
$groups_arr[$arr[0]] = str_replace(" ","",$arr[1]) ; |
1293 |
} elseif (substr($l,0,1) != "#") { |
} elseif (substr($l,0,1) != "#") { |
1294 |
$arr=explode(":",$l); |
$arr=explode(":",$l); |
1295 |
$path=array_shift($arr); |
$path=array_shift($arr); |
1551 |
} |
} |
1552 |
|
|
1553 |
////////////////////////////////////////////////////////////////// |
////////////////////////////////////////////////////////////////// |
1554 |
|
|
1555 |
|
function isBlank($file,$what = "filename") { |
1556 |
|
if (trim($file) == "") return "<i>whitespace $what</i>"; |
1557 |
|
if ($file == "") return "<i>no $what</i>"; |
1558 |
|
return $file; |
1559 |
|
} |
1560 |
|
|
1561 |
|
////////////////////////////////////////////////////////////////// |
1562 |
// MAIN PROGRAM |
// MAIN PROGRAM |
1563 |
|
|
1564 |
$gblFilePerms = 0640 ; // default for new files |
$gblFilePerms = 0640 ; // default for new files |