Some minor cleanups, nothing functional, just code-level niceness mostly.
authormoodler <moodler>
Thu, 15 May 2003 14:34:48 +0000 (14:34 +0000)
committermoodler <moodler>
Thu, 15 May 2003 14:34:48 +0000 (14:34 +0000)
   - xhtml cleanups, mostly from Peter Bazira
   - removed all short php tags

login/change_password_form.html
login/forgot_password_form.html
login/index.php
login/index_confirm.html [deleted file]
login/index_form.html
login/signup.php
login/signup_form.html

index 279e6cb..b3556ef 100644 (file)
@@ -1,34 +1,35 @@
-<P><B><? print_string("allfieldsrequired") ?></B></P>
-
-<form name="form" method="post" action="change_password.php">
-<table cellpadding=10>
-<tr valign=top>
-       <td><P><? print_string("username") ?>:</P></td>
-       <td><input type="text" name="username" size=25 value="<? p($frm->username) ?>">
-       <? formerr($err->username) ?>
-       </td>
-</tr>
-<tr valign=top>
-       <td><P><? print_string("password") ?>:</P></td>
-       <td><input type="password" name="password" size=25 value="<? p($frm->password) ?>">
-       <? formerr($err->password) ?>
-       </td>
-</tr>
-<tr valign=top>
-       <td><P><? print_string("newpassword") ?>:</P></td>
-       <td><input type="password" name="newpassword1" size=25 value="<? p($frm->newpassword1) ?>">
-       <? formerr($err->newpassword1) ?>
-       </td>
-</tr>
-<tr valign=top>
-       <td><P><? print_string("newpassword") ?> (<? print_string("again") ?>):</P></td>
-       <td><input type="password" name="newpassword2" size=25 value="<? p($frm->newpassword2) ?>">
-       <? formerr($err->newpassword2) ?>
-       </td>
-</tr>
-<tr>
-       <td></td>
-    <td><input type="hidden" name="id" value="<?=$frm->id?>">
-       <input type="submit" value="<? print_string("changepassword") ?>"></td>
-</table>
-</form>
+<p><b><?php print_string("allfieldsrequired") ?></b></p>\r
+\r
+<form action="change_password.php" method="post" name="form" id="form">\r
+<table cellpadding="10">\r
+<tr valign="top">\r
+    <td><p><?php print_string("username") ?>:</p></td>\r
+    <td><input type="text" name="username" size="25" value="<?php p($frm->username) ?>" />\r
+    <?php formerr($err->username) ?>\r
+    </td>\r
+</tr>\r
+<tr valign="top">\r
+    <td><p><?php print_string("password") ?>:</p></td>\r
+    <td><input type="password" name="password" size="25" value="<?php p($frm->password) ?>" />\r
+    <?php formerr($err->password) ?>\r
+    </td>\r
+</tr>\r
+<tr valign="top">\r
+    <td><p><?php print_string("newpassword") ?>:</p></td>\r
+    <td><input type="password" name="newpassword1" size="25" value="<?php p($frm->newpassword1) ?>" />\r
+    <?php formerr($err->newpassword1) ?>\r
+    </td>\r
+</tr>\r
+<tr valign="top">\r
+    <td><p><?php print_string("newpassword") ?> (<?php print_string("again") ?>):</p></td>\r
+    <td><input type="password" name="newpassword2" size="25" value="<?php p($frm->newpassword2) ?>" />\r
+    <?php formerr($err->newpassword2) ?>\r
+    </td>\r
+</tr>\r
+<tr>\r
+    <td></td>\r
+    <td><input type="hidden" name="id" value="<?php p($frm->id)?>" />\r
+    <input type="submit" value="<?php print_string("changepassword") ?>" /></td>\r
+    </tr>\r
+  </table>\r
+</form>\r
index 92e2362..380ee92 100644 (file)
@@ -1,25 +1,28 @@
-<table cellpadding=20 align=center>
-<tr valign=top>
-<td width=300 class=normal>
-       <p><? print_string("enteremailaddress") ?>
-</td>
-
-<td bgcolor="<?=$THEME->cellheading?>">
-       <form name="form" method="post" action="<?=$ME?>">
-       <table>
-       <tr>
-               <td class=label><? print_string("email") ?>:</td>
-               <td><input type="text" name="email" size=25 value="<? p($frm->email) ?>"> 
-               <? if (!empty($err->email)) {formerr($err->email);} ?>
-       </tr>
-       <tr>
-               <td></td>
-               <td><input type="submit" value="<? print_string("ok") ?>">
-                       <input type="button" value="<? print_string("cancel") ?>" onClick="javascript: history.go(-1)">
-               </td>
-       </table>
-       </form>
-</td>
-</tr>
-</table>
-
+<table cellpadding="20" align="center">\r
+<tr valign="top">\r
+\r
+  <td width="300" class="normal">\r
+    <p><?php print_string("enteremailaddress") ?> </p>\r
+  </td>\r
+\r
+  <td bgcolor="<?php p($THEME->cellheading)?>">\r
+    <form action="<?php p($ME) ?>" method="post" name="form" id="form">\r
+    <table>\r
+    <tr>\r
+        <td class="label"><?php print_string("email") ?>:</td>\r
+        <td><input type="text" name="email" size="25" value="<?php p($frm->email) ?>" />\r
+              <?php if (!empty($err->email)) {formerr($err->email);} ?>\r
+        </td>\r
+    </tr>\r
+    <tr>\r
+        <td></td>\r
+        <td><input type="submit" value="<?php print_string("ok") ?>" />\r
+            <input type="button" value="<?php print_string("cancel") ?>" onClick="javascript: history.go(-1)" />\r
+        </td>\r
+    </tr>\r
+    </table>\r
+    </form>\r
+  </td>\r
+\r
+</tr>\r
+</table>\r
index 7b02215..4be43dd 100644 (file)
@@ -28,7 +28,8 @@
         if ($user) {
             if (! $user->confirmed ) {       // they never confirmed via email 
                 print_header(get_string("mustconfirm"), get_string("mustconfirm") ); 
-                include("index_confirm.html");
+                print_heading(get_string("mustconfirm"));
+                print_simple_box(get_string("emailconfirmsent", "", $user->email), "center");
                 print_footer();
                 die;
             }
diff --git a/login/index_confirm.html b/login/index_confirm.html
deleted file mode 100644 (file)
index e7700b6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<CENTER>
-<H2><? print_string("mustconfirm") ?></H2>
-<? print_string("emailconfirmsent", "", $user->email) ?>
-
index 1b1a746..01d8675 100644 (file)
@@ -1,59 +1,57 @@
-<CENTER>\r
-\r
-<TABLE WIDTH="90%" BORDER="0" CELLSPACING="10" CELLPADDING="5" ALIGN="CENTER">\r
-  <TR>\r
-    <? if ($show_instructions) { ?>\r
-        <TD WIDTH="50%" bgcolor=<?=$THEME->cellheading2?> class="headingblock">\r
-          <P ALIGN="CENTER"><B><FONT SIZE=3><? print_string("returningtosite") ?></FONT></B></P>\r
-        </TD>\r
-        <TD WIDTH="50%" bgcolor=<?=$THEME->cellheading2?> class="headingblock">\r
-          <P ALIGN="CENTER"><B><FONT SIZE=3><? print_string("firsttime") ?></FONT></B></P>\r
-        </TD>\r
-    <? } ?>\r
-  </TR>\r
-  <TR>\r
-    <TD WIDTH="50%" VALIGN="TOP" bgcolor="<?=$THEME->cellcontent2?>" class="generalbox"> <FONT SIZE=2> \r
-      <P ALIGN="CENTER"><? print_string("loginusing") ?>:<BR>\r
-      (<? print_string("cookiesenabled") ?>)<BR>\r
-         <? formerr($errormsg) ?>\r
+<table width="90%" border="0" cellspacing="10" cellpadding="5" align="center">\r
+  <tr>\r
+    <?php if ($show_instructions) { ?>\r
+        <td width="50%" bgcolor="<?php p($THEME->cellheading2) ?>" class="headingblock">\r
+          <p align="center"><b><font size="3"><? print_string("returningtosite") ?></font></b></p>\r
+        </td>\r
+        <td width="50%" bgcolor="<?php p($THEME->cellheading2) ?>" class="headingblock">\r
+          <p align="center"><b><font size="3"><? print_string("firsttime") ?></font></b></p>\r
+        </td>\r
+    <?php } ?>\r
+  </tr>\r
+  <tr>\r
+    <td width="50%" valign="top" bgcolor="<?php p($THEME->cellcontent2) ?>" class="generalbox"> <font size="2"> \r
+        <p align="center"><?php print_string("loginusing") ?>:<br />\r
+          (<?php print_string("cookiesenabled") ?>)<br />\r
+         <?php formerr($errormsg) ?>\r
       </p></font>\r
-      <FORM NAME="form" ACTION="index.php" METHOD=post>\r
+      <form action="index.php" method="post" name="form" id="form">\r
         <table border="0" align="center">\r
         <tr>\r
-            <td width="80%"><FONT SIZE=2>\r
-              <TABLE ALIGN=center>\r
-                <TR\r
-                  <TD align=right><P><FONT SIZE=2><? print_string("username") ?>:</FONT></P></TD>\r
-                  <TD><INPUT TYPE="text" NAME="username" SIZE="15" value="<? p($frm->username) ?>"\r
-                  </TD>\r
-                </TR>\r
-                <TR\r
-                  <TD height="24" align=right><P><FONT SIZE=2><? print_string("password") ?>:</FONT></P></TD>\r
-                  <TD><INPUT TYPE="password" NAME="password" SIZE="15" value="<? p($frm->password) ?>"\r
-                  </TD>\r
-                </TR>\r
-              </TABLE>\r
-              </FONT></td>\r
-            <td width="20%"><font size=2>\r
-              <input type="submit" name="Submit" value="<? print_string("login") ?>">\r
+            <td width="80%"><font size="2">\r
+              <table align="center">\r
+                <tr\r
+                  <td align="right"><p><font size="2"><?php print_string("username") ?>:</font></p></td>\r
+                  <td><input type="text" name="username" size="15" value="<?php p($frm->username) ?>" /\r
+                  </td>\r
+                </tr>\r
+                <tr\r
+                  <td height="24" align="right"><p><font size="2"><?php print_string("password") ?>:</font></p></td>\r
+                  <td><input type="password" name="password" size="15" value="<?php p($frm->password) ?>" /\r
+                  </td>\r
+                </tr>\r
+              </table>\r
+              </font></td>\r
+            <td width="20%"><font size="2">\r
+                <input type="submit" name="Submit" value="<?php print_string("login") ?>" />\r
               </font></td>\r
         </tr>\r
       </table>\r
-         </FORM>\r
-      <FONT SIZE=2\r
-      <BLOCKQUOTE>\r
-    <? if ($CFG->guestloginbutton) {  ?>\r
-          <HR>\r
-            <P ALIGN=CENTER><? print_string("someallowguest") ?>:</P>\r
-            <CENTER>\r
-            <FORM NAME="form2" ACTION="index.php" METHOD=post>\r
-            <INPUT TYPE="hidden" NAME="username" VALUE="guest">\r
-            <INPUT TYPE="hidden" NAME="password" VALUE="guest">\r
-            <INPUT type="submit" NAME="Submit"   VALUE="<? print_string("loginguest") ?>">\r
-            </FORM>\r
-            </CENTER>\r
-    <? } ?>\r
-    <? if ($CFG->changepassword or $CFG->auth == "email" or $CFG->auth == "none") {\r
+         </form>\r
+      <font size="2"\r
+      <blockquote>\r
+    <?php if ($CFG->guestloginbutton) {  ?>\r
+          <hr />\r
+            <p align="center"><?php print_string("someallowguest") ?>:</p>\r
+            <center>\r
+            <form action="index.php" method="post" name="form2" id="form2">\r
+              <input type="hidden" name="username" value="guest" />\r
+              <input type="hidden" name="password" value="guest" />\r
+              <input type="submit" name="Submit"   value="<?php print_string("loginguest") ?>" />\r
+            </form>\r
+            </center>\r
+    <?php } ?>\r
+    <?php if ($CFG->changepassword or $CFG->auth == "email" or $CFG->auth == "none") {\r
           if ($CFG->auth == "email" or $CFG->auth == "none") {\r
               $changepassword = "forgot_password.php";\r
               $changebuttonname = get_string("senddetails");\r
           }\r
     \r
     ?>\r
-          <HR>\r
-            <P ALIGN=CENTER><? print_string("forgotten") ?></P\r
-            <CENTER>\r
-            <FORM NAME="form3" ACTION="<?=$changepassword ?>" METHOD=get>\r
-            <INPUT type="submit" VALUE="<?=$changebuttonname?>">\r
-            </FORM>\r
-            </CENTER>\r
-    <? } ?>\r
-        </BLOCKQUOTE>\r
-      </FONT> </TD>\r
-    <? if ($show_instructions) { ?>\r
-        <TD WIDTH="50%" VALIGN="TOP" bgcolor="<?=$THEME->cellcontent2?>" class="generalbox">\r
-          <FONT SIZE=2>\r
-          <? switch ($CFG->auth) {\r
+          <hr />\r
+            <p align="center"><?php print_string("forgotten") ?></p\r
+            <center>\r
+            <form action="<?php p($changepassword) ?>" method="get" name="form3" id="form3">\r
+              <input type="submit" value="<?php p($changebuttonname) ?>" />\r
+            </form>\r
+            </center>\r
+    <?php } ?>\r
+        </blockquote>\r
+      </font> </td>\r
+    <?php if ($show_instructions) { ?>\r
+        <td width="50%" valign="top" bgcolor="<?php p($THEME->cellcontent2) ?>" class="generalbox">\r
+          <font size="2">\r
+          <?php switch ($CFG->auth) {\r
                case "email":             ?>\r
-                 <P><? print_string("loginsteps", "", "signup.php") ?></P>\r
-                 </FONT>\r
-                 <CENTER>\r
-                 <FORM NAME="form4" ACTION="signup.php" METHOD=get>\r
-                 <INPUT type="submit" VALUE="<? print_string("startsignup") ?>">\r
-                 </FORM>\r
-                 </CENTER>\r
-          <?     break;\r
+                 <p><?php print_string("loginsteps", "", "signup.php") ?></p>\r
+                 </font>\r
+                 <center>\r
+                 <form action="signup.php" method="get" name="form4" id="form4">\r
+                 \r
+            <input type="submit" value="<?php print_string("startsignup") ?>" />\r
+                 </form>\r
+                 </center>\r
+          <?php     break;\r
                case "none":\r
                  echo "<P>".get_string("loginstepsnone")."</P>";\r
                  break;\r
                default:\r
                  echo "<BLOCKQUOTE>";\r
                  echo format_text($CFG->auth_instructions);\r
-                 echo "</BLOCKQUOTE>";\r
+                 echo "</blockquote>";\r
                  require_once("../auth/$CFG->auth/lib.php");\r
                  if (isset($CFG->auth_user_create) and $CFG->auth_user_create==1 and function_exists('auth_user_create') ){?>\r
-                                   <FORM NAME="form4" ACTION="signup.php" METHOD=get>\r
-                    <INPUT type="submit" VALUE="<? print_string("startsignup") ?>">\r
-                    </FORM>\r
-                    </CENTER>\r
-                 <?\r
+                                   <form action="signup.php" method="get" name="form4" id="form4">\r
+                    \r
+          <input type="submit" value="<?php print_string("startsignup") ?>" />\r
+                    </form>\r
+                    </td></tr>\r
+                 <?php\r
                                 }\r
              }\r
           ?>\r
     \r
-          </TD>\r
-    <?  } ?>\r
-\r
-  </TR>\r
-</TABLE>\r
+          \r
+    <?php  } ?>\r
+</table>\r
index 4b265fd..11b6708 100644 (file)
     
             $emailconfirm = get_string("emailconfirm");
             print_header($emailconfirm, $emailconfirm, $emailconfirm);
-            echo "<CENTER>";
-            print_string("emailconfirmsent", "", $user->email);
-            echo "</CENTER>";
-            print_footer();
+            notice(get_string("emailconfirmsent", "", $user->email), $CFG->wwwroot);
             exit;
         }
     }
