private function generationButtonAdd() { $ip = $_SERVER['REMOTE_ADDR']; $status = $this->getDataIPStatus($ip); if ($status['status'] == 'blocked') { $this->html .= '<div id="errorCommentBlocked" style="display: none;">'; $this->html .= ErrorHelper::getMessageErrorFeedbackNoComments("Этот IP заблокирован. Вы не можете оставлять отзывы и комментарии ", 'errorCommentBlocked'); $this->html .= '</div>'; $this->html .= '<input type="button" value="Оставить отзыв" onclick="errorComments(\'errorCommentBlocked\');">'; } else { if ($status['timeLimit'] != 1) { $this->html .= '<center><a id="formFeedbackFancybox" class="fancybox-doc" href="#formFeedback">'; $this->html .= '<input type="button" value="Оставить отзыв">'; $this->html .= '</center></a>'; } else { if (floor($this->checkDifferenceBetweenVisits($ip)) < $this->timeValide) { $this->html .= '<div id="errorCommentTimeLimit" style="display: none;">'; $this->html .= ErrorHelper::getMessageErrorFeedbackNoComments("Вы можете добавить отзыв только один раз в " . $this->timeValide . " дней", 'errorCommentTimeLimit'); $this->html .= '</div>'; } $this->html .= '<center><input type="button" value="Оставить отзыв" onclick="errorComments(\'errorCommentTimeLimit\');"></center>'; } } }
private function generationButtonAddComments($id) { $ip = $_SERVER['REMOTE_ADDR']; $status = $this->getDataIPStatus($ip); if ($status['status'] == 'blocked') { $this->html .= '<div id="errorCommentBlocked" style="display: none;">'; $this->html .= ErrorHelper::getMessageErrorFeedbackNoComments("Этот IP заблокирован. Вы не можете оставлять отзывы и комментарии ", 'errorCommentBlocked'); $this->html .= '</div>'; $this->html .= '<a><div class="feedbackCommentButton" onclick="errorComments(\'errorCommentBlocked\');">'; // $this->html .= 'Комментировать'; $this->html .= '</div></a>'; } else { if ($status['commentYourself'] == 0 && $this->getDataIP($id) == $ip) { $this->html .= '<div id="errorCommentYourself" style="display: none;">'; $this->html .= ErrorHelper::getMessageErrorFeedbackNoComments("Вы не можете комментировать свои отзывы", 'errorCommentYourself'); $this->html .= '</div>'; $this->html .= '<a><div class="feedbackCommentButton" onclick="errorComments(\'errorCommentYourself\');">'; // $this->html .= 'Комментировать'; $this->html .= '</div></a>'; } else { $this->html .= '<a id="formFeedbackFancybox" class="fancybox-doc" href="#formFeedbackComment' . $id . '">'; $this->html .= '<div class="feedbackCommentButton">'; // $this->html .= 'Комментировать'; $this->html .= '</div>'; $this->html .= '</a>'; } } }