--- docman.php 2000/07/26 11:46:19 1.2 +++ docman.php 2000/08/03 19:35:44 1.3 @@ -96,7 +96,14 @@ $gblPw = ""; if ($gblAuth) { - $htusers=fopen(dirname($SCRIPT_FILENAME)."/.htusers","r"); + $htusers_file=dirname($SCRIPT_FILENAME)."/.htusers"; + if (! file_exists($htusers_file)) { + $htusers=fopen($htusers_file,"a+"); + fputs($htusers,"# Change owner of $htusers_file to root !!\n"); + fputs($htusers,"demo:full name:md5_hash\n"); + fclose($htusers); + } + $htusers=fopen($htusers_file,"r"); while($user = fgetcsv($htusers,255,":")) { if ($user[0] == $GLOBALS["PHP_AUTH_USER"]) { $gblUserName=$user[1]; @@ -124,7 +131,7 @@ // the directory below should be /icons/ or /icons/small/ // on Apache; a set of icons is included in the distribution - $gblIconLocation = "icons/" ; + $gblIconLocation = "/icons/" ; // files you want to be able to edit in text mode // and view with (primitive) syntax highlighting @@ -628,7 +635,7 @@ // start navigation page $text = "Use this page to add, delete"; if (! isset($show_deleted)) { - $text .= ", undelete"; + $text .= ", undelete"; } $text .= " or revise files on this web site." ; StartHTML("(Navigate)",$text) ;