Changeset 1440822
- Timestamp:
- 06/21/2016 10:35:21 AM (10 years ago)
- File:
-
- 1 edited
-
review-builder/trunk/com/controllers/Review.php (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
review-builder/trunk/com/controllers/Review.php
r1440780 r1440822 32 32 { 33 33 global $sgrb; 34 34 35 35 $attributes = shortcode_atts(array( 36 36 'id' => '1', … … 94 94 return; 95 95 } 96 96 97 97 } 98 98 … … 100 100 101 101 $tempId = $review->getTemplate_id(); 102 102 103 103 if ($tempId) { 104 104 $template = new Template($tempName,$tempId); … … 195 195 exit(); 196 196 } 197 197 198 198 $review->save(); 199 199 … … 258 258 259 259 $sgrbDataArray = array(); 260 260 261 261 $fields = SGRB_CategoryModel::finder()->findAll('review_id = %d', $sgrbId); 262 262 $sgrbOptions = $sgrbRev->getOptions(); … … 283 283 284 284 $options = $sgrbRev->getOptions(); 285 $options = json_decode($options, true); 285 $options = json_decode($options, true); 286 286 287 287 $sgrbDataArray['title'] = $title; 288 $sgrbDataArray['notify'] = $options["notify"];289 $sgrbDataArray['required-title-checkbox'] = $options["required-title-checkbox"];290 $sgrbDataArray['required-email-checkbox'] = $options["required-email-checkbox"];291 $sgrbDataArray['auto-approve-checkbox'] = $options["auto-approve-checkbox"];292 $sgrbDataArray['sgrb-google-search-on'] = $options["sgrb-google-search-on"];293 $sgrbDataArray['total-rate'] = $options["total-rate"];294 $sgrbDataArray['total-rate-background-color'] = $options["total-rate-background-color"];295 $sgrbDataArray['rate-type'] = $options["rate-type"];296 $sgrbDataArray['skin-color'] = $options["skin-color"];297 $sgrbDataArray['rate-text-color'] = $options["rate-text-color"];298 $sgrbDataArray['template-font'] = $options["template-font"];299 $sgrbDataArray['template-background-color'] = $options["template-background-color"];300 $sgrbDataArray['template-text-color'] = $options["template-text-color"];288 $sgrbDataArray['notify'] = @$options["notify"]; 289 $sgrbDataArray['required-title-checkbox'] = @$options["required-title-checkbox"]; 290 $sgrbDataArray['required-email-checkbox'] = @$options["required-email-checkbox"]; 291 $sgrbDataArray['auto-approve-checkbox'] = @$options["auto-approve-checkbox"]; 292 $sgrbDataArray['sgrb-google-search-on'] = @$options["sgrb-google-search-on"]; 293 $sgrbDataArray['total-rate'] = @$options["total-rate"]; 294 $sgrbDataArray['total-rate-background-color'] = @$options["total-rate-background-color"]; 295 $sgrbDataArray['rate-type'] = @$options["rate-type"]; 296 $sgrbDataArray['skin-color'] = @$options["skin-color"]; 297 $sgrbDataArray['rate-text-color'] = @$options["rate-text-color"]; 298 $sgrbDataArray['template-font'] = @$options["template-font"]; 299 $sgrbDataArray['template-background-color'] = @$options["template-background-color"]; 300 $sgrbDataArray['template-text-color'] = @$options["template-text-color"]; 301 301 302 302 if ($options['template-field-shadow-on']) { 303 $sgrbDataArray['template-field-shadow-on'] = $options['template-field-shadow-on'];304 $sgrbDataArray['shadow-left-right'] = $options["shadow-left-right"];305 $sgrbDataArray['shadow-top-bottom'] = $options["shadow-top-bottom"];306 $sgrbDataArray['template-shadow-color'] = $options["template-shadow-color"];307 $sgrbDataArray['shadow-blur'] = $options["shadow-blur"];303 $sgrbDataArray['template-field-shadow-on'] = @$options['template-field-shadow-on']; 304 $sgrbDataArray['shadow-left-right'] = @$options["shadow-left-right"]; 305 $sgrbDataArray['shadow-top-bottom'] = @$options["shadow-top-bottom"]; 306 $sgrbDataArray['template-shadow-color'] = @$options["template-shadow-color"]; 307 $sgrbDataArray['shadow-blur'] = @$options["shadow-blur"]; 308 308 } 309 309 … … 374 374 $sgrb->includeScript('core/scripts/sgrbRequestHandler'); 375 375 376 $html = ''; 376 $html = ''; 377 377 $commentForm = ''; 378 378 $ratedHtml = false; … … 392 392 $review[0]['options']['rate-text-color'] = '#4c4c4c'; 393 393 } 394 394 395 395 if ($review[0]['options']['total-rate'] == 1 || SGRB_PRO_VERSION) { 396 396 $countRates = 0; … … 414 414 } 415 415 else { 416 $totalRate = floor($rating / $countRates); 417 } 418 416 $totalRate = floor($rating / $countRates); 417 } 418 419 419 } 420 420 … … 574 574 $html .= '<input class="sgrb-rate-text-color" type="hidden" value="'.esc_attr($review[0]['options']['rate-text-color']).'">'; 575 575 $html .= '<input class="sgrb-rate-background-color" type="hidden" value="'.esc_attr($review[0]['options']['total-rate-background-color']).'">'; 576 576 577 577 $totalRateHtml = '<div class="sgrb-total-rate-wrapper" style="background-color:'.esc_attr($review[0]['options']['total-rate-background-color']).';color: '.$review[0]['options']['rate-text-color'].';"> 578 578 <div class="sgrb-total-rate-title"> … … 582 582 583 583 $mainStyles = ''; 584 584 585 585 if ($review[0]['options']['rate-type'] == SGRB_RATE_TYPE_STAR) { 586 586 $sgrb->includeScript('core/scripts/jquery.rateyo'); … … 699 699 $ratedFields['fields'] = $_POST['field']; 700 700 $ratedFields['rates'] = $_POST['rate']; 701 701 702 702 $reviewId = $_POST['reviewId']; 703 703 $currentReview = SGRB_ReviewModel::finder()->findByPk($reviewId); … … 743 743 $currentUser = wp_get_current_user(); 744 744 $currentUserName = $currentUser->user_nicename; 745 $subject = 'Review Builder Wordpress plugin.'; 745 $subject = 'Review Builder Wordpress plugin.'; 746 746 $blogName = get_option('blogname'); 747 747 $editUrl = $sgrb->adminUrl('Comment/index').'sgrb_allComms&id='.$reviewId; … … 756 756 $currentUser = wp_get_current_user(); 757 757 $currentUserName = $currentUser->user_nicename; 758 $subject = 'Review Builder Wordpress plugin.'; 758 $subject = 'Review Builder Wordpress plugin.'; 759 759 $blogName = get_option('blogname'); 760 760 $editUrl = $sgrb->adminUrl('Comment/index').'sgrb_allComms&id='.$reviewId; … … 810 810 $start = $_POST['itemsRangeStart']; 811 811 $perPage = $_POST['perPage']; 812 812 813 813 $approvedComments = SGRB_CommentModel::finder()->findAll('review_id = %d && approved = %d GROUP BY cdate DESC LIMIT '.$start.', '.$perPage.' ' , array($_POST['review'], 1)); 814 814
Note: See TracChangeset
for help on using the changeset viewer.