Make login html adaptable, first application specific, then login, and finally defailt.
1.1 --- a/r/setup.php Sun Oct 05 11:07:26 2008 +0200
1.2 +++ b/r/setup.php Sun Oct 05 11:16:59 2008 +0200
1.3 @@ -33,8 +33,13 @@
1.4 echo "<blockquote>Login failed, your username or password is not correct.</blockquote><br>";
1.5 }
1.6
1.7 - echo '<form><span class="label">Login</span><input type="text" name="login"><br>';
1.8 - echo '<span class="label">Password</span><input type="password" name="password"><br>';
1.9 - echo '<span class="label"> </span><input type="submit" value="Login"></form>';
1.10 + // Find the most specific login page and include it to be shown to the user.
1.11 + if (file_exists($_SESSION["configLocation"]."login.html")) {
1.12 + include_once($_SESSION["configLocation"]."login.html");
1.13 + } else if (file_exists("../local/login.html")) {
1.14 + include_once("../local/login.html");
1.15 + } else {
1.16 + include_once("../share/login.html");
1.17 + }
1.18 }
1.19 ?>
1.20 \ No newline at end of file
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/share/login.html Sun Oct 05 11:16:59 2008 +0200
2.3 @@ -0,0 +1,10 @@
2.4 +<form>
2.5 + <span class="label">Login</span>
2.6 + <input type="text" name="login">
2.7 + <br>
2.8 + <span class="label">Password</span>
2.9 + <input type="password" name="password">
2.10 + <br>
2.11 + <span class="label"> </span>
2.12 + <input type="submit" value="Login">
2.13 +</form>