diff --git a/data.RES b/data.RES new file mode 100644 index 0000000..63aeb39 Binary files /dev/null and b/data.RES differ diff --git a/default.tpl b/default.tpl index 0cc0ebb..ec9383f 100644 --- a/default.tpl +++ b/default.tpl @@ -437,23 +437,8 @@ z-index:1; /* without this .item-menu will be over*/ } {.123 if 2|
|{.commentNL|%item-comment%.}|
.} -[login] -{.$common-head.} - {.!HFS.} %folder% - - - - - [error-page] - - - - - - +{.$common-head.} %content% @@ -464,6 +449,10 @@ z-index:1; /* without this .item-menu will be over*/ } +[login] +

{.!Login required.}

+ + [not found]

{.!Not found.}

{.!go to root.} diff --git a/main.pas b/main.pas index 7d9d8c6..02a4de0 100644 --- a/main.pas +++ b/main.pas @@ -3917,6 +3917,7 @@ try data.conn.reply.contentType:=ansistring(name2mimetype(sectionName, 'text/html')); if sectionName = 'ban' then data.conn.reply.mode:=HRM_DENY; if sectionName = 'deny' then data.conn.reply.mode:=HRM_DENY; + if sectionName = 'login' then data.conn.reply.mode:=HRM_DENY; if sectionName = 'not found' then data.conn.reply.mode:=HRM_NOT_FOUND; if sectionName = 'unauthorized' then data.conn.reply.mode:=HRM_UNAUTHORIZED; if sectionName = 'overload' then data.conn.reply.mode:=HRM_OVERLOAD; @@ -5089,15 +5090,9 @@ var freeIfTemp(Ftemp); end; if result then exit; - if f.isFolder() then - begin - conn.reply.mode:=HRM_REPLY; - getPage('login', data, f); - exit; - end; conn.reply.realm:=f.getShownRealm(); runEventScript('unauthorized'); - getPage('unauthorized', data); + getPage('login', data, f); // log anyone trying to guess the password if (forceFile = NIL) and stringExists(data.user, getAccountList(TRUE, FALSE)) and logOtherEventsChk.checked then diff --git a/utillib.pas b/utillib.pas index cc6955f..963cb77 100644 --- a/utillib.pas +++ b/utillib.pas @@ -2495,7 +2495,7 @@ var left, right: real; leftS, rightS: string; - function getOperate(dir:integer):string; + function getOperand(dir:integer):string; var j: integer; begin @@ -2511,7 +2511,7 @@ var swapMem(i, j, sizeOf(i), dir > 0); j:=j-i+1; result:=copy(s, i, j); - end; // getOperate + end; // getOperand begin repeat @@ -2546,8 +2546,8 @@ begin exit; end; // determine operates - leftS:=getOperate(-1); - rightS:=getOperate(+1); + leftS:=getOperand(-1); + rightS:=getOperand(+1); left:=StrToFloatDef(trim(leftS), 0); right:=strToFloat(trim(rightS)); // calculate