Profile
MAJ is an Open Source, PHP-based content management system (CMS) that can be deployed as a blog, bulletin or message board, Internet forum, and wiki. It is extensible via PHP panels and is HTML5 and CSS3 ready.
Git
This commit has been accessed 1057 times via Git panel.

commit 56794c7d158ce3c5fd4ca33f82d7a919634c6ad2
tree e11e7721f7156be075373dbe66ed6def9c57cb08
parent 4f67cd77f6174c85361b3c667e76bd0668ed67d4
author Magie Antonio <magie@majcms.org> 1306868776 +0800
committer Magie Antonio <magie@majcms.org> 1306868776 +0800

    Update form field types and attributes to HTML5

diff --git a/add.php b/add.php
index cb77d6d..fa4ba7a 100644
--- a/add.php
+++ b/add.php
@@ -451,8 +451,8 @@ a:active {
 <table border="0" cellspacing="0" cellpadding="0"><tr><td>
 
 <table border="0" cellspacing="2" cellpadding="0">
-<tr><td><input autocomplete="off" class="input_title" type="text" name="title_input"></td></tr>
-<tr><td><textarea class="input_body" name="body_input" rows="15"></textarea></td></tr>
+<tr><td><input autocomplete="off" class="input_title" type="text" name="title_input" autofocus required></td></tr>
+<tr><td><textarea class="input_body" name="body_input" rows="15" required></textarea></td></tr>
 <tr><td><input class="input_body" type="submit" value="click here to post this new entry"></td></tr>
 </form>
 
diff --git a/album.php b/album.php
index a8bb30c..9567fb6 100644
--- a/album.php
+++ b/album.php
@@ -286,7 +286,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album/{$_REQUEST['show']}")) {
                echo "<input type=hidden name=show value={$_REQUEST['show']}>";
                echo "<input type=hidden name=edit value=caption>";
                echo "<tr bgcolor=#ffffff><td colspan=\"$album_image_colspan\">";
-               echo "<textarea class=input name=caption rows=3>";
+               echo "<textarea class=input name=caption rows=3 autofocus required>";
                if (file_exists("data/items/{$_REQUEST['entry']}/album/captions/{$_REQUEST['show']}.txt")) {
                        $caption_get = file_get_contents("data/items/{$_REQUEST['entry']}/album/captions/{$_REQUEST['show']}.txt");
                        $caption_get = str_replace('<br />', "\n", $caption_get);
diff --git a/cat.php b/cat.php
index da9fb61..1449e12 100644
--- a/cat.php
+++ b/cat.php
@@ -255,7 +255,7 @@ a:active {
 
 <table border="0" cellspacing="1" cellpadding="2">
 <form enctype="multipart/form-data" action="cat.php" method="post">
-<tr><td>category id*</td><td><input type="text" class="input" name="new_id" autocomplete="off" maxlength="30"></td></tr>
+<tr><td>category id*</td><td><input type="text" class="input" name="new_id" autocomplete="off" maxlength="30" autofocus required></td></tr>
 <tr><td>title or description</td><td><input type="text" class="input" name="new_title" autocomplete="off" maxlength="90"></td></tr>
 <tr><td></td><td><input type="submit" class="input" value="click here to add a new category"></td></tr>
 </form>
@@ -293,7 +293,7 @@ a:active {
 
                        foreach ($show_cat as $category) {
                                echo "<form enctype=\"multipart/form-data\" action=\"cat.php\" method=\"post\">";
-                               echo "<tr><td><input type=\"text\" class=\"id\" name=\"cat_ren\" value=\"$category\" maxlength=\"30\" autocomplete=\"off\"></td>";
+                               echo "<tr><td><input type=\"text\" class=\"id\" name=\"cat_ren\" value=\"$category\" maxlength=\"30\" autocomplete=\"off\" required></td>";
                                echo "<td><input type=\"text\" class=\"input\" name=\"cat_title\" value=\"";
                                readfile("data/categories/$category/title.txt");
                                echo "\" autocomplete=\"off\" maxlength=\"90\"></td>";
diff --git a/colors.php b/colors.php
index 1318467..60e3e09 100644
--- a/colors.php
+++ b/colors.php
@@ -916,7 +916,7 @@ a:active {
 <tr><td></td></tr>
 <tr><td></td></tr>
 <form action=colors.php method=post>
-<tr><td><input type=text id=color name=color value=#ffffff class=input autocomplete=off></td></tr>
+<tr><td><input type=text id=color name=color value=#ffffff class=input autocomplete=off autofocus required></td></tr>
 <tr><td>
 <table border=1 cellspacing=1 cellpadding=0 width=289>
 <tr><td colspan=3>body</td><td></td><td colspan=3>links</td></tr>
@@ -976,7 +976,7 @@ if (file_exists("images/background.gif") or file_exists("images/background.jpg")
 ?>
 
 </p></td></tr>
-<tr><td><input type=text class=input name=id autocomplete=off></td></tr>
+<tr><td><input type=text class=input name=id autocomplete=off required></td></tr>
 <tr><td><input type=submit class=input value="click here to save current color scheme"></td></tr>
 </table>
 </form>
@@ -1031,7 +1031,7 @@ if (@function_exists('gzinflate')) {
 <form enctype="multipart/form-data" action=colors.php method=post>
 <table border=0 cellspacing=1 cellpadding=1>
 <tr><td><p>Select and upload a color scheme zip file below.</p></td></tr>
-<tr><td><input autocomplete=off type=file name=upload></td></tr>
+<tr><td><input autocomplete=off type=file name=upload required></td></tr>
 <tr><td><input type=submit class=input value="click here to upload scheme"></td></tr>
 </table>
 </form>
diff --git a/edit.php b/edit.php
index 8730c06..d8c2b35 100644
--- a/edit.php
+++ b/edit.php
@@ -637,10 +637,10 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
 <table border="0" cellspacing="0" cellpadding="0"><tr><td>
 
 <table border="0" cellspacing="2" cellpadding="0">
-<tr><td><input autocomplete="off" class="input_title" type="text" name="title_input" value="<?php
+<tr><td><input required autocomplete="off" class="input_title" type="text" name="title_input" value="<?php
   readfile($title_file);
 ?>"></td></tr>
-<tr><td><textarea class="input_body" name="body_input" rows="15">
+<tr><td><textarea class="input_body" name="body_input" rows="15" autofocus required>
 <?php
   $open_body_file = fopen($body_file, "r");
   $read_body_file = fread($open_body_file, filesize($body_file));
diff --git a/fonts.php b/fonts.php
index 9a00dd8..164e36e 100644
--- a/fonts.php
+++ b/fonts.php
@@ -554,7 +554,7 @@ a:active {
 
 <tr>
 <td bgcolor=#ffffff><p>body</p></td>
-<td bgcolor=#ffffff><input type=text class=input name=body autocomplete=off<?php if (file_exists("data/fonts/body.txt")) {
+<td bgcolor=#ffffff><input autofocus type=text class=input name=body autocomplete=off<?php if (file_exists("data/fonts/body.txt")) {
        echo ' value="';
        readfile("data/fonts/body.txt");
        echo '"';
diff --git a/index.php b/index.php
index d11a0d4..132c047 100644
--- a/index.php
+++ b/index.php
@@ -500,7 +500,7 @@ if (isset($maj_req_entry) and !empty($maj_req_entry)) {
                        fclose($maj_fp_views);
                }
               
-               if (isset($maj_req_show) and !empty($maj_req_show) and isset($_POST['captcha_put']) and !empty($_REQUEST['captcha_get']) and isset($_POST['firstname']) and !empty($_POST['firstname']) and isset($_POST['lastname']) and !empty($_POST['lastname']) and isset($_POST['email']) and !empty($_POST['email']) and isset($_POST['new_comment']) and !empty($_POST['new_comment']) and isset($_POST['captcha_put']) and !empty($_POST['captcha_put']) and ($_REQUEST['captcha_get'] == $_POST['captcha_put']) and (ereg("@",$_POST['email'])) and (ereg("\.",$_POST['email']))) {
+               if (isset($maj_req_show) and !empty($maj_req_show) and isset($_POST['captcha_put']) and !empty($_REQUEST['captcha_get']) and isset($_POST['firstname']) and !empty($_POST['firstname']) and isset($_POST['lastname']) and !empty($_POST['lastname']) and isset($_POST['email']) and !empty($_POST['email']) and isset($_POST['new_comment']) and !empty($_POST['new_comment']) and isset($_POST['captcha_put']) and !empty($_POST['captcha_put']) and ($_REQUEST['captcha_get'] == sha1($_POST['captcha_put'])) and (ereg("@",$_POST['email'])) and (ereg("\.",$_POST['email']))) {
               
                        if (!file_exists("data/items/$maj_req_entry/comments")) {
                                mkdir("data/items/$maj_req_entry/comments");
@@ -3902,6 +3902,8 @@ foreach ($maj_disp as $maj_d) {
                        }
                        else {
                                $maj_captcha_rand = str_rand(7);
+                              
+                               $maj_captcha_show = sha1($maj_captcha_rand);
               
                                echo "<p>Fill out the form below";
 
@@ -3924,7 +3926,7 @@ foreach ($maj_disp as $maj_d) {
                       
                                <table border=0 cellspacing=2 cellpadding=0 width=500>
                                <form enctype="multipart/form-data" action="index.php?entry=<?php echo $maj_d; ?>&show=comments" method="post">
-                               <input type=hidden name=captcha_get value="<?php echo $maj_captcha_rand; ?>">
+                               <input type=hidden name=captcha_get value="<?php echo $maj_captcha_show; ?>">
                                <tr>
 
                                <?php
@@ -3969,7 +3971,7 @@ foreach ($maj_disp as $maj_d) {
                                }
                                else {
                                        ?>
-                                       <td width=75><nobr>First Name*</nobr></td><td width=300><input class=input type=text autocomplete=off name=firstname maxlength=30></td>
+                                       <td width=75><nobr>First Name*</nobr></td><td width=300><input required autofocus class=input type=text autocomplete=off name=firstname maxlength=30></td>
                                        <?php
                                }
                                ?>
@@ -4001,7 +4003,7 @@ foreach ($maj_disp as $maj_d) {
                                }
                                else {
                                        ?>
-                                       <tr><td><nobr>Last Name*</nobr></td><td><input class=input type=text autocomplete=off name=lastname maxlength=30></td></tr>
+                                       <tr><td><nobr>Last Name*</nobr></td><td><input required class=input type=text autocomplete=off name=lastname maxlength=30></td></tr>
                                        <?php
                                }
 
@@ -4013,7 +4015,7 @@ foreach ($maj_disp as $maj_d) {
                                                <?php
                                        }
                                        else {
-                                               echo "<tr><td><nobr>E-mail*</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>";
+                                               echo "<tr><td><nobr>E-mail*</nobr></td><td colspan=2><input class=input type=email autocomplete=off name=email maxlength=60></td></tr>";
                                        }
                                }
                                elseif (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/bb.txt")) {
@@ -4023,7 +4025,7 @@ foreach ($maj_disp as $maj_d) {
                                }
                                else {
                                        ?>
-                                       <tr><td><nobr>E-mail*</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>
+                                       <tr><td><nobr>E-mail*</nobr></td><td colspan=2><input required class=input type=email autocomplete=off name=email maxlength=60></td></tr>
                                        <?php
                                }
 
@@ -4039,18 +4041,18 @@ foreach ($maj_disp as $maj_d) {
                                }
                                else {
                                        ?>
-                                       <tr><td><nobr>Website</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=url maxlength=300></td></tr>
+                                       <tr><td><nobr>Website</nobr></td><td colspan=2><input class=input type=url autocomplete=off name=url maxlength=300></td></tr>
                                        <?php
                                }
                                ?>
-                               <tr><td><nobr>Comment*</nobr></td><td><textarea class=input name=new_comment rows=15></textarea></td></tr>
+                               <tr><td><nobr>Comment*</nobr></td><td><textarea required class=input name=new_comment rows=15></textarea></td></tr>
                                <?php
 
                                if (isset($_SESSION['logged_in'])) {
                                        echo "<input type=hidden name=captcha_put value=\"$maj_captcha_rand\">";
                                }
                                else {
-                                       echo "<tr><td><nobr>CAPTCHA*</nobr></td><td><input class=input type=text autocomplete=off name=captcha_put maxlength=7></td></tr>";
+                                       echo "<tr><td><nobr>CAPTCHA*</nobr></td><td><input required class=input type=text autocomplete=off name=captcha_put maxlength=7></td></tr>";
                                }
 
                                ?>
@@ -4060,7 +4062,7 @@ foreach ($maj_disp as $maj_d) {
                                <?php
                        }
                        ?>
-                       </td></tr></table>
+                       </td></tr></table><div style="height: 10px;"></div>
                        <?php
                }
        }
@@ -4871,7 +4873,7 @@ if (($maj_count_grand > 0) and (!file_exists("data/xsearch.txt") or ($_SESSION['
        Search</div>
        <form enctype="multipart/form-data" action="dig.php" method="post">
        <div class="panel_body">
-       <input type="text" class="search" name="search" autocomplete="off" maxlength="55">
+       <input type="search" class="search" name="search" autocomplete="off" maxlength="55" required>
        </form>
        </div></div>
 
diff --git a/login.php b/login.php
index d5ddbe8..1c11c54 100644
--- a/login.php
+++ b/login.php
@@ -153,9 +153,9 @@ a:active {
 
 <form enctype="multipart/form-data" action="login.php" method="post">
 
-<tr><td>Username</td><td><input class="input" type="text" maxlength="30" name="username"<?php if (!file_exists("data/autocomplete.txt")) { echo " autocomplete=\"off\""; } if ($err_username == "0") { echo " value=\"{$_POST['username']}\""; } ?>></td><?php if ($err_username == "0") { echo "<td><img src=\"images/widget.ok.png\" border=\"0\" width=\"14\" height=\"14\"></td><td>The username you entered is correct.</td>"; } if ($err_username == "1") { echo "<td><img src=\"images/widget.x.png\" border=\"0\" width=\"14\" height=\"14\"></td><td>The username you entered is invalid.</td>"; } ?></tr>
+<tr><td>Username</td><td><input required autofocus class="input" type="text" maxlength="30" name="username"<?php if (!file_exists("data/autocomplete.txt")) { echo " autocomplete=\"off\""; } if ($err_username == "0") { echo " value=\"{$_POST['username']}\""; } ?>></td><?php if ($err_username == "0") { echo "<td><img src=\"images/widget.ok.png\" border=\"0\" width=\"14\" height=\"14\"></td><td>The username you entered is correct.</td>"; } if ($err_username == "1") { echo "<td><img src=\"images/widget.x.png\" border=\"0\" width=\"14\" height=\"14\"></td><td>The username you entered is invalid.</td>"; } ?></tr>
 
-<tr><td>Password</td><td><input autocomplete="off" class="input" type="password" maxlength="128" name="password"<?php if (!file_exists("data/autocomplete.txt")) { echo " autocomplete=\"off\""; } ?>></td><?php if ($err_password == "1") { echo "<td><img src=\"images/widget.x.png\" border=\"0\" width=\"14\" height=\"14\"></td><td>The password you entered is invalid.</td>"; } ?></tr>
+<tr><td>Password</td><td><input required class="input" type="password" maxlength="128" name="password"<?php if (!file_exists("data/autocomplete.txt")) { echo " autocomplete=\"off\""; } ?>></td><?php if ($err_password == "1") { echo "<td><img src=\"images/widget.x.png\" border=\"0\" width=\"14\" height=\"14\"></td><td>The password you entered is invalid.</td>"; } ?></tr>
 
 <tr><td></td><td><input class="click" type="submit" value="click here to login"></td></tr>
 
diff --git a/move.php b/move.php
index 8f95d9b..3658fb9 100644
--- a/move.php
+++ b/move.php
@@ -250,7 +250,7 @@ if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQ
 </b></td></tr>
 
 <tr><td>target entry</td><td width="5"></td><td>
-<select class="input" name="target">
+<select class="input" name="target" autofocus>
 
 <?php
 
diff --git a/options.php b/options.php
index 9717e19..df913e8 100644
--- a/options.php
+++ b/options.php
@@ -508,10 +508,10 @@ if (file_exists("data/members/active/{$_SESSION['logged_in']}/bb-last.txt")) {
 <input type="hidden" name="edit" value="on">
 
 <?php if (!file_exists("data/members/active/{$_SESSION['logged_in']}/key.txt")) { ?>
-<tr><td bgcolor="#ffffff"><p>e-mail address*</p></td><td bgcolor="#ffffff" colspan="2"><input class="input" type="text" autocomplete="off" name="email" maxlength="60" value="<?php readfile("data/members/active/{$_SESSION['logged_in']}/email.txt"); ?>"></td></tr>
+<tr><td bgcolor="#ffffff"><p>e-mail address*</p></td><td bgcolor="#ffffff" colspan="2"><input autofocus required class="input" type="email" autocomplete="off" name="email" maxlength="60" value="<?php readfile("data/members/active/{$_SESSION['logged_in']}/email.txt"); ?>"></td></tr>
 <?php } ?>
 
-<tr><td bgcolor="#ffffff"><p>website</p></td><td bgcolor="#ffffff" colspan="2"><input class="input" type="text" autocomplete="off" name="url" maxlength="300" <?php if (file_exists("data/members/active/{$_SESSION['logged_in']}/url.txt")) { echo "value=\""; readfile("data/members/active/{$_SESSION['logged_in']}/url.txt"); echo "\""; } ?>></td></tr>
+<tr><td bgcolor="#ffffff"><p>website</p></td><td bgcolor="#ffffff" colspan="2"><input class="input" type="url" autocomplete="off" name="url" maxlength="300" <?php if (file_exists("data/members/active/{$_SESSION['logged_in']}/url.txt")) { echo "value=\""; readfile("data/members/active/{$_SESSION['logged_in']}/url.txt"); echo "\""; } ?>></td></tr>
 
 <tr><td bgcolor="#ffffff"><p>country</p></td><td bgcolor="#ffffff" colspan="2">
 
@@ -764,7 +764,7 @@ if (file_exists("data/members/active/{$_SESSION['logged_in']}/bb-last.txt")) {
 
 </td></tr>
 
-<tr><td bgcolor="#ffffff"><p>city or municipality</p></td><td bgcolor="#ffffff" colspan="2"><input class="input" type="text" autocomplete="off" name="city" maxlength="100" <?php if (file_exists("data/members/active/{$_SESSION['logged_in']}/url.txt")) { echo "value=\""; readfile("data/members/active/{$_SESSION['logged_in']}/city.txt");echo "\"";  } ?>></td></tr>
+<tr><td bgcolor="#ffffff"><p>city or municipality</p></td><td bgcolor="#ffffff" colspan="2"><input required class="input" type="text" autocomplete="off" name="city" maxlength="100" <?php if (file_exists("data/members/active/{$_SESSION['logged_in']}/url.txt")) { echo "value=\""; readfile("data/members/active/{$_SESSION['logged_in']}/city.txt");echo "\"";  } ?>></td></tr>
 
 <?php if (file_exists("data/bb.txt") and file_exists("data/bb-sig.txt")) { ?>
 
diff --git a/panels.php b/panels.php
index 6793c48..bc80051 100644
--- a/panels.php
+++ b/panels.php
@@ -409,9 +409,9 @@ a:active {
 
 <table border="0" cellspacing="1" cellpadding="1">
 <form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
-<tr><td><input type="text" class="input" name="new_id" autocomplete="off" maxlength="30"></td><td>panel id*</td></tr>
-<tr><td><input type="text" class="input" name="new_title" autocomplete="off" maxlength="90"></td><td>panel title*</td></tr>
-<tr><td><textarea class="input" name="new_content" rows="15"></textarea></td><td valign="top">content*</td></tr>
+<tr><td><input type="text" class="input" name="new_id" autocomplete="off" maxlength="30" autofocus required></td><td>panel id*</td></tr>
+<tr><td><input type="text" class="input" name="new_title" autocomplete="off" maxlength="90" required></td><td>panel title*</td></tr>
+<tr><td><textarea class="input" name="new_content" rows="15" required></textarea></td><td valign="top">content*</td></tr>
 <tr><td><input type="submit" class="input" value="click here to add new panel"></td><td></td></tr>
 </form>
 <form enctype="multipart/form-data" action="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']); ?>" method="post">
@@ -448,7 +448,7 @@ a:active {
                                echo strtolower(str_replace("_", " ", $panel));
                                echo "\"></a></td></tr>";
 
-                               echo "<tr><td><input type=\"text\" class=\"input\" name=\"move_id\" value=\"$panel\" autocomplete=\"off\" maxlength=\"30\"></td>";
+                               echo "<tr><td><input type=\"text\" class=\"input\" name=\"move_id\" value=\"$panel\" autocomplete=\"off\" maxlength=\"30\" required></td>";
                                echo "<input type=\"hidden\" name=\"old_id\" value=\"$panel\">";
 
                                echo "<td valign=\"top\" rowspan=\"5\">";
@@ -523,9 +523,9 @@ a:active {
 
                                echo "<tr></td><td><input type=\"text\" class=\"input\" name=\"panel_title\" value=\"";
                                readfile("data/panels/$panel/title.txt");
-                               echo "\" autocomplete=\"off\" maxlength=\"90\"></td></tr>";
+                               echo "\" autocomplete=\"off\" maxlength=\"90\" required></td></tr>";
 
-                               echo "<tr><td><textarea class=\"input\" name=\"panel_content\" rows=\"15\">";
+                               echo "<tr><td><textarea class=\"input\" name=\"panel_content\" rows=\"15\" required>";
                                readfile("data/panels/$panel/panel.php");
                                echo "</textarea></td></tr>";
 
diff --git a/passwd.php b/passwd.php
index 205e9fa..1a8629d 100644
--- a/passwd.php
+++ b/passwd.php
@@ -87,7 +87,7 @@ if (isset($_REQUEST['show']) and ($_REQUEST['show'] == videos)) {
 }
 
 ?>" method="post">
-               <input autocomplete=off class=input type=password name=passwd>
+               <input required autofocus autocomplete=off class=input type=password name=passwd>
                <input class=input type=submit value=submit>
                </form>
                <p>Enter the required password above or click <a href=index.php>here</a> to go back to the index page.</p>
diff --git a/reg.php b/reg.php
index 4f9a89b..e6c31ec 100644
--- a/reg.php
+++ b/reg.php
@@ -707,12 +707,12 @@ if (file_exists("data/bb-disclaimer.txt")) {
 <table border="0" cellspacing="2" cellpadding="0">
 <form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
 <input type=hidden name=captcha_get value="<?php echo $captcha_rand; ?>">
-<tr><td width=100><p>Username</p></td><td colspan=3><input class=input type=text autocomplete=off name=username maxlength=30></td><?php echo $err_username; ?></tr>
-<tr><td width=100><p>First Name</p></td><td width=300 colspan=3><input class=input type=text autocomplete=off name=firstname maxlength=30></td><?php echo $err_firstname; ?></tr>
-<tr><td width=100><p>Last Name</p></td><td colspan=3><input class=input type=text autocomplete=off name=lastname maxlength=30></td><?php echo $err_lastname; ?></tr>
-<tr><td width=100><p>E-mail Address</p></td><td colspan=3><input class=input type=text autocomplete=off name=email maxlength=60></td><?php echo $err_email; ?></tr>
-<tr><td width=100><p>Birthdate</p></td><td><input class=bd type=text autocomplete=off name=bd_year maxlength=4 value=YYYY></td><td><input class=bd type=text autocomplete=off name=bd_month maxlength=2 value=MM></td><td><input class=bd type=text autocomplete=off name=bd_day maxlength=2 value=DD></td><?php echo $err_bday; ?></tr>
-<tr><td width=100><p>Website (optional)</p></td><td colspan=3><input class=input type=text autocomplete=off name=url maxlength=300></td></tr>
+<tr><td width=100><p>Username</p></td><td colspan=3><input required autofocus class=input type=text autocomplete=off name=username maxlength=30></td><?php echo $err_username; ?></tr>
+<tr><td width=100><p>First Name</p></td><td width=300 colspan=3><input required class=input type=text autocomplete=off name=firstname maxlength=30></td><?php echo $err_firstname; ?></tr>
+<tr><td width=100><p>Last Name</p></td><td colspan=3><input required class=input type=text autocomplete=off name=lastname maxlength=30></td><?php echo $err_lastname; ?></tr>
+<tr><td width=100><p>E-mail Address</p></td><td colspan=3><input required class=input type=email autocomplete=off name=email maxlength=60></td><?php echo $err_email; ?></tr>
+<tr><td width=100><p>Birthdate</p></td><td><input required class=bd type=text autocomplete=off name=bd_year maxlength=4 value=YYYY></td><td><input required class=bd type=text autocomplete=off name=bd_month maxlength=2 value=MM></td><td><input required class=bd type=text autocomplete=off name=bd_day maxlength=2 value=DD></td><?php echo $err_bday; ?></tr>
+<tr><td width=100><p>Website (optional)</p></td><td colspan=3><input class=input type=url autocomplete=off name=url maxlength=300></td></tr>
 
 <tr><td width=100><p>Country</p></td><td colspan=3>
 
@@ -965,7 +965,7 @@ if (file_exists("data/bb-disclaimer.txt")) {
 
 </td><?php echo $err_country; ?></tr>
 
-<tr><td width=100><p>City or Municipality</p></td><td colspan=3><input class=input type=text autocomplete=off name=city maxlength=100></td><?php echo $err_city; ?></tr>
+<tr><td width=100><p>City or Municipality</p></td><td colspan=3><input required class=input type=text autocomplete=off name=city maxlength=100></td><?php echo $err_city; ?></tr>
 
 <tr><td width=100><p><?php
 
@@ -976,7 +976,7 @@ else {
        echo "$scaptcha_x + $scaptcha_y + $scaptcha_z =";
 }
 
-?></p></td><td colspan=3><input class=input type=text autocomplete=off name=captcha_put maxlength=7></td><?php echo $err_captcha; ?></tr>
+?></p></td><td colspan=3><input required class=input type=text autocomplete=off name=captcha_put maxlength=7></td><?php echo $err_captcha; ?></tr>
 <tr><td><p></p></td><td colspan=3><input type=hidden name=submit value=1><input class=input type=submit value="click here to submit your registration"></td></tr>
 </form>
 <form enctype="multipart/form-data" method="post">
diff --git a/reset.php b/reset.php
index cf5f310..3c247bc 100644
--- a/reset.php
+++ b/reset.php
@@ -94,9 +94,9 @@ a:active {
 </style>
 
 <form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
-<input autocomplete=off class=input type=text name=username>
-<input autocomplete=off class=input type=text name=addr>
-<input autocomplete=off class=input type=text name=bday>
+<input required autofocus autocomplete=off class=input type=text name=username>
+<input required autocomplete=off class=input type=email name=addr>
+<input required autocomplete=off class=input type=text name=bday>
 <input class=input type=submit value=reset>
 </form>
 
diff --git a/settings.php b/settings.php
index 12f60dc..d1cb5c7 100644
--- a/settings.php
+++ b/settings.php
@@ -1210,10 +1210,10 @@ a:active {
 <table border="0" cellspacing="1" cellpadding="2">
 <form enctype="multipart/form-data" action="settings.php" method="post">
 <input type="hidden" name="edit" value="on">
-<tr><td>blog title*</td><td><input autocomplete="off" class="input" type="text" name="title" value="<?php readfile("data/title.txt"); ?>"></td></tr>
-<tr><td>author*</td><td><input autocomplete="off" class="input" type="text" name="author" value="<?php readfile("data/author.txt"); ?>"></td></tr>
-<tr><td>e-mail address*</td><td><input autocomplete="off" class="input" type="text" name="email" <?php if (file_exists("data/email.txt")) { echo 'value="'; readfile("data/email.txt"); echo '"'; } ?>></td></tr>
-<tr><td>username*</td><td><input autocomplete="off" class="input" type="text" name="username" value="<?php readfile("data/username.txt"); ?>"></td></tr>
+<tr><td>blog title*</td><td><input required autocomplete="off" class="input" type="text" name="title" value="<?php readfile("data/title.txt"); ?>"></td></tr>
+<tr><td>author*</td><td><input required autocomplete="off" class="input" type="text" name="author" value="<?php readfile("data/author.txt"); ?>"></td></tr>
+<tr><td>e-mail address*</td><td><input required autocomplete="off" class="input" type="email" name="email" <?php if (file_exists("data/email.txt")) { echo 'value="'; readfile("data/email.txt"); echo '"'; } ?>></td></tr>
+<tr><td>username*</td><td><input required autocomplete="off" class="input" type="text" name="username" value="<?php readfile("data/username.txt"); ?>"></td></tr>
 <tr><td>entries per page</td><td><input autocomplete="off" class="input" type="text" name="increase" value="<?php readfile("data/increase.txt"); ?>"></td></tr>
 <tr><td>timezone offset in seconds</td><td><input autocomplete="off" class="input" type="text" name="offset" value="<?php readfile("data/offset.txt"); ?>"></td></tr>
 <tr><td>ping on content change</td><td><input autocomplete="off" class="input" type="text" name="ping" value="<?php readfile("data/ping.txt"); ?>"></td></tr>
@@ -1558,7 +1558,7 @@ if (file_exists("data/ml-reply2.txt")) {
 
 <?php if (file_exists("data/ml.txt")) { ?>
 
-<tr><td>reply-to</td><td><input class="input" autocomplete="off" type="text" name="ml_reply2" <?php if (file_exists("data/ml-reply2.txt")) { echo "value=\""; readfile("data/ml-reply2.txt"); echo "\""; } ?>></td></tr>
+<tr><td>reply-to</td><td><input class="input" autocomplete="off" type="email" name="ml_reply2" <?php if (file_exists("data/ml-reply2.txt")) { echo "value=\""; readfile("data/ml-reply2.txt"); echo "\""; } ?>></td></tr>
 <tr><td>prepend to subject</td><td><input class="input" autocomplete="off" type="text" name="ml_prepend" <?php if (file_exists("data/ml-prepend.txt")) { echo "value=\""; readfile("data/ml-prepend.txt"); echo "\""; } ?>></td></tr>
 <tr><td>header</td><td><textarea class="input" name="ml_header"><?php if (file_exists("data/ml-header.txt")) { readfile("data/ml-header.txt"); } ?></textarea></td></tr>
 <tr><td>footer</td><td><textarea class="input" name="ml_footer"><?php if (file_exists("data/ml-footer.txt")) { readfile("data/ml-footer.txt"); } ?></textarea></td></tr>
diff --git a/video.php b/video.php
index d1a3d99..01f11d9 100644
--- a/video.php
+++ b/video.php
@@ -138,7 +138,7 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST
        if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
       
                echo "<form method=\"post\"><input type=\"hidden\" name=\"entry\" value=\"$maj_d\"><input type=\"hidden\" name=\"show\" value=\"$maj_s\">";
-               echo "<tr><td colspan=\"2\"><textarea class=\"input\" style=\"width: 100%;\" name=\"caption\"></textarea></td></tr>";
+               echo "<tr><td colspan=\"2\"><textarea autofocus required class=\"input\" style=\"width: 100%;\" name=\"caption\"></textarea></td></tr>";
                echo "<tr><td colspan=\"2\"><input type=\"submit\" class=\"click\" style=\"width: 100%;\" value=\"click here to update the caption\"></td></tr>";
                echo "</form>";
        }
 
Credits
Sunday, Sep 18, 2005, 12:00 AM (Revision 11 - Thursday, Jul 14, 2011, 7:30 PM)
Open Source enables software developers to stand on the shoulders of giants instead of reinventing the wheel, so to speak. Kudos and many thanks to the folks who made their work freely available for reuse in MAJ.

read more
Bugs and Exploits
Friday, Aug 26, 2005, 12:00 AM (Revision 23 - Wednesday, May 29, 2013, 5:25 AM)
Although MAJ started as a family project, care has been taken to make it as "safe" as possible. With more people now working on MAJ, bugs and exploitable code may sometimes slip in. We invite you to poke around and see if you can find any. Generally, there are two things you can do when you find a MAJ or PHP-related bug or exploit:

1. Take advantage of it. But hey, what's so exciting about messing up someone's blog? Ho-hum, right?
2. Report it here so that we can work on a fix and make MAJ better.

read more
Search
Download
MAJ 2.0
75 files
32977 downloads
MAJ 1.0
26 files
13132 downloads
MAJ 0.14
45 files
35010 downloads