Added 'Guest Selection page' option

SVN revision: 548
This commit is contained in:
2003-06-04 10:33:49 +00:00
parent 0e4aff508a
commit d38364ea96
4 changed files with 37 additions and 0 deletions
+1
View File
@@ -5,6 +5,7 @@ Version 2.3.8, released June xxth, 2003
- On config user page, don't go back to logbook page after changing a user as admin
- Check for .gif & co files in resource directory, then in themes directory
- for printable search result output, display all pages
- Added "Guest selection page" option
Version 2.3.7, released May 15th, 2003
======================================
+9
View File
@@ -186,6 +186,15 @@ It can be completely customized in order to contain logos etc. As a template,
the standard selection page produced by <code><b>elogd</b></code> can be used.
<p>
<LI><b><code>Guest Selection page = &lt;file&gt;</code></b>
<br>
The same for installations which have a global password file. This means that the
logbook selection page is also password protected. It might be however that some
logbooks have guest access, in which case guest access to the selection page should
be allowed as well (maybe with only a subset of the available logbooks). In that case
this options can be used, to show a list of logbooks with guest access.
<p>
<LI><b><code>SMTP host = &lt;host.domain&gt;</code></b>
<br>
This defines the SMTP host needed to send automatic email notifications. The host
+1
View File
@@ -45,6 +45,7 @@ starting at the items with the most votes. You can vote for a feature, or sugges
<tr><td>Make attributes to display selectable in "Find" page<td>1</tr>
<tr><td>Convert elog text files into XML files and comma separated files with elconv<td>1</tr>
<tr><td>Edit existing messages with elog utility<td>1</tr>
<tr><td>Implement multi-line attributes<td>1</tr>
</table></center><p>
+26
View File
@@ -6,6 +6,9 @@
Contents: Web server program for Electronic Logbook ELOG
$Log$
Revision 1.114 2003/06/04 10:33:49 midas
Added 'Guest Selection page' option
Revision 1.113 2003/06/04 08:17:35 midas
Fixed problem with registration notification
@@ -11494,6 +11497,29 @@ FILE *f;
return;
}
/* check for Guest Selection Page */
if (getcfg("global", "Guest Selection Page", str) &&
!(isparam("unm") && isparam("upwd")))
{
/* check for URL */
if (strstr(str, "http://"))
{
redirect(NULL, str);
return;
}
/* check if file starts with an absolute directory */
if (str[0] == DIR_SEPARATOR || str[1] == ':')
strlcpy(file_name, str, sizeof(file_name));
else
{
strlcpy(file_name, resource_dir, sizeof(file_name));
strlcat(file_name, str, sizeof(file_name));
}
send_file_direct(file_name);
return;
}
if (!check_user_password(NULL, getparam("unm"), getparam("upwd"), ""))
return;
}