Project

General

Profile

« Previous | Next » 

Revision 49f61a1c

Added by Erik Fonnesbeck over 14 years ago

Rename to pass-through credits and improve descriptions.

View differences:

usr/local/www/services_captiveportal.php
150 150
		$input_errors[] = gettext("The idle timeout must be at least 1 minute.");
151 151
	}
152 152
	if ($_POST['freelogins_count'] && (!is_numeric($_POST['freelogins_count']))) {
153
		$input_errors[] = gettext("The free pass-throughs count must be a number or left blank.");
154
	}
155
	if ($_POST['freelogins_resettimeout'] && (!is_numeric($_POST['freelogins_resettimeout']) || ($_POST['freelogins_resettimeout'] <= 0))) {
156
		$input_errors[] = gettext("The waiting period until free pass-throughs restored cannot be 0 hours.");
153
		$input_errors[] = gettext("The pass-through credit count must be a number or left blank.");
154
	} else if ($_POST['freelogins_count'] && is_numeric($_POST['freelogins_count']) && ($_POST['freelogins_count'] >= 1)) {
155
		if (empty($_POST['freelogins_resettimeout']) || !is_numeric($_POST['freelogins_resettimeout']) || ($_POST['freelogins_resettimeout'] <= 0)) {
156
			$input_errors[] = gettext("The waiting period to restore pass-through credits must be above 0 hours.");
157
		}
157 158
	}
158 159
	if (($_POST['radiusip'] && !is_ipaddr($_POST['radiusip']))) {
159 160
		$input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['radiusip']);
......
366 367
	  <?=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>
367 368
	</tr>
368 369
	<tr>
369
	  <td width="22%" valign="top" class="vncell"><?=gettext("Free pass-throughs allowed per MAC address"); ?></td>
370
	  <td width="22%" valign="top" class="vncell"><?=gettext("Pass-through credits allowed per MAC address"); ?></td>
370 371
	  <td width="78%" class="vtable">
371 372
		<input name="freelogins_count" type="text" class="formfld unknown" id="freelogins_count" size="6" value="<?=htmlspecialchars($pconfig['freelogins_count']);?>">
372 373
		<?=gettext("per client MAC address (0 or blank = none)"); ?><br>
373 374
		<?=gettext("This setting allows passing through the captive portal without authentication a limited number of times per MAC address. Once used up, the client can only log in with valid credentials until the waiting period specified below has expired. Recommended to set a hard timeout and/or idle timeout when using this for it to be effective."); ?></td>
374 375
	</tr>
375 376
	<tr>
376
	  <td width="22%" valign="top" class="vncell"><?=gettext("Waiting period until free pass-throughs restored"); ?></td>
377
	  <td width="22%" valign="top" class="vncell"><?=gettext("Waiting period to restore pass-through credits"); ?></td>
377 378
	  <td width="78%" class="vtable">
378 379
		<input name="freelogins_resettimeout" type="text" class="formfld unknown" id="freelogins_resettimeout" size="6" value="<?=htmlspecialchars($pconfig['freelogins_resettimeout']);?>">
379 380
		<?=gettext("hours"); ?><br>
380
		<?=gettext("Clients will have their available free pass-throughs restored to the original count after this waiting period since using up their first pass-through. This must be greater than zero if free pass-throughs are enabled."); ?></td>
381
		<?=gettext("Clients will have their available pass-through credits restored to the original count after this amount of time since using the first one. This must be above 0 hours if pass-through credits are enabled."); ?></td>
381 382
	</tr>
382 383
	<tr>
383
	  <td width="22%" valign="top" class="vncell"><?=gettext("Reset free pass-throughs waiting period on attempted access"); ?></td>
384
	  <td width="22%" valign="top" class="vncell"><?=gettext("Reset waiting period on attempted access"); ?></td>
384 385
	  <td width="78%" class="vtable">
385 386
		<input name="freelogins_updatetimeouts" type="checkbox" class="formfld" id="freelogins_updatetimeouts" value="yes" <?php if($pconfig['freelogins_updatetimeouts']) echo "checked"; ?>>
386 387
		<strong><?=gettext("Enable waiting period reset on attempted access"); ?></strong><br>
387
		<?=gettext("If enabled, the waiting period is reset to the original duration if access is attempted when all free pass-throughs have already been exhausted."); ?></td>
388
		<?=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>
388 389
	</tr>
389 390
	<tr>
390 391
	  <td width="22%" valign="top" class="vncell"><?=gettext("Logout popup window"); ?></td>

Also available in: Unified diff