set-general.php

File Type: php File Location: monofiles/ File name: set-general.php
<?php

// LOAD SETTINGS
function load_settings() {
    
    
    global 
$rot;
    
    
$set_file $rot.'monofiles/filesinfo/settings.xml';
    
    
    
    if (
is_file($set_file)) 
        
$set simplexml_load_file($set_file);
    else
        exit(
'Error loading settings.');
    
    
    
    if (
$set !== false
        
$page_settings = array( "title" => $set->general->title ,
                                
"description" => $set->general->description,
                                
"default_title" => $set->general->defaulttitle,
                                
"results-per-page" => $set->general->indexposts->results,
                                
"lastmodified" => $set->general->indexposts->lastmod,
                                
"dates" => $set->general->dateshow,
                                
"tags" => $set->general->tagshow,
                                
"ownername" => $set->general->ownername,
                                
"ownerid" => $set->general->ownerid,
                                
"makenote" => $set->general->makenote,
                                
"note" => $set->general->note
                                
);
    return 
$page_settings;
}



// LOAD THEME SETTINGS
function load_theme() {
    
    
    global 
$rot;
    
    
    
$set_file $rot.'monofiles/filesinfo/theme.xml';
    
    
    if (
is_file($set_file)) 
        
$set simplexml_load_file($set_file);
    else
        exit(
'Error loading settings.');
    
    
    
    if (
$set !== false
        
$theme_settings = array("titleshow" => $set->theme->titleshow ,
                                
"descriptionshow" => $set->theme->descriptionshow,
                                
"default_title" => $set->theme->defaulttitle,
                                
"default_description" => $set->theme->defaultdescription,
                                
"navigation" => $set->theme->navigation,
                                
"background" => $set->theme->background,
                                
"monoback" => $set->theme->monoback,
                                
"centered" => $set->theme->centered,
                                
"fixedmenu" => $set->theme->fixedmenu,
                                
"layouthead" => $set->theme->layouthead,
                                
"layoutbody" => $set->theme->layoutbody,
                                
"layoutfoot" => $set->theme->layoutfoot,
                                
"darktheme" => $set->theme->darktheme
                                
);
    return 
$theme_settings;
}
?>