Plugin Directory

Changeset 2081147


Ignore:
Timestamp:
05/06/2019 06:38:48 AM (7 years ago)
Author:
smartinfosys2018
Message:

Implemented Advised changes

Location:
polldeep/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • polldeep/trunk/js/ajaxCalls.js

    r2080308 r2081147  
    1414            imgurl = jQuery('img',html).attr('src');
    1515            if(!imgurl) {
    16                 tb_remove();
    17                     alert('Please select a correct file type');
    18                     return false;
     16                tb_remove();
     17                    alert('Please select a correct file type');
     18                    return false;
    1919            }
    2020            imgName = imgurl.slice(imgurl.lastIndexOf('/') + 1);
     
    4545                        jQuery("<div class='preview-wrapper'><span>&#10799;</span><img alt='"+json.success+"' class='preview-img' width='150' src='"+imgurl+"'/><input id='poll_background_image' type='hidden' name='poll_background_image' value='"+imgName+"'></div>" ).insertAfter( '#upload_image' );
    4646                        jQuery('#poll_widget').css('background','url("'+imgurl+'") repeat scroll left top / 100% auto transparent');
     47                    } else if(json.unauthorized) {
     48                        alert('You do not have proper authorization to perform this activity.');
    4749                    } else {
    4850                        alert(json.failed);
  • polldeep/trunk/polldeep.php

    r2079941 r2081147  
    1010We will continue adding maps and more features. Our aim is to become the number one online polling tool. Get started now and have a free poll on us. With your PollDeep plugin dashboard, you can create a poll and change the look of it to suit your style and brand. Embed your poll in your website or blog, email it to a closed user group or share it on Facebook and Twitter. Find out the results of your poll and the profiles of your voters. Quickly spot trends and recognize the similarities and differences.
    1111
    12 Version: 1.3
     12Version: 1.1
    1313Author: www.smartinfosys.net
    1414Author URI: https://www.smartinfosys.net/
     
    101101             wp_enqueue_script( 'jquery-ui-slider' );
    102102             wp_enqueue_script( 'fileupload' );
    103            
     103           
    104104             if(sanitize_text_field($_GET['action'])=='analyzeAjax')
    105105             {
     
    143143             wp_enqueue_style( 'styleSmart' );
    144144             wp_enqueue_style( 'responsiveSmart' );
     145
    145146             
    146147        }
     
    361362               'id'=>intval($_REQUEST['id'])
    362363             );
    363         } else if ($call == 'upload_file_to_polldeep') {
     364        } else if ($call == 'upload_file_to_polldeep' && current_user_can('administrator')) {
    364365            $url = $polldeepServer.'/user/fileUploadAjax';
    365366            $body = array(
     
    369370                'myfile' => sanitize_text_field($_REQUEST['myfile'])
    370371            );
     372        } else if($call == 'upload_file_to_polldeep' && !current_user_can('administrator')) {
     373            $unauthorized_error = array(
     374                        "unauthorized"  => 'true',
     375                        );
     376                echo json_encode($unauthorized_error);     
     377                die;
    371378        }
    372379       
Note: See TracChangeset for help on using the changeset viewer.