public static function initialize_plugin_data()
 {
     $globals = EZP_CS_JSON_Entity_Base::get_by_type(self::TYPE);
     if ($globals == null) {
         // RSR TODO: error checking here to ensure data doesnt get out of sync
         $display = EZP_CS_Display_Entity::create_with_defaults();
         $display->save();
         $content = EZP_CS_Content_Entity::create_with_defaults();
         $content->save();
         $set = EZP_CS_Set_Entity::create($display->id, $content->id);
         $set->save();
         $config = EZP_CS_Config_Entity::create_with_defaults();
         $config->save();
         $global = new EZP_CS_Global_Entity();
         $global->set("active_set_index", $set->id);
         $global->set("config_index", $config->id);
         $global->save();
     }
 }
    .ezp-cs-radiodiv { margin-bottom:10px;}

    #easy-pie-cs-builtin-background-slider { width: 610px}
    #easy-pie-cs-builtin-background-slider img { height:100px; width:100px; margin-right:10px; margin-top:7px;}
</style>

<!--<script type="text/javascript" src="<?php 
echo EZP_CS_Utility::$PLUGIN_URL . '/jquery-plugins/simple-modal/jquery.simplemodal.1.4.4.min.js?' . EZP_CS_Constants::PLUGIN_VERSION;
?>
"></script>-->

<?php 
$action_updated = null;
$global = EZP_CS_Global_Entity::get_instance();
$set_index = $global->active_set_index;
$set = EZP_CS_Set_Entity::get_by_id($set_index);
$display = EZP_CS_Display_Entity::get_by_id($set->display_index);
$config = EZP_CS_Config_Entity::get_by_id($global->config_index);
$error_string = "";
if (isset($_POST['action']) && $_POST['action'] == 'save') {
    check_admin_referer('easy-pie-coming-soon-save-display');
    EZP_CS_Utility::debug('past admin check');
    // Artificially set the bools since they aren't part of the postback
    $display->background_tiling_enabled = "false";
    $error_string = $display->set_post_variables($_POST);
    if ($error_string == "") {
        $action_updated = $display->save();
    }
}
?>
Beispiel #3
0
 /**
  * Display the maintenance page
  */
 public function display_coming_soon_page()
 {
     $global = EZP_CS_Global_Entity::get_instance();
     $set_index = $global->active_set_index;
     $set = EZP_CS_Set_Entity::get_by_id($set_index);
     $config = EZP_CS_Config_Entity::get_by_id($global->config_index);
     $in_preview = isset($_REQUEST['ezp_cs_preview']) && $_REQUEST['ezp_cs_preview'] == 'true';
     if (trim($config->unfiltered_urls) != "") {
         $is_unfiltered = EZP_CS_Utility::is_current_url_unfiltered($config);
     } else {
         $is_unfiltered = false;
     }
     if (!$is_unfiltered && (!is_user_logged_in() || $in_preview)) {
         if ($config->return_code == 503) {
             header('HTTP/1.1 503 Service Temporarily Unavailable');
             header('Status: 503 Service Temporarily Unavailable');
             header('Retry-After: 86400');
             // RSR TODO: Put in the retry time later
         } else {
             header('HTTP/1.1 200 OK');
         }
         $__dir__ = dirname(__FILE__);
         $page = $__dir__ . "/../mini-themes/base-responsive/index.php";
         $page_url = content_url('plugins/easy-pie-coming-soon/mini-themes/base-responsive');
         require $page;
         exit;
     }
 }