Plugin Directory

Changeset 1316529


Ignore:
Timestamp:
12/26/2015 02:44:05 PM (10 years ago)
Author:
digontoahsan
Message:

Changes for ADVPS version 2.5.0

Location:
advanced-post-slider/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • advanced-post-slider/trunk/advanced-post-slider.php

    r1305899 r1316529  
    44    Plugin URI: www.wpcue.com
    55    Description: A multipurpose responsive slideshow plugin powered with three built-in design template, lots of easy customizable options and many more to explore.
    6     Version: 2.4.0
     6    Version: 2.5.0
    77    Author: digontoahsan
    88    Author URI: www.wpcue.com
     
    7676            update_option('advps-update-notification','show');
    7777        }
    78         update_option('advps-curr-version','2.4.0');
     78        update_option('advps-curr-version','2.5.0');
    7979    }
    8080    add_action( 'plugins_loaded', 'advps_update_db' );
     
    108108   
    109109    function advpsUpdateLabel(){
    110         $nonce = $_POST['checkReq'];
    111         $fname = $_POST['f_name'];
    112         $fvalue = trim($_POST['f_value']);
     110        $nonce = sanitize_text_field(  $_POST['checkReq'] );
     111        $fname = sanitize_text_field( $_POST['f_name'] );
     112        $fvalue = trim( sanitize_text_field( $_POST['f_value']) );
    113113        if(! defined( 'ABSPATH' ) || !wp_verify_nonce( $nonce, 'advpsauthrequst' )){
    114114            echo "Unauthorized request.";
     
    124124
    125125    function chkCaetegory(){
    126         $nonce = $_POST['checkReq'];
    127         $posttype = $_POST['post_type'];
     126        $nonce = sanitize_text_field( $_POST['checkReq'] );
     127        $posttype = sanitize_text_field( $_POST['post_type'] );
    128128        if(! defined( 'ABSPATH' ) || !wp_verify_nonce( $nonce, 'advpsauthrequst' )){
    129129            echo "Unauthorized request.";
     
    155155    }
    156156    function advpsUpdateOpt(){
    157         $nonce = $_POST['checkReq'];
     157        $nonce = sanitize_text_field( $_POST['checkReq'] );
    158158        $optdata = $_POST['optdata'];
    159159       
     
    200200    }
    201201    function advpsListPost(){
    202         $nonce = $_POST['checkReq'];
    203         $ptype = $_POST['ptype'];
    204         $pmax = $_POST['pmax'];
    205         $porderBy = $_POST['porderBy'];
    206         $porder = $_POST['porder'];
    207         $plist = explode(',',$_POST['plist']);
     202        $nonce = sanitize_text_field( $_POST['checkReq'] );
     203        $ptype = sanitize_text_field( $_POST['ptype'] );
     204        $pmax = sanitize_text_field( $_POST['pmax'] );
     205        $porderBy = sanitize_text_field( $_POST['porderBy'] );
     206        $porder = sanitize_text_field( $_POST['porder'] );
     207        $plist = explode(',', sanitize_text_field( $_POST['plist'] ) ) ;
    208208       
    209209        if(! defined( 'ABSPATH' ) || !wp_verify_nonce( $nonce, 'advpsauthrequst' )){
     
    230230    }
    231231    function advpsUpdateSmethod(){
    232         $nonce = $_POST['checkReq'];
    233         $selnam = $_POST['selnam'];
    234         $selval = $_POST['selval'];
     232        $nonce = sanitize_text_field( $_POST['checkReq'] );
     233        $selnam = sanitize_text_field( $_POST['selnam'] );
     234        $selval = sanitize_text_field( $_POST['selval'] );
    235235       
    236236        if(! defined( 'ABSPATH' ) || !wp_verify_nonce( $nonce, 'advpsauthrequst' )){
  • advanced-post-slider/trunk/advps-admin.php

    r1305899 r1316529  
    88   
    99    if(isset($_GET['tab'])){
    10         $currTab = $_GET['tab'];
     10        $currTab = sanitize_text_field( $_GET['tab'] );
    1111    }
    1212    else
     
    1818    }
    1919    if(isset($_POST['optset-id'])){
     20        $optset_id = intval( $_POST['optset-id'] );
     21       
    2022        if ( !isset($_POST['advps_wpnonce']) || !wp_verify_nonce($_POST['advps_wpnonce'],'advps-checkauthnonce') )
    2123        {
     
    2527       
    2628        if(isset($_POST['del-optset'])){
    27         $q_del = $wpdb->prepare("delete from ".$wpdb->prefix."advps_optionset where id = %d",$_POST['optset-id']);
    28            
     29            $q_del = $wpdb->prepare("delete from ".$wpdb->prefix."advps_optionset where id = %d",$optset_id);           
    2930            if($wpdb->query($q_del)){
    30                 delete_option('optset'.$_POST['optset-id']);
     31                delete_option('optset'.$optset_id);
    3132                $stsMgs =  "Deleted successfully.";
    3233            }
    3334        }
    3435        elseif(isset($_POST['dup-optset'])){
    35            
    36             $q_sel = $wpdb->prepare( "select * from ".$wpdb->prefix."advps_optionset where id = %d",$_POST['optset-id'] );
     36            $nextopt_id = intval( $_POST['nextoptid'] );
     37           
     38            $q_sel = $wpdb->prepare( "select * from ".$wpdb->prefix."advps_optionset where id = %d",$optset_id );
    3739            $res = $wpdb->get_results($q_sel);
    3840           
     
    4042           
    4143            if($wpdb->query($q_add)){
    42                 update_option('advpssmethod'.$_POST['nextoptid'],get_option('advpssmethod'.$_POST['optset-id']));
     44                update_option('advpssmethod'.$nextopt_id,get_option('advpssmethod'.$optset_id ));
    4345                $stsMgs =  "Duplicated successfully.";
    4446            }
     
    5557            }
    5658           
    57             $all_field = $_POST;
     59            //$all_field = $_POST;
     60            $nextopt_id = intval( $_POST['nextoptid'] );
    5861            $tem_list = array('one','two','three');
    5962            $template = sanitize_text_field($_POST['template']);
     
    8386            }
    8487            if($wpdb->query($q_add)){
    85                 update_option('advpssmethod'.$_POST['nextoptid'],'plist');
     88                update_option('advpssmethod'.$nextopt_id,'plist');
    8689                $stsMgs =  "Added successfully.";
    8790            }
     
    100103           
    101104            $thumb_name = sanitize_text_field($_POST['advps_thumb_name']);
    102             $width = sanitize_text_field($_POST['advps_thumb_width']);
    103             $height = sanitize_text_field($_POST['advps_thumb_height']);
     105            $width = intval($_POST['advps_thumb_width']);
     106            $height = intval($_POST['advps_thumb_height']);
    104107            $crop = sanitize_text_field($_POST['advps_crop']);
    105108   
     
    118121        }
    119122       
    120         $thumb_id = sanitize_text_field($_POST['thumb_id']);
     123        $thumb_id = intval($_POST['thumb_id']);
    121124        $thumb_name = sanitize_text_field($_POST['advps_thumb_name']);
    122         $width = sanitize_text_field($_POST['advps_thumb_width']);
    123         $height = sanitize_text_field($_POST['advps_thumb_height']);
     125        $width = intval($_POST['advps_thumb_width']);
     126        $height = intval($_POST['advps_thumb_height']);
    124127        $crop = sanitize_text_field($_POST['advps_crop']);
    125128           
     
    152155            }
    153156            if($(this).hasClass('closed')){
    154                 $(this).css('background-image','url(<?php echo advps_url?>images/up.png)');
     157                $(this).css('background-image','url(<?php echo esc_url( advps_url );?>images/up.png)');
    155158                $(this).removeClass('closed');
    156159            }
    157160            else
    158161            {
    159                 $(this).css('background-image','url(<?php echo advps_url?>images/down.png)');
     162                $(this).css('background-image','url(<?php echo esc_url( advps_url );?>images/down.png)');
    160163                $(this).addClass('closed');
    161164            }
     
    190193.advps-legend {
    191194    background-color:#6E6E6E;
    192  background-image:url(<?php echo advps_url?>images/up.png);
     195 background-image:url(<?php echo esc_url( advps_url );?>images/up.png);
    193196    background-repeat:no-repeat;
    194197    background-position: 96px 6px;
     
    225228}
    226229.postbox .down {
    227  background-image:url(<?php echo advps_url?>images/downb.png);
     230 background-image:url(<?php echo esc_url( advps_url );?>images/downb.png);
    228231    background-repeat:no-repeat;
    229232    background-position: 4px 10px;
    230233}
    231234.postbox .up {
    232  background-image:url(<?php echo advps_url?>images/upb.png);
     235 background-image:url(<?php echo esc_url( advps_url );?>images/upb.png);
    233236    background-repeat:no-repeat;
    234237    background-position: 4px 10px;
     
    254257  <?php if($stsMgs != ''){?>
    255258  <div id="message" class="updated below-h2">
    256     <p><?php echo $stsMgs;?></p>
     259    <p><?php echo esc_html( $stsMgs );?></p>
    257260  </div>
    258261  <?php }?>
     
    266269        }elseif($currTab == 'thumb'){?>
    267270  <div class="advps-col-right">
    268     <h2>Advanced post slider <?php echo get_option('advps-curr-version');?></h2>
     271    <h2>Advanced post slider <?php echo esc_html( get_option('advps-curr-version') );?></h2>
    269272    <ul>
    270273      <li><a href="http://www.wpcue.com/wordpress-plugins/advanced-post-slider/" target="_blank">Plugin Homepage</a></li>
     
    291294            <form method="post">
    292295              <th scope="row">Name&nbsp;
    293                 <input type="text" name="advps_thumb_name" value="<?php echo $thmb->thumb_name;?>" style="width:140px" /></th>
     296                <input type="text" name="advps_thumb_name" value="<?php echo esc_attr( $thmb->thumb_name );?>" style="width:140px" /></th>
    294297              <td>Width&nbsp;
    295                 <input type="text" name="advps_thumb_width" value="<?php echo $thmb->width;?>" style="width:80px;" onkeypress="return onlyNum(event);" />
     298                <input type="text" name="advps_thumb_width" value="<?php echo esc_attr( $thmb->width );?>" style="width:80px;" onkeypress="return onlyNum(event);" />
    296299                px&nbsp;&nbsp;&nbsp;Height&nbsp;
    297                 <input type="text" name="advps_thumb_height" value="<?php echo $thmb->height;?>" style="width:80px;" onkeypress="return onlyNum(event);" />
     300                <input type="text" name="advps_thumb_height" value="<?php echo esc_attr( $thmb->height );?>" style="width:80px;" onkeypress="return onlyNum(event);" />
    298301                px <span style="margin-left:20px;">Crop&nbsp;
    299302                <select name="advps_crop">
     
    304307                <input type="submit" value="Save" class="button-secondary" name="update_thumb" />
    305308                </span></td>
    306               <input type="hidden" value="<?php echo $thmb->id;?>" name="thumb_id" />
     309              <input type="hidden" value="<?php echo esc_attr( $thmb->id );?>" name="thumb_id" />
    307310              <?php wp_nonce_field('advps-checkauthnonce','advps_wpnonce'); ?>
    308311            </form>
     
    348351  <?php }?>
    349352</div>
    350 <meta name="wpversion" content="<?php echo $wp_version;?>" />
     353<meta name="wpversion" content="<?php echo esc_attr( $wp_version );?>" />
  • advanced-post-slider/trunk/js/advps.script.js

    r938708 r1316529  
    198198    }
    199199}
     200function duplicateOptSet(id){
     201    jQuery("#frmOptDel"+id).removeAttr("onsubmit");
     202    jQuery("#frmOptDel"+id).submit();
     203}
    200204function pagerAttr(v){
    201205    alert(v);
  • advanced-post-slider/trunk/readme.txt

    r1305899 r1316529  
    22Contributors: digontoahsan
    33Donate link:
    4 Tags: post slider, content slider, slider, slideshow, wordpress content slider, content, wordpress slideshow, images, logo scroller, testimonial scroller, banner rotator, recent post slider, bxslider, image slider, sidebar slideshow, posts, post, image, image slideshow, responsive slideshow, responsive slider, carousel slider, ticker, responsive carousel slider, responsive carousel, showcase, news slider, thumbnail, thumbnail slider, featured thumbnail
     4Tags: post slider, wordpress content slider, wordpress slideshow, logo scroller, testimonial scroller, banner rotator, recent post slider, image slider, image slideshow, responsive slider, responsive carousel slider, news slider
    55Requires at least: 3.0.1
    66Tested up to: 4.4
    7 Stable tag: 2.4.0
     7Stable tag: 2.5.0
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    149149* Security fix.
    150150
     151= 2.5.0 =
     152* Important security fix and data cleaning. Upgrade is highly recommended.
     153* Duplicating option set not working issue resolved.
     154
    151155== Upgrade Notice ==
  • advanced-post-slider/trunk/templates/template-one.php

    r1115402 r1316529  
    44
    55<div class="advps-col-right">
    6   <h2>Advanced post slider <?php echo get_option('advps-curr-version');?></h2>
     6  <h2>Advanced post slider <?php echo esc_html( get_option('advps-curr-version') );?></h2>
    77  <ul>
    88    <li><a href="http://www.wpcue.com/wordpress-plugins/advanced-post-slider/" target="_blank">Plugin Homepage</a></li>
     
    3838      <div class="handlediv down" title="Click to toggle"> <br>
    3939      </div>
    40       <h3 style="cursor:pointer; text-align:center" class="advps-expand <?php if(isset($_POST['advps_submit']) && $_POST['advps_submit'] == 'Add new slideshow' && $_POST['nextoptid'] == $dset->id){echo 'advps-highlight';}?>" id="lbltxt<?php echo $dset->id;?>">
    41         <?php if(get_option('optset'.$dset->id)){echo get_option('optset'.$dset->id);}else{echo 'Slider '.$dset->id;}?>
     40      <h3 style="cursor:pointer; text-align:center" class="advps-expand <?php if(isset($_POST['advps_submit']) && $_POST['advps_submit'] == 'Add new slideshow' && $_POST['nextoptid'] == intval( $dset->id )){echo 'advps-highlight';}?>" id="lbltxt<?php echo intval(intval( $dset->id ));?>">
     41        <?php if(get_option('optset'.intval(intval( $dset->id )))){echo esc_html( get_option('optset'.intval(intval( $dset->id ))) );}else{echo 'Slider '.intval(intval( $dset->id ));}?>
    4242      </h3>
    4343      <div class="inside">
     
    4747            <tr>
    4848              <th scope="row">Label</th>
    49               <td><input type="text" style="width:px;" value="<?php if(get_option('optset'.$dset->id)){echo get_option('optset'.$dset->id);}else{echo 'Slider '.$dset->id;}?>" name="optset<?php echo $dset->id;?>" class="advps-optset-label" onchange="advpsUpdateLabel(this.name,this.value,<?php echo $dset->id;?>)" />
    50                 <span id="lbludtSts<?php echo $dset->id;?>" style="padding-left:10px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span></td>
     49              <td><input type="text" style="width:px;" value="<?php if(get_option('optset'.intval ( $dset->id ))){echo esc_attr( get_option('optset'.intval ( $dset->id )) );}else{echo 'Slider '.intval ( $dset->id );}?>" name="optset<?php echo intval ( $dset->id );?>" class="advps-optset-label" onchange="advpsUpdateLabel(this.name,this.value,<?php echo intval ( $dset->id );?>)" />
     50                <span id="lbludtSts<?php echo intval ( $dset->id );?>" style="padding-left:10px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span></td>
    5151            </tr>
    5252            <tr>
    5353              <th scope="row">Usage</th>
    54               <td><input style="width:200px; font-size:12px; text-align:center;" type="text" value='[advps-slideshow optset="<?php echo $dset->id;?>"]' readonly="readonly"  /></td>
     54              <td><input style="width:200px; font-size:12px; text-align:center;" type="text" value='[advps-slideshow optset="<?php echo intval ( $dset->id );?>"]' readonly="readonly"  /></td>
    5555            </tr>
    5656          </table>
     
    5858        <fieldset>
    5959          <legend class="advps-legend advpssm" style="width:80px; background-position:79px 6px;"><strong>Select Post</strong></legend>
    60           <div id="advps-sel<?php echo $dset->id;?>">
     60          <div id="advps-sel<?php echo intval ( $dset->id );?>">
    6161            <table class="form-table">
    6262              <tr>
    6363                <th scope="row">Select post using</th>
    64                 <td><select name="advpssmethod<?php echo $dset->id?>" onchange="updateSm(this,<?php echo $dset->id;?>);">
    65                     <option value="plist" <?php if(get_option('advpssmethod'.$dset->id) == 'plist'){echo 'selected="selected"';}?>>Post list</option>
    66                     <option value="query" <?php if(get_option('advpssmethod'.$dset->id) == 'query'){echo 'selected="selected"';}?>>Query</option>
     64                <td><select name="advpssmethod<?php echo intval ( $dset->id )?>" onchange="updateSm(this,<?php echo intval ( $dset->id );?>);">
     65                    <option value="plist" <?php if(get_option('advpssmethod'.intval ( $dset->id )) == 'plist'){echo 'selected="selected"';}?>>Post list</option>
     66                    <option value="query" <?php if(get_option('advpssmethod'.intval ( $dset->id )) == 'query'){echo 'selected="selected"';}?>>Query</option>
    6767                  </select>
    68                   <span id="smudtsts<?php echo $dset->id;?>" style="padding-left:10px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span></td>
     68                  <span id="smudtsts<?php echo intval ( $dset->id );?>" style="padding-left:10px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span></td>
    6969              </tr>
    7070            </table>
    71             <form method="post" onsubmit="return false" id="plist<?php echo $dset->id;?>">
    72               <table class="form-table <?php if(get_option('advpssmethod'.$dset->id) == 'query'){echo 'advps-hide';}?>">
     71            <form method="post" onsubmit="return false" id="plist<?php echo intval ( $dset->id );?>">
     72              <table class="form-table <?php if(get_option('advpssmethod'.intval ( $dset->id )) == 'query'){echo 'advps-hide';}?>">
    7373                <tr>
    7474                  <th scope="row">Listing option</th>
     
    7979                              foreach ($customPostTypes  as $post_type ) {
    8080                          ?>
    81                       <option value="<?php echo $post_type;?>" <?php if($plist['advps_post_stypes'] == $post_type){echo 'selected="selected"';}?>><?php echo $post_type;?></option>
     81                      <option value="<?php echo esc_attr( $post_type );?>" <?php if($plist['advps_post_stypes'] == $post_type){echo 'selected="selected"';}?>><?php echo esc_html( $post_type );?></option>
    8282                      <?php     
    8383                              }
     
    8585                    </select>
    8686                    <span style="padding-left:10px;">
    87                     <input type="text" name="advps_plistmax" value="<?php echo $plist['advps_plistmax'];?>" style="width:40px;" onkeypress="return onlyNum(event);" title="Max number of post to list" />
     87                    <input type="text" name="advps_plistmax" value="<?php echo esc_attr( $plist['advps_plistmax'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" title="Max number of post to list" />
    8888                    </span> <span style="padding-left:10px;">
    8989                    <select name="advps_plistorder_by" title="Order by">
     
    103103                    </select>
    104104                    </span> <span style="padding-left:10px;">
    105                     <button class="button-secondary" value="" onclick="listPost(<?php echo $dset->id;?>)">List</button>
    106                     </span> <span class="ajx-loaderp" style="padding-left:12px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span></td>
     105                    <button class="button-secondary" value="" onclick="listPost(<?php echo intval ( $dset->id );?>)">List</button>
     106                    </span> <span class="ajx-loaderp" style="padding-left:12px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span></td>
    107107                </tr>
    108108                <tr>
    109109                  <th scope="row">Select post from list</th>
    110                   <td><select name="advps_plist[]" multiple="multiple" style="min-height:250px; min-width:300px;" id="advps-plist-field<?php echo $dset->id;?>">
     110                  <td><select name="advps_plist[]" multiple="multiple" style="min-height:250px; min-width:300px;" id="advps-plist-field<?php echo intval( $dset->id );?>">
    111111                      <?php
    112112                        $lpargs = array(
    113                                 'post_type'      => ($plist['advps_post_stypes']) ? $plist['advps_post_stypes'] : 'post',
    114                                 'posts_per_page' => ($plist['advps_plistmax']) ? $plist['advps_plistmax'] : 99,
    115                                 'orderby'        => ($plist['advps_plistorder_by']) ? $plist['advps_plistorder_by'] : 'date',
    116                                 'order'          => ($plist['advps_plistorder']) ? $plist['advps_plistorder'] : 'DESC'
     113                                'post_type'      => ($plist['advps_post_stypes']) ? esc_html( $plist['advps_post_stypes'] ) : 'post',
     114                                'posts_per_page' => ($plist['advps_plistmax']) ? esc_html( $plist['advps_plistmax'] ) : 99,
     115                                'orderby'        => ($plist['advps_plistorder_by']) ? esc_html( $plist['advps_plistorder_by'] ) : 'date',
     116                                'order'          => ($plist['advps_plistorder']) ? esc_html( $plist['advps_plistorder'] ) : 'DESC'
    117117                        );
    118118                        $pl_query = new WP_Query($lpargs); while ($pl_query->have_posts()) : $pl_query->the_post();?>
     
    126126                <tr>
    127127                  <th scope="row">&nbsp;</th>
    128                   <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('plist<?php echo $dset->id;?>')" />
    129                     <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     128                  <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('plist<?php echo intval( $dset->id );?>')" />
     129                    <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    130130                </tr>
    131131              </table>
    132132              <input type="hidden" name="opt_field" value="plist" />
    133               <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     133              <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    134134            </form>
    135             <form method="post" onsubmit="return false" id="query<?php echo $dset->id;?>">
    136               <table class="form-table <?php if(!get_option('advpssmethod'.$dset->id) || get_option('advpssmethod'.$dset->id) == 'plist'){echo 'advps-hide';}?>">
     135            <form method="post" onsubmit="return false" id="query<?php echo intval( $dset->id );?>">
     136              <table class="form-table <?php if(!get_option('advpssmethod'.intval( $dset->id )) || get_option('advpssmethod'.intval( $dset->id )) == 'plist'){echo 'advps-hide';}?>">
    137137                <tr>
    138138                  <th scope="row">Post Type</th>
    139                   <td><select name="advps_post_types" onchange="advpsCheckCat(this.value,<?php echo $dset->id;?>)">
     139                  <td><select name="advps_post_types" onchange="advpsCheckCat(this.value,<?php echo intval( $dset->id );?>)">
    140140                      <option value="post" <?php if($query['advps_post_types'] == 'post'){echo 'selected="selected"';}?>>post</option>
    141141                      <option value="page" <?php if($query['advps_post_types'] == 'page'){echo 'selected="selected"';}?>>page</option>
     
    143143                              foreach ($customPostTypes  as $post_type ) {
    144144                          ?>
    145                       <option value="<?php echo $post_type;?>" <?php if($query['advps_post_types'] == $post_type){echo 'selected="selected"';}?>><?php echo $post_type;?></option>
     145                      <option value="<?php echo esc_attr( $post_type );?>" <?php if($query['advps_post_types'] == $post_type){echo 'selected="selected"';}?>><?php echo $post_type;?></option>
    146146                      <?php     
    147147                              }
     
    149149                    </select></td>
    150150                </tr>
    151                 <tr id="advps-cat-field<?php echo $dset->id;?>">
     151                <tr id="advps-cat-field<?php echo intval( $dset->id );?>">
    152152                  <?php 
    153                     $posttypeobj = get_post_type_object($query['advps_post_types']);
     153                    $posttypeobj = get_post_type_object( esc_html( $query['advps_post_types']) );
    154154                    if($query['advps_post_types'] != "page" && ($query['advps_post_types'] == 'post' || in_array('category',$posttypeobj->taxonomies))){
    155155                ?>
     
    160160                        foreach($catList as $scat){
    161161                      ?>
    162                       <option value="<?php echo $scat->term_id;?>" <?php if(isset($query['advps_category']) && in_array($scat->term_id,$query['advps_category'])){echo 'selected="selected"';}?>><?php echo $scat->name;?></option>
     162                      <option value="<?php echo esc_attr( $scat->term_id );?>" <?php if(isset($query['advps_category']) && in_array($scat->term_id,$query['advps_category'])){echo 'selected="selected"';}?>><?php echo esc_html( $scat->name );?></option>
    163163                      <?php }?>
    164164                    </select>
     
    168168                <tr>
    169169                  <th scope="row">Max. Number of post</th>
    170                   <td><input type="text" name="advps_maxpost" value="<?php echo $query['advps_maxpost'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
     170                  <td><input type="text" name="advps_maxpost" value="<?php echo esc_attr( $query['advps_maxpost'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
    171171                </tr>
    172172                <tr>
    173173                  <th scope="row">Offset (optional)</th>
    174                   <td><input type="text" name="advps_offset" value="<?php echo $query['advps_offset'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
     174                  <td><input type="text" name="advps_offset" value="<?php echo esc_attr( $query['advps_offset'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
    175175                </tr>
    176176                <tr>
    177177                  <th scope="row">Exclude (optional)</th>
    178                   <td><input type="text" name="advps_exclude" value="<?php echo $query['advps_exclude'];?>" style="width:100px;" />
     178                  <td><input type="text" name="advps_exclude" value="<?php echo esc_attr( $query['advps_exclude'] );?>" style="width:100px;" />
    179179                    <span style="padding-left:10px; font-size:10px; font-style:italic;">[ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]</span></td>
    180180                </tr>
     
    201201                <tr>
    202202                  <th scope="row">&nbsp;</th>
    203                   <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('query<?php echo $dset->id;?>')" />
    204                     <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     203                  <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('query<?php echo intval( $dset->id );?>')" />
     204                    <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    205205                </tr>
    206206              </table>
    207207              <input type="hidden" name="opt_field" value="query" />
    208               <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     208              <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    209209            </form>
    210210          </div>
     
    212212        <fieldset>
    213213          <legend class="advps-legend" style="width:50px; background-position:49px 6px;"><strong>Slider</strong></legend>
    214           <form method="post" id="slider<?php echo $dset->id;?>" onsubmit="return false">
     214          <form method="post" id="slider<?php echo intval( $dset->id );?>" onsubmit="return false">
    215215            <table class="form-table">
    216216              <tr>
    217217                <th scope="row">Slider Type</th>
    218                 <td><select name="advps_slider_type" onchange="sliderType(this.value,<?php echo $dset->id;?>);">
     218                <td><select name="advps_slider_type" onchange="sliderType(this.value,<?php echo intval( $dset->id );?>);">
    219219                    <option value="standard" <?php if($slider['advps_slider_type'] == 'standard'){echo 'selected="selected"';}?>>Standard</option>
    220220                    <option value="carousel" <?php if($slider['advps_slider_type'] == 'carousel'){echo 'selected="selected"';}?>>Carousel</option>
     
    240240              <tr>
    241241                <th scope="row">Speed</th>
    242                 <td><input type="text" name="advps_speed" value="<?php echo $slider['advps_speed'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
     242                <td><input type="text" name="advps_speed" value="<?php echo esc_attr( $slider['advps_speed'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
    243243              </tr>
    244244              <tr>
     
    251251              <tr>
    252252                <th scope="row">Pause</th>
    253                 <td><input type="text" name="advps_timeout" value="<?php echo $slider['advps_timeout'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
     253                <td><input type="text" name="advps_timeout" value="<?php echo esc_attr( $slider['advps_timeout'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
    254254              </tr>
    255255              <tr>
    256256                <th scope="row">Slide margin</th>
    257                 <td><input type="text" name="advps_sldmargin" value="<?php echo $slider['advps_sldmargin'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
     257                <td><input type="text" name="advps_sldmargin" value="<?php echo esc_attr( $slider['advps_sldmargin'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
    258258              </tr>
    259259              <tr>
     
    266266              <tr>
    267267                <th scope="row">&nbsp;</th>
    268                 <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('slider<?php echo $dset->id;?>')" />
    269                   <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     268                <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('slider<?php echo intval( $dset->id );?>')" />
     269                  <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    270270              </tr>
    271271            </table>
    272272            <input type="hidden" name="opt_field" value="slider" />
    273             <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     273            <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    274274          </form>
    275275        </fieldset>
    276276        <fieldset>
    277277          <legend class="advps-legend" style="width:121px; background-position:120px 6px;"><strong>Carousel & Ticker</strong></legend>
    278           <form method="post" onsubmit="return false" id="caro_ticker<?php echo $dset->id;?>">
     278          <form method="post" onsubmit="return false" id="caro_ticker<?php echo intval( $dset->id );?>">
    279279            <table class="form-table">
    280280              <tr>
    281281                <th scope="row">Number of slide</th>
    282                 <td><input type="text" name="advps_caro_slds" value="<?php if(isset($caro_ticker['advps_caro_slds'])){echo $caro_ticker['advps_caro_slds'];}?>" style="width:60px;" onkeypress="return onlyNum(event);" />
     282                <td><input type="text" name="advps_caro_slds" value="<?php if(isset($caro_ticker['advps_caro_slds'])){echo esc_attr( $caro_ticker['advps_caro_slds'] );}?>" style="width:60px;" onkeypress="return onlyNum(event);" />
    283283                  <span style="padding-left:20px; font-size:10px; font-style:italic;">[ N.B. For slider type Carousel or Ticker. ]</span></td>
    284284              </tr>
    285285              <tr>
    286286                <th scope="row">Slide width</th>
    287                 <td><input type="text" name="advps_caro_sldwidth" value="<?php if(isset($caro_ticker['advps_caro_sldwidth'])){echo $caro_ticker['advps_caro_sldwidth'];}?>" style="width:60px;" onkeypress="return onlyNum(event);" />
     287                <td><input type="text" name="advps_caro_sldwidth" value="<?php if(isset($caro_ticker['advps_caro_sldwidth'])){echo esc_attr( $caro_ticker['advps_caro_sldwidth'] );}?>" style="width:60px;" onkeypress="return onlyNum(event);" />
    288288                  <span style="padding-left:20px; font-size:10px; font-style:italic;">[ N.B. For slider type Carousel or Ticker. ]</span></td>
    289289              </tr>
    290290              <tr>
    291291                <th scope="row">&nbsp;</th>
    292                 <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('caro_ticker<?php echo $dset->id;?>')" />
    293                   <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     292                <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('caro_ticker<?php echo intval( $dset->id );?>')" />
     293                  <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    294294              </tr>
    295295            </table>
    296296            <input type="hidden" name="opt_field" value="caro_ticker" />
    297             <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     297            <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    298298          </form>
    299299        </fieldset>
    300300        <fieldset>
    301301          <legend class="advps-legend" style="width:155px; background-position:154px 6px;"><strong>Container & Thumbnail</strong></legend>
    302           <form method="post" onsubmit="return false" id="container<?php echo $dset->id;?>">
     302          <form method="post" onsubmit="return false" id="container<?php echo intval( $dset->id );?>">
    303303            <table class="form-table">
    304304              <tr>
     
    314314                        foreach($_wp_additional_image_sizes as $tkey => $tval){
    315315                        ?>
    316                     <option value="<?php echo $tkey;?>" <?php if($container['advps_thumbnail'] == $tkey){echo 'selected="selected"';}?>><?php echo $tkey;?></option>
     316                    <option value="<?php echo esc_attr( $tkey );?>" <?php if($container['advps_thumbnail'] == $tkey){echo 'selected="selected"';}?>><?php echo esc_html( $tkey );?></option>
    317317                    <?php
    318318                        }
     
    322322              <tr>
    323323                <th scope="row">Default image url</th>
    324                 <td><input type="text" name="advps_default_image" value="<?php if(isset($container['advps_default_image'])){ echo $container['advps_default_image'];}?>" style="width:250px;" />
     324                <td><input type="text" name="advps_default_image" value="<?php if(isset($container['advps_default_image'])){ echo esc_url( $container['advps_default_image'] );}?>" style="width:250px;" />
    325325                  <span style="padding-left:10px; font-size:10px; font-style:italic;"> [ N.B. If any post doesn't have featured image then default image will be shown.]</span></td>
    326326              </tr>
    327327              <tr>
    328328                <th scope="row">Slide Container Width</th>
    329                 <td><input type="text" name="advps_sld_width" value="<?php echo $container['advps_sld_width'];?>" style="width:45px;" onkeypress="return onlyNum(event);" />
     329                <td><input type="text" name="advps_sld_width" value="<?php echo esc_attr( $container['advps_sld_width'] );?>" style="width:45px;" onkeypress="return onlyNum(event);" />
    330330                  &nbsp;px</td>
    331331              </tr>
     
    339339              <tr>
    340340                <th scope="row">Background Color</th>
    341                 <td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bgcolor" value="<?php echo $container['advps_bgcolor'];?>" style="width:100px;" />
     341                <td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bgcolor" value="<?php echo esc_attr( $container['advps_bgcolor'] );?>" style="width:100px;" />
    342342                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    343343              </tr>
     
    345345                <th scope="row">Border</th>
    346346                <td><span style="vertical-align:top">
    347                   <input type="text" name="advps_border_size" value="<?php echo $container['advps_border_size'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
     347                  <input type="text" name="advps_border_size" value="<?php echo esc_attr( $container['advps_border_size'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" />
    348348                  px &nbsp;&nbsp;
    349349                  <select name="advps_border_type">
     
    356356                  </select>
    357357                  &nbsp;&nbsp;</span>
    358                   <input class="advps-color-picker" type="text" name="advps_border_color" id="advpscolor<?php echo ++$flg?>" value="<?php echo $container['advps_border_color'];?>" style="width:100px;" />
     358                  <input class="advps-color-picker" type="text" name="advps_border_color" id="advpscolor<?php echo ++$flg?>" value="<?php echo esc_attr( $container['advps_border_color'] );?>" style="width:100px;" />
    359359                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    360360              </tr>
     
    369369                <th scope="row">Box Shadow</th>
    370370                <td><span style="vertical-align:top">
    371                   <input type="text" name="advps_bxshad1" value="<?php echo $container['advps_bxshad1'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
     371                  <input type="text" name="advps_bxshad1" value="<?php echo esc_attr( $container['advps_bxshad1'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" />
    372372                  px &nbsp;&nbsp;
    373                   <input type="text" name="advps_bxshad2" value="<?php echo $container['advps_bxshad2'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
     373                  <input type="text" name="advps_bxshad2" value="<?php echo esc_attr( $container['advps_bxshad2'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" />
    374374                  px&nbsp;&nbsp;
    375                   <input type="text" name="advps_bxshad3" value="<?php echo $container['advps_bxshad3'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
     375                  <input type="text" name="advps_bxshad3" value="<?php echo esc_attr( $container['advps_bxshad3'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" />
    376376                  px&nbsp;&nbsp;</span>
    377                   <input class="advps-color-picker" type="text" name="advps_bxshadcolor" value="<?php echo $container['advps_bxshadcolor'];?>" style="width:100px;" id="advpscolor<?php echo ++$flg?>" />
     377                  <input class="advps-color-picker" type="text" name="advps_bxshadcolor" value="<?php echo esc_attr( $container['advps_bxshadcolor'] );?>" style="width:100px;" id="advpscolor<?php echo ++$flg?>" />
    378378                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    379379              </tr>
     
    387387              <tr>
    388388                <th scope="row">&nbsp;</th>
    389                 <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('container<?php echo $dset->id;?>')" />
    390                   <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     389                <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('container<?php echo intval( $dset->id );?>')" />
     390                  <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    391391              </tr>
    392392            </table>
    393393            <input type="hidden" name="opt_field" value="container" />
    394             <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     394            <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    395395          </form>
    396396        </fieldset>
    397397        <fieldset>
    398398          <legend class="advps-legend" style="width:102px; background-position:101px 6px;"><strong>Title & Excerpt</strong></legend>
    399           <form method="post" onsubmit="return false" id="content<?php echo $dset->id;?>">
     399          <form method="post" onsubmit="return false" id="content<?php echo intval( $dset->id );?>">
    400400            <table class="form-table">
    401401              <tr>
    402402                <th scope="row">Overlay size</th>
    403403                <td>Width&nbsp;
    404                   <input type="text" name="advps_overlay_width" value="<?php echo $content['advps_overlay_width'];?>" style="width:80px;" onkeypress="return onlyNum(event);" />
     404                  <input type="text" name="advps_overlay_width" value="<?php echo esc_attr( $content['advps_overlay_width'] );?>" style="width:80px;" onkeypress="return onlyNum(event);" />
    405405                  %&nbsp;&nbsp;&nbsp;Height&nbsp;
    406                   <input type="text" name="advps_overlay_height" value="<?php echo $content['advps_overlay_height'];?>" style="width:80px;" onkeypress="return onlyNum(event);" />
     406                  <input type="text" name="advps_overlay_height" value="<?php echo esc_attr( $content['advps_overlay_height'] );?>" style="width:80px;" onkeypress="return onlyNum(event);" />
    407407                  %</td>
    408408              </tr>
    409409              <tr>
    410410                <th scope="row">Overlay color</th>
    411                 <td><input type="text" name="advps_overlay_color" value="<?php echo $content['advps_overlay_color'];?>" style="width:100px;" class="advps-color-picker" id="advpscolor<?php echo ++$flg?>" />
     411                <td><input type="text" name="advps_overlay_color" value="<?php echo esc_attr( $content['advps_overlay_color'] );?>" style="width:100px;" class="advps-color-picker" id="advpscolor<?php echo ++$flg?>" />
    412412                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    413413              </tr>
    414414              <tr>
    415415                <th scope="row">Overlay opacity</th>
    416                 <td><input type="text" name="advps_overlay_opacity" value="<?php echo $content['advps_overlay_opacity'];?>" style="width:50px;" />
     416                <td><input type="text" name="advps_overlay_opacity" value="<?php echo esc_attr( $content['advps_overlay_opacity'] );?>" style="width:50px;" />
    417417                  &nbsp;<span style="padding-left:10px; font-size:10px; font-style:italic;">[ 0 - 1 ]</span></td>
    418418              </tr>
     
    435435              <tr>
    436436                <th scope="row">Text opacity</th>
    437                 <td><input type="text" name="advps_text_opacity" value="<?php echo $content['advps_text_opacity'];?>" style="width:50px;" />
     437                <td><input type="text" name="advps_text_opacity" value="<?php echo esc_attr( $content['advps_text_opacity'] );?>" style="width:50px;" />
    438438                  &nbsp;<span style="padding-left:10px; font-size:10px; font-style:italic;">[ 0 - 1 ]</span></td>
    439439              </tr>
     
    457457              <tr>
    458458                <th scope="row">Title font Color</th>
    459                 <td><input type="text" name="advps_titleFcolor" value="<?php echo $content['advps_titleFcolor'];?>" style="width:100px;" class="advps-color-picker" id="advpscolor<?php echo ++$flg?>" />
     459                <td><input type="text" name="advps_titleFcolor" value="<?php echo esc_attr( $content['advps_titleFcolor'] );?>" style="width:100px;" class="advps-color-picker" id="advpscolor<?php echo ++$flg?>" />
    460460                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    461461              </tr>
    462462              <tr>
    463463                <th scope="row">Title hover Color</th>
    464                 <td><input type="text" name="advps_titleHcolor" value="<?php echo $content['advps_titleHcolor'];?>" style="width:100px;" class="advps-color-picker" id="advpscolor<?php echo ++$flg?>" />
     464                <td><input type="text" name="advps_titleHcolor" value="<?php echo esc_attr( $content['advps_titleHcolor'] );?>" style="width:100px;" class="advps-color-picker" id="advpscolor<?php echo ++$flg?>" />
    465465                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    466466              </tr>
    467467              <tr>
    468468                <th scope="row">Title font size</th>
    469                 <td><input type="text" name="advps_titleFsizeL" value="<?php if(isset($content['advps_titleFsizeL'])){ echo $content['advps_titleFsizeL'];}else{echo 20;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
    470                   &nbsp;px&nbsp;&nbsp;
    471                   <input type="text" name="advps_titleFsize1" value="<?php if(isset($content['advps_titleFsize1'])){ echo $content['advps_titleFsize1'];}else{echo 18;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
    472                   &nbsp;px&nbsp;&nbsp;
    473                   <input type="text" name="advps_titleFsize2" value="<?php if(isset($content['advps_titleFsize2'])){echo $content['advps_titleFsize2'];}else{echo 16;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
    474                   &nbsp;px&nbsp;&nbsp;
    475                   <input type="text" name="advps_titleFsize3" value="<?php if(isset($content['advps_titleFsize3'])){echo $content['advps_titleFsize3'];}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
    476                   &nbsp;px&nbsp;&nbsp;
    477                   <input type="text" name="advps_titleFsize4" value="<?php if(isset($content['advps_titleFsize4'])){echo $content['advps_titleFsize4'];}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
    478                   &nbsp;px&nbsp;&nbsp;
    479                   <input type="text" name="advps_titleFsize5" value="<?php if(isset($content['advps_titleFsize5'])){echo $content['advps_titleFsize5'];}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
     469                <td><input type="text" name="advps_titleFsizeL" value="<?php if(isset($content['advps_titleFsizeL'])){ echo esc_attr( $content['advps_titleFsizeL'] );}else{echo 20;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
     470                  &nbsp;px&nbsp;&nbsp;
     471                  <input type="text" name="advps_titleFsize1" value="<?php if(isset($content['advps_titleFsize1'])){ echo esc_attr( $content['advps_titleFsize1'] );}else{echo 18;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
     472                  &nbsp;px&nbsp;&nbsp;
     473                  <input type="text" name="advps_titleFsize2" value="<?php if(isset($content['advps_titleFsize2'])){echo esc_attr( $content['advps_titleFsize2'] );}else{echo 16;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
     474                  &nbsp;px&nbsp;&nbsp;
     475                  <input type="text" name="advps_titleFsize3" value="<?php if(isset($content['advps_titleFsize3'])){echo esc_attr( $content['advps_titleFsize3'] );}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
     476                  &nbsp;px&nbsp;&nbsp;
     477                  <input type="text" name="advps_titleFsize4" value="<?php if(isset($content['advps_titleFsize4'])){echo esc_attr( $content['advps_titleFsize4'] );}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
     478                  &nbsp;px&nbsp;&nbsp;
     479                  <input type="text" name="advps_titleFsize5" value="<?php if(isset($content['advps_titleFsize5'])){echo esc_attr( $content['advps_titleFsize5'] );}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
    480480                  &nbsp;px&nbsp;&nbsp; <span style="padding-left:10px; font-size:10px; font-style:italic;">[ N.B. Different sizes for different media screen width. Hover the field to know which field is for which width. ]</span></td>
    481481              </tr>
    482482              <tr>
    483483                <th scope="row">Title line height</th>
    484                 <td><input type="text" name="advps_titleLheightL" value="<?php if(isset($content['advps_titleLheightL'])){ echo $content['advps_titleLheightL'];}else{echo 20;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
    485                   &nbsp;px&nbsp;&nbsp;
    486                   <input type="text" name="advps_titleLheight1" value="<?php if(isset($content['advps_titleLheight1'])){ echo $content['advps_titleLheight1'];}else{echo 18;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
    487                   &nbsp;px&nbsp;&nbsp;
    488                   <input type="text" name="advps_titleLheight2" value="<?php if(isset($content['advps_titleLheight2'])){echo $content['advps_titleLheight2'];}else{echo 16;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
    489                   &nbsp;px&nbsp;&nbsp;
    490                   <input type="text" name="advps_titleLheight3" value="<?php if(isset($content['advps_titleLheight3'])){echo $content['advps_titleLheight3'];}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
    491                   &nbsp;px&nbsp;&nbsp;
    492                   <input type="text" name="advps_titleLheight4" value="<?php if(isset($content['advps_titleLheight4'])){echo $content['advps_titleLheight4'];}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
    493                   &nbsp;px&nbsp;&nbsp;
    494                   <input type="text" name="advps_titleLheight5" value="<?php if(isset($content['advps_titleLheight5'])){echo $content['advps_titleLheight5'];}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
     484                <td><input type="text" name="advps_titleLheightL" value="<?php if(isset($content['advps_titleLheightL'])){ echo esc_attr( $content['advps_titleLheightL'] );}else{echo 20;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
     485                  &nbsp;px&nbsp;&nbsp;
     486                  <input type="text" name="advps_titleLheight1" value="<?php if(isset($content['advps_titleLheight1'])){ echo esc_attr( $content['advps_titleLheight1'] );}else{echo 18;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
     487                  &nbsp;px&nbsp;&nbsp;
     488                  <input type="text" name="advps_titleLheight2" value="<?php if(isset($content['advps_titleLheight2'])){echo esc_attr( $content['advps_titleLheight2'] );}else{echo 16;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
     489                  &nbsp;px&nbsp;&nbsp;
     490                  <input type="text" name="advps_titleLheight3" value="<?php if(isset($content['advps_titleLheight3'])){echo esc_attr( $content['advps_titleLheight3'] );}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
     491                  &nbsp;px&nbsp;&nbsp;
     492                  <input type="text" name="advps_titleLheight4" value="<?php if(isset($content['advps_titleLheight4'])){echo esc_attr( $content['advps_titleLheight4'] );}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
     493                  &nbsp;px&nbsp;&nbsp;
     494                  <input type="text" name="advps_titleLheight5" value="<?php if(isset($content['advps_titleLheight5'])){echo esc_attr( $content['advps_titleLheight5'] );}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
    495495                  &nbsp;px&nbsp;&nbsp; <span style="padding-left:10px; font-size:10px; font-style:italic;">[ N.B. Each for different media screen width. Hover the field to know which field is for which width. ]</span></td>
    496496              </tr>
    497497              <tr>
    498498                <th scope="row">Excerpt font color</th>
    499                 <td><input class="advps-color-picker" type="text" name="advps_excptFcolor" value="<?php echo $content['advps_excptFcolor'];?>" style="width:100px;" id="advpscolor<?php echo ++$flg?>" />
     499                <td><input class="advps-color-picker" type="text" name="advps_excptFcolor" value="<?php echo esc_attr( $content['advps_excptFcolor'] );?>" style="width:100px;" id="advpscolor<?php echo ++$flg?>" />
    500500                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    501501              </tr>
    502502              <tr>
    503503                <th scope="row">Excerpt font size</th>
    504                 <td><input type="text" name="advps_excptFsizeL" value="<?php if(isset($content['advps_excptFsizeL'])){ echo $content['advps_excptFsizeL'];}else{echo 14;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
    505                   &nbsp;px&nbsp;&nbsp;
    506                   <input type="text" name="advps_excptFsize1" value="<?php if(isset($content['advps_excptFsize1'])){ echo $content['advps_excptFsize1'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
    507                   &nbsp;px&nbsp;&nbsp;
    508                   <input type="text" name="advps_excptFsize2" value="<?php if(isset($content['advps_excptFsize2'])){echo $content['advps_excptFsize2'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
    509                   &nbsp;px&nbsp;&nbsp;
    510                   <input type="text" name="advps_excptFsize3" value="<?php if(isset($content['advps_excptFsize3'])){echo $content['advps_excptFsize3'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
    511                   &nbsp;px&nbsp;&nbsp;
    512                   <input type="text" name="advps_excptFsize4" value="<?php if(isset($content['advps_excptFsize4'])){echo $content['advps_excptFsize4'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
    513                   &nbsp;px&nbsp;&nbsp;
    514                   <input type="text" name="advps_excptFsize5" value="<?php if(isset($content['advps_excptFsize5'])){echo $content['advps_excptFsize5'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
     504                <td><input type="text" name="advps_excptFsizeL" value="<?php if(isset($content['advps_excptFsizeL'])){ echo esc_attr( $content['advps_excptFsizeL'] );}else{echo 14;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
     505                  &nbsp;px&nbsp;&nbsp;
     506                  <input type="text" name="advps_excptFsize1" value="<?php if(isset($content['advps_excptFsize1'])){ echo esc_attr( $content['advps_excptFsize1'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
     507                  &nbsp;px&nbsp;&nbsp;
     508                  <input type="text" name="advps_excptFsize2" value="<?php if(isset($content['advps_excptFsize2'])){echo esc_attr( $content['advps_excptFsize2'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
     509                  &nbsp;px&nbsp;&nbsp;
     510                  <input type="text" name="advps_excptFsize3" value="<?php if(isset($content['advps_excptFsize3'])){echo esc_attr( $content['advps_excptFsize3'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
     511                  &nbsp;px&nbsp;&nbsp;
     512                  <input type="text" name="advps_excptFsize4" value="<?php if(isset($content['advps_excptFsize4'])){echo esc_attr( $content['advps_excptFsize4'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
     513                  &nbsp;px&nbsp;&nbsp;
     514                  <input type="text" name="advps_excptFsize5" value="<?php if(isset($content['advps_excptFsize5'])){echo esc_attr( $content['advps_excptFsize5'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
    515515                  &nbsp;px&nbsp;&nbsp; </td>
    516516              </tr>
    517517              <tr>
    518518                <th scope="row">Excerpt line height</th>
    519                 <td><input type="text" name="advps_excptLheightL" value="<?php if(isset($content['advps_excptLheightL'])){ echo $content['advps_excptLheightL'];}else{echo 14;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
    520                   &nbsp;px&nbsp;&nbsp;
    521                   <input type="text" name="advps_excptLheight1" value="<?php if(isset($content['advps_excptLheight1'])){ echo $content['advps_excptLheight1'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
    522                   &nbsp;px&nbsp;&nbsp;
    523                   <input type="text" name="advps_excptLheight2" value="<?php if(isset($content['advps_excptLheight2'])){echo $content['advps_excptLheight2'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
    524                   &nbsp;px&nbsp;&nbsp;
    525                   <input type="text" name="advps_excptLheight3" value="<?php if(isset($content['advps_excptLheight3'])){echo $content['advps_excptLheight3'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
    526                   &nbsp;px&nbsp;&nbsp;
    527                   <input type="text" name="advps_excptLheight4" value="<?php if(isset($content['advps_excptLheight4'])){echo $content['advps_excptLheight4'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
    528                   &nbsp;px&nbsp;&nbsp;
    529                   <input type="text" name="advps_excptLheight5" value="<?php if(isset($content['advps_excptLheight5'])){echo $content['advps_excptLheight5'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
     519                <td><input type="text" name="advps_excptLheightL" value="<?php if(isset($content['advps_excptLheightL'])){ echo esc_attr( $content['advps_excptLheightL'] );}else{echo 14;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
     520                  &nbsp;px&nbsp;&nbsp;
     521                  <input type="text" name="advps_excptLheight1" value="<?php if(isset($content['advps_excptLheight1'])){ echo esc_attr( $content['advps_excptLheight1'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
     522                  &nbsp;px&nbsp;&nbsp;
     523                  <input type="text" name="advps_excptLheight2" value="<?php if(isset($content['advps_excptLheight2'])){echo esc_attr( $content['advps_excptLheight2'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
     524                  &nbsp;px&nbsp;&nbsp;
     525                  <input type="text" name="advps_excptLheight3" value="<?php if(isset($content['advps_excptLheight3'])){echo esc_attr( $content['advps_excptLheight3'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
     526                  &nbsp;px&nbsp;&nbsp;
     527                  <input type="text" name="advps_excptLheight4" value="<?php if(isset($content['advps_excptLheight4'])){echo esc_attr( $content['advps_excptLheight4'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
     528                  &nbsp;px&nbsp;&nbsp;
     529                  <input type="text" name="advps_excptLheight5" value="<?php if(isset($content['advps_excptLheight5'])){echo esc_attr( $content['advps_excptLheight5'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
    530530                  &nbsp;px&nbsp;&nbsp; </td>
    531531              </tr>
    532532              <tr>
    533533                <th scope="row">Excerpt length</th>
    534                 <td><input type="text" name="advps_excerptlen" value="<?php echo $content['advps_excerptlen'];?>" style="width:60px;" onkeypress="return onlyNum(event);" />
     534                <td><input type="text" name="advps_excerptlen" value="<?php echo esc_attr( $content['advps_excerptlen'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" />
    535535                  &nbsp;words</td>
    536536              </tr>
     
    592592              <tr>
    593593                <th scope="row">&nbsp;</th>
    594                 <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('content<?php echo $dset->id;?>')" />
    595                   <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     594                <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('content<?php echo intval( $dset->id );?>')" />
     595                  <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    596596              </tr>
    597597            </table>
    598598            <input type="hidden" name="opt_field" value="content" />
    599             <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     599            <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    600600          </form>
    601601        </fieldset>
    602602        <fieldset>
    603603          <legend class="advps-legend" style="width:79px; background-position:78px 6px;"><strong>Navigation</strong></legend>
    604           <form method="post" onsubmit="return false" id="navigation<?php echo $dset->id;?>">
     604          <form method="post" onsubmit="return false" id="navigation<?php echo intval( $dset->id );?>">
    605605            <table class="form-table">
    606606              <tr>
     
    617617                  <span style="padding:0px 5px 0px 10px;">Bullet</span>
    618618                  <input type="radio" name="advps_pager_type" value="bullet" <?php if(isset($navigation['advps_pager_type']) && $navigation['advps_pager_type'] == 'bullet'){echo 'checked="checked"';}?>>
    619                   <span id="advps-pthumb-lvl<?php echo $dset->id;?>" style="padding:0px 5px 0px 10px;" class="<?php if($slider['advps_slider_type'] != 'standard'){echo 'advps-fade';}?>">Thumbnail</span>
    620                   <input id="advps-pthumb<?php echo $dset->id;?>" <?php if($slider['advps_slider_type'] != 'standard'){echo 'disabled="disabled"';}?> type="radio" name="advps_pager_type" value="thumb" <?php if(isset($navigation['advps_pager_type']) && $navigation['advps_pager_type'] == 'thumb'){echo 'checked="checked"';}?>></td>
     619                  <span id="advps-pthumb-lvl<?php echo intval( $dset->id );?>" style="padding:0px 5px 0px 10px;" class="<?php if($slider['advps_slider_type'] != 'standard'){echo 'advps-fade';}?>">Thumbnail</span>
     620                  <input id="advps-pthumb<?php echo intval( $dset->id );?>" <?php if($slider['advps_slider_type'] != 'standard'){echo 'disabled="disabled"';}?> type="radio" name="advps_pager_type" value="thumb" <?php if(isset($navigation['advps_pager_type']) && $navigation['advps_pager_type'] == 'thumb'){echo 'checked="checked"';}?>></td>
    621621              </tr>
    622622              <tr>
    623623                <th scope="row">Thumbnail Width</th>
    624                 <td><input type="text" name="advps_pthumb_width" value="<?php echo $navigation['advps_pthumb_width'];?>" style="width:50px;" onkeypress="return onlyNum(event);" />
     624                <td><input type="text" name="advps_pthumb_width" value="<?php echo esc_attr( $navigation['advps_pthumb_width'] );?>" style="width:50px;" onkeypress="return onlyNum(event);" />
    625625                  &nbsp;% <span style="padding-left:10px; font-size:10px; font-style:italic;">[ N.B. For pager type thumbnail. ]</span></td>
    626626              </tr>
     
    635635              <tr>
    636636                <th scope="row">Pager position from bottom</th>
    637                 <td><input type="text" name="advps_pager_bottom" value="<?php echo $navigation['advps_pager_bottom'];?>" style="width:50px;" onkeypress="return NumNdNeg(event);" />
     637                <td><input type="text" name="advps_pager_bottom" value="<?php echo esc_attr( $navigation['advps_pager_bottom'] );?>" style="width:50px;" onkeypress="return NumNdNeg(event);" />
    638638                  &nbsp;px</td>
    639639              </tr>
     
    656656              <tr>
    657657                <th scope="row">Play/Pause position from bottom</th>
    658                 <td><input type="text" name="advps_ppause_bottom" value="<?php echo $navigation['advps_ppause_bottom'];?>" style="width:50px;" onkeypress="return NumNdNeg(event);" />
     658                <td><input type="text" name="advps_ppause_bottom" value="<?php echo esc_attr( $navigation['advps_ppause_bottom'] );?>" style="width:50px;" onkeypress="return NumNdNeg(event);" />
    659659                  &nbsp;px</td>
    660660              </tr>
     
    668668              <tr>
    669669                <th scope="row">&nbsp;</th>
    670                 <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('navigation<?php echo $dset->id;?>')" />
    671                   <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     670                <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('navigation<?php echo intval( $dset->id );?>')" />
     671                  <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    672672              </tr>
    673673            </table>
    674674            <input type="hidden" name="opt_field" value="navigation" />
    675             <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     675            <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    676676          </form>
    677677        </fieldset>
    678678        <!-- </form>-->
    679         <form method="post" id="frmOptDel<?php echo $dset->id;?>" onsubmit="return false">
    680           <input type="hidden" value="<?php echo $dset->id;?>" name="optset-id" />
    681           <input type="hidden" value="<?php echo $tcount[0]->Auto_increment;?>" name="nextoptid" />
     679        <form method="post" id="frmOptDel<?php echo intval( $dset->id );?>" onsubmit="return false">
     680          <input type="hidden" value="<?php echo intval( $dset->id );?>" name="optset-id" />
     681          <input type="hidden" value="<?php echo intval( $tcount[0]->Auto_increment );?>" name="nextoptid" />
    682682          <p>
    683             <input type="submit" name="del-optset" value="Delete" class="button-secondary" onclick="deleteOptSet(<?php echo $dset->id;?>)" style="width:12%;" />
     683            <input type="submit" name="del-optset" value="Delete" class="button-secondary" onclick="deleteOptSet(<?php echo intval( $dset->id );?>)" style="width:12%;" />
    684684            <span style="margin-left:5px;">
    685             <input type="submit" name="dup-optset" value="Duplicate" class="button-secondary" onclick="duplicateOptSet(<?php echo $dset->id;?>)" style="width:12%;" />
     685            <input type="submit" name="dup-optset" value="Duplicate" class="button-secondary" onclick="duplicateOptSet(<?php echo intval( $dset->id );?>)" style="width:12%;" />
    686686            </span> </p>
    687687          <?php wp_nonce_field('advps-checkauthnonce','advps_wpnonce'); ?>
     
    697697  <form method="post">
    698698    <input type="hidden" name="template" value="one" />
    699     <input type="hidden" name="nextoptid" id="nextoptid" value="<?php echo $tcount[0]->Auto_increment;?>" />
     699    <input type="hidden" name="nextoptid" id="nextoptid" value="<?php echo intval( $tcount[0]->Auto_increment );?>" />
    700700    <?php wp_nonce_field('advps-checkauthnonce','advps_wpnonce'); ?>
    701701    <input type="submit" name="advps_submit" value="Add new slideshow" class="button-primary" style="font-weight:bold" />
  • advanced-post-slider/trunk/templates/template-three.php

    r1115402 r1316529  
    44
    55<div class="advps-col-right">
    6   <h2>Advanced post slider <?php echo get_option('advps-curr-version');?></h2>
     6  <h2>Advanced post slider <?php echo esc_html( get_option('advps-curr-version') );?></h2>
    77  <ul>
    88    <li><a href="http://www.wpcue.com/wordpress-plugins/advanced-post-slider/" target="_blank">Plugin Homepage</a></li>
     
    4242      <div class="handlediv down" title="Click to toggle"> <br>
    4343      </div>
    44       <h3 style="cursor:pointer; text-align:center" class="advps-expand <?php if(isset($_POST['advps_submit']) && $_POST['advps_submit'] == 'Add new slideshow' && $_POST['nextoptid'] == $dset->id){echo 'advps-highlight';}?>" id="lbltxt<?php echo $dset->id;?>">
    45         <?php if(get_option('optset'.$dset->id)){echo get_option('optset'.$dset->id);}else{echo 'Slider '.$dset->id;}?>
     44      <h3 style="cursor:pointer; text-align:center" class="advps-expand <?php if(isset($_POST['advps_submit']) && $_POST['advps_submit'] == 'Add new slideshow' && $_POST['nextoptid'] == intval( $dset->id )){echo 'advps-highlight';}?>" id="lbltxt<?php echo intval( $dset->id );?>">
     45        <?php if(get_option('optset'.intval( $dset->id ))){echo esc_html( get_option('optset'.intval( $dset->id )) );}else{echo 'Slider '.intval( $dset->id );}?>
    4646      </h3>
    4747      <div class="inside">
     
    5151            <tr>
    5252              <th scope="row">Label</th>
    53               <td><input type="text" style="width:px;" value="<?php if(get_option('optset'.$dset->id)){echo get_option('optset'.$dset->id);}else{echo 'Slider '.$dset->id;}?>" name="optset<?php echo $dset->id;?>" class="advps-optset-label" onchange="advpsUpdateLabel(this.name,this.value,<?php echo $dset->id;?>)" />
    54                 <span id="lbludtSts<?php echo $dset->id;?>" style="padding-left:10px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span></td>
     53              <td><input type="text" style="width:px;" value="<?php if(get_option('optset'.intval( $dset->id ))){echo esc_attr( get_option('optset'.intval( $dset->id )) );}else{echo 'Slider '.intval( $dset->id );}?>" name="optset<?php echo intval( $dset->id );?>" class="advps-optset-label" onchange="advpsUpdateLabel(this.name,this.value,<?php echo intval( $dset->id );?>)" />
     54                <span id="lbludtSts<?php echo intval( $dset->id );?>" style="padding-left:10px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span></td>
    5555            </tr>
    5656            <tr>
    5757              <th scope="row">Usage</th>
    58               <td><input style="width:200px; font-size:12px; text-align:center;" type="text" value='[advps-slideshow optset="<?php echo $dset->id;?>"]' readonly="readonly"  /></td>
     58              <td><input style="width:200px; font-size:12px; text-align:center;" type="text" value='[advps-slideshow optset="<?php echo intval( $dset->id );?>"]' readonly="readonly"  /></td>
    5959            </tr>
    6060          </table>
     
    6262        <fieldset>
    6363          <legend class="advps-legend" style="width:80px; background-position:79px 6px;"><strong>Select Post</strong></legend>
    64           <div id="advps-sel<?php echo $dset->id;?>">
     64          <div id="advps-sel<?php echo intval( $dset->id );?>">
    6565            <table class="form-table">
    6666              <tr>
    6767                <th scope="row">Select post using</th>
    68                 <td><select name="advpssmethod<?php echo $dset->id?>" onchange="updateSm(this,<?php echo $dset->id;?>);">
    69                     <option value="plist" <?php if(get_option('advpssmethod'.$dset->id) == 'plist'){echo 'selected="selected"';}?>>Post list</option>
    70                     <option value="query" <?php if(get_option('advpssmethod'.$dset->id) == 'query'){echo 'selected="selected"';}?>>Query</option>
    71                   </select>
    72                   <span id="smudtsts<?php echo $dset->id;?>" style="padding-left:10px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span></td>
     68                <td><select name="advpssmethod<?php echo intval( $dset->id )?>" onchange="updateSm(this,<?php echo intval( $dset->id );?>);">
     69                    <option value="plist" <?php if(get_option('advpssmethod'.intval( $dset->id )) == 'plist'){echo 'selected="selected"';}?>>Post list</option>
     70                    <option value="query" <?php if(get_option('advpssmethod'.intval( $dset->id )) == 'query'){echo 'selected="selected"';}?>>Query</option>
     71                  </select>
     72                  <span id="smudtsts<?php echo intval( $dset->id );?>" style="padding-left:10px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span></td>
    7373              </tr>
    7474            </table>
    75             <form method="post" onsubmit="return false" id="plist<?php echo $dset->id;?>">
    76               <table class="form-table <?php if(get_option('advpssmethod'.$dset->id) == 'query'){echo 'advps-hide';}?>">
     75            <form method="post" onsubmit="return false" id="plist<?php echo intval( $dset->id );?>">
     76              <table class="form-table <?php if(get_option('advpssmethod'.intval( $dset->id )) == 'query'){echo 'advps-hide';}?>">
    7777                <tr>
    7878                  <th scope="row">Listing option</th>
     
    8989                    </select>
    9090                    <span style="padding-left:10px;">
    91                     <input type="text" name="advps_plistmax" value="<?php echo $plist['advps_plistmax'];?>" style="width:40px;" onkeypress="return onlyNum(event);" title="Max number of post to list" />
     91                    <input type="text" name="advps_plistmax" value="<?php echo esc_attr( $plist['advps_plistmax'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" title="Max number of post to list" />
    9292                    </span> <span style="padding-left:10px;">
    9393                    <select name="advps_plistorder_by" title="Order by">
     
    107107                    </select>
    108108                    </span> <span style="padding-left:10px;">
    109                     <button class="button-secondary" value="" onclick="listPost(<?php echo $dset->id;?>)">List</button>
    110                     </span> <span class="ajx-loaderp" style="padding-left:12px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span></td>
     109                    <button class="button-secondary" value="" onclick="listPost(<?php echo intval( $dset->id );?>)">List</button>
     110                    </span> <span class="ajx-loaderp" style="padding-left:12px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span></td>
    111111                </tr>
    112112                <tr>
    113113                  <th scope="row">Select post from list</th>
    114                   <td><select name="advps_plist[]" multiple="multiple" style="min-height:250px; min-width:300px;" id="advps-plist-field<?php echo $dset->id;?>">
     114                  <td><select name="advps_plist[]" multiple="multiple" style="min-height:250px; min-width:300px;" id="advps-plist-field<?php echo intval( $dset->id );?>">
    115115                      <?php
    116116                        $lpargs = array(
    117                                 'post_type'      => ($plist['advps_post_stypes']) ? $plist['advps_post_stypes'] : 'post',
    118                                 'posts_per_page' => ($plist['advps_plistmax']) ? $plist['advps_plistmax'] : 99,
    119                                 'orderby'        => ($plist['advps_plistorder_by']) ? $plist['advps_plistorder_by'] : 'date',
    120                                 'order'          => ($plist['advps_plistorder']) ? $plist['advps_plistorder'] : 'DESC'
     117                                'post_type'      => ($plist['advps_post_stypes']) ? esc_html( $plist['advps_post_stypes'] ) : 'post',
     118                                'posts_per_page' => ($plist['advps_plistmax']) ? esc_html( $plist['advps_plistmax'] ) : 99,
     119                                'orderby'        => ($plist['advps_plistorder_by']) ? esc_html( $plist['advps_plistorder_by'] ) : 'date',
     120                                'order'          => ($plist['advps_plistorder']) ? esc_html( $plist['advps_plistorder'] ) : 'DESC'
    121121                        );
    122122                        $pl_query = new WP_Query($lpargs); while ($pl_query->have_posts()) : $pl_query->the_post();?>
     
    130130                <tr>
    131131                  <th scope="row">&nbsp;</th>
    132                   <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('plist<?php echo $dset->id;?>')" />
    133                     <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     132                  <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('plist<?php echo intval( $dset->id );?>')" />
     133                    <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    134134                </tr>
    135135              </table>
    136136              <input type="hidden" name="opt_field" value="plist" />
    137               <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     137              <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    138138            </form>
    139             <form method="post" onsubmit="return false" id="query<?php echo $dset->id;?>">
    140               <table class="form-table <?php if(!get_option('advpssmethod'.$dset->id) || get_option('advpssmethod'.$dset->id) == 'plist'){echo 'advps-hide';}?>">
     139            <form method="post" onsubmit="return false" id="query<?php echo intval( $dset->id );?>">
     140              <table class="form-table <?php if(!get_option('advpssmethod'.intval( $dset->id )) || get_option('advpssmethod'.intval( $dset->id )) == 'plist'){echo 'advps-hide';}?>">
    141141                <tr>
    142142                  <th scope="row">Post Type</th>
    143                   <td><select name="advps_post_types" onchange="advpsCheckCat(this.value,<?php echo $dset->id;?>)">
     143                  <td><select name="advps_post_types" onchange="advpsCheckCat(this.value,<?php echo intval( $dset->id );?>)">
    144144                      <option value="post" <?php if($query['advps_post_types'] == 'post'){echo 'selected="selected"';}?>>post</option>
    145145                      <option value="page" <?php if($query['advps_post_types'] == 'page'){echo 'selected="selected"';}?>>page</option>
     
    147147                              foreach ($customPostTypes  as $post_type ) {
    148148                          ?>
    149                       <option value="<?php echo $post_type;?>" <?php if($query['advps_post_types'] == $post_type){echo 'selected="selected"';}?>><?php echo $post_type;?></option>
     149                      <option value="<?php echo esc_attr( $post_type );?>" <?php if($query['advps_post_types'] == $post_type){echo 'selected="selected"';}?>><?php echo $post_type;?></option>
    150150                      <?php     
    151151                              }
     
    153153                    </select></td>
    154154                </tr>
    155                 <tr id="advps-cat-field<?php echo $dset->id;?>">
     155                <tr id="advps-cat-field<?php echo intval( $dset->id );?>">
    156156                  <?php 
    157                     $posttypeobj = get_post_type_object($query['advps_post_types']);
     157                    $posttypeobj = get_post_type_object( esc_html( $query['advps_post_types']) );
    158158                    if($query['advps_post_types'] != "page" && ($query['advps_post_types'] == 'post' || in_array('category',$posttypeobj->taxonomies))){
    159159                ?>
     
    164164                        foreach($catList as $scat){
    165165                      ?>
    166                       <option value="<?php echo $scat->term_id;?>" <?php if(isset($query['advps_category']) && in_array($scat->term_id,$query['advps_category'])){echo 'selected="selected"';}?>><?php echo $scat->name;?></option>
     166                      <option value="<?php echo $scat->term_id;?>" <?php if(isset($query['advps_category']) && in_array($scat->term_id,$query['advps_category'])){echo 'selected="selected"';}?>><?php echo esc_html( $scat->name );?></option>
    167167                      <?php }?>
    168168                    </select>
     
    172172                <tr>
    173173                  <th scope="row">Max. Number of post</th>
    174                   <td><input type="text" name="advps_maxpost" value="<?php echo $query['advps_maxpost'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
     174                  <td><input type="text" name="advps_maxpost" value="<?php echo esc_attr( $query['advps_maxpost'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
    175175                </tr>
    176176                <tr>
    177177                  <th scope="row">Offset (optional)</th>
    178                   <td><input type="text" name="advps_offset" value="<?php echo $query['advps_offset'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
     178                  <td><input type="text" name="advps_offset" value="<?php echo esc_attr( $query['advps_offset'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
    179179                </tr>
    180180                <tr>
    181181                  <th scope="row">Exclude (optional)</th>
    182                   <td><input type="text" name="advps_exclude" value="<?php echo $query['advps_exclude'];?>" style="width:100px;" />
     182                  <td><input type="text" name="advps_exclude" value="<?php echo esc_attr( $query['advps_exclude'] );?>" style="width:100px;" />
    183183                    <span style="padding-left:10px; font-size:10px; font-style:italic;">[ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]</span></td>
    184184                </tr>
     
    205205                <tr>
    206206                  <th scope="row">&nbsp;</th>
    207                   <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('query<?php echo $dset->id;?>')" />
    208                     <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     207                  <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('query<?php echo intval( $dset->id );?>')" />
     208                    <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    209209                </tr>
    210210              </table>
    211211              <input type="hidden" name="opt_field" value="query" />
    212               <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     212              <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    213213            </form>
    214214          </div>
     
    216216        <fieldset>
    217217          <legend class="advps-legend" style="width:50px; background-position:49px 6px;"><strong>Slider</strong></legend>
    218           <form method="post" id="slider<?php echo $dset->id;?>" onsubmit="return false">
     218          <form method="post" id="slider<?php echo intval( $dset->id );?>" onsubmit="return false">
    219219            <table class="form-table">
    220220              <tr>
    221221                <th scope="row">Slider Type</th>
    222                 <td><select name="advps_slider_type" onchange="sliderType(this.value,<?php echo $dset->id;?>);">
     222                <td><select name="advps_slider_type" onchange="sliderType(this.value,<?php echo intval( $dset->id );?>);">
    223223                    <option value="standard" <?php if($slider['advps_slider_type'] == 'standard'){echo 'selected="selected"';}?>>Standard</option>
    224224                    <option value="carousel" <?php if($slider['advps_slider_type'] == 'carousel'){echo 'selected="selected"';}?>>Carousel</option>
     
    244244              <tr>
    245245                <th scope="row">Speed</th>
    246                 <td><input type="text" name="advps_speed" value="<?php echo $slider['advps_speed'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
     246                <td><input type="text" name="advps_speed" value="<?php echo esc_attr( $slider['advps_speed'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
    247247              </tr>
    248248              <tr>
     
    255255              <tr>
    256256                <th scope="row">Pause</th>
    257                 <td><input type="text" name="advps_timeout" value="<?php echo $slider['advps_timeout'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
     257                <td><input type="text" name="advps_timeout" value="<?php echo esc_attr( $slider['advps_timeout'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
    258258              </tr>
    259259              <tr>
    260260                <th scope="row">Slide margin</th>
    261                 <td><input type="text" name="advps_sldmargin" value="<?php echo $slider['advps_sldmargin'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
     261                <td><input type="text" name="advps_sldmargin" value="<?php echo esc_attr( $slider['advps_sldmargin'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
    262262              </tr>
    263263              <tr>
     
    270270              <tr>
    271271                <th scope="row">&nbsp;</th>
    272                 <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('slider<?php echo $dset->id;?>')" />
    273                   <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     272                <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('slider<?php echo intval( $dset->id );?>')" />
     273                  <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    274274              </tr>
    275275            </table>
    276276            <input type="hidden" name="opt_field" value="slider" />
    277             <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     277            <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    278278          </form>
    279279        </fieldset>
    280280        <fieldset>
    281281          <legend class="advps-legend" style="width:121px; background-position:120px 6px;"><strong>Carousel & Ticker</strong></legend>
    282           <form method="post" onsubmit="return false" id="caro_ticker<?php echo $dset->id;?>">
     282          <form method="post" onsubmit="return false" id="caro_ticker<?php echo intval( $dset->id );?>">
    283283            <table class="form-table">
    284284              <tr>
    285285                <th scope="row">Number of slide</th>
    286                 <td><input type="text" name="advps_caro_slds" value="<?php if(isset($caro_ticker['advps_caro_slds'])){echo $caro_ticker['advps_caro_slds'];}?>" style="width:60px;" onkeypress="return onlyNum(event);" />
     286                <td><input type="text" name="advps_caro_slds" value="<?php if(isset($caro_ticker['advps_caro_slds'])){echo esc_attr( $caro_ticker['advps_caro_slds'] );}?>" style="width:60px;" onkeypress="return onlyNum(event);" />
    287287                  <span style="padding-left:20px; font-size:10px; font-style:italic;">[ N.B. For slider type Carousel or Ticker. ]</span></td>
    288288              </tr>
    289289              <tr>
    290290                <th scope="row">Slide width</th>
    291                 <td><input type="text" name="advps_caro_sldwidth" value="<?php if(isset($caro_ticker['advps_caro_sldwidth'])){echo $caro_ticker['advps_caro_sldwidth'];}?>" style="width:60px;" onkeypress="return onlyNum(event);" />
     291                <td><input type="text" name="advps_caro_sldwidth" value="<?php if(isset($caro_ticker['advps_caro_sldwidth'])){echo esc_attr( $caro_ticker['advps_caro_sldwidth'] );}?>" style="width:60px;" onkeypress="return onlyNum(event);" />
    292292                  <span style="padding-left:20px; font-size:10px; font-style:italic;">[ N.B. For slider type Carousel or Ticker. ]</span></td>
    293293              </tr>
    294294              <tr>
    295295                <th scope="row">&nbsp;</th>
    296                 <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('caro_ticker<?php echo $dset->id;?>')" />
    297                   <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     296                <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('caro_ticker<?php echo intval( $dset->id );?>')" />
     297                  <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    298298              </tr>
    299299            </table>
    300300            <input type="hidden" name="opt_field" value="caro_ticker" />
    301             <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     301            <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    302302          </form>
    303303        </fieldset>
    304304        <fieldset>
    305305          <legend class="advps-legend" style="width:155px; background-position:154px 6px;"><strong>Container & Thumbnail</strong></legend>
    306           <form method="post" onsubmit="return false" id="container<?php echo $dset->id;?>">
     306          <form method="post" onsubmit="return false" id="container<?php echo intval( $dset->id );?>">
    307307            <table class="form-table">
    308308              <tr>
     
    318318                        foreach($_wp_additional_image_sizes as $tkey => $tval){
    319319                        ?>
    320                     <option value="<?php echo $tkey;?>" <?php if($container['advps_thumbnail'] == $tkey){echo 'selected="selected"';}?>><?php echo $tkey;?></option>
     320                    <option value="<?php echo esc_attr( $tkey );?>" <?php if($container['advps_thumbnail'] == $tkey){echo 'selected="selected"';}?>><?php echo esc_html( $tkey );?></option>
    321321                    <?php
    322322                        }
     
    331331              <tr>
    332332                <th scope="row">Slide Container Width</th>
    333                 <td><input type="text" name="advps_sld_width" value="<?php echo $container['advps_sld_width'];?>" style="width:45px;" onkeypress="return onlyNum(event);" />
     333                <td><input type="text" name="advps_sld_width" value="<?php echo esc_attr( $container['advps_sld_width'] );?>" style="width:45px;" onkeypress="return onlyNum(event);" />
    334334                  &nbsp;px </td>
    335335              </tr>
     
    343343              <tr>
    344344                <th scope="row">Padding</th>
    345                 <td><input type="text" name="advps_contpad1" value="<?php echo $container['advps_contpad1'];?>" style="width:40px; height:25px;" />
     345                <td><input type="text" name="advps_contpad1" value="<?php echo esc_attr( $container['advps_contpad1'] );?>" style="width:40px; height:25px;" />
    346346                  <select name="advps_padu1" style="vertical-align:top; width:46px; height:25px;">
    347347                    <option value="vw" <?php if(isset($container['advps_padu1']) && $container['advps_padu1'] == 'vw'){echo 'selected="selected"';}?>>vw</option>
     
    352352                    <option value="pt" <?php if(isset($container['advps_padu1']) && $container['advps_padu1'] == 'pt'){echo 'selected="selected"';}?>>pt</option>
    353353                  </select>
    354                   <input type="text" name="advps_contpad2" value="<?php echo $container['advps_contpad2'];?>" style="width:40px; height:25px;" />
     354                  <input type="text" name="advps_contpad2" value="<?php echo esc_attr( $container['advps_contpad2'] );?>" style="width:40px; height:25px;" />
    355355                  <select name="advps_padu2" style="vertical-align:top;width:46px; height:25px;">
    356356                    <option value="vw" <?php if(isset($container['advps_padu2']) && $container['advps_padu2'] == 'vw'){echo 'selected="selected"';}?>>vw</option>
     
    361361                    <option value="pt" <?php if(isset($container['advps_padu2']) && $container['advps_padu2'] == 'pt'){echo 'selected="selected"';}?>>pt</option>
    362362                  </select>
    363                   <input type="text" name="advps_contpad3" value="<?php echo $container['advps_contpad3'];?>" style="width:40px; height:25px;" />
     363                  <input type="text" name="advps_contpad3" value="<?php echo esc_attr( $container['advps_contpad3'] );?>" style="width:40px; height:25px;" />
    364364                  <select name="advps_padu3" style="vertical-align:top;width:46px; height:25px;">
    365365                    <option value="vw" <?php if(isset($container['advps_padu3']) && $container['advps_padu3'] == 'vw'){echo 'selected="selected"';}?>>vw</option>
     
    370370                    <option value="pt" <?php if(isset($container['advps_padu3']) && $container['advps_padu3'] == 'pt'){echo 'selected="selected"';}?>>pt</option>
    371371                  </select>
    372                   <input type="text" name="advps_contpad4" value="<?php echo $container['advps_contpad4'];?>" style="width:40px; height:25px;" />
     372                  <input type="text" name="advps_contpad4" value="<?php echo esc_attr( $container['advps_contpad4'] );?>" style="width:40px; height:25px;" />
    373373                  <select name="advps_padu4" style="vertical-align:top;width:46px; height:25px;">
    374374                    <option value="vw" <?php if(isset($container['advps_padu4']) && $container['advps_padu4'] == 'vw'){echo 'selected="selected"';}?>>vw</option>
     
    382382              <tr>
    383383                <th scope="row">Background Color</th>
    384                 <td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bgcolor" value="<?php echo $container['advps_bgcolor'];?>" style="width:100px;" />
     384                <td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bgcolor" value="<?php echo esc_attr( $container['advps_bgcolor'] );?>" style="width:100px;" />
    385385                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    386386              </tr>
     
    388388                <th scope="row">Border</th>
    389389                <td><span style="vertical-align:top">
    390                   <input type="text" name="advps_border_size" value="<?php echo $container['advps_border_size'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
     390                  <input type="text" name="advps_border_size" value="<?php echo esc_attr( $container['advps_border_size'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" />
    391391                  px &nbsp;&nbsp;
    392392                  <select name="advps_border_type">
     
    399399                  </select>
    400400                  &nbsp;&nbsp;</span>
    401                   <input class="advps-color-picker" type="text" name="advps_border_color" id="advpscolor<?php echo ++$flg?>" value="<?php echo $container['advps_border_color'];?>" style="width:100px;" />
     401                  <input class="advps-color-picker" type="text" name="advps_border_color" id="advpscolor<?php echo ++$flg?>" value="<?php echo esc_attr( $container['advps_border_color'] );?>" style="width:100px;" />
    402402                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    403403              </tr>
     
    412412                <th scope="row">Box Shadow</th>
    413413                <td><span style="vertical-align:top">
    414                   <input type="text" name="advps_bxshad1" value="<?php echo $container['advps_bxshad1'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
     414                  <input type="text" name="advps_bxshad1" value="<?php echo esc_attr( $container['advps_bxshad1'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" />
    415415                  px &nbsp;&nbsp;
    416                   <input type="text" name="advps_bxshad2" value="<?php echo $container['advps_bxshad2'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
     416                  <input type="text" name="advps_bxshad2" value="<?php echo esc_attr( $container['advps_bxshad2'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" />
    417417                  px&nbsp;&nbsp;
    418                   <input type="text" name="advps_bxshad3" value="<?php echo $container['advps_bxshad3'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
     418                  <input type="text" name="advps_bxshad3" value="<?php echo esc_attr( $container['advps_bxshad3'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" />
    419419                  px&nbsp;&nbsp;</span>
    420                   <input class="advps-color-picker" type="text" name="advps_bxshadcolor" value="<?php echo $container['advps_bxshadcolor'];?>" style="width:100px;" id="advpscolor<?php echo ++$flg?>" />
     420                  <input class="advps-color-picker" type="text" name="advps_bxshadcolor" value="<?php echo esc_attr( $container['advps_bxshadcolor'] );?>" style="width:100px;" id="advpscolor<?php echo ++$flg?>" />
    421421                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    422422              </tr>
     
    430430              <tr>
    431431                <th scope="row">&nbsp;</th>
    432                 <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('container<?php echo $dset->id;?>')" />
    433                   <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     432                <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('container<?php echo intval( $dset->id );?>')" />
     433                  <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    434434              </tr>
    435435            </table>
    436436            <input type="hidden" name="opt_field" value="container" />
    437             <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     437            <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    438438          </form>
    439439        </fieldset>
    440440        <fieldset>
    441441          <legend class="advps-legend" style="width:66px; background-position:65px 6px;"><strong>Content</strong></legend>
    442           <form method="post" onsubmit="return false" id="content<?php echo $dset->id;?>">
     442          <form method="post" onsubmit="return false" id="content<?php echo intval( $dset->id );?>">
    443443            <table class="form-table">
    444444              <tr>
     
    454454              <tr>
    455455                <th scope="row">Content width</th>
    456                 <td><input type="text" name="advps_cont_width" value="<?php echo $content['advps_cont_width'];?>" style="width:60px;" onkeypress="return onlyNum(event);" />
     456                <td><input type="text" name="advps_cont_width" value="<?php echo esc_attr( $content['advps_cont_width'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" />
    457457                  px</td>
    458458              </tr>
     
    468468              <tr>
    469469                <th scope="row">Title font Color</th>
    470                 <td><input id="advpscolor<?php echo ++$flg?>" type="text" name="advps_titleFcolor" value="<?php echo $content['advps_titleFcolor'];?>" style="width:100px;" class="advps-color-picker" />
     470                <td><input id="advpscolor<?php echo ++$flg?>" type="text" name="advps_titleFcolor" value="<?php echo esc_attr( $content['advps_titleFcolor'] );?>" style="width:100px;" class="advps-color-picker" />
    471471                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    472472              </tr>
    473473              <tr>
    474474                <th scope="row">Title hover Color</th>
    475                 <td><input id="advpscolor<?php echo ++$flg?>" type="text" name="advps_titleHcolor" value="<?php echo $content['advps_titleHcolor'];?>" style="width:100px;" class="advps-color-picker" />
     475                <td><input id="advpscolor<?php echo ++$flg?>" type="text" name="advps_titleHcolor" value="<?php echo esc_attr( $content['advps_titleHcolor'] );?>" style="width:100px;" class="advps-color-picker" />
    476476                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    477477              </tr>
    478478              <tr>
    479479                <th scope="row">Title font size</th>
    480                 <td><input type="text" name="advps_titleFsizeL" value="<?php if(isset($content['advps_titleFsizeL'])){ echo $content['advps_titleFsizeL'];}else{echo 20;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
    481                   &nbsp;px&nbsp;&nbsp;
    482                   <input type="text" name="advps_titleFsize1" value="<?php if(isset($content['advps_titleFsize1'])){ echo $content['advps_titleFsize1'];}else{echo 18;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
    483                   &nbsp;px&nbsp;&nbsp;
    484                   <input type="text" name="advps_titleFsize2" value="<?php if(isset($content['advps_titleFsize2'])){echo $content['advps_titleFsize2'];}else{echo 16;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
    485                   &nbsp;px&nbsp;&nbsp;
    486                   <input type="text" name="advps_titleFsize3" value="<?php if(isset($content['advps_titleFsize3'])){echo $content['advps_titleFsize3'];}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
    487                   &nbsp;px&nbsp;&nbsp;
    488                   <input type="text" name="advps_titleFsize4" value="<?php if(isset($content['advps_titleFsize4'])){echo $content['advps_titleFsize4'];}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
    489                   &nbsp;px&nbsp;&nbsp;
    490                   <input type="text" name="advps_titleFsize5" value="<?php if(isset($content['advps_titleFsize5'])){echo $content['advps_titleFsize5'];}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
     480                <td><input type="text" name="advps_titleFsizeL" value="<?php if(isset($content['advps_titleFsizeL'])){ echo esc_attr( $content['advps_titleFsizeL'] );}else{echo 20;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
     481                  &nbsp;px&nbsp;&nbsp;
     482                  <input type="text" name="advps_titleFsize1" value="<?php if(isset($content['advps_titleFsize1'])){ echo esc_attr( $content['advps_titleFsize1'] );}else{echo 18;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
     483                  &nbsp;px&nbsp;&nbsp;
     484                  <input type="text" name="advps_titleFsize2" value="<?php if(isset($content['advps_titleFsize2'])){echo esc_attr( $content['advps_titleFsize2'] );}else{echo 16;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
     485                  &nbsp;px&nbsp;&nbsp;
     486                  <input type="text" name="advps_titleFsize3" value="<?php if(isset($content['advps_titleFsize3'])){echo esc_attr( $content['advps_titleFsize3'] );}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
     487                  &nbsp;px&nbsp;&nbsp;
     488                  <input type="text" name="advps_titleFsize4" value="<?php if(isset($content['advps_titleFsize4'])){echo esc_attr( $content['advps_titleFsize4'] );}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
     489                  &nbsp;px&nbsp;&nbsp;
     490                  <input type="text" name="advps_titleFsize5" value="<?php if(isset($content['advps_titleFsize5'])){echo esc_attr( $content['advps_titleFsize5'] );}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
    491491                  &nbsp;px&nbsp;&nbsp; <span style="padding-left:10px; font-size:10px; font-style:italic;">[ N.B. Different sizes for different media screen width. Hover the field to know which field is for which width. ]</span></td>
    492492              </tr>
    493493              <tr>
    494494                <th scope="row">Title line height</th>
    495                 <td><input type="text" name="advps_titleLheightL" value="<?php if(isset($content['advps_titleLheightL'])){ echo $content['advps_titleLheightL'];}else{echo 20;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
    496                   &nbsp;px&nbsp;&nbsp;
    497                   <input type="text" name="advps_titleLheight1" value="<?php if(isset($content['advps_titleLheight1'])){ echo $content['advps_titleLheight1'];}else{echo 18;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
    498                   &nbsp;px&nbsp;&nbsp;
    499                   <input type="text" name="advps_titleLheight2" value="<?php if(isset($content['advps_titleLheight2'])){echo $content['advps_titleLheight2'];}else{echo 16;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
    500                   &nbsp;px&nbsp;&nbsp;
    501                   <input type="text" name="advps_titleLheight3" value="<?php if(isset($content['advps_titleLheight3'])){echo $content['advps_titleLheight3'];}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
    502                   &nbsp;px&nbsp;&nbsp;
    503                   <input type="text" name="advps_titleLheight4" value="<?php if(isset($content['advps_titleLheight4'])){echo $content['advps_titleLheight4'];}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
    504                   &nbsp;px&nbsp;&nbsp;
    505                   <input type="text" name="advps_titleLheight5" value="<?php if(isset($content['advps_titleLheight5'])){echo $content['advps_titleLheight5'];}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
     495                <td><input type="text" name="advps_titleLheightL" value="<?php if(isset($content['advps_titleLheightL'])){ echo esc_attr( $content['advps_titleLheightL'] );}else{echo 20;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
     496                  &nbsp;px&nbsp;&nbsp;
     497                  <input type="text" name="advps_titleLheight1" value="<?php if(isset($content['advps_titleLheight1'])){ echo esc_attr( $content['advps_titleLheight1'] );}else{echo 18;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
     498                  &nbsp;px&nbsp;&nbsp;
     499                  <input type="text" name="advps_titleLheight2" value="<?php if(isset($content['advps_titleLheight2'])){echo esc_attr( $content['advps_titleLheight2'] );}else{echo 16;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
     500                  &nbsp;px&nbsp;&nbsp;
     501                  <input type="text" name="advps_titleLheight3" value="<?php if(isset($content['advps_titleLheight3'])){echo esc_attr( $content['advps_titleLheight3'] );}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
     502                  &nbsp;px&nbsp;&nbsp;
     503                  <input type="text" name="advps_titleLheight4" value="<?php if(isset($content['advps_titleLheight4'])){echo esc_attr( $content['advps_titleLheight4'] );}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
     504                  &nbsp;px&nbsp;&nbsp;
     505                  <input type="text" name="advps_titleLheight5" value="<?php if(isset($content['advps_titleLheight5'])){echo esc_attr( $content['advps_titleLheight5'] );}else{echo 15;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
    506506                  &nbsp;px&nbsp;&nbsp; <span style="padding-left:10px; font-size:10px; font-style:italic;">[ N.B. Each for different media screen width. Hover the field to know which field is for which width. ]</span></td>
    507507              </tr>
    508508              <tr>
    509509                <th scope="row">Excerpt/Content font color</th>
    510                 <td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_excptFcolor" value="<?php echo $content['advps_excptFcolor'];?>" style="width:100px;" />
     510                <td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_excptFcolor" value="<?php echo esc_attr( $content['advps_excptFcolor'] );?>" style="width:100px;" />
    511511                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    512512              </tr>
    513513              <tr>
    514514                <th scope="row">Excerpt/Content font size</th>
    515                 <td><input type="text" name="advps_excptFsizeL" value="<?php if(isset($content['advps_excptFsizeL'])){ echo $content['advps_excptFsizeL'];}else{echo 14;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
    516                   &nbsp;px&nbsp;&nbsp;
    517                   <input type="text" name="advps_excptFsize1" value="<?php if(isset($content['advps_excptFsize1'])){ echo $content['advps_excptFsize1'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
    518                   &nbsp;px&nbsp;&nbsp;
    519                   <input type="text" name="advps_excptFsize2" value="<?php if(isset($content['advps_excptFsize2'])){echo $content['advps_excptFsize2'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
    520                   &nbsp;px&nbsp;&nbsp;
    521                   <input type="text" name="advps_excptFsize3" value="<?php if(isset($content['advps_excptFsize3'])){echo $content['advps_excptFsize3'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
    522                   &nbsp;px&nbsp;&nbsp;
    523                   <input type="text" name="advps_excptFsize4" value="<?php if(isset($content['advps_excptFsize4'])){echo $content['advps_excptFsize4'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
    524                   &nbsp;px&nbsp;&nbsp;
    525                   <input type="text" name="advps_excptFsize5" value="<?php if(isset($content['advps_excptFsize5'])){echo $content['advps_excptFsize5'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
     515                <td><input type="text" name="advps_excptFsizeL" value="<?php if(isset($content['advps_excptFsizeL'])){ echo esc_attr( $content['advps_excptFsizeL'] );}else{echo 14;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
     516                  &nbsp;px&nbsp;&nbsp;
     517                  <input type="text" name="advps_excptFsize1" value="<?php if(isset($content['advps_excptFsize1'])){ echo esc_attr( $content['advps_excptFsize1'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
     518                  &nbsp;px&nbsp;&nbsp;
     519                  <input type="text" name="advps_excptFsize2" value="<?php if(isset($content['advps_excptFsize2'])){echo esc_attr( $content['advps_excptFsize2'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
     520                  &nbsp;px&nbsp;&nbsp;
     521                  <input type="text" name="advps_excptFsize3" value="<?php if(isset($content['advps_excptFsize3'])){echo esc_attr( $content['advps_excptFsize3'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
     522                  &nbsp;px&nbsp;&nbsp;
     523                  <input type="text" name="advps_excptFsize4" value="<?php if(isset($content['advps_excptFsize4'])){echo esc_attr( $content['advps_excptFsize4'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
     524                  &nbsp;px&nbsp;&nbsp;
     525                  <input type="text" name="advps_excptFsize5" value="<?php if(isset($content['advps_excptFsize5'])){echo esc_attr( $content['advps_excptFsize5'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
    526526                  &nbsp;px&nbsp;&nbsp; </td>
    527527              </tr>
    528528              <tr>
    529529                <th scope="row">Excerpt line height</th>
    530                 <td><input type="text" name="advps_excptLheightL" value="<?php if(isset($content['advps_excptLheightL'])){ echo $content['advps_excptLheightL'];}else{echo 14;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
    531                   &nbsp;px&nbsp;&nbsp;
    532                   <input type="text" name="advps_excptLheight1" value="<?php if(isset($content['advps_excptLheight1'])){ echo $content['advps_excptLheight1'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
    533                   &nbsp;px&nbsp;&nbsp;
    534                   <input type="text" name="advps_excptLheight2" value="<?php if(isset($content['advps_excptLheight2'])){echo $content['advps_excptLheight2'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
    535                   &nbsp;px&nbsp;&nbsp;
    536                   <input type="text" name="advps_excptLheight3" value="<?php if(isset($content['advps_excptLheight3'])){echo $content['advps_excptLheight3'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
    537                   &nbsp;px&nbsp;&nbsp;
    538                   <input type="text" name="advps_excptLheight4" value="<?php if(isset($content['advps_excptLheight4'])){echo $content['advps_excptLheight4'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
    539                   &nbsp;px&nbsp;&nbsp;
    540                   <input type="text" name="advps_excptLheight5" value="<?php if(isset($content['advps_excptLheight5'])){echo $content['advps_excptLheight5'];}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
     530                <td><input type="text" name="advps_excptLheightL" value="<?php if(isset($content['advps_excptLheightL'])){ echo esc_attr( $content['advps_excptLheightL'] );}else{echo 14;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For desktop, laptop and larger width device." />
     531                  &nbsp;px&nbsp;&nbsp;
     532                  <input type="text" name="advps_excptLheight1" value="<?php if(isset($content['advps_excptLheight1'])){ echo esc_attr( $content['advps_excptLheight1'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 1024" />
     533                  &nbsp;px&nbsp;&nbsp;
     534                  <input type="text" name="advps_excptLheight2" value="<?php if(isset($content['advps_excptLheight2'])){echo esc_attr( $content['advps_excptLheight2'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 768" />
     535                  &nbsp;px&nbsp;&nbsp;
     536                  <input type="text" name="advps_excptLheight3" value="<?php if(isset($content['advps_excptLheight3'])){echo esc_attr( $content['advps_excptLheight3'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 650" />
     537                  &nbsp;px&nbsp;&nbsp;
     538                  <input type="text" name="advps_excptLheight4" value="<?php if(isset($content['advps_excptLheight4'])){echo esc_attr( $content['advps_excptLheight4'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 480" />
     539                  &nbsp;px&nbsp;&nbsp;
     540                  <input type="text" name="advps_excptLheight5" value="<?php if(isset($content['advps_excptLheight5'])){echo esc_attr( $content['advps_excptLheight5'] );}else{echo 12;}?>" style="width:40px;" onkeypress="return onlyNum(event);" title="For media screen smaller than 320" />
    541541                  &nbsp;px&nbsp;&nbsp; </td>
    542542              </tr>
    543543              <tr>
    544544                <th scope="row">Excerpt length</th>
    545                 <td><input type="text" name="advps_excerptlen" value="<?php echo $content['advps_excerptlen'];?>" style="width:60px;" onkeypress="return onlyNum(event);" />
     545                <td><input type="text" name="advps_excerptlen" value="<?php echo esc_attr( $content['advps_excerptlen'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" />
    546546                  &nbsp;words</td>
    547547              </tr>
     
    596596              <tr>
    597597                <th scope="row">&nbsp;</th>
    598                 <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('content<?php echo $dset->id;?>')" />
    599                   <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     598                <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('content<?php echo intval( $dset->id );?>')" />
     599                  <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    600600              </tr>
    601601            </table>
    602602            <input type="hidden" name="opt_field" value="content" />
    603             <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     603            <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    604604          </form>
    605605        </fieldset>
    606606        <fieldset>
    607607          <legend class="advps-legend" style="width:79px; background-position:78px 6px;"><strong>Navigation</strong></legend>
    608           <form method="post" onsubmit="return false" id="navigation<?php echo $dset->id;?>">
     608          <form method="post" onsubmit="return false" id="navigation<?php echo intval( $dset->id );?>">
    609609            <table class="form-table">
    610610              <tr>
     
    621621                  <span style="padding:0px 5px 0px 10px;">Bullet</span>
    622622                  <input type="radio" name="advps_pager_type" value="bullet" <?php if(isset($navigation['advps_pager_type']) && $navigation['advps_pager_type'] == 'bullet'){echo 'checked="checked"';}?>>
    623                   <span id="advps-pthumb-lvl<?php echo $dset->id;?>" style="padding:0px 5px 0px 10px;" class="<?php if($slider['advps_slider_type'] != 'standard'){echo 'advps-fade';}?>">Thumbnail</span>
    624                   <input id="advps-pthumb<?php echo $dset->id;?>" <?php if($slider['advps_slider_type'] != 'standard'){echo 'disabled="disabled"';}?> type="radio" name="advps_pager_type" value="thumb" <?php if(isset($navigation['advps_pager_type']) && $navigation['advps_pager_type'] == 'thumb'){echo 'checked="checked"';}?>></td>
     623                  <span id="advps-pthumb-lvl<?php echo intval( $dset->id );?>" style="padding:0px 5px 0px 10px;" class="<?php if($slider['advps_slider_type'] != 'standard'){echo 'advps-fade';}?>">Thumbnail</span>
     624                  <input id="advps-pthumb<?php echo intval( $dset->id );?>" <?php if($slider['advps_slider_type'] != 'standard'){echo 'disabled="disabled"';}?> type="radio" name="advps_pager_type" value="thumb" <?php if(isset($navigation['advps_pager_type']) && $navigation['advps_pager_type'] == 'thumb'){echo 'checked="checked"';}?>></td>
    625625              </tr>
    626626              <tr>
    627627                <th scope="row">Thumbnail Width</th>
    628                 <td><input type="text" name="advps_pthumb_width" value="<?php echo $navigation['advps_pthumb_width'];?>" style="width:50px;" onkeypress="return onlyNum(event);" />
     628                <td><input type="text" name="advps_pthumb_width" value="<?php echo esc_attr( $navigation['advps_pthumb_width'] );?>" style="width:50px;" onkeypress="return onlyNum(event);" />
    629629                  &nbsp;% <span style="padding-left:10px; font-size:10px; font-style:italic;">[ N.B. For pager type thumbnail. ]</span></td>
    630630              </tr>
     
    639639              <tr>
    640640                <th scope="row">Pager position from bottom</th>
    641                 <td><input type="text" name="advps_pager_bottom" value="<?php echo $navigation['advps_pager_bottom'];?>" style="width:50px;" onkeypress="return NumNdNeg(event);" />
     641                <td><input type="text" name="advps_pager_bottom" value="<?php echo esc_attr( $navigation['advps_pager_bottom'] );?>" style="width:50px;" onkeypress="return NumNdNeg(event);" />
    642642                  &nbsp;px</td>
    643643              </tr>
     
    672672              <tr>
    673673                <th scope="row">&nbsp;</th>
    674                 <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('navigation<?php echo $dset->id;?>')" />
    675                   <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     674                <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('navigation<?php echo intval( $dset->id );?>')" />
     675                  <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    676676              </tr>
    677677            </table>
    678678            <input type="hidden" name="opt_field" value="navigation" />
    679             <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     679            <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    680680          </form>
    681681        </fieldset>
    682         <form method="post" id="frmOptDel<?php echo $dset->id;?>" onsubmit="return false">
    683           <input type="hidden" value="<?php echo $dset->id;?>" name="optset-id" />
    684           <input type="hidden" value="<?php echo $tcount[0]->Auto_increment;?>" name="nextoptid" />
     682        <form method="post" id="frmOptDel<?php echo intval( $dset->id );?>" onsubmit="return false">
     683          <input type="hidden" value="<?php echo intval( $dset->id );?>" name="optset-id" />
     684          <input type="hidden" value="<?php echo intval( $tcount[0]->Auto_increment );?>" name="nextoptid" />
    685685          <p>
    686             <input type="submit" name="del-optset" value="Delete" class="button-secondary" onclick="deleteOptSet(<?php echo $dset->id;?>)" style="width:12%;" />
     686            <input type="submit" name="del-optset" value="Delete" class="button-secondary" onclick="deleteOptSet(<?php echo intval( $dset->id );?>)" style="width:12%;" />
    687687            <span style="margin-left:5px;">
    688             <input type="submit" name="dup-optset" value="Duplicate" class="button-secondary" onclick="duplicateOptSet(<?php echo $dset->id;?>)" style="width:12%;" />
     688            <input type="submit" name="dup-optset" value="Duplicate" class="button-secondary" onclick="duplicateOptSet(<?php echo intval( $dset->id );?>)" style="width:12%;" />
    689689            </span> </p>
    690690          <?php wp_nonce_field('advps-checkauthnonce','advps_wpnonce'); ?>
     
    700700<div style="position:relative; float:left; width:72%">
    701701  <form method="post">
    702     <input type="hidden" name="nextoptid" value="<?php echo $tcount[0]->Auto_increment;?>" />
     702    <input type="hidden" name="nextoptid" value="<?php echo intval( $tcount[0]->Auto_increment );?>" />
    703703    <input type="hidden" name="template" value="three" />
    704704    <?php wp_nonce_field('advps-checkauthnonce','advps_wpnonce'); ?>
  • advanced-post-slider/trunk/templates/template-two.php

    r1115402 r1316529  
    33?>
    44<div class="advps-col-right">
    5   <h2>Advanced post slider <?php echo get_option('advps-curr-version');?></h2>
     5  <h2>Advanced post slider <?php echo esc_html( get_option('advps-curr-version') );?></h2>
    66  <ul>
    77    <li><a href="http://www.wpcue.com/wordpress-plugins/advanced-post-slider/" target="_blank">Plugin Homepage</a></li>
     
    3737      <div class="handlediv down" title="Click to toggle"> <br>
    3838      </div>
    39       <h3 style="cursor:pointer; text-align:center" class="advps-expand <?php if(isset($_POST['advps_submit']) && $_POST['advps_submit'] == 'Add new slideshow' && $_POST['nextoptid'] == $dset->id){echo 'advps-highlight';}?>" id="lbltxt<?php echo $dset->id;?>">
    40         <?php if(get_option('optset'.$dset->id)){echo get_option('optset'.$dset->id);}else{echo 'Slider '.$dset->id;}?>
     39      <h3 style="cursor:pointer; text-align:center" class="advps-expand <?php if(isset($_POST['advps_submit']) && $_POST['advps_submit'] == 'Add new slideshow' && $_POST['nextoptid'] == intval( $dset->id )){echo 'advps-highlight';}?>" id="lbltxt<?php echo intval( $dset->id );?>">
     40        <?php if(get_option('optset'.intval( $dset->id ))){echo esc_html( get_option('optset'.intval( $dset->id )) );}else{echo 'Slider '.intval( $dset->id );}?>
    4141      </h3>
    4242      <div class="inside">
     
    4646            <tr>
    4747              <th scope="row">Label</th>
    48               <td><input type="text" style="" value="<?php if(get_option('optset'.$dset->id)){echo get_option('optset'.$dset->id);}else{echo 'Slider '.$dset->id;}?>" name="optset<?php echo $dset->id;?>" class="advps-optset-label" onchange="advpsUpdateLabel(this.name,this.value,<?php echo $dset->id;?>)" />
    49                 <span id="lbludtSts<?php echo $dset->id;?>" style="padding-left:10px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span></td>
     48              <td><input type="text" style="" value="<?php if(get_option('optset'.intval( $dset->id ))){echo esc_attr( get_option('optset'.intval( $dset->id )) );}else{echo 'Slider '.intval( $dset->id );}?>" name="optset<?php echo intval( $dset->id );?>" class="advps-optset-label" onchange="advpsUpdateLabel(this.name,this.value,<?php echo intval( $dset->id );?>)" />
     49                <span id="lbludtSts<?php echo intval( $dset->id );?>" style="padding-left:10px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span></td>
    5050            </tr>
    5151            <tr>
    5252              <th scope="row">Usage</th>
    53               <td><input style="width:200px; font-size:12px; text-align:center;" type="text" value='[advps-slideshow optset="<?php echo $dset->id;?>"]' readonly="readonly"  /></td>
     53              <td><input style="width:200px; font-size:12px; text-align:center;" type="text" value='[advps-slideshow optset="<?php echo intval( $dset->id );?>"]' readonly="readonly"  /></td>
    5454            </tr>
    5555          </table>
     
    5757        <fieldset>
    5858          <legend class="advps-legend advpssm" style="width:80px; background-position:79px 6px;"><strong>Select Post</strong></legend>
    59           <div id="advps-sel<?php echo $dset->id;?>">
     59          <div id="advps-sel<?php echo intval( $dset->id );?>">
    6060            <table class="form-table">
    6161              <tr>
    6262                <th scope="row">Select post using</th>
    63                 <td><select name="advpssmethod<?php echo $dset->id?>" onchange="updateSm(this,<?php echo $dset->id;?>);">
    64                     <option value="plist" <?php if(get_option('advpssmethod'.$dset->id) == 'plist'){echo 'selected="selected"';}?>>Post list</option>
    65                     <option value="query" <?php if(get_option('advpssmethod'.$dset->id) == 'query'){echo 'selected="selected"';}?>>Query</option>
    66                   </select><span id="smudtsts<?php echo $dset->id;?>" style="padding-left:10px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span></td>
     63                <td><select name="advpssmethod<?php echo intval( $dset->id )?>" onchange="updateSm(this,<?php echo intval( $dset->id );?>);">
     64                    <option value="plist" <?php if(get_option('advpssmethod'.intval( $dset->id )) == 'plist'){echo 'selected="selected"';}?>>Post list</option>
     65                    <option value="query" <?php if(get_option('advpssmethod'.intval( $dset->id )) == 'query'){echo 'selected="selected"';}?>>Query</option>
     66                  </select><span id="smudtsts<?php echo intval( $dset->id );?>" style="padding-left:10px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span></td>
    6767              </tr>
    6868            </table>
    69             <form method="post" onsubmit="return false" id="plist<?php echo $dset->id;?>">
    70               <table class="form-table <?php if(get_option('advpssmethod'.$dset->id) == 'query'){echo 'advps-hide';}?>">
     69            <form method="post" onsubmit="return false" id="plist<?php echo intval( $dset->id );?>">
     70              <table class="form-table <?php if(get_option('advpssmethod'.intval( $dset->id )) == 'query'){echo 'advps-hide';}?>">
    7171                <tr>
    7272                  <th scope="row">Listing option</th>
     
    8383                    </select>
    8484                    <span style="padding-left:10px;">
    85                     <input type="text" name="advps_plistmax" value="<?php echo $plist['advps_plistmax'];?>" style="width:40px;" onkeypress="return onlyNum(event);" title="Max number of post to list" />
     85                    <input type="text" name="advps_plistmax" value="<?php echo esc_attr( $plist['advps_plistmax'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" title="Max number of post to list" />
    8686                    </span> <span style="padding-left:10px;">
    8787                    <select name="advps_plistorder_by" title="Order by">
     
    101101                    </select>
    102102                    </span> <span style="padding-left:10px;">
    103                     <button class="button-secondary" value="" onclick="listPost(<?php echo $dset->id;?>)">List</button>
    104                     </span> <span class="ajx-loaderp" style="padding-left:12px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span></td>
     103                    <button class="button-secondary" value="" onclick="listPost(<?php echo intval( $dset->id );?>)">List</button>
     104                    </span> <span class="ajx-loaderp" style="padding-left:12px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span></td>
    105105                </tr>
    106106                <tr>
    107107                  <th scope="row">Select post from list</th>
    108                   <td><select name="advps_plist[]" multiple="multiple" style="min-height:250px; min-width:300px;" id="advps-plist-field<?php echo $dset->id;?>">
     108                  <td><select name="advps_plist[]" multiple="multiple" style="min-height:250px; min-width:300px;" id="advps-plist-field<?php echo intval( $dset->id );?>">
    109109                      <?php
    110110                        $lpargs = array(
    111                                 'post_type'      => ($plist['advps_post_stypes']) ? $plist['advps_post_stypes'] : 'post',
    112                                 'posts_per_page' => ($plist['advps_plistmax']) ? $plist['advps_plistmax'] : 99,
    113                                 'orderby'        => ($plist['advps_plistorder_by']) ? $plist['advps_plistorder_by'] : 'date',
    114                                 'order'          => ($plist['advps_plistorder']) ? $plist['advps_plistorder'] : 'DESC'
     111                                'post_type'      => ($plist['advps_post_stypes']) ? esc_html( $plist['advps_post_stypes'] ) : 'post',
     112                                'posts_per_page' => ($plist['advps_plistmax']) ? esc_html( $plist['advps_plistmax'] ) : 99,
     113                                'orderby'        => ($plist['advps_plistorder_by']) ? esc_html( $plist['advps_plistorder_by'] ) : 'date',
     114                                'order'          => ($plist['advps_plistorder']) ? esc_html( $plist['advps_plistorder'] ) : 'DESC'
    115115                        );
    116116                        $pl_query = new WP_Query($lpargs); while ($pl_query->have_posts()) : $pl_query->the_post();?>
     
    124124                <tr>
    125125                  <th scope="row">&nbsp;</th>
    126                   <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('plist<?php echo $dset->id;?>')" />
    127                     <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     126                  <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('plist<?php echo intval( $dset->id );?>')" />
     127                    <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    128128                </tr>
    129129              </table>
    130130              <input type="hidden" name="opt_field" value="plist" />
    131               <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     131              <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    132132            </form>
    133             <form method="post" onsubmit="return false" id="query<?php echo $dset->id;?>">
    134               <table class="form-table <?php if(!get_option('advpssmethod'.$dset->id) || get_option('advpssmethod'.$dset->id) == 'plist'){echo 'advps-hide';}?>">
     133            <form method="post" onsubmit="return false" id="query<?php echo intval( $dset->id );?>">
     134              <table class="form-table <?php if(!get_option('advpssmethod'.intval( $dset->id )) || get_option('advpssmethod'.intval( $dset->id )) == 'plist'){echo 'advps-hide';}?>">
    135135                <tr>
    136136                  <th scope="row">Post Type</th>
    137                   <td><select name="advps_post_types" onchange="advpsCheckCat(this.value,<?php echo $dset->id;?>)">
     137                  <td><select name="advps_post_types" onchange="advpsCheckCat(this.value,<?php echo intval( $dset->id );?>)">
    138138                      <option value="post" <?php if($query['advps_post_types'] == 'post'){echo 'selected="selected"';}?>>post</option>
    139139                      <option value="page" <?php if($query['advps_post_types'] == 'page'){echo 'selected="selected"';}?>>page</option>
     
    141141                              foreach ($customPostTypes  as $post_type ) {
    142142                          ?>
    143                       <option value="<?php echo $post_type;?>" <?php if($query['advps_post_types'] == $post_type){echo 'selected="selected"';}?>><?php echo $post_type;?></option>
     143                      <option value="<?php echo esc_attr( $post_type );?>" <?php if($query['advps_post_types'] == $post_type){echo 'selected="selected"';}?>><?php echo $post_type;?></option>
    144144                      <?php     
    145145                              }
     
    147147                    </select></td>
    148148                </tr>
    149                 <tr id="advps-cat-field<?php echo $dset->id;?>">
     149                <tr id="advps-cat-field<?php echo intval( $dset->id );?>">
    150150                  <?php
    151                     $posttypeobj = get_post_type_object($query['advps_post_types']); 
     151                    $posttypeobj = get_post_type_object( esc_html( $query['advps_post_types']) ); 
    152152                    if($query['advps_post_types'] != "page" && ($query['advps_post_types'] == 'post' || in_array('category',$posttypeobj->taxonomies))){
    153153                ?>
     
    158158                        foreach($catList as $scat){
    159159                      ?>
    160                       <option value="<?php echo $scat->term_id;?>" <?php if(isset($query['advps_category']) && in_array($scat->term_id,$query['advps_category'])){echo 'selected="selected"';}?>><?php echo $scat->name;?></option>
     160                      <option value="<?php echo esc_attr( $scat->term_id );?>" <?php if(isset($query['advps_category']) && in_array($scat->term_id,$query['advps_category'])){echo 'selected="selected"';}?>><?php echo esc_html( $scat->name );?></option>
    161161                      <?php }?>
    162162                    </select>
     
    166166                <tr>
    167167                  <th scope="row">Max. Number of post</th>
    168                   <td><input type="text" name="advps_maxpost" value="<?php echo $query['advps_maxpost'];?>" style="width:60px;" onkeypress="return onlyNum(event);" />
     168                  <td><input type="text" name="advps_maxpost" value="<?php echo esc_attr( $query['advps_maxpost'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" />
    169169                    <span style="padding-left:10px; font-size:10px; font-style:italic;">[ * Maximum Slides]</span></td>
    170170                </tr>
    171171                <tr>
    172172                  <th scope="row">Offset (optional)</th>
    173                   <td><input type="text" name="advps_offset" value="<?php echo $query['advps_offset'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
     173                  <td><input type="text" name="advps_offset" value="<?php echo esc_attr( $query['advps_offset'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
    174174                </tr>
    175175                <tr>
    176176                  <th scope="row">Exclude (optional)</th>
    177                   <td><input type="text" name="advps_exclude" value="<?php echo $query['advps_exclude'];?>" style="width:100px;" />
     177                  <td><input type="text" name="advps_exclude" value="<?php echo esc_attr( $query['advps_exclude'] );?>" style="width:100px;" />
    178178                    <span style="padding-left:10px; font-size:10px; font-style:italic;">[ Ex. 1,5,10 Comma separated post IDs that need to exclude from slideshow ]</span></td>
    179179                </tr>
     
    200200                <tr>
    201201                  <th scope="row">&nbsp;</th>
    202                   <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('query<?php echo $dset->id;?>')" />
    203                     <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     202                  <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('query<?php echo intval( $dset->id );?>')" />
     203                    <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    204204                </tr>
    205205              </table>
    206206              <input type="hidden" name="opt_field" value="query" />
    207               <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     207              <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    208208            </form>
    209209          </div>
     
    211211        <fieldset>
    212212          <legend class="advps-legend" style="width:50px; background-position:49px 6px;"><strong>Slider</strong></legend>
    213           <form method="post" id="slider<?php echo $dset->id;?>" onsubmit="return false">
     213          <form method="post" id="slider<?php echo intval( $dset->id );?>" onsubmit="return false">
    214214            <table class="form-table">
    215215              <tr>
    216216                <th scope="row">Slider Type</th>
    217                 <td><select name="advps_slider_type" onchange="sliderType(this.value,<?php echo $dset->id;?>);">
     217                <td><select name="advps_slider_type" onchange="sliderType(this.value,<?php echo intval( $dset->id );?>);">
    218218                    <option value="standard" <?php if($slider['advps_slider_type'] == 'standard'){echo 'selected="selected"';}?>>Standard</option>
    219219                    <option value="carousel" <?php if($slider['advps_slider_type'] == 'carousel'){echo 'selected="selected"';}?>>Carousel</option>
     
    239239              <tr>
    240240                <th scope="row">Speed</th>
    241                 <td><input type="text" name="advps_speed" value="<?php echo $slider['advps_speed'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
     241                <td><input type="text" name="advps_speed" value="<?php echo esc_attr( $slider['advps_speed'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
    242242              </tr>
    243243              <tr>
     
    250250              <tr>
    251251                <th scope="row">Pause</th>
    252                 <td><input type="text" name="advps_timeout" value="<?php echo $slider['advps_timeout'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
     252                <td><input type="text" name="advps_timeout" value="<?php echo esc_attr( $slider['advps_timeout'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
    253253              </tr>
    254254              <tr>
    255255                <th scope="row">Slide margin</th>
    256                 <td><input type="text" name="advps_sldmargin" value="<?php echo $slider['advps_sldmargin'];?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
     256                <td><input type="text" name="advps_sldmargin" value="<?php echo esc_attr( $slider['advps_sldmargin'] );?>" style="width:60px;" onkeypress="return onlyNum(event);" /></td>
    257257              </tr>
    258258              <tr>
     
    266266              <tr>
    267267                <th scope="row">&nbsp;</th>
    268                 <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('slider<?php echo $dset->id;?>')" />
    269                   <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     268                <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('slider<?php echo intval( $dset->id );?>')" />
     269                  <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    270270              </tr>
    271271            </table>
    272272            <input type="hidden" name="opt_field" value="slider" />
    273             <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     273            <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    274274          </form>
    275275        </fieldset>
    276276        <fieldset>
    277277          <legend class="advps-legend" style="width:121px; background-position:120px 6px;"><strong>Carousel & Ticker</strong></legend>
    278           <form method="post" onsubmit="return false" id="caro_ticker<?php echo $dset->id;?>">
     278          <form method="post" onsubmit="return false" id="caro_ticker<?php echo intval( $dset->id );?>">
    279279            <table class="form-table">
    280280              <tr>
    281281                <th scope="row">Number of slide</th>
    282                 <td><input type="text" name="advps_caro_slds" value="<?php if(isset($caro_ticker['advps_caro_slds'])){echo $caro_ticker['advps_caro_slds'];}?>" style="width:60px;" onkeypress="return onlyNum(event);" />
     282                <td><input type="text" name="advps_caro_slds" value="<?php if(isset($caro_ticker['advps_caro_slds'])){echo esc_attr( $caro_ticker['advps_caro_slds'] );}?>" style="width:60px;" onkeypress="return onlyNum(event);" />
    283283                  <span style="padding-left:20px; font-size:10px; font-style:italic;">[ N.B. For slider type Carousel or Ticker. ]</span></td>
    284284              </tr>
    285285              <tr>
    286286                <th scope="row">Slide width</th>
    287                 <td><input type="text" name="advps_caro_sldwidth" value="<?php if(isset($caro_ticker['advps_caro_sldwidth'])){echo $caro_ticker['advps_caro_sldwidth'];}?>" style="width:60px;" onkeypress="return onlyNum(event);" />
     287                <td><input type="text" name="advps_caro_sldwidth" value="<?php if(isset($caro_ticker['advps_caro_sldwidth'])){echo esc_attr( $caro_ticker['advps_caro_sldwidth'] );}?>" style="width:60px;" onkeypress="return onlyNum(event);" />
    288288                  <span style="padding-left:20px; font-size:10px; font-style:italic;">[ N.B. For slider type Carousel or Ticker. ]</span></td>
    289289              </tr>
    290290              <tr>
    291291                <th scope="row">&nbsp;</th>
    292                 <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('caro_ticker<?php echo $dset->id;?>')" />
    293                   <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     292                <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('caro_ticker<?php echo intval( $dset->id );?>')" />
     293                  <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    294294              </tr>
    295295            </table>
    296296            <input type="hidden" name="opt_field" value="caro_ticker" />
    297             <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     297            <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    298298          </form>
    299299        </fieldset>
    300300        <fieldset>
    301301          <legend class="advps-legend" style="width:158px; background-position:157px 6px;"><strong>Container & Thumbnail</strong></legend>
    302           <form method="post" onsubmit="return false" id="container<?php echo $dset->id;?>">
     302          <form method="post" onsubmit="return false" id="container<?php echo intval( $dset->id );?>">
    303303            <table class="form-table">
    304304              <tr>
     
    314314                        foreach($_wp_additional_image_sizes as $tkey => $tval){
    315315                        ?>
    316                     <option value="<?php echo $tkey;?>" <?php if($container['advps_thumbnail'] == $tkey){echo 'selected="selected"';}?>><?php echo $tkey;?></option>
     316                    <option value="<?php echo esc_attr( $tkey );?>" <?php if($container['advps_thumbnail'] == $tkey){echo 'selected="selected"';}?>><?php echo esc_html( $tkey );?></option>
    317317                    <?php
    318318                        }
     
    322322              <tr>
    323323                <th scope="row">Default image url</th>
    324                 <td><input type="text" name="advps_default_image" value="<?php if(isset($container['advps_default_image'])){ echo $container['advps_default_image'];}?>" style="width:250px;" />
     324                <td><input type="text" name="advps_default_image" value="<?php if(isset($container['advps_default_image'])){ echo esc_url( $container['advps_default_image'] );}?>" style="width:250px;" />
    325325                  <span style="padding-left:10px; font-size:10px; font-style:italic;"> [ N.B. If any post doesn't have featured image then default image will be shown.]</span></td>
    326326              </tr>
    327327              <tr>
    328328                <th scope="row">Slide Container Width</th>
    329                 <td><input type="text" name="advps_sld_width" value="<?php echo $container['advps_sld_width'];?>" style="width:45px;" onkeypress="return onlyNum(event);" />
     329                <td><input type="text" name="advps_sld_width" value="<?php echo esc_attr( $container['advps_sld_width'] );?>" style="width:45px;" onkeypress="return onlyNum(event);" />
    330330                  &nbsp;px</td>
    331331              </tr>
     
    339339              <tr>
    340340                <th scope="row">Background Color</th>
    341                 <td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bgcolor" value="<?php echo $container['advps_bgcolor'];?>" style="width:100px;" />
     341                <td><input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bgcolor" value="<?php echo esc_attr( $container['advps_bgcolor'] );?>" style="width:100px;" />
    342342                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    343343              </tr>
     
    345345                <th scope="row">Border</th>
    346346                <td><span style="vertical-align:top">
    347                   <input type="text" name="advps_border_size" value="<?php echo $container['advps_border_size'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
     347                  <input type="text" name="advps_border_size" value="<?php echo esc_attr( $container['advps_border_size'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" />
    348348                  px &nbsp;&nbsp;
    349349                  <select name="advps_border_type">
     
    356356                  </select>
    357357                  &nbsp;&nbsp;</span>
    358                   <input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_border_color" value="<?php echo $container['advps_border_color'];?>" style="width:100px;" />
     358                  <input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_border_color" value="<?php echo esc_attr( $container['advps_border_color'] );?>" style="width:100px;" />
    359359                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    360360              </tr>
     
    369369                <th scope="row">Box Shadow</th>
    370370                <td><span style="vertical-align:top">
    371                   <input type="text" name="advps_bxshad1" value="<?php echo $container['advps_bxshad1'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
     371                  <input type="text" name="advps_bxshad1" value="<?php echo esc_attr( $container['advps_bxshad1'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" />
    372372                  px &nbsp;&nbsp;
    373                   <input type="text" name="advps_bxshad2" value="<?php echo $container['advps_bxshad2'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
     373                  <input type="text" name="advps_bxshad2" value="<?php echo esc_attr( $container['advps_bxshad2'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" />
    374374                  px&nbsp;&nbsp;
    375                   <input type="text" name="advps_bxshad3" value="<?php echo $container['advps_bxshad3'];?>" style="width:40px;" onkeypress="return onlyNum(event);" />
     375                  <input type="text" name="advps_bxshad3" value="<?php echo esc_attr( $container['advps_bxshad3'] );?>" style="width:40px;" onkeypress="return onlyNum(event);" />
    376376                  px&nbsp;&nbsp;</span>
    377                   <input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bxshadcolor" value="<?php echo $container['advps_bxshadcolor'];?>" style="width:100px;" />
     377                  <input id="advpscolor<?php echo ++$flg?>" class="advps-color-picker" type="text" name="advps_bxshadcolor" value="<?php echo esc_attr( $container['advps_bxshadcolor'] );?>" style="width:100px;" />
    378378                  <div class="advpsfarb" style="padding-left:22%"></div></td>
    379379              </tr>
     
    435435              <tr>
    436436                <th scope="row">&nbsp;</th>
    437                 <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('container<?php echo $dset->id;?>')" />
    438                   <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     437                <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('container<?php echo intval( $dset->id );?>')" />
     438                  <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    439439              </tr>
    440440            </table>
    441441            <input type="hidden" name="opt_field" value="container" />
    442             <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     442            <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    443443          </form>
    444444        </fieldset>
    445445        <fieldset>
    446446          <legend class="advps-legend" style="width:79px; background-position:78px 6px;"><strong>Navigation</strong></legend>
    447           <form method="post" onsubmit="return false" id="navigation<?php echo $dset->id;?>">
     447          <form method="post" onsubmit="return false" id="navigation<?php echo intval( $dset->id );?>">
    448448            <table class="form-table">
    449449              <tr>
     
    460460                  <span style="padding:0px 5px 0px 10px;">Bullet</span>
    461461                  <input type="radio" name="advps_pager_type" value="bullet" <?php if(isset($navigation['advps_pager_type']) && $navigation['advps_pager_type'] == 'bullet'){echo 'checked="checked"';}?>>
    462                   <span id="advps-pthumb-lvl<?php echo $dset->id;?>" style="padding:0px 5px 0px 10px;" class="<?php if($slider['advps_slider_type'] != 'standard'){echo 'advps-fade';}?>">Thumbnail</span>
    463                   <input id="advps-pthumb<?php echo $dset->id;?>" <?php if($slider['advps_slider_type'] != 'standard'){echo 'disabled="disabled"';}?> type="radio" name="advps_pager_type" value="thumb" <?php if(isset($navigation['advps_pager_type']) && $navigation['advps_pager_type'] == 'thumb'){echo 'checked="checked"';}?>></td>
     462                  <span id="advps-pthumb-lvl<?php echo intval( $dset->id );?>" style="padding:0px 5px 0px 10px;" class="<?php if($slider['advps_slider_type'] != 'standard'){echo 'advps-fade';}?>">Thumbnail</span>
     463                  <input id="advps-pthumb<?php echo intval( $dset->id );?>" <?php if($slider['advps_slider_type'] != 'standard'){echo 'disabled="disabled"';}?> type="radio" name="advps_pager_type" value="thumb" <?php if(isset($navigation['advps_pager_type']) && $navigation['advps_pager_type'] == 'thumb'){echo 'checked="checked"';}?>></td>
    464464              </tr>
    465465              <tr>
    466466                <th scope="row">Thumbnail Width</th>
    467467                <td>
    468                   <input type="text" name="advps_pthumb_width" value="<?php echo $navigation['advps_pthumb_width'];?>" style="width:50px;" onkeypress="return onlyNum(event);" />&nbsp;%                 
     468                  <input type="text" name="advps_pthumb_width" value="<?php echo esc_attr( $navigation['advps_pthumb_width'] );?>" style="width:50px;" onkeypress="return onlyNum(event);" />&nbsp;%                 
    469469                  <span style="padding-left:10px; font-size:10px; font-style:italic;">[ N.B. For pager type thumbnail. ]</span></td>
    470470              </tr>
     
    479479              <tr>
    480480                <th scope="row">Pager position from bottom</th>
    481                 <td><input type="text" name="advps_pager_bottom" value="<?php echo $navigation['advps_pager_bottom'];?>" style="width:50px;" onkeypress="return NumNdNeg(event);" />
     481                <td><input type="text" name="advps_pager_bottom" value="<?php echo esc_attr( $navigation['advps_pager_bottom'] );?>" style="width:50px;" onkeypress="return NumNdNeg(event);" />
    482482                  &nbsp;px</td>
    483483              </tr>
     
    500500              <tr>
    501501                <th scope="row">Play/Pause position from bottom</th>
    502                 <td><input type="text" name="advps_ppause_bottom" value="<?php echo $navigation['advps_ppause_bottom'];?>" style="width:50px;" onkeypress="return NumNdNeg(event);" />
     502                <td><input type="text" name="advps_ppause_bottom" value="<?php echo esc_attr( $navigation['advps_ppause_bottom'] );?>" style="width:50px;" onkeypress="return NumNdNeg(event);" />
    503503                  &nbsp;px</td>
    504504              </tr>
     
    512512              <tr>
    513513                <th scope="row">&nbsp;</th>
    514                 <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('navigation<?php echo $dset->id;?>')" />
    515                   <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo advps_url;?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
     514                <td><input type="submit" name="advps_submit" value="Save changes" class="button-primary" onclick="updateOptionSet('navigation<?php echo intval( $dset->id );?>')" />
     515                  <span class="ajx-loader" style="padding-left:15px; display:none;"><img src="<?php echo esc_url( advps_url );?>/images/ajax-loader.gif" /></span><span class="ajx-sts"></span></td>
    516516              </tr>
    517517            </table>
    518518            <input type="hidden" name="opt_field" value="navigation" />
    519             <input type="hidden" value="<?php echo $dset->id;?>" name="opt_id" />
     519            <input type="hidden" value="<?php echo intval( $dset->id );?>" name="opt_id" />
    520520          </form>
    521521        </fieldset>
    522         <form method="post" id="frmOptDel<?php echo $dset->id;?>" onsubmit="return false">
    523           <input type="hidden" value="<?php echo $dset->id;?>" name="optset-id" />
     522        <form method="post" id="frmOptDel<?php echo intval( $dset->id );?>" onsubmit="return false">
     523          <input type="hidden" value="<?php echo intval( $dset->id );?>" name="optset-id" />
    524524          <input type="hidden" value="<?php echo $tcount[0]->Auto_increment;?>" name="nextoptid" />
    525525          <p>
    526             <input type="submit" name="del-optset" value="Delete" class="button-secondary" onclick="deleteOptSet(<?php echo $dset->id;?>)" style="width:12%;" />
    527             <span style="margin-left:5px;"><input type="submit" name="dup-optset" value="Duplicate" class="button-secondary" onclick="duplicateOptSet(<?php echo $dset->id;?>)" style="width:12%;" /></span>
     526            <input type="submit" name="del-optset" value="Delete" class="button-secondary" onclick="deleteOptSet(<?php echo intval( $dset->id );?>)" style="width:12%;" />
     527            <span style="margin-left:5px;"><input type="submit" name="dup-optset" value="Duplicate" class="button-secondary" onclick="duplicateOptSet(<?php echo intval( $dset->id );?>)" style="width:12%;" /></span>
    528528          </p>
    529529          <?php wp_nonce_field('advps-checkauthnonce','advps_wpnonce'); ?>
Note: See TracChangeset for help on using the changeset viewer.