Example #1
0
function Form_maker_Themes()
{
    require_once "Theme_functions.php";
    require_once "Themes_function.html.php";
    if (!function_exists('print_html_nav')) {
        require_once "nav_function/nav_html_func.php";
    }
    global $wpdb;
    if (isset($_GET["task"])) {
        $task = esc_html($_GET["task"]);
    } else {
        $task = "";
    }
    if (isset($_GET["id"])) {
        $id = (int) $_GET["id"];
    } else {
        $id = 0;
    }
    switch ($task) {
        case 'theme':
            show_theme();
            break;
        case 'default':
            default_theme($id);
            show_theme();
            break;
        case 'add_theme':
            add_theme();
            break;
        case 'Save':
            if ($id) {
                apply_theme($id);
            } else {
                save_theme();
            }
            show_theme();
            break;
        case 'Apply':
            if ($id) {
                apply_theme($id);
            } else {
                save_theme();
                $id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker_themes");
            }
            edit_theme($id);
            break;
        case 'edit_theme':
            edit_theme($id);
            break;
        case 'remove_theme':
            remove_theme($id);
            show_theme();
            break;
        default:
            show_theme();
    }
}
function Spider_Video_Player_Themes()
{
    wp_enqueue_script('media-upload');
    wp_admin_css('thickbox');
    require_once "Theme_functions.php";
    // add functions for Spider_Video_Player
    require_once "Themes_function.html.php";
    // add functions for vive Spider_Video_Player
    if (isset($_GET["task"])) {
        $task = htmlspecialchars($_GET["task"]);
    } else {
        $task = "";
    }
    if (isset($_GET["id"])) {
        $id = htmlspecialchars($_GET["id"]);
    } else {
        $id = 0;
    }
    switch ($task) {
        case 'theme':
            show_theme();
            break;
        case 'default':
            $nonce_sp_vid = $_REQUEST['_wpnonce'];
            if (!wp_verify_nonce($nonce_sp_vid, 'nonce_sp_vid')) {
                die("Are you sure you want to do this?");
            }
            default_theme($id);
            show_theme();
            break;
        case 'add_theme':
            add_theme();
            break;
        case 'Save':
            if ($id) {
                check_admin_referer('nonce_sp_vid', 'nonce_sp_vid');
                apply_theme($id);
            } else {
                check_admin_referer('nonce_sp_vid', 'nonce_sp_vid');
                save_theme();
            }
            show_theme();
            break;
        case 'Apply':
            if ($id) {
                check_admin_referer('nonce_sp_vid', 'nonce_sp_vid');
                apply_theme($id);
            } else {
                check_admin_referer('nonce_sp_vid', 'nonce_sp_vid');
                save_theme();
            }
            edit_theme($id);
            break;
        case 'edit_theme':
            edit_theme($id);
            break;
        case 'remove_theme':
            $nonce_sp_vid = $_REQUEST['_wpnonce'];
            if (!wp_verify_nonce($nonce_sp_vid, 'nonce_sp_vid')) {
                die("Are you sure you want to do this?");
            }
            remove_theme($id);
            show_theme();
            break;
        default:
            show_theme();
    }
}
Example #3
0
function Spider_Video_Player_Themes()
{
    wp_enqueue_script('media-upload');
    wp_admin_css('thickbox');
    require_once "Theme_functions.php";
    // add functions for Spider_Video_Player
    require_once "Themes_function.html.php";
    // add functions for vive Spider_Video_Player
    if (isset($_GET["task"])) {
        $task = htmlspecialchars($_GET["task"]);
    } else {
        $task = "";
    }
    if (isset($_GET["id"])) {
        $id = htmlspecialchars($_GET["id"]);
    } else {
        $id = 0;
    }
    switch ($task) {
        case 'theme':
            show_theme();
            break;
        case 'default':
            default_theme($id);
            show_theme();
            break;
        case 'add_theme':
            add_theme();
            break;
        case 'Save':
            if ($id) {
                apply_theme($id);
            } else {
                save_theme();
            }
            show_theme();
            break;
        case 'Apply':
            if ($id) {
                apply_theme($id);
            } else {
                save_theme();
            }
            edit_theme($id);
            break;
        case 'edit_theme':
            edit_theme($id);
            break;
        case 'remove_theme':
            remove_theme($id);
            show_theme();
            break;
        default:
            show_theme();
    }
}