Projet

Général

Profil

« Précédent | Suivant » 

Révision 0cb60645

Ajouté par Colin Fleming il y a presque 10 ans

Tidy up "status_captiveportal" XHTML

Add SUMMARY to TABLES
Remove PHP ECHO that isn't in a PHP statement
Update HTML Boolean operator
Add COLSPAN to fill the width of the table
Move NOWRAP to CLASS statement
Close INPUT and IMG tags and add ALT to IMG
Add BODY between HEAD.INC and FBEGIN.INC
Remove TYPE from TEXTAREA, invalid in XHTML
Add closing BODY and closing HTML tags

Voir les différences:

usr/local/www/status_captiveportal_test.php
59 59
$shortcut_section = "captiveportal-vouchers";
60 60

  
61 61
include("head.inc");
62
include("fbegin.inc");
63

  
64 62
?>
63
<body>
64
<?php include("fbegin.inc"); ?>
65 65

  
66 66
<form action="status_captiveportal_test.php" method="post" enctype="multipart/form-data" name="iform" id="iform">
67 67
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="tab pane">
......
83 83
  <tr>
84 84
    <td valign="top" class="vncellreq"><?=gettext("Voucher(s)"); ?></td>
85 85
    <td class="vtable">
86
    <textarea name="vouchers" cols="65" rows="3" type="text" id="vouchers" class="formpre"><?=htmlspecialchars($_POST['vouchers']);?></textarea>
86
    <textarea name="vouchers" cols="65" rows="3" id="vouchers" class="formpre"><?=htmlspecialchars($_POST['vouchers']);?></textarea>
87 87
    <br />
88 88
<?=gettext("Enter multiple vouchers separated by space or newline. The remaining time, if valid, will be shown for each voucher"); ?>.</td>      
89 89
  </tr>      
90 90
  <tr>
91 91
    <td width="22%" valign="top">&nbsp;</td>
92 92
    <td width="78%">
93
    <input name="zone" type="hidden" value="<?=htmlspecialchars($cpzone);?>">
94
    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>">
93
    <input name="zone" type="hidden" value="<?=htmlspecialchars($cpzone);?>" />
94
    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>" />
95 95
    </td>
96 96
  </tr>
97 97
</table>
98 98
</td></tr></table>
99 99
</form>
100
<p>
100
<br/>
101 101
<?php
102 102
if ($_POST) {
103 103
    if ($_POST['vouchers']) {
104 104
        $test_results = voucher_auth($_POST['vouchers'], 1);
105
        echo "<p><table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"100%\">\n";
105
        echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"100%\" summary=\"results\">\n";
106 106
        foreach ($test_results as $result) {
107 107
            if (strpos($result, " good ") || strpos($result, " granted ")) {
108
                echo "<tr><td bgcolor=\"#D9DEE8\"><img src=\"/themes/{$g['theme']}/images/icons/icon_pass.gif\"></td>";
108
                echo "<tr><td bgcolor=\"#D9DEE8\"><img src=\"/themes/{$g['theme']}/images/icons/icon_pass.gif\" alt=\"pass\" /></td>";
109 109
                echo "<td bgcolor=\"#D9DEE8\">$result</td></tr>";
110 110
            } else {
111
                echo "<tr><td bgcolor=\"#FFD9D1\"><img src=\"/themes/{$g['theme']}/images/icons/icon_block.gif\"></td>";
111
                echo "<tr><td bgcolor=\"#FFD9D1\"><img src=\"/themes/{$g['theme']}/images/icons/icon_block.gif\" alt=\"block\" /></td>";
112 112
                echo "<td bgcolor=\"#FFD9D1\">$result</td></tr>";
113 113
            }
114 114
        }
115
        echo "</table></p>";
115
        echo "</table>";
116 116
    }
117 117
}
118 118

  
119 119
include("fend.inc");
120 120
?>
121
</body>
122
</html>

Formats disponibles : Unified diff