Commit b20834ac authored by Franco Fichtner's avatar Franco Fichtner

src: apply global whitespace cleanups

parent 46bf6e98
...@@ -287,9 +287,9 @@ function get_default_captive_portal_html() { ...@@ -287,9 +287,9 @@ function get_default_captive_portal_html() {
global $config, $g, $cpzone; global $config, $g, $cpzone;
$htmltext = <<<EOD $htmltext = <<<EOD
<html> <html>
<body> <body>
<form method="post" action="\$PORTAL_ACTION\$"> <form method="post" action="\$PORTAL_ACTION\$">
<input name="redirurl" type="hidden" value="\$PORTAL_REDIRURL\$"> <input name="redirurl" type="hidden" value="\$PORTAL_REDIRURL\$">
<input name="zone" type="hidden" value="\$PORTAL_ZONE\$"> <input name="zone" type="hidden" value="\$PORTAL_ZONE\$">
<center> <center>
...@@ -370,7 +370,7 @@ EOD; ...@@ -370,7 +370,7 @@ EOD;
</table> </table>
</center> </center>
</form> </form>
</body> </body>
</html> </html>
EOD; EOD;
...@@ -681,7 +681,7 @@ function captiveportal_init_webgui_zone($cpcfg) { ...@@ -681,7 +681,7 @@ function captiveportal_init_webgui_zone($cpcfg) {
} }
/* /*
* Remove clients that have been around for longer than the specified amount of time * Remove clients that have been around for longer than the specified amount of time
* db file structure: * db file structure:
* timestamp,ipfw_rule_no,clientip,clientmac,username,sessionid,password,session_timeout,idle_timeout,session_terminate_time,interim_interval * timestamp,ipfw_rule_no,clientip,clientmac,username,sessionid,password,session_timeout,idle_timeout,session_terminate_time,interim_interval
...@@ -703,7 +703,7 @@ function captiveportal_prune_old() { ...@@ -703,7 +703,7 @@ function captiveportal_prune_old() {
}else{ }else{
// cleanup sessions if radius accounting is enable // cleanup sessions if radius accounting is enable
// TODO: this code needs a rewrite, probably the easiest thing todo is update the zone administration and run // TODO: this code needs a rewrite, probably the easiest thing todo is update the zone administration and run
// the normal cleanup (portal_cleanup_sessions) to detach both processes // the normal cleanup (portal_cleanup_sessions) to detach both processes
// //
$vcpcfg = $config['voucher'][$cpzone]; $vcpcfg = $config['voucher'][$cpzone];
......
<?php <?php
/* /*
Copyritgh (C) 2014 Deciso B.V. Copyritgh (C) 2014 Deciso B.V.
Copyright (C) Scott Ullrich Copyright (C) Scott Ullrich
Copyright (C) 2009 Jim Pingle <myfirstname>@<mylastname>.org Copyright (C) 2009 Jim Pingle <myfirstname>@<mylastname>.org
All rights reserved. All rights reserved.
......
...@@ -109,4 +109,4 @@ class ARP ...@@ -109,4 +109,4 @@ class ARP
} }
} }
\ No newline at end of file
...@@ -384,4 +384,4 @@ class DB { ...@@ -384,4 +384,4 @@ class DB {
} }
\ No newline at end of file
...@@ -327,4 +327,4 @@ class Rules { ...@@ -327,4 +327,4 @@ class Rules {
file_put_contents($filename,$ruleset_txt); file_put_contents($filename,$ruleset_txt);
} }
} }
\ No newline at end of file
...@@ -123,4 +123,4 @@ class Shell ...@@ -123,4 +123,4 @@ class Shell
} }
} }
\ No newline at end of file
<?php <?php
/* /*
Copyritgh (C) 2014 Deciso B.V. Copyritgh (C) 2014 Deciso B.V.
Copyright (C) 2010 - Jim Pingle Copyright (C) 2010 - Jim Pingle
Copyright (C) 2006, Eric Friesen Copyright (C) 2006, Eric Friesen
......
<?php <?php
/* /*
Copyright (C) 2014 Deciso B.V. Copyright (C) 2014 Deciso B.V.
Copyright (C) 2005 Paul Taylor (paultaylor@winndixie.com) and Manuel Kasper <mk@neon1.net>. Copyright (C) 2005 Paul Taylor (paultaylor@winndixie.com) and Manuel Kasper <mk@neon1.net>.
All rights reserved. All rights reserved.
......
...@@ -423,8 +423,8 @@ include("fbegin.inc"); ...@@ -423,8 +423,8 @@ include("fbegin.inc");
<?php if (count($layer7_rules_list) > 0): ?> <?php if (count($layer7_rules_list) > 0): ?>
<tr class="tabcont"> <tr class="tabcont">
<td width="25%" align="left"></td><td width="75%"> </td> <td width="25%" align="left"></td><td width="75%"> </td>
</tr> </tr>
<?php endif; ?> <?php endif; ?>
<tr> <tr>
...@@ -571,14 +571,14 @@ include("fbegin.inc"); ...@@ -571,14 +571,14 @@ include("fbegin.inc");
<input id="delete" onclick="return confirm('Are you sure you want to delete?')" type="submit" class="btn btn-default formbtn" name="delete" value="<?=gettext("Delete"); ?>" /> <input id="delete" onclick="return confirm('Are you sure you want to delete?')" type="submit" class="btn btn-default formbtn" name="delete" value="<?=gettext("Delete"); ?>" />
</a> </a>
<?php endif ?> <?php endif ?>
</td> </td>
</tr> </tr>
<?php endif; ?> <?php endif; ?>
<!-- End of layer7 rules form --> <!-- End of layer7 rules form -->
</table> </table>
</div><!-- end of div:shape area --> </div><!-- end of div:shape area -->
</form> </form>
</div> </div>
</section> </section>
</div> </div>
......
<?php <?php
/* /*
Copyright (C) 2014 Deciso B.V. Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004 Scott Ullrich Copyright (C) 2004 Scott Ullrich
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>. Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved. All rights reserved.
......
...@@ -569,4 +569,3 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed")) ...@@ -569,4 +569,3 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed"))
</section> </section>
<?php include("foot.inc"); ?> <?php include("foot.inc"); ?>
...@@ -50,10 +50,10 @@ $pgtitle = gettext("License"); ...@@ -50,10 +50,10 @@ $pgtitle = gettext("License");
<br /> <br />
<strong> <strong>
THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,<br /> THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,<br />
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br /> ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br />
</strong><br /> </strong><br />
OPNsense is based on <a href="http://www.freebsd.org" target="_blank">FreeBSD</a><br /> OPNsense is based on <a href="http://www.freebsd.org" target="_blank">FreeBSD</a><br />
......
<?php <?php
/* /*
Copyright (C) 2014-2015 Deciso B.V. Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>. Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>.
All rights reserved. All rights reserved.
......
...@@ -562,7 +562,7 @@ function enable_change(enable_change) { ...@@ -562,7 +562,7 @@ function enable_change(enable_change) {
<?=gettext("minutes"); ?><br /> <?=gettext("minutes"); ?><br />
<?=gettext("Clients will be disconnected after this amount of time, regardless of activity. They may log in again immediately, though. Leave this field blank for no hard timeout (not recommended unless an idle timeout is set)."); ?></td> <?=gettext("Clients will be disconnected after this amount of time, regardless of activity. They may log in again immediately, though. Leave this field blank for no hard timeout (not recommended unless an idle timeout is set)."); ?></td>
</tr> </tr>
<!-- <!--
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Pass-through credits allowed per MAC address"); ?></td> <td width="22%" valign="top" class="vncell"><?=gettext("Pass-through credits allowed per MAC address"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
...@@ -584,7 +584,7 @@ function enable_change(enable_change) { ...@@ -584,7 +584,7 @@ function enable_change(enable_change) {
<strong><?=gettext("Enable waiting period reset on attempted access"); ?></strong><br /> <strong><?=gettext("Enable waiting period reset on attempted access"); ?></strong><br />
<?=gettext("If enabled, the waiting period is reset to the original duration if access is attempted when all pass-through credits have already been exhausted."); ?></td> <?=gettext("If enabled, the waiting period is reset to the original duration if access is attempted when all pass-through credits have already been exhausted."); ?></td>
</tr> </tr>
--> -->
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Logout popup window"); ?></td> <td width="22%" valign="top" class="vncell"><?=gettext("Logout popup window"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
...@@ -607,7 +607,7 @@ function enable_change(enable_change) { ...@@ -607,7 +607,7 @@ function enable_change(enable_change) {
<?=gettext("If you provide a URL here, clients will be redirected to that URL instead of the one they initially tried " . <?=gettext("If you provide a URL here, clients will be redirected to that URL instead of the one they initially tried " .
"to access after they've authenticated."); ?></td> "to access after they've authenticated."); ?></td>
</tr> </tr>
<!-- <!--
<tr> <tr>
<td valign="top" class="vncell"><?=gettext("Blocked MAC address redirect URL"); ?> </td> <td valign="top" class="vncell"><?=gettext("Blocked MAC address redirect URL"); ?> </td>
<td class="vtable"> <td class="vtable">
...@@ -615,7 +615,7 @@ function enable_change(enable_change) { ...@@ -615,7 +615,7 @@ function enable_change(enable_change) {
<?php printf(gettext("If you provide a URL here, MAC addresses set to be blocked will be redirect to that URL when attempt to access anything."));?> <?php printf(gettext("If you provide a URL here, MAC addresses set to be blocked will be redirect to that URL when attempt to access anything."));?>
</td> </td>
</tr> </tr>
--> -->
<tr> <tr>
<td valign="top" class="vncell"><?=gettext("Concurrent user logins"); ?></td> <td valign="top" class="vncell"><?=gettext("Concurrent user logins"); ?></td>
<td class="vtable"> <td class="vtable">
...@@ -623,7 +623,7 @@ function enable_change(enable_change) { ...@@ -623,7 +623,7 @@ function enable_change(enable_change) {
<strong><?=gettext("Disable concurrent logins"); ?></strong><br /> <strong><?=gettext("Disable concurrent logins"); ?></strong><br />
<?=gettext("If this option is set, only the most recent login per username will be active. Subsequent logins will cause machines previously logged in with the same username to be disconnected."); ?></td> <?=gettext("If this option is set, only the most recent login per username will be active. Subsequent logins will cause machines previously logged in with the same username to be disconnected."); ?></td>
</tr> </tr>
<!-- <!--
<tr> <tr>
<td valign="top" class="vncell"><?=gettext("Per-user bandwidth restriction"); ?></td> <td valign="top" class="vncell"><?=gettext("Per-user bandwidth restriction"); ?></td>
<td class="vtable"> <td class="vtable">
...@@ -641,7 +641,7 @@ function enable_change(enable_change) { ...@@ -641,7 +641,7 @@ function enable_change(enable_change) {
<br /> <br />
<?=gettext("If this option is set, the captive portal will restrict each user who logs in to the specified default bandwidth. RADIUS can override the default settings. Leave empty or set to 0 for no limit."); ?> </td> <?=gettext("If this option is set, the captive portal will restrict each user who logs in to the specified default bandwidth. RADIUS can override the default settings. Leave empty or set to 0 for no limit."); ?> </td>
</tr> </tr>
--> -->
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Authentication"); ?></td> <td width="22%" valign="top" class="vncell"><?=gettext("Authentication"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
......
...@@ -207,7 +207,7 @@ include("head.inc"); ...@@ -207,7 +207,7 @@ include("head.inc");
<br /> <span class="vexpl"><?=gettext("You may enter a description here for your reference (not parsed)"); ?>.</span> <br /> <span class="vexpl"><?=gettext("You may enter a description here for your reference (not parsed)"); ?>.</span>
</td> </td>
</tr> </tr>
<!-- <!--
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Bandwidth up"); ?></td> <td width="22%" valign="top" class="vncell"><?=gettext("Bandwidth up"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
...@@ -222,7 +222,7 @@ include("head.inc"); ...@@ -222,7 +222,7 @@ include("head.inc");
<br /> <span class="vexpl"><?=gettext("Enter a download limit to be enforced on this IP address in Kbit/s"); ?></span> <br /> <span class="vexpl"><?=gettext("Enter a download limit to be enforced on this IP address in Kbit/s"); ?></span>
</td> </td>
</tr> </tr>
--> -->
<tr> <tr>
<td width="22%" valign="top">&nbsp;</td> <td width="22%" valign="top">&nbsp;</td>
<td width="78%"> <td width="78%">
......
...@@ -224,7 +224,7 @@ include("head.inc"); ...@@ -224,7 +224,7 @@ include("head.inc");
<span class="vexpl"><?=gettext("You may enter a description here for your reference (not parsed)"); ?>.</span> <span class="vexpl"><?=gettext("You may enter a description here for your reference (not parsed)"); ?>.</span>
</td> </td>
</tr> </tr>
<!-- <!--
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Bandwidth up"); ?></td> <td width="22%" valign="top" class="vncell"><?=gettext("Bandwidth up"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
...@@ -241,7 +241,7 @@ include("head.inc"); ...@@ -241,7 +241,7 @@ include("head.inc");
<span class="vexpl"><?=gettext("Enter a download limit to be enforced on this MAC address in Kbit/s"); ?></span> <span class="vexpl"><?=gettext("Enter a download limit to be enforced on this MAC address in Kbit/s"); ?></span>
</td> </td>
</tr> </tr>
--> -->
<tr> <tr>
<td width="22%" valign="top">&nbsp;</td> <td width="22%" valign="top">&nbsp;</td>
<td width="78%"> <td width="78%">
......
...@@ -171,7 +171,7 @@ include("head.inc"); ...@@ -171,7 +171,7 @@ include("head.inc");
?> ?>
<body> <body>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
//Generic show an advanced option function //Generic show an advanced option function
......
...@@ -157,7 +157,7 @@ include("head.inc"); ...@@ -157,7 +157,7 @@ include("head.inc");
?> ?>
<body> <body>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
function check_deps() { function check_deps() {
......
...@@ -161,7 +161,7 @@ include_once("head.inc"); ...@@ -161,7 +161,7 @@ include_once("head.inc");
?> ?>
<body> <body>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
function enable_change(enable_over) { function enable_change(enable_over) {
......
...@@ -68,7 +68,7 @@ function clientcmp($a, $b) { ...@@ -68,7 +68,7 @@ function clientcmp($a, $b) {
if (!empty($cpzone)) { if (!empty($cpzone)) {
$cpdb_handle = new OPNsense\CaptivePortal\DB($cpzone); $cpdb_handle = new OPNsense\CaptivePortal\DB($cpzone);
$cpclient_handle = new OPNsense\CaptivePortal\CPClient(); $cpclient_handle = new OPNsense\CaptivePortal\CPClient();
$order = ""; $order = "";
if ($_GET['order']) { if ($_GET['order']) {
...@@ -79,7 +79,7 @@ if (!empty($cpzone)) { ...@@ -79,7 +79,7 @@ if (!empty($cpzone)) {
$cpdb = $cpdb_handle->listClients(array(),"and",array($order) ) ; $cpdb = $cpdb_handle->listClients(array(),"and",array($order) ) ;
if ($_GET['showact']) { if ($_GET['showact']) {
$accounting_info = $cpclient_handle->list_accounting(); $accounting_info = $cpclient_handle->list_accounting();
} }
else { else {
$accounting_info = array() ; $accounting_info = array() ;
...@@ -186,7 +186,7 @@ $mac_man = load_mac_manufacturer_table(); ...@@ -186,7 +186,7 @@ $mac_man = load_mac_manufacturer_table();
<td class="listr"><?=htmlspecialchars(date("m/d/Y H:i:s", $cpent->allow_time));?></td> <td class="listr"><?=htmlspecialchars(date("m/d/Y H:i:s", $cpent->allow_time));?></td>
<?php if ($_GET['showact']): <?php if ($_GET['showact']):
//$last_act = captiveportal_get_last_activity($cpent->ip, $cpent->mac); //$last_act = captiveportal_get_last_activity($cpent->ip, $cpent->mac);
if ( array_key_exists($cpent->ip,$accounting_info) ) $last_act = $accounting_info[$cpent->ip]['last_accessed'] ; if ( array_key_exists($cpent->ip,$accounting_info) ) $last_act = $accounting_info[$cpent->ip]['last_accessed'] ;
else $last_act=0; else $last_act=0;
?> ?>
<td class="listr"><?php if ($last_act != 0) echo htmlspecialchars(date("m/d/Y H:i:s", $last_act));?></td> <td class="listr"><?php if ($last_act != 0) echo htmlspecialchars(date("m/d/Y H:i:s", $last_act));?></td>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* /*
Copyright (C) 2014 Deciso B.V. Copyright (C) 2014 Deciso B.V.
Copyright (C) 2008 Seth Mos Copyright (C) 2008 Seth Mos
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment