Changeset 2081147
- Timestamp:
- 05/06/2019 06:38:48 AM (7 years ago)
- Location:
- polldeep/trunk
- Files:
-
- 2 edited
-
js/ajaxCalls.js (modified) (2 diffs)
-
polldeep.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
polldeep/trunk/js/ajaxCalls.js
r2080308 r2081147 14 14 imgurl = jQuery('img',html).attr('src'); 15 15 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; 19 19 } 20 20 imgName = imgurl.slice(imgurl.lastIndexOf('/') + 1); … … 45 45 jQuery("<div class='preview-wrapper'><span>⨯</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' ); 46 46 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.'); 47 49 } else { 48 50 alert(json.failed); -
polldeep/trunk/polldeep.php
r2079941 r2081147 10 10 We 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. 11 11 12 Version: 1. 312 Version: 1.1 13 13 Author: www.smartinfosys.net 14 14 Author URI: https://www.smartinfosys.net/ … … 101 101 wp_enqueue_script( 'jquery-ui-slider' ); 102 102 wp_enqueue_script( 'fileupload' ); 103 103 104 104 if(sanitize_text_field($_GET['action'])=='analyzeAjax') 105 105 { … … 143 143 wp_enqueue_style( 'styleSmart' ); 144 144 wp_enqueue_style( 'responsiveSmart' ); 145 145 146 146 147 } … … 361 362 'id'=>intval($_REQUEST['id']) 362 363 ); 363 } else if ($call == 'upload_file_to_polldeep' ) {364 } else if ($call == 'upload_file_to_polldeep' && current_user_can('administrator')) { 364 365 $url = $polldeepServer.'/user/fileUploadAjax'; 365 366 $body = array( … … 369 370 'myfile' => sanitize_text_field($_REQUEST['myfile']) 370 371 ); 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; 371 378 } 372 379
Note: See TracChangeset
for help on using the changeset viewer.