Révision 0cb60645
Ajouté par Colin Fleming il y a presque 10 ans
usr/local/www/status_captiveportal_expire.php | ||
---|---|---|
58 | 58 |
$pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Expire Vouchers"), $a_cp[$cpzone]['zone']); |
59 | 59 |
|
60 | 60 |
include("head.inc"); |
61 |
include("fbegin.inc"); |
|
62 | 61 |
?> |
62 |
<body> |
|
63 |
<?php include("fbegin.inc"); ?> |
|
63 | 64 |
|
64 | 65 |
<form action="status_captiveportal_expire.php" method="post" enctype="multipart/form-data" name="iform" id="iform"> |
65 | 66 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="tab pane"> |
... | ... | |
81 | 82 |
<tr> |
82 | 83 |
<td valign="top" class="vncellreq"><?=gettext("Voucher(s)"); ?></td> |
83 | 84 |
<td class="vtable"> |
84 |
<textarea name="vouchers" cols="65" rows="3" type="text" id="vouchers" class="formpre"><?=htmlspecialchars($_POST['vouchers']);?></textarea>
|
|
85 |
<textarea name="vouchers" cols="65" rows="3" id="vouchers" class="formpre"><?=htmlspecialchars($_POST['vouchers']);?></textarea> |
|
85 | 86 |
<br /> |
86 | 87 |
<?=gettext("Enter multiple vouchers separated by space or newline. All valid vouchers will be marked as expired"); ?>.</td> |
87 | 88 |
</tr> |
88 | 89 |
<tr> |
89 | 90 |
<td width="22%" valign="top"> </td> |
90 | 91 |
<td width="78%"> |
91 |
<input name="zone" type="hidden" value="<?=htmlspecialchars($cpzone);?>"> |
|
92 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>"> |
|
92 |
<input name="zone" type="hidden" value="<?=htmlspecialchars($cpzone);?>" />
|
|
93 |
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>" />
|
|
93 | 94 |
</td> |
94 | 95 |
</tr> |
95 | 96 |
</table> |
96 | 97 |
</td></tr></table> |
97 | 98 |
</form> |
98 |
<p>
|
|
99 |
<br/>
|
|
99 | 100 |
<?php |
100 | 101 |
if ($_POST) { |
101 | 102 |
if ($_POST['vouchers']) { |
102 | 103 |
$result = voucher_expire($_POST['vouchers']); |
103 |
echo "<p><table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"100%\">\n";
|
|
104 |
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"100%\" summary=\"results\">\n";
|
|
104 | 105 |
if ( $result) { |
105 |
echo "<tr><td bgcolor=\"#D9DEE8\"><img src=\"/themes/{$g['theme']}/images/icons/icon_pass.gif\"></td>"; |
|
106 |
echo "<tr><td bgcolor=\"#D9DEE8\"><img src=\"/themes/{$g['theme']}/images/icons/icon_pass.gif\" alt=\"pass\" /></td>";
|
|
106 | 107 |
echo "<td bgcolor=\"#D9DEE8\">Success</td></tr>"; |
107 | 108 |
} else { |
108 |
echo "<tr><td bgcolor=\"#FFD9D1\"><img src=\"/themes/{$g['theme']}/images/icons/icon_block.gif\"></td>"; |
|
109 |
echo "<tr><td bgcolor=\"#FFD9D1\"><img src=\"/themes/{$g['theme']}/images/icons/icon_block.gif\" alt=\"block\" /></td>";
|
|
109 | 110 |
echo "<td bgcolor=\"#FFD9D1\">Error</td></tr>"; |
110 | 111 |
} |
111 |
echo "</table></p>";
|
|
112 |
echo "</table>"; |
|
112 | 113 |
} |
113 | 114 |
} |
114 | 115 |
|
115 | 116 |
include("fend.inc"); |
116 | 117 |
?> |
117 |
|
|
118 |
</body> |
|
119 |
</html> |
Formats disponibles : Unified diff
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