Révision 7c9710fc
Ajouté par Renato Botelho il y a plus de 9 ans
usr/local/www/status_interfaces.php | ||
---|---|---|
46 | 46 |
require_once("shaper.inc"); |
47 | 47 |
require_once("filter.inc"); |
48 | 48 |
|
49 |
if ($_GET['if']) {
|
|
50 |
$interface = $_GET['if'];
|
|
51 |
if ($_GET['action'] == "Disconnect" || $_GET['action'] == "Release") {
|
|
49 |
if ($_POST['if']) {
|
|
50 |
$interface = $_POST['if'];
|
|
51 |
if ($_POST['action'] == "disconnect" || $_POST['action'] == "release") {
|
|
52 | 52 |
interface_bring_down($interface); |
53 |
} else if ($_GET['action'] == "Connect" || $_GET['action'] == "Renew") {
|
|
53 |
} else if ($_POST['action'] == "connect" || $_POST['action'] == "renew") {
|
|
54 | 54 |
interface_configure($interface); |
55 | 55 |
} |
56 | 56 |
header("Location: status_interfaces.php"); |
... | ... | |
96 | 96 |
DHCP |
97 | 97 |
</td> |
98 | 98 |
<td width="78%" class="listr"> |
99 |
<?=htmlspecialchars($ifinfo['dhcplink']);?> |
|
100 |
<?php if ($ifinfo['dhcplink'] == "up"): ?> |
|
101 |
<a href="status_interfaces.php?action=Release&if=<?php echo $ifdescr; ?>"> |
|
102 |
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Release");?>" class="formbtns" /> |
|
103 |
<?php else: ?> |
|
104 |
<a href="status_interfaces.php?action=Renew&if=<?php echo $ifdescr; ?>"> |
|
105 |
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Renew");?>" class="formbtns" /> |
|
106 |
<?php endif; ?> |
|
107 |
</a> |
|
99 |
<form name="dhcplink_form" action="status_interfaces.php" method="post"> |
|
100 |
<?=htmlspecialchars($ifinfo['dhcplink']);?> |
|
101 |
<?php if ($ifinfo['dhcplink'] == "up"): ?> |
|
102 |
<input type="hidden" name="if" value="<?php echo $ifdescr; ?>" /> |
|
103 |
<input type="hidden" name="action" value="release" /> |
|
104 |
<input type="submit" name="submit" class="formbtn" value="<?php echo gettext("Release"); ?>" /> |
|
105 |
<?php else: ?> |
|
106 |
<input type="hidden" name="if" value="<?php echo $ifdescr; ?>" /> |
|
107 |
<input type="hidden" name="action" value="renew" /> |
|
108 |
<input type="submit" name="submit" class="formbtn" value="<?php echo gettext("Renew"); ?>" /> |
|
109 |
<?php endif; ?> |
|
110 |
</form> |
|
108 | 111 |
</td> |
109 | 112 |
</tr> |
110 | 113 |
<?php endif; |
... | ... | |
114 | 117 |
DHCP6 |
115 | 118 |
</td> |
116 | 119 |
<td width="78%" class="listr"> |
117 |
<?=htmlspecialchars($ifinfo['dhcp6link']);?> |
|
118 |
<?php if ($ifinfo['dhcp6link'] == "up"): ?> |
|
119 |
<a href="status_interfaces.php?action=Release&if=<?php echo $ifdescr; ?>"> |
|
120 |
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Release");?>" class="formbtns" /> |
|
121 |
<?php else: ?> |
|
122 |
<a href="status_interfaces.php?action=Renew&if=<?php echo $ifdescr; ?>"> |
|
123 |
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Renew");?>" class="formbtns" /> |
|
124 |
<?php endif; ?> |
|
125 |
</a> |
|
120 |
<form name="dhcp6link_form" action="status_interfaces.php" method="post"> |
|
121 |
<?=htmlspecialchars($ifinfo['dhcp6link']);?> |
|
122 |
<?php if ($ifinfo['dhcp6link'] == "up"): ?> |
|
123 |
<input type="hidden" name="if" value="<?php echo $ifdescr; ?>" /> |
|
124 |
<input type="hidden" name="action" value="release" /> |
|
125 |
<input type="submit" name="submit" class="formbtn" value="<?php echo gettext("Release"); ?>" /> |
|
126 |
<?php else: ?> |
|
127 |
<input type="hidden" name="if" value="<?php echo $ifdescr; ?>" /> |
|
128 |
<input type="hidden" name="action" value="renew" /> |
|
129 |
<input type="submit" name="submit" class="formbtn" value="<?php echo gettext("Renew"); ?>" /> |
|
130 |
<?php endif; ?> |
|
131 |
</form> |
|
126 | 132 |
</td> |
127 | 133 |
</tr> |
128 | 134 |
<?php endif; if ($ifinfo['pppoelink']): ?> |
129 | 135 |
<tr> |
130 | 136 |
<td width="22%" class="vncellt"><?=gettext("PPPoE"); ?></td> |
131 | 137 |
<td width="78%" class="listr"> |
132 |
<?=htmlspecialchars($ifinfo['pppoelink']);?> |
|
133 |
<?php if ($ifinfo['pppoelink'] == "up"): ?> |
|
134 |
<a href="status_interfaces.php?action=Disconnect&if=<?php echo $ifdescr; ?>"> |
|
135 |
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Disconnect");?>" class="formbtns" /> |
|
136 |
<?php else: ?> |
|
137 |
<a href="status_interfaces.php?action=Connect&if=<?php echo $ifdescr; ?>"> |
|
138 |
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Connect");?>" class="formbtns" /> |
|
138 |
<form name="pppoelink_form" action="status_interfaces.php" method="post"> |
|
139 |
<?=htmlspecialchars($ifinfo['pppoelink']);?> |
|
140 |
<?php if ($ifinfo['pppoelink'] == "up"): ?> |
|
141 |
<input type="hidden" name="if" value="<?php echo $ifdescr; ?>" /> |
|
142 |
<input type="hidden" name="action" value="disconnect" /> |
|
143 |
<input type="submit" name="submit" class="formbtn" value="<?php echo gettext("Disconnect"); ?>" /> |
|
144 |
<?php else: ?> |
|
145 |
<input type="hidden" name="if" value="<?php echo $ifdescr; ?>" /> |
|
146 |
<input type="hidden" name="action" value="connect" /> |
|
147 |
<input type="submit" name="submit" class="formbtn" value="<?php echo gettext("Connect"); ?>" /> |
|
139 | 148 |
<?php endif; ?> |
140 |
</a>
|
|
149 |
</form>
|
|
141 | 150 |
</td> |
142 | 151 |
</tr> |
143 | 152 |
<?php endif; if ($ifinfo['pptplink']): ?> |
144 | 153 |
<tr> |
145 | 154 |
<td width="22%" class="vncellt"><?=gettext("PPTP"); ?></td> |
146 | 155 |
<td width="78%" class="listr"> |
147 |
<?=htmlspecialchars($ifinfo['pptplink']);?> |
|
148 |
<?php if ($ifinfo['pptplink'] == "up"): ?> |
|
149 |
<a href="status_interfaces.php?action=Disconnect&if=<?php echo $ifdescr; ?>"> |
|
150 |
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Disconnect");?>" class="formbtns" /> |
|
151 |
<?php else: ?> |
|
152 |
<a href="status_interfaces.php?action=Connect&if=<?php echo $ifdescr; ?>"> |
|
153 |
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Connect");?>" class="formbtns" /> |
|
154 |
<?php endif; ?> |
|
155 |
</a> |
|
156 |
<form name="pptplink_form" action="status_interfaces.php" method="post"> |
|
157 |
<?=htmlspecialchars($ifinfo['pptplink']);?> |
|
158 |
<?php if ($ifinfo['pptplink'] == "up"): ?> |
|
159 |
<input type="hidden" name="if" value="<?php echo $ifdescr; ?>" /> |
|
160 |
<input type="hidden" name="action" value="disconnect" /> |
|
161 |
<input type="submit" name="submit" class="formbtn" value="<?php echo gettext("Disconnect"); ?>" /> |
|
162 |
<?php else: ?> |
|
163 |
<input type="hidden" name="if" value="<?php echo $ifdescr; ?>" /> |
|
164 |
<input type="hidden" name="action" value="connect" /> |
|
165 |
<input type="submit" name="submit" class="formbtn" value="<?php echo gettext("Connect"); ?>" /> |
|
166 |
<?php endif; ?> |
|
167 |
</form> |
|
156 | 168 |
</td> |
157 | 169 |
</tr> |
158 | 170 |
<?php endif; if ($ifinfo['l2tplink']): ?> |
159 | 171 |
<tr> |
160 | 172 |
<td width="22%" class="vncellt"><?=gettext("L2TP"); ?></td> |
161 | 173 |
<td width="78%" class="listr"> |
162 |
<?=htmlspecialchars($ifinfo['l2tplink']);?> |
|
163 |
<?php if ($ifinfo['l2tplink'] == "up"): ?> |
|
164 |
<a href="status_interfaces.php?action=Disconnect&if=<?php echo $ifdescr; ?>"> |
|
165 |
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Disconnect");?>" class="formbtns" /> |
|
166 |
<?php else: ?> |
|
167 |
<a href="status_interfaces.php?action=Connect&if=<?php echo $ifdescr; ?>"> |
|
168 |
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Connect");?>" class="formbtns" /> |
|
169 |
<?php endif; ?> |
|
170 |
</a> |
|
174 |
<form name="l2tplink_form" action="status_interfaces.php" method="post"> |
|
175 |
<?=htmlspecialchars($ifinfo['l2tplink']);?> |
|
176 |
<?php if ($ifinfo['l2tplink'] == "up"): ?> |
|
177 |
<input type="hidden" name="if" value="<?php echo $ifdescr; ?>" /> |
|
178 |
<input type="hidden" name="action" value="disconnect" /> |
|
179 |
<input type="submit" name="submit" class="formbtn" value="<?php echo gettext("Disconnect"); ?>" /> |
|
180 |
<?php else: ?> |
|
181 |
<input type="hidden" name="if" value="<?php echo $ifdescr; ?>" /> |
|
182 |
<input type="hidden" name="action" value="connect" /> |
|
183 |
<input type="submit" name="submit" class="formbtn" value="<?php echo gettext("Connect"); ?>" /> |
|
184 |
<?php endif; ?> |
|
185 |
</form> |
|
171 | 186 |
</td> |
172 | 187 |
</tr> |
173 | 188 |
<?php endif; if ($ifinfo['ppplink']): ?> |
174 | 189 |
<tr> |
175 | 190 |
<td width="22%" class="vncellt"><?=gettext("PPP"); ?></td> |
176 | 191 |
<td width="78%" class="listr"> |
177 |
<?=htmlspecialchars($ifinfo['pppinfo']);?> |
|
178 |
<?php if ($ifinfo['ppplink'] == "up"): ?> |
|
179 |
<a href="status_interfaces.php?action=Disconnect&if=<?php echo $ifdescr; ?>"> |
|
180 |
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Disconnect");?>" class="formbtns" /> |
|
181 |
<?php else: ?> |
|
182 |
<?php if (!$ifinfo['nodevice']): ?> |
|
183 |
<a href="status_interfaces.php?action=Connect&if=<?php echo $ifdescr; ?>"> |
|
184 |
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Connect");?>" class="formbtns" /> |
|
192 |
<form name="ppplink_form" action="status_interfaces.php" method="post"> |
|
193 |
<?=htmlspecialchars($ifinfo['pppinfo']);?> |
|
194 |
<?php if ($ifinfo['ppplink'] == "up"): ?> |
|
195 |
<input type="hidden" name="if" value="<?php echo $ifdescr; ?>" /> |
|
196 |
<input type="hidden" name="action" value="disconnect" /> |
|
197 |
<input type="submit" name="submit" class="formbtn" value="<?php echo gettext("Disconnect"); ?>" /> |
|
198 |
<?php else: ?> |
|
199 |
<?php if (!$ifinfo['nodevice']): ?> |
|
200 |
<input type="hidden" name="if" value="<?php echo $ifdescr; ?>" /> |
|
201 |
<input type="hidden" name="action" value="connect" /> |
|
202 |
<input type="submit" name="submit" class="formbtn" value="<?php echo gettext("Connect"); ?>" /> |
|
203 |
<?php endif; ?> |
|
185 | 204 |
<?php endif; ?> |
186 |
<?php endif; ?> |
|
187 |
</a> |
|
205 |
</form> |
|
188 | 206 |
</td> |
189 | 207 |
</tr> |
190 | 208 |
<?php endif; if ($ifinfo['ppp_uptime'] || $ifinfo['ppp_uptime_accumulated']): ?> |
Formats disponibles : Unified diff
Replace GET by POST, it fixes #3833