X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fauth.c;h=94abedfbeead97d3fbc9817c78fdc106cd4706f0;hb=582470a6adda00d5fd5ec218ea28ad44c66ce508;hp=eec2a691271e2e06cd8bb8ccf380a5b814ff5bd0;hpb=1e32899153e9e52aaec1e651e0c33a563b8aaed8;p=citadel.git diff --git a/webcit/auth.c b/webcit/auth.c index eec2a6912..94abedfbe 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -1,54 +1,48 @@ /* * $Id$ - */ -/** * - * \defgroup WebcitAuth WebcitAuth; Handles authentication of users to a Citadel server. - * \ingroup CitadelConfig + * WebcitAuth; Handles authentication of users to a Citadel server. */ -/*@{*/ #include "webcit.h" +#include "webserver.h" - - -/** - * \brief user states - * the plain text states of a user. filled in at \ function TODO initialize_ax_defs() - * due to NLS +/* + * Access level definitions. This is initialized from a function rather than a + * static array so that the strings may be localized. */ char *axdefs[7]; void initialize_axdefs(void) { - axdefs[0] = _("Deleted"); /*!0: an erased user */ - axdefs[1] = _("New User"); /*!1: a new user */ - axdefs[2] = _("Problem User"); /*!2: a trouble maker */ - axdefs[3] = _("Local User"); /*!3: user with normal privileges */ - axdefs[4] = _("Network User"); /*!4: a user that may access network resources */ - axdefs[5] = _("Preferred User");/*!5: a moderator */ - axdefs[6] = _("Aide"); /*!6: chief */ + axdefs[0] = _("Deleted"); /* an erased user */ + axdefs[1] = _("New User"); /* a new user */ + axdefs[2] = _("Problem User"); /* a trouble maker */ + axdefs[3] = _("Local User"); /* user with normal privileges */ + axdefs[4] = _("Network User"); /* a user that may access network resources */ + axdefs[5] = _("Preferred User");/* a moderator */ + axdefs[6] = _("Aide"); /* chief */ } -/** - * \brief Display the login screen - * \param mesg The error message if last attempt failed. +/* + * Display the login screen + * mesg = the error message if last attempt failed. */ void display_login(char *mesg) { char buf[SIZ]; output_headers(1, 1, 2, 0, 0, 0); - wprintf("
\n"); + wprintf("
\n"); - if (mesg != NULL) if (strlen(mesg) > 0) { - stresc(buf, mesg, 0, 0); - svprintf("mesg", WCS_STRING, "%s", buf); + if (mesg != NULL) if (!IsEmptyStr(mesg)) { + stresc(buf, SIZ, mesg, 0, 0); + svprintf(HKEY("MESG"), WCS_STRING, "%s", buf); } - svprintf("LOGIN_INSTRUCTIONS", WCS_STRING, + svprintf(HKEY("LOGIN_INSTRUCTIONS"), WCS_STRING, _("