Fix a possible race condition in the PaintWeb DML code.
[moodle/mihaisucan.git] / login / index_form.html
blobbfed5054f76f40b156ee6b205248ba6e698c8e42
1 <?php
2 if ($show_instructions) {
3 $columns = 'twocolumns';
4 } else {
5 $columns = 'onecolumn';
7 ?>
8 <div class="loginbox clearfix <?php echo $columns ?>">
9 <div class="loginpanel">
10 <h2><?php print_string("returningtosite") ?></h2>
11 <div class="subcontent loginsub">
12 <div class="desc">
13 <?php
14 print_string("loginusing");
15 if (empty($CFG->usesid)) {
16 echo '<br/>';
17 echo '('.get_string("cookiesenabled").')';
18 helpbutton("cookies", get_string("cookiesenabled"));
21 </div>
22 <?php
23 if (!empty($errormsg)) {
24 echo '<div class="loginerrors">';
25 formerr($errormsg);
26 echo '</div>';
29 <form action="index.php" method="post" id="login">
30 <div class="loginform">
31 <div class="form-label"><label for="username"><?php print_string("username") ?></label></div>
32 <div class="form-input">
33 <input type="text" name="username" id="username" size="15" value="<?php p($frm->username, true) ?>" />
34 </div>
35 <div class="clearer"><!-- --></div>
36 <div class="form-label"><label for="password"><?php print_string("password") ?></label></div>
37 <div class="form-input">
38 <input type="password" name="password" id="password" size="15" value="" />
39 <input type="submit" value="<?php print_string("login") ?>" />
40 <input type="hidden" name="testcookies" value="1" />
41 </div>
42 <div class="clearer"><!-- --></div>
43 </div>
44 </form>
45 </div>
47 <?php if ($CFG->guestloginbutton) { ?>
48 <div class="subcontent guestsub">
49 <div class="desc">
50 <?php print_string("someallowguest") ?>
51 </div>
52 <form action="index.php" method="post" id="guestlogin">
53 <div class="guestform">
54 <input type="hidden" name="username" value="guest" />
55 <input type="hidden" name="password" value="guest" />
56 <input type="hidden" name="testcookies" value="1" />
57 <input type="submit" value="<?php print_string("loginguest") ?>" />
58 </div>
59 </form>
60 </div>
61 <?php } ?>
63 <div class="subcontent forgotsub">
64 <div class="desc">
65 <?php print_string("forgotten") ?>
66 </div>
67 <form action="forgot_password.php" method="post" id="changepassword">
68 <div class="forgotform">
69 <input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
70 <input type="submit" value="<?php print_string("passwordrecovery") ?>" />
71 </div>
72 </form>
73 </div>
74 </div>
75 <?php if ($show_instructions) { ?>
76 <div class="signuppanel">
77 <h2><?php print_string("firsttime") ?></h2>
78 <div class="subcontent">
79 <?php if (is_enabled_auth('none')) { // instructions override the rest for security reasons
80 print_string("loginstepsnone");
81 } else if ($CFG->registerauth == 'email') {
82 if (!empty($CFG->auth_instructions)) {
83 echo format_text($CFG->auth_instructions);
84 } else {
85 print_string("loginsteps", "", "signup.php");
86 } ?>
87 <div class="signupform">
88 <form action="signup.php" method="get" id="signup">
89 <div><input type="submit" value="<?php print_string("startsignup") ?>" /></div>
90 </form>
91 </div>
92 <?php } else if (!empty($CFG->registerauth)) {
93 echo format_text($CFG->auth_instructions); ?>
94 <div class="signupform">
95 <form action="signup.php" method="get" id="signup">
96 <div><input type="submit" value="<?php print_string("startsignup") ?>" /></div>
97 </form>
98 </div>
99 <?php } else {
100 echo format_text($CFG->auth_instructions);
101 } ?>
102 </div>
103 </div>
104 <?php } ?>
105 </div>