当前位置: 首页>>代码示例>>PHP>>正文


PHP WDWLibrary::esc_script方法代码示例

本文整理汇总了PHP中WDWLibrary::esc_script方法的典型用法代码示例。如果您正苦于以下问题:PHP WDWLibrary::esc_script方法的具体用法?PHP WDWLibrary::esc_script怎么用?PHP WDWLibrary::esc_script使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WDWLibrary的用法示例。


在下文中一共展示了WDWLibrary::esc_script方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

    public function display()
    {
        global $WD_BWG_UPLOAD_DIR;
        require_once WD_BWG_DIR . '/framework/WDWLibraryEmbed.php';
        $tag_id = isset($_GET['tag_id']) ? esc_html($_GET['tag_id']) : 0;
        $gallery_id = WDWLibrary::esc_script('get', 'gallery_id', 0, 'int');
        $bwg = isset($_GET['current_view']) ? esc_html($_GET['current_view']) : 0;
        $current_image_id = WDWLibrary::esc_script('get', 'image_id', 0, 'int');
        $theme_id = isset($_GET['theme_id']) ? esc_html($_GET['theme_id']) : 1;
        $thumb_width = isset($_GET['thumb_width']) ? esc_html($_GET['thumb_width']) : 120;
        $thumb_height = isset($_GET['thumb_height']) ? esc_html($_GET['thumb_height']) : 90;
        $open_with_fullscreen = WDWLibrary::esc_script('get', 'open_with_fullscreen', 0, 'int');
        $open_with_autoplay = WDWLibrary::esc_script('get', 'open_with_autoplay', 0, 'int');
        $image_width = WDWLibrary::esc_script('get', 'image_width', 800, 'int');
        $image_height = WDWLibrary::esc_script('get', 'image_height', 500, 'int');
        $image_effect = WDWLibrary::esc_script('get', 'image_effect', 'fade');
        $sort_by = isset($_GET['wd_sor']) ? esc_html($_GET['wd_sor']) : 'order';
        $order_by = isset($_GET['wd_ord']) ? esc_html($_GET['wd_ord']) : 'asc';
        $enable_image_filmstrip = FALSE;
        $enable_image_fullscreen = isset($_GET['enable_image_fullscreen']) ? esc_html($_GET['enable_image_fullscreen']) : 0;
        $popup_enable_info = isset($_GET['popup_enable_info']) ? esc_html($_GET['popup_enable_info']) : 1;
        $popup_info_always_show = isset($_GET['popup_info_always_show']) ? esc_html($_GET['popup_info_always_show']) : 0;
        $popup_info_full_width = isset($_GET['popup_info_full_width']) ? esc_html($_GET['popup_info_full_width']) : 0;
        $popup_enable_rate = WDWLibrary::esc_script('get', 'popup_enable_rate', 0, 'int');
        $popup_hit_counter = isset($_GET['popup_hit_counter']) ? esc_html($_GET['popup_hit_counter']) : 0;
        $slideshow_effect_duration = isset($_GET['slideshow_effect_duration']) ? (int) $_GET['slideshow_effect_duration'] : 1;
        $slideshow_interval = isset($_GET['slideshow_interval']) ? (int) $_GET['slideshow_interval'] : 5;
        $enable_image_ctrl_btn = isset($_GET['enable_image_ctrl_btn']) ? esc_html($_GET['enable_image_ctrl_btn']) : 0;
        $enable_comment_social = FALSE;
        $enable_image_facebook = FALSE;
        $enable_image_twitter = FALSE;
        $enable_image_google = FALSE;
        $enable_image_pinterest = FALSE;
        $enable_image_tumblr = FALSE;
        $watermark_type = isset($_GET['watermark_type']) ? esc_html($_GET['watermark_type']) : 'none';
        $watermark_text = isset($_GET['watermark_text']) ? esc_html($_GET['watermark_text']) : '';
        $watermark_font_size = isset($_GET['watermark_font_size']) ? esc_html($_GET['watermark_font_size']) : 12;
        $watermark_font = isset($_GET['watermark_font']) ? esc_html($_GET['watermark_font']) : 'Arial';
        $watermark_color = isset($_GET['watermark_color']) ? esc_html($_GET['watermark_color']) : 'FFFFFF';
        $watermark_opacity = isset($_GET['watermark_opacity']) ? esc_html($_GET['watermark_opacity']) : 30;
        $watermark_position = explode('-', isset($_GET['watermark_position']) ? esc_html($_GET['watermark_position']) : 'bottom-right');
        $watermark_link = isset($_GET['watermark_link']) ? esc_html($_GET['watermark_link']) : '';
        $watermark_url = isset($_GET['watermark_url']) ? esc_html($_GET['watermark_url']) : '';
        $watermark_width = isset($_GET['watermark_width']) ? esc_html($_GET['watermark_width']) : 90;
        $watermark_height = isset($_GET['watermark_height']) ? esc_html($_GET['watermark_height']) : 90;
        $theme_row = $this->model->get_theme_row_data($theme_id);
        $option_row = $this->model->get_option_row_data();
        $image_right_click = $option_row->image_right_click;
        $image_filmstrip_height = 0;
        $image_filmstrip_width = 0;
        if ($tag_id != 0) {
            $image_rows = $this->model->get_image_rows_data_tag($tag_id, $sort_by, $order_by);
        } else {
            $image_rows = $this->model->get_image_rows_data($gallery_id, $bwg, $sort_by, $order_by);
        }
        $image_id = isset($_POST['image_id']) ? (int) $_POST['image_id'] : $current_image_id;
        $filmstrip_thumb_margin = $theme_row->lightbox_filmstrip_thumb_margin;
        $margins_split = explode(" ", $filmstrip_thumb_margin);
        $filmstrip_thumb_margin_right = 0;
        $filmstrip_thumb_margin_left = 0;
        if (isset($margins_split[1])) {
            $filmstrip_thumb_margin_right = (int) $margins_split[1];
            if (isset($margins_split[3])) {
                $filmstrip_thumb_margin_left = (int) $margins_split[3];
            } else {
                $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
            }
        } elseif (isset($margins_split[0])) {
            $filmstrip_thumb_margin_right = (int) $margins_split[0];
            $filmstrip_thumb_margin_left = $filmstrip_thumb_margin_right;
        }
        $filmstrip_thumb_margin_hor = $filmstrip_thumb_margin_right + $filmstrip_thumb_margin_left;
        $rgb_bwg_image_info_bg_color = WDWLibrary::spider_hex2rgb($theme_row->lightbox_info_bg_color);
        $rgb_bwg_image_hit_bg_color = WDWLibrary::spider_hex2rgb($theme_row->lightbox_hit_bg_color);
        $rgb_lightbox_ctrl_cont_bg_color = WDWLibrary::spider_hex2rgb($theme_row->lightbox_ctrl_cont_bg_color);
        $lightbox_bg_transparent = isset($theme_row->lightbox_bg_transparent) ? $theme_row->lightbox_bg_transparent : 100;
        $lightbox_bg_color = WDWLibrary::spider_hex2rgb($theme_row->lightbox_bg_color);
        $current_filename = '';
        ?>
    <style>
      .spider_popup_wrap * {
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
      }
      .spider_popup_wrap {
        background-color: rgba(<?php 
        echo $lightbox_bg_color['red'];
        ?>
, <?php 
        echo $lightbox_bg_color['green'];
        ?>
, <?php 
        echo $lightbox_bg_color['blue'];
        ?>
, <?php 
        echo number_format($lightbox_bg_transparent / 100, 2, ".", "");
        ?>
);
        display: inline-block;
//.........这里部分代码省略.........
开发者ID:benshez,项目名称:DreamWeddingCeremonies,代码行数:101,代码来源:BWGViewGalleryBox.php


注:本文中的WDWLibrary::esc_script方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。