| ############################################################################### |
| ############################################################################### |
| # Settings_Maintenance.pl # |
| # Settings_Maintenance.pm # |
| |
| # $Date: 01.05.16 $ # |
| ############################################################################### |
| ############################################################################### |
| # YaBB: Yet another Bulletin Board # |
| # YaBB: Yet another Bulletin Board # |
| # Open-Source Community Software for Webmasters # |
| # Open-Source Community Software for Webmasters # |
| # Version: YaBB 2.5.2 # |
| # Version: YaBB 2.6.12 # |
| # Packaged: October 21, 2012 # |
| # Packaged: January 5, 2016 # |
| # Distributed by: http://www.yabbforum.com # |
| # Distributed by: http://www.yabbforum.com # |
| # =========================================================================== # |
| # =========================================================================== # |
| # Copyright (c) 2000-2012 YaBB (www.yabbforum.com) - All Rights Reserved. # |
| # Copyright (c) 2000-2016 YaBB (www.yabbforum.com) - All Rights Reserved. # |
| # Software by: The YaBB Development Team # |
| # Software by: The YaBB Development Team # |
| # with assistance from the YaBB community. # |
| # with assistance from the YaBB community. # |
| ############################################################################### |
| ############################################################################### |
| |
| # use strict; |
| |
| our $VERSION = '2.6.12'; |
| |
| |
| $settings_maintenanceplver = 'YaBB 2.5.2 $Revision: 1.0 $'; |
| our $settings_maintenancepmver = 'YaBB 2.6.12 $Revision: 1651 $'; |
| if ($action eq 'detailedversion') { return 1; } |
| if ( $action eq 'detailedversion' ) { return 1; } |
| |
| |
| # List of settings |
| # List of settings |
| @settings = ( |
| @settings = ( |
| # Begin tab |
| |
| { |
| # Begin tab |
| name => $admin_txt{'67'}, # Tab name |
| { |
| id => 'settings', # Javascript ID |
| name => $admin_txt{'67'}, # Tab name |
| items => [ |
| id => 'settings', # Javascript ID |
| { |
| items => [ |
| description => qq~<label for="maintenance">$admin_txt{'348'}</label>~, |
| { |
| input_html => qq~<input type="checkbox" name="maintenance" id="maintenance" value="1" ${ischecked($maintenance)}/>~, |
| description => |
| name => 'maintenance', |
| qq~<label for="maintenance">$admin_txt{'348'}</label>~, |
| validate => 'boolean', |
| input_html => |
| }, |
| qq~<input type="checkbox" name="maintenance" id="maintenance" value="1" ${ischecked($maintenance)} />~, |
| { |
| name => 'maintenance', |
| description => qq~<label for="maintenancetext">$admin_txt{'348Text'}</label>~, |
| validate => 'boolean', |
| input_html => qq~<textarea cols="30" rows="5" name="maintenancetext" id="maintenancetext" style="width: 98%">$maintenancetext</textarea>~, |
| }, |
| name => 'maintenancetext', |
| { |
| validate => 'fulltext,null', |
| description => |
| }, |
| qq~<label for="maintenancetext">$admin_txt{'348Text'}</label>~, |
| ], |
| input_html => |
| }); |
| qq~<textarea cols="30" rows="5" name="maintenancetext" id="maintenancetext" style="width: 98%">$maintenancetext</textarea>~, |
| |
| name => 'maintenancetext', |
| |
| validate => 'fulltext,null', |
| |
| }, |
| |
| ], |
| |
| } |
| |
| ); |
| |
| |
| # Routine to save them |
| # Routine to save them |
| sub SaveSettings { |
| sub SaveSettings { |
| my %settings = @_; |
| my %settings = @_; |
| |
| |
| if ($settings{'maintenance'} != 1) { |
| if ( $settings{'maintenance'} != 1 ) { |
| unlink "$vardir/maintenance.lock" || &admin_fatal_error('cannot_open_dir', "$vardir/maintenance.lock"); |
| unlink "$vardir/maintenance.lock" |
| } |
| || fatal_error( 'cannot_open_dir', "$vardir/maintenance.lock" ); |
| |
| } |
| |
| |
| SaveSettingsTo('Settings.pl', %settings); |
| SaveSettingsTo( 'Settings.pm', %settings ); |
| |
| return; |
| } |
| } |
| |
| |
| 1; |
| 1; |
| |
| |