Пример #1
0
     break;
 case 'unpublish_calendar':
     change_calendar(0);
     break;
     ////////////THEME////////////////
 ////////////THEME////////////////
 case 'add_theme':
 case 'edit_theme':
     edit_theme();
     break;
 case 'theme':
     show_theme();
     break;
 case 'save_theme':
 case 'apply_theme':
     save_theme();
     break;
 case 'cancel_theme':
     cancel_theme();
     break;
 case 'remove_theme':
     removeTheme();
     break;
 case 'preview_theme':
     preview_theme();
     break;
 case 'license':
     license();
     break;
 case 'plugin':
     plugin();
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();
    }
}
Пример #3
0
<?php

if ($_GET['set_theme']) {
    save_theme($_GET['set_theme']);
}
$themes = scandir('../themes');
$themes = array_diff($themes, array('.', '..'));
?>
<h2>Set site theme</h2>
	<ul>
	<?php 
foreach ($themes as $theme) {
    ?>
			<li><a href="?page=themes&set_theme=<?php 
    print $theme;
    ?>
" class="<?php 
    print getinfo('active_theme') == $theme ? 'active' : '';
    ?>
" ><?php 
    print $theme;
    ?>
</a></li>
		
	<?php 
}
?>
	</ul>


<h2>Menues</h2>
Пример #4
0
    print json_encode($result);
});
$app->get("/api/package/?", function () use($app) {
    header("Content-type: text/json");
    if (!check_colors($app->request())) {
        die("null");
    }
    $api_type = $app->request()->params("api_type");
    $id = $app->request()->params("id");
    $c = $app->request()->params("c");
    $share = $app->request()->params("share");
    $result_generate = generate($api_type, $id, $c);
    if (!$result_generate) {
        die("null");
    }
    $theme_id = save_theme($api_type, $id, $c, $share);
    if (!$theme_id) {
        die("null");
    }
    if ($share) {
        $result = generate_for_gallery($theme_id);
        if (!$result) {
            die("null");
        }
    }
    print json_encode($result_generate);
});
$app->get("/api/package_by_id/:theme_id/?", function ($theme_id) use($app) {
    header("Content-type: text/json");
    $result_generate = generate_by_id($theme_id);
    if (!$result_generate) {
Пример #5
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();
    }
}
Пример #6
0
 * This file is part of pluck, the easy content management system
 * Copyright (c) pluck team
 * http://www.pluck-cms.org

 * Pluck is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * See docs/COPYING for the complete license.
*/
//Make sure the file isn't accessed directly.
defined('IN_PLUCK') or exit('Access denied!');
//Save the theme-data.
if (isset($_POST['save'], $cont1) && file_exists('data/themes/' . $cont1)) {
    save_theme($cont1);
    //Redirect user
    show_error($lang['theme']['saved'], 3);
    redirect('?action=options', 2);
    include_once 'data/inc/footer.php';
    exit;
}
?>
<div class="rightmenu">
	<div class="menudiv">
		<span>
			<img src="data/image/install.png" alt="<?php 
echo $lang['theme_install']['title'];
?>
" title="<?php 
echo $lang['theme_install']['title'];
Пример #7
0
            }
            //Check the passwords.
            if (empty($cont4)) {
                $error['pass'] = show_error($lang['changepass']['empty'], 1, true);
            } elseif ($cont4 != $cont5) {
                $error['pass'] = show_error($lang['changepass']['different'], 1, true);
            }
            if (!isset($error)) {
                //Save prefered language.
                save_language($cont3);
                //Save options.
                save_options($cont1, $cont2, 'yes');
                //Save password.
                save_password($cont4);
                //Save theme.
                save_theme('default');
                //Make some dirs for the trashcan, modules and pages.
                foreach (array('data/trash/pages', 'data/trash/images', 'data/trash/files', 'data/settings/modules', PAGE_DIR) as $dir) {
                    if (!is_dir($dir)) {
                        mkdir($dir);
                    }
                    chmod($dir, 0777);
                }
                unset($dir);
                redirect('?action=step3', 0);
                include_once 'data/inc/footer.php';
                exit;
            }
        }
        ?>
		<span class="kop2"><?php 
Пример #8
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();
    }
}