private function EditReviewStep1() { // Show the form to edit a product $reviewId = (int) $_GET['reviewId']; $arrData = array(); // Make sure the product exists if (ReviewExists($reviewId)) { $this->_GetReviewData($reviewId, $arrData); // Does this user have permission to edit this review? if ($GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId() && $arrData['prodvendorid'] != $GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId()) { FlashMessage(GetLang('Unauthorized'), MSG_ERROR, 'index.php?ToDo=viewReviews'); } $GLOBALS['ReviewId'] = $reviewId; $GLOBALS['FromName'] = isc_html_escape($arrData['revfromname']); $GLOBALS['Title'] = isc_html_escape($arrData['revtitle']); $GLOBALS['Review'] = isc_html_escape($arrData['revtext']); $GLOBALS['StatusOptions'] = $this->_GetStatusOptions($arrData['revstatus']); $GLOBALS['RatingOptions'] = $this->_GetRatingOptions($arrData['revrating']); //lguan_20100612: Show extra ratings $GLOBALS['RatingQualityOptions'] = $this->_GetRatingOptions($arrData['qualityrating']); $GLOBALS['RatingInstallOptions'] = $this->_GetRatingOptions($arrData['installrating']); $GLOBALS['RatingValueOptions'] = $this->_GetRatingOptions($arrData['valuerating']); $GLOBALS['RatingSupportOptions'] = $this->_GetRatingOptions($arrData['supportrating']); $GLOBALS['RatingDeliveryOptions'] = $this->_GetRatingOptions($arrData['deliveryrating']); $GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate("review.form"); $GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate(); } else { // The review doesn't exist $this->ManageReviews(GetLang('ReviewDoesntExist'), MSG_ERROR); } }
private function EditReviewStep1() { // Show the form to edit a product $reviewId = (int)$_GET['reviewId']; $arrData = array(); // Make sure the product exists if (ReviewExists($reviewId)) { $this->_GetReviewData($reviewId, $arrData); // Does this user have permission to edit this review? if($GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId() && $arrData['prodvendorid'] != $GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId()) { FlashMessage(GetLang('Unauthorized'), MSG_ERROR, 'index.php?ToDo=viewReviews'); } $GLOBALS['ReviewId'] = $reviewId; $GLOBALS['FromName'] = isc_html_escape($arrData['revfromname']); $GLOBALS['Title'] = isc_html_escape($arrData['revtitle']); $GLOBALS['Review'] = isc_html_escape($arrData['revtext']); $GLOBALS['StatusOptions'] = $this->_GetStatusOptions($arrData['revstatus']); $GLOBALS['RatingOptions'] = $this->_GetRatingOptions($arrData['revrating']); $this->template->display('review.form.tpl'); } else { // The review doesn't exist $this->ManageReviews(GetLang('ReviewDoesntExist'), MSG_ERROR); } }