Révision 0cb60645
Ajouté par Colin Fleming il y a presque 10 ans
usr/local/www/status_captiveportal.php | ||
---|---|---|
117 | 117 |
<td class="tabcont"> |
118 | 118 |
<?php endif; ?> |
119 | 119 |
|
120 |
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> |
|
120 |
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area">
|
|
121 | 121 |
<tr> |
122 | 122 |
<td width="20%" class="vncell" valign="top"> |
123 | 123 |
<br /><?=gettext("Captive Portal Zone"); ?><br/><br /> |
... | ... | |
125 | 125 |
<td class="vncell" width="30%" align="center"> |
126 | 126 |
<form action="status_captiveportal.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> |
127 | 127 |
<select name="zone" class="formselect" onchange="document.form1.submit()"> |
128 |
echo "<option value="">none</option>\n";
|
|
128 |
<option value="">none</option>
|
|
129 | 129 |
<?php foreach ($a_cp as $cpkey => $cp) { |
130 |
echo "<option value='{$cpkey}' ";
|
|
130 |
echo "<option value=\"{$cpkey}\" ";
|
|
131 | 131 |
if ($cpzone == $cpkey) |
132 |
echo "selected"; |
|
132 |
echo "selected=\"selected\"";
|
|
133 | 133 |
echo ">" . htmlspecialchars($cp['zone']) . "</option>\n"; |
134 | 134 |
} |
135 | 135 |
?> |
... | ... | |
152 | 152 |
<td class="listhdrr"><a href="?zone=<?=$cpzone?>&order=start&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Session start");?></a></td> |
153 | 153 |
<td class="listhdr"><a href="?zone=<?=$cpzone?>&order=lastact&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Last activity");?></a></td> |
154 | 154 |
<?php else: ?> |
155 |
<td class="listhdr"><a href="?zone=<?=$cpzone?>&order=start&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Session start");?></a></td> |
|
155 |
<td class="listhdr" colspan="2"><a href="?zone=<?=$cpzone?>&order=start&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Session start");?></a></td>
|
|
156 | 156 |
<?php endif; ?> |
157 | 157 |
<td class="list sort_ignore"></td> |
158 | 158 |
</tr> |
... | ... | |
174 | 174 |
<?php if ($_GET['showact']): |
175 | 175 |
$last_act = captiveportal_get_last_activity($cpent[2], $cpent[3]); ?> |
176 | 176 |
<td class="listr"><?php if ($last_act != 0) echo htmlspecialchars(date("m/d/Y H:i:s", $last_act));?></td> |
177 |
<?php else: ?> |
|
178 |
<td class="listr" colspan="2"><?=htmlspecialchars(date("m/d/Y H:i:s", $cpent[0]));?></td> |
|
177 | 179 |
<?php endif; ?> |
178 |
<td valign="middle" class="list" nowrap>
|
|
180 |
<td valign="middle" class="list nowrap">
|
|
179 | 181 |
<a href="?zone=<?=$cpzone;?>&order=<?=$_GET['order'];?>&showact=<?=htmlspecialchars($_GET['showact']);?>&act=del&id=<?=$cpent[5];?>" onclick="return confirm('<?=gettext("Do you really want to disconnect this client?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("Disconnect");?>"></a> |
180 | 182 |
</td> |
181 | 183 |
</tr> |
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> |
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"> </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> |
usr/local/www/status_captiveportal_voucher_rolls.php | ||
---|---|---|
63 | 63 |
$a_roll = &$config['voucher'][$cpzone]['roll']; |
64 | 64 |
|
65 | 65 |
include("head.inc"); |
66 |
include("fbegin.inc"); |
|
67 | 66 |
?> |
67 |
<body> |
|
68 |
<?php include("fbegin.inc"); ?> |
|
68 | 69 |
|
69 | 70 |
<form action="status_captiveportal_voucher_rolls.php" method="post" enctype="multipart/form-data" name="iform" id="iform"> |
70 | 71 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="tab pane"> |
... | ... | |
132 | 133 |
</table> |
133 | 134 |
</form> |
134 | 135 |
<?php include("fend.inc"); ?> |
136 |
</body> |
|
137 |
</html> |
usr/local/www/status_captiveportal_vouchers.php | ||
---|---|---|
97 | 97 |
} |
98 | 98 |
|
99 | 99 |
include("head.inc"); |
100 |
include("fbegin.inc"); |
|
101 | 100 |
?> |
101 |
<body> |
|
102 |
<?php include("fbegin.inc"); ?> |
|
102 | 103 |
|
103 | 104 |
<form action="status_captiveportal_vouchers.php" method="post" enctype="multipart/form-data" name="iform" id="iform"> |
104 | 105 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="tab pane"> |
... | ... | |
118 | 119 |
|
119 | 120 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="content pane"> |
120 | 121 |
<tr> |
121 |
<td class="listhdrr"><a href="?order=0&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Voucher"); ?></a></td> |
|
122 |
<td class="listhdrr"><a href="?order=1&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Roll"); ?></a></td> |
|
123 |
<td class="listhdrr"><a href="?order=2&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Activated at"); ?></a></td> |
|
124 |
<td class="listhdrr"><a href="?order=3&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Expires in"); ?></a></td> |
|
125 |
<td class="listhdr"><a href="?order=4&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Expires at"); ?></a></td> |
|
122 |
<td class="listhdrr"><a href="?order=0&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Voucher"); ?></a></td>
|
|
123 |
<td class="listhdrr"><a href="?order=1&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Roll"); ?></a></td>
|
|
124 |
<td class="listhdrr"><a href="?order=2&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Activated at"); ?></a></td>
|
|
125 |
<td class="listhdrr"><a href="?order=3&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Expires in"); ?></a></td>
|
|
126 |
<td class="listhdr"><a href="?order=4&showact=<?=htmlspecialchars($_GET['showact']);?>"><?=gettext("Expires at"); ?></a></td>
|
|
126 | 127 |
<td class="list"></td> |
127 | 128 |
</tr> |
128 | 129 |
<?php foreach ($db as $dbent): ?> |
... | ... | |
141 | 142 |
</table> |
142 | 143 |
</form> |
143 | 144 |
<?php include("fend.inc"); ?> |
145 |
</body> |
|
146 |
</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