source: contrib/Dms/out/out.Login.php @ 3526

Revision 3526, 2.3 KB checked in by afernandes, 13 years ago (diff)

Ticket #1416 - Disponibilizado modulos Timesheet e DMS para a comunidade.

  • Property svn:executable set to *
Line 
1<?php
2include("../inc/inc.Settings.php");
3include("../inc/inc.Language.php");
4include("../inc/inc.OutUtils.php");
5
6
7printHTMLHead( getMLText("login") );
8?>
9
10<script language="JavaScript">
11function checkForm()
12{
13        msg = "";
14        if (document.form1.login.value == "") msg += "<?php printMLText("js_no_login");?>\n";
15        if (document.form1.pwd.value == "") msg += "<?php printMLText("js_no_pwd");?>\n";
16        if (msg != "")
17        {
18                alert(msg);
19                return false;
20        }
21        else
22                return true;
23}
24
25
26function guestLogin()
27{
28        url = "../op/op.Login.php?login=guest" +
29                "&sesstheme=" + document.form1.sesstheme.options[document.form1.sesstheme.options.selectedIndex].value +
30                "&lang=" + document.form1.lang.options[document.form1.lang.options.selectedIndex].value;
31        document.location.href = url;
32}
33
34</script>
35
36<?php
37
38printCenterStart();
39printStartBox(getMLText("login"));
40?>
41
42<form action="../op/op.Login.php" method="post" name="form1" onsubmit="return checkForm();">
43<table>
44        <tr>
45                <td class="inputDescription"><?php printMLText("user_login");?></td>
46                <td><input name="login"></td>
47        </tr>
48        <tr>
49                <td class="inputDescription"><?php printMLText("password");?></td>
50                <td><input name="pwd" type="Password"></td>
51        </tr>
52        <tr>
53                <td class="inputDescription"><?php printMLText("language");?></td>
54                <td>
55                        <?php
56                                print "<select name=\"lang\">";
57                                $languages = getLanguages();
58                                foreach ($languages as $currLang)
59                                {
60                                        print "<option value=\"$currLang\"";
61                                        if ($currLang == $settings->_language)
62                                                print " selected";
63                                        print ">$currLang";
64                                }
65                                print "</select>";
66                        ?>
67                </td>
68        </tr>
69        <tr>
70                <td class="inputDescription"><?php printMLText("theme");?></td>
71                <td>
72                        <?php
73                                print "<select name=\"sesstheme\">";
74                                $themes = getThemes();
75                                foreach ($themes as $currTheme)
76                                {
77                                        print "<option value=\"$currTheme\"";
78                                        if ($currTheme == $settings->_theme)
79                                                print " selected";
80                                        print ">$currTheme";
81                                }
82                                print "</select>";
83                        ?>
84                </td>
85        </tr>
86        <tr>
87                <td colspan="2" class="standardText">
88                        <br><input type="Submit">
89                        <?php
90                                if ($settings->_enableGuestLogin)
91                                        print "<p><a href=\"javascript:guestLogin()\">" . getMLText("guest_login") . "</a>";
92                        ?>
93                </td>
94        </tr>
95</table>
96</form>
97
98<script language="JavaScript">
99document.form1.login.focus();
100</script>
101
102<?php
103printEndBox();
104printCenterEnd();
105printHTMLFoot();
106?>
Note: See TracBrowser for help on using the repository browser.