index a4e726e..b3e1e02 100644 (file)
-<?PHP
-   if (empty($user->username)) {
-       $user->username = "";
-   }
-   if (empty($user->password)) {
-       $user->password = "";
-   }
-   if (empty($user->email)) {
-       $user->email = "";
-   }
-   if (empty($user->firstname)) {
-       $user->firstname = "";
-   }
-   if (empty($user->lastname)) {
-       $user->lastname = "";
-   }
-   if (empty($user->idnumber)) {
-       $user->idnumber = "";
-   }
-   if (empty($user->phone)) {
-       $user->phone = "";
-   }
-   if (empty($user->city)) {
-       $user->city = "";
-   }
-   if (empty($user->country)) {
-       $user->country = "";
-   }
-
-?>
-<CENTER>
-<table cellpadding=20> <tr> <td bgcolor="<?=$THEME->cellcontent2 ?>" class="generalbox">
-
-<form name="form" method="post" action="signup.php">
-<table>
-<tr valign=top>
-       <td colspan=2><P><B><? print_string("createuserandpass") ?>:</td>
-</tr>
-<tr valign=top>
-       <td><P><? print_string("username") ?>:</td>
-       <td><input type="text" name="username" size=12 value="<? p($user->username) ?>">
-       <? if (!empty($err->username)) { formerr($err->username); } ?>
-       </td>
-</tr>
-<tr valign=top>
-       <td><P><? print_string("password") ?>:</td>
-       <td><input type="password" name="password" size=12 value="<? p($user->password) ?>">
-       <? if (!empty($err->password)) { formerr($err->password); } ?>
-       </td>
-</tr>
-<tr valign=top>
-       <td colspan=2><P><BR><B><? print_string("supplyinfo") ?>:</B><BR>(<? print_string("emailmustbereal") ?>)</P>
-</tr>
-<tr valign=top>
-       <td><P><? print_string("email") ?>:</td>
-       <td><input type="text" name="email" size=25 value="<? p($user->email) ?>">
-       <? if (!empty($err->email)) { formerr($err->email); } ?>
-       </td>
-</tr>
-<tr valign=top>
-       <td><P><? print_string("firstname") ?>:</td>
-       <td><input type="text" name="firstname" size=25 value="<? p($user->firstname) ?>">
-       <? if (!empty($err->firstname)) { formerr($err->firstname);} ?>
-       </td>
-</tr>
-<tr valign=top>
-       <td><P><? print_string("lastname") ?>:</td>
-       <td><input type="text" name="lastname" size=25 value="<? p($user->lastname) ?>">
-       <? if (!empty($err->lastname)) { formerr($err->lastname);} ?>
-       </td>
-</tr>
-<tr valign=top>
-       <td><P><? print_string("idnumber") ?>:</td>
-       <td><input type="text" name="idnumber" size=25 value="<? p($user->idnumber) ?>"> (<? print_string("optional") ?>)
-       <? if (!empty($err->idnumber)) { formerr($err->idnumber);} ?>
-       </td>
-</tr>
-<tr valign=top>
-       <td><P><? print_string("phone") ?>:</td>
-       <td><input type="text" name="phone" size=25 value="<? p($user->phone) ?>"> (<? print_string("optional") ?>)
-       <? if (!empty($err->phone)) { formerr($err->phone);} ?>
-       </td>
-</tr>
-<tr valign=top>
-       <td><P><? print_string("city") ?>:</td>
-       <td><input type="text" name="city" size=25 value="<? p($user->city) ?>">
-       <? if (!empty($err->city)) { formerr($err->city);} ?>
-       </td>
-</tr>
-<tr valign=top>
-       <td><P><? print_string("country") ?>:</td>
-       <td><? choose_from_menu ($COUNTRIES, "country", $user->country, get_string("selectacountry"), "", "") ?>
-       <? if (!empty($err->country)) { formerr($err->country);} ?>
-       </td>
-</tr>
-<tr>
-       <td></td>
-       <td><input type="submit" value="<? print_string("createaccount") ?>"></td>
-</table>
-</form>
-
-</td></tr></table>
-
+<?php\r
+   if (empty($user->username)) {\r
+       $user->username = "";\r
+   }\r
+   if (empty($user->password)) {\r
+       $user->password = "";\r
+   }\r
+   if (empty($user->email)) {\r
+       $user->email = "";\r
+   }\r
+   if (empty($user->firstname)) {\r
+       $user->firstname = "";\r
+   }\r
+   if (empty($user->lastname)) {\r
+       $user->lastname = "";\r
+   }\r
+   if (empty($user->idnumber)) {\r
+       $user->idnumber = "";\r
+   }\r
+   if (empty($user->phone)) {\r
+       $user->phone = "";\r
+   }\r
+   if (empty($user->city)) {\r
+       $user->city = "";\r
+   }\r
+   if (empty($user->country)) {\r
+       $user->country = "";\r
+   }\r
+\r
+?>\r
+<table cellpadding="20" align="center"> <tr> <td bgcolor="<?php p($THEME->cellcontent2) ?>" class="generalbox">\r
+\r
+<form action="signup.php" method="post" name="form" id="form">\r
+<table>\r
+<tr valign="top">\r
+       <td colspan="2"><p><b><?php print_string("createuserandpass") ?>:</b></p></td>\r
+</tr>\r
+<tr valign="top">\r
+       <td><p><?php print_string("username") ?>:</p></td>\r
+       <td><input type="text" name="username" size="12" value="<?php p($user->username) ?>" />\r
+       <?php if (!empty($err->username)) { formerr($err->username); } ?>\r
+       </td>\r
+</tr>\r
+<tr valign="top">\r
+       <td><p><?php print_string("password") ?>:</p></td>\r
+       <td><input type="password" name="password" size="12" value="<?php p($user->password) ?>" />\r
+       <?php if (!empty($err->password)) { formerr($err->password); } ?>\r
+       </td>\r
+</tr>\r
+<tr valign="top">\r
+       <td colspan="2"><p><br />\r
+                  <b><?php print_string("supplyinfo") ?>:</b><br />\r
+                  (<?php print_string("emailmustbereal") ?>)</p>\r
+              </td>\r
+            </tr>\r
+<tr valign="top">\r
+       <td><p><?php print_string("email") ?>:</p></td>\r
+       <td><input type="text" name="email" size="25" value="<?php p($user->email) ?>" />\r
+       <?php if (!empty($err->email)) { formerr($err->email); } ?>\r
+       </td>\r
+</tr>\r
+<tr valign="top">\r
+       <td><p><?php print_string("firstname") ?>:</p></td>\r
+       <td><input type="text" name="firstname" size="25" value="<?php p($user->firstname) ?>" />\r
+       <?php if (!empty($err->firstname)) { formerr($err->firstname);} ?>\r
+       </td>\r
+</tr>\r
+<tr valign="top">\r
+       <td><p><?php print_string("lastname") ?>:</p></td>\r
+       <td><input type="text" name="lastname" size="25" value="<?php p($user->lastname) ?>" />\r
+       <?php if (!empty($err->lastname)) { formerr($err->lastname);} ?>\r
+       </td>\r
+</tr>\r
+<tr valign="top">\r
+       <td><p><?php print_string("idnumber") ?>:</p></td>\r
+       <td><input type="text" name="idnumber" size="25" value="<?php p($user->idnumber) ?>" />\r
+                 (<?php print_string("optional") ?>)\r
+       <?php if (!empty($err->idnumber)) { formerr($err->idnumber);} ?>\r
+       </td>\r
+</tr>\r
+<tr valign="top">\r
+       <td><p><?php print_string("phone") ?>:</p></td>\r
+       <td><input type="text" name="phone" size="25" value="<?php p($user->phone) ?>" />\r
+                 (<?php print_string("optional") ?>)\r
+       <?php if (!empty($err->phone)) { formerr($err->phone);} ?>\r
+       </td>\r
+</tr>\r
+<tr valign="top">\r
+       <td><p><?php print_string("city") ?>:</p></td>\r
+       <td><input type="text" name="city" size="25" value="<?php p($user->city) ?>" />\r
+       <?php if (!empty($err->city)) { formerr($err->city);} ?>\r
+       </td>\r
+</tr>\r
+<tr valign="top">\r
+       <td><p><?php print_string("country") ?>:</p></td>\r
+       <td><?php choose_from_menu ($COUNTRIES, "country", $user->country, get_string("selectacountry"), "", "") ?>\r
+       <?php if (!empty($err->country)) { formerr($err->country);} ?>\r
+       </td>\r
+</tr>\r
+<tr>\r
+       <td></td>\r
+       <td><input type="submit" value="<?php print_string("createaccount") ?>" /></td>\r
+            </tr>\r
+          </table>\r
+</form>\r
+\r
+</td></tr></table>\r