339 setConfig('lockout_duration', $_POST['lockout_duration']); |
339 setConfig('lockout_duration', $_POST['lockout_duration']); |
340 |
340 |
341 if ( in_array($_POST['lockout_policy'], array('disable', 'captcha', 'lockout')) ) |
341 if ( in_array($_POST['lockout_policy'], array('disable', 'captcha', 'lockout')) ) |
342 setConfig('lockout_policy', $_POST['lockout_policy']); |
342 setConfig('lockout_policy', $_POST['lockout_policy']); |
343 |
343 |
|
344 // Session time |
|
345 foreach ( array('session_short_time', 'session_remember_time') as $k ) |
|
346 { |
|
347 if ( strval(intval($_POST[$k])) === $_POST[$k] && intval($_POST[$k]) >= 0 ) |
|
348 { |
|
349 setConfig($k, $_POST[$k]); |
|
350 } |
|
351 } |
|
352 |
344 // Avatar settings |
353 // Avatar settings |
345 setConfig('avatar_enable', ( isset($_POST['avatar_enable']) ? '1' : '0' )); |
354 setConfig('avatar_enable', ( isset($_POST['avatar_enable']) ? '1' : '0' )); |
346 // for these next three values, set the config value if it's a valid integer; this is |
355 // for these next three values, set the config value if it's a valid integer; this is |
347 // done by using strval(intval($foo)) === $foo, which flattens $foo to an integer and |
356 // done by using strval(intval($foo)) === $foo, which flattens $foo to an integer and |
348 // then converts it back to a string. This effectively verifies that var $foo is both |
357 // then converts it back to a string. This effectively verifies that var $foo is both |
754 <small><?php echo $lang->get('acpgc_field_email_smtp_hostname_hint'); ?></small> |
763 <small><?php echo $lang->get('acpgc_field_email_smtp_hostname_hint'); ?></small> |
755 </td> |
764 </td> |
756 <td class="row1"> |
765 <td class="row1"> |
757 <?php echo $lang->get('acpgc_field_email_smtp_username'); ?> <input value="<?php echo getConfig('smtp_user'); ?>" name="smtp_user" type="text" size="30" /><br /> |
766 <?php echo $lang->get('acpgc_field_email_smtp_username'); ?> <input value="<?php echo getConfig('smtp_user'); ?>" name="smtp_user" type="text" size="30" /><br /> |
758 <?php echo $lang->get('acpgc_field_email_smtp_password'); ?> <input value="<?php if(getConfig('smtp_password') != false) echo 'XXXXXXXXXXXX'; ?>" name="smtp_pass" type="password" size="30" /> |
767 <?php echo $lang->get('acpgc_field_email_smtp_password'); ?> <input value="<?php if(getConfig('smtp_password') != false) echo 'XXXXXXXXXXXX'; ?>" name="smtp_pass" type="password" size="30" /> |
|
768 </td> |
|
769 </tr> |
|
770 |
|
771 <!-- Session length --> |
|
772 |
|
773 <tr> |
|
774 <th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_sessions'); ?></th> |
|
775 </tr> |
|
776 |
|
777 <tr> |
|
778 <td class="row3" colspan="2"><?php echo $lang->get('acpgc_hint_sessions_noelev'); ?></td> |
|
779 </tr> |
|
780 |
|
781 <tr> |
|
782 <td class="row1"> |
|
783 <?php echo $lang->get('acpgc_field_short_time'); ?><br /> |
|
784 <small><?php echo $lang->get('acpgc_field_short_time_hint'); ?></small> |
|
785 </td> |
|
786 <td class="row1"> |
|
787 <input type="text" name="session_short_time" value="<?php echo getConfig('session_short_time', '720'); ?>" size="4" /> |
|
788 </td> |
|
789 </tr> |
|
790 |
|
791 <tr> |
|
792 <td class="row2"> |
|
793 <?php echo $lang->get('acpgc_field_long_time'); ?><br /> |
|
794 <small><?php echo $lang->get('acpgc_field_long_time_hint'); ?></small> |
|
795 </td> |
|
796 <td class="row2"> |
|
797 <input type="text" name="session_remember_time" value="<?php echo getConfig('session_remember_time', '30'); ?>" size="4" /> |
759 </td> |
798 </td> |
760 </tr> |
799 </tr> |
761 |
800 |
762 <!-- Avatar support --> |
801 <!-- Avatar support --> |
763 |
802 |