コード例 #1
0
 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();
     }
 }
コード例 #2
0
 June 2007. Copyright (C) 2007 Free Software Foundation, Inc., 51 Franklin
 St, Fifth Floor, Boston, MA 02110, USA

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
$global = EZP_CS_Global_Entity::get_instance();
$config = EZP_CS_Config_Entity::get_by_id($global->config_index);
?>

<script type="text/javascript" src='<?php 
echo EZP_CS_Utility::$PLUGIN_URL . "/js/page-subscribers.js?" . EZP_CS_Constants::PLUGIN_VERSION;
?>
'></script>

<style lang="text/css">
    .compound-setting { line-height:20px;}
    .narrow-input { width:66px;}
    .long-input { width: 345px;}

    #easy-pie-cs-postbox-inside { /* width: 550px;*/ }
    #easy-pie-cs-postbox-inside h3 { font-size: 16px }
コード例 #3
0
ファイル: class-ezp-cs.php プロジェクト: bqevin/wp-shopeasy
 /**
  * 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;
     }
 }