2014-07-24 10:51:37 +02:00
< ? php
/*
FusionPBX
Version : MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 ( the " License " ); you may not use this file except in compliance with
the License . You may obtain a copy of the License at
http :// www . mozilla . org / MPL /
Software distributed under the License is distributed on an " AS IS " basis ,
WITHOUT WARRANTY OF ANY KIND , either express or implied . See the License
for the specific language governing rights and limitations under the
License .
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane < markjcrane @ fusionpbx . com >
Portions created by the Initial Developer are Copyright ( C ) 2008 - 2012
the Initial Developer . All Rights Reserved .
Contributor ( s ) :
Mark J Crane < markjcrane @ fusionpbx . com >
*/
if ( $domains_processed == 1 ) {
//add theme settings default settings
$sql = " select count(*) as num_rows from v_default_settings " ;
$sql .= " where default_setting_category = 'theme' " ;
$prep_statement = $db -> prepare ( $sql );
if ( $prep_statement ) {
$prep_statement -> execute ();
$row = $prep_statement -> fetch ( PDO :: FETCH_ASSOC );
unset ( $prep_statement );
if ( $row [ 'num_rows' ] == 0 ) {
$x = 0 ;
$array [ $x ][ 'default_setting_category' ] = 'theme' ;
2014-07-25 00:17:09 +02:00
$array [ $x ][ 'default_setting_subcategory' ] = 'background_image' ;
$array [ $x ][ 'default_setting_name' ] = 'text' ;
$array [ $x ][ 'default_setting_value' ] = '' ;
2014-07-24 10:51:37 +02:00
$array [ $x ][ 'default_setting_enabled' ] = 'false' ;
2014-07-25 00:17:09 +02:00
$array [ $x ][ 'default_setting_description' ] = 'Specify a folder path or file path/url to enable background image(s) within a selected compatible template.' ;
$x ++ ;
$array [ $x ][ 'default_setting_category' ] = 'theme' ;
2014-07-25 02:57:43 +02:00
$array [ $x ][ 'default_setting_subcategory' ] = 'background_color' ;
$array [ $x ][ 'default_setting_name' ] = 'array' ;
2014-07-25 00:17:09 +02:00
$array [ $x ][ 'default_setting_value' ] = '#ffffff' ;
2014-07-27 04:53:10 +02:00
$array [ $x ][ 'default_setting_enabled' ] = 'true' ;
2014-07-25 02:57:43 +02:00
$array [ $x ][ 'default_setting_order' ] = '0' ;
2014-07-27 04:53:10 +02:00
$array [ $x ][ 'default_setting_description' ] = 'Set a background (HTML compatible) color.' ;
2014-07-25 00:17:09 +02:00
$x ++ ;
$array [ $x ][ 'default_setting_category' ] = 'theme' ;
2014-07-25 02:57:43 +02:00
$array [ $x ][ 'default_setting_subcategory' ] = 'background_color' ;
$array [ $x ][ 'default_setting_name' ] = 'array' ;
2014-07-25 00:17:09 +02:00
$array [ $x ][ 'default_setting_value' ] = '#f0f2f6' ;
2014-07-25 02:57:43 +02:00
$array [ $x ][ 'default_setting_order' ] = '1' ;
2014-07-27 04:53:10 +02:00
$array [ $x ][ 'default_setting_enabled' ] = 'true' ;
$array [ $x ][ 'default_setting_description' ] = 'Set a secondary background (HTML compatible) color, for a gradient effect.' ;
$x ++ ;
$array [ $x ][ 'default_setting_category' ] = 'theme' ;
$array [ $x ][ 'default_setting_subcategory' ] = 'login_opacity' ;
$array [ $x ][ 'default_setting_name' ] = 'text' ;
$array [ $x ][ 'default_setting_value' ] = '0.35' ;
$array [ $x ][ 'default_setting_enabled' ] = 'true' ;
$array [ $x ][ 'default_setting_description' ] = 'Set the opacity of the login box (decimal).' ;
$x ++ ;
$array [ $x ][ 'default_setting_category' ] = 'theme' ;
2014-08-17 06:33:57 +02:00
$array [ $x ][ 'default_setting_subcategory' ] = 'login_background_color' ;
2014-07-27 04:53:10 +02:00
$array [ $x ][ 'default_setting_name' ] = 'text' ;
$array [ $x ][ 'default_setting_value' ] = '#ffffff' ;
$array [ $x ][ 'default_setting_enabled' ] = 'true' ;
$array [ $x ][ 'default_setting_description' ] = 'Set a background color (HTML compatible) for the login box.' ;
2014-07-24 10:51:37 +02:00
$x ++ ;
2014-08-16 22:29:45 +02:00
$array [ $x ][ 'default_setting_category' ] = 'theme' ;
2014-08-17 06:33:57 +02:00
$array [ $x ][ 'default_setting_subcategory' ] = 'footer_background_color' ;
2014-08-16 22:29:45 +02:00
$array [ $x ][ 'default_setting_name' ] = 'text' ;
2014-08-17 06:33:57 +02:00
$array [ $x ][ 'default_setting_value' ] = '#000000' ;
2014-08-16 22:29:45 +02:00
$array [ $x ][ 'default_setting_enabled' ] = 'true' ;
2014-08-17 06:33:57 +02:00
$array [ $x ][ 'default_setting_description' ] = 'Set a background color (HTML compatible) for the footer bar.' ;
$x ++ ;
$array [ $x ][ 'default_setting_category' ] = 'theme' ;
$array [ $x ][ 'default_setting_subcategory' ] = 'footer_color' ;
$array [ $x ][ 'default_setting_name' ] = 'text' ;
$array [ $x ][ 'default_setting_value' ] = '#ffffff' ;
$array [ $x ][ 'default_setting_enabled' ] = 'true' ;
$array [ $x ][ 'default_setting_description' ] = 'Set a foreground color (HTML compatible) for the footer bar.' ;
$x ++ ;
$array [ $x ][ 'default_setting_category' ] = 'theme' ;
$array [ $x ][ 'default_setting_subcategory' ] = 'footer_opacity' ;
$array [ $x ][ 'default_setting_name' ] = 'text' ;
$array [ $x ][ 'default_setting_value' ] = '0.2' ;
$array [ $x ][ 'default_setting_enabled' ] = 'true' ;
$array [ $x ][ 'default_setting_description' ] = 'Set the opacity of the footer bar (decimal).' ;
2014-08-16 22:29:45 +02:00
$x ++ ;
2014-07-24 10:51:37 +02:00
$orm = new orm ;
$orm -> name ( 'default_settings' );
2014-08-17 06:33:57 +02:00
foreach ( $array as $index => $null ) {
$orm -> save ( $array [ $index ]);
}
2014-07-24 10:51:37 +02:00
$message = $orm -> message ;
//print_r($message);
}
unset ( $row );
}
}
?>