Beispiel #1
0
    $fp = fopen($settingsXML, "w");
    if (!$fp) {
        exit("0");
    }
    //Failure
    $arr['properties_skin'] = str_replace(array('=', '?', '"', '$'), '', $arr['properties_skin']);
    $newProperties = preg_replace("|<properties>.*?</properties>|si", $arr['properties_skin'], $mainXML);
    if (fwrite($fp, $newProperties)) {
        echo "1";
    } else {
        echo "0";
    }
    fclose($fp);
}
if (isset($_GET['show_options'])) {
    flag_skin_options();
}
function flag_skin_options()
{
    $flag_options = get_option('flag_options');
    $act_skin = isset($_GET['skin']) ? urlencode($_GET['skin']) : $flag_options['flashSkin'];
    $act_skin = sanitize_flagname($act_skin);
    $settings = $flag_options['skinsDirURL'] . $act_skin . '/settings';
    $settingsXML = $flag_options['skinsDirABS'] . $act_skin . '/settings/settings.xml';
    $fp = fopen($settingsXML, "r");
    if (!$fp) {
        echo '<p style="color:#ff0000;"><b>Error! The configuration file not be found. You need to reinstall this skin.</b></p>';
    } else {
        $cPanel = FLAG_URLPATH . "lib/cpanel.swf";
        $constructor = FLAG_URLPATH . "lib/";
        $swfObject = FLAG_URLPATH . "admin/js/swfobject.js?ver=2.2";
Beispiel #2
0
/**
 * Get skin options
 *
 */
function flag_skin_options_tab()
{
    //Get the active skin
    $flag_options = get_option('flag_options');
    $active_skin_settings = $flag_options['skinsDirABS'] . $flag_options['flashSkin'] . '/settings/settings.xml';
    if (!file_exists($active_skin_settings)) {
        $active_skin = $flag_options['skinsDirABS'] . $flag_options['flashSkin'] . '/' . $flag_options['flashSkin'] . '.php';
        include_once $active_skin;
    } else {
        include_once dirname(__FILE__) . '/skin_options.php';
    }
    if (function_exists('flag_skin_options')) {
        flag_skin_options();
    } else {
        include_once FLAG_ABSPATH . 'admin/db_skin_color_scheme.php';
        flag_skin_options();
    }
}