<?php
/**
 * This file handles the Email this Question page
 *
 * PHP version 5.0
 *
 * @category	Anova
 * @package		ManageAbuseContentHandler
 * @author 		senthil_52ag05
 * @copyright 	Copyright (c) 2010 {@link http://www.agriya.com Agriya Infoway}
 * @license		http://www.agriya.com Agriya Infoway Licence
 * @version		SVN: $Id: $
 * @since 		2009-02-20
 */
require_once('../../common/configs/config.inc.php');
$CFG['lang']['include_files'][] = 'languages/%s/'.$CFG['admin']['index']['blog_module'].'/admin/manageAbuseContent.php';
$CFG['html']['header'] = 'general/html_header.php';
$CFG['html']['footer'] = 'general/html_footer.php';

$CFG['is']['ajax_page'] = false;
if(isset($_REQUEST['ajax_page']) and $_REQUEST['ajax_page'])
	{
		$CFG['is']['ajax_page'] = true;
	}
if ($CFG['admin']['module']['forums'])
	{
		$CFG['lang']['include_files'][] = 'common/configs/anova_configs/config_forums.inc.php';
	}

$CFG['mods']['include_files'][] = 'common/classes/class_AnovaHandler.lib.php';
//compulsory
$CFG['site']['is_module_page']='anova';
$CFG['mods']['is_include_only']['html_header'] = false;
$CFG['html']['is_use_header'] = false;

/**
 * To include application top file
 */
require_once($CFG['site']['project_path'].'common/application_top.inc.php');

//-------------- Class ManageAbuseContentHandler begins --------------->>>>>//
/**
 * <b>Class overview</b>
 *
 * <b>Methods overview</b>
 *
 * @category	Anova
 * @package		ManageAbuseContentHandler
 * @author 		senthil_52ag05
 * @copyright 	Copyright (c) 2010 {@link http://www.agriya.com Agriya Infoway}
 * @license		http://www.agriya.com Agriya Infoway Licence
 * @version		SVN: $Id:
 * @since 		2008-12-22
 */
class ManageAbuseContentHandler extends AnovaHandler
    {
    	public $sent_email_arr=array();

		/**
		 * ManageAbuseContentHandler::chkIsValidQuestionId()
		 *
		 * @param string $err_msg
		 * @return
		 */
		public function chkIsValidQuestionId($err_msg = '')
			{
				if (!$this->fields_arr['qid'])
					{
						$this->setCommonErrorMsg($err_msg);
						return false;
					}
				$sql = 'SELECT q.ques_id, q.total_answer, q.abuse_count, q.cat_id, q.best_ans_id, q.description, q.total_stars, q.question, UNIX_TIMESTAMP(date_asked) as date_asked'.
						', '.$this->getUserTableFields(array('name', 'display_name')).', q.status, q.user_id, q.seo_title'.
						' FROM '.$this->CFG['db']['tbl']['questions'].' AS q, '.$this->CFG['db']['tbl']['users'].' AS u'.
						' WHERE q.user_id=u.'.$this->getUserTableField('user_id').
						' AND q.ques_id='.$this->dbObj->Param('qid');
				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['qid']));
				if (!$rs)
						trigger_db_error($this->dbObj);

				$numrows = $rs->PO_RecordCount();
				if ($numrows > 0 )
					{
						$this->question_details = $rs->FetchRow();
						return true;
					}

				$this->setCommonErrorMsg($err_msg);
				return false;
			}

		/**
		 * ManageAbuseContentHandler::chkIsValidAnswerId()
		 *
		 * @param string $err_msg
		 * @return
		 */
		public function chkIsValidAnswerId($err_msg = '')
			{
				if (!$this->fields_arr['aid'])
					{
						$this->setCommonErrorMsg($err_msg);
						return false;
					}

				$sql = 'SELECT a.ans_id, a.answer, a.ques_id, '.$this->getUserTableField('display_name').' as asked_by, '.$this->getUserTableField('name').' as name, a.user_id'.
						' FROM '.$this->CFG['db']['tbl']['answers'].' AS a, '.$this->CFG['db']['tbl']['users'].' AS u'.
						' WHERE a.user_id=u.'.$this->getUserTableField('user_id').
						' AND a.ans_id='.$this->dbObj->Param('aid');
				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['aid']));
				if (!$rs)
						trigger_db_error($this->dbObj);

				$numrows = $rs->PO_RecordCount();
				if ($numrows > 0 )
					{
						$this->answer_details = $rs->FetchRow();
						return true;
					}

				$this->setCommonErrorMsg($err_msg);
				return false;
			}

		/**
		 * ManageAbuseContentHandler::chkIsValidBlogId()
		 *
		 * @param string $err_msg
		 * @return
		 */
		public function chkIsValidBlogId($err_msg = '')
			{
				if (!$this->fields_arr['blog_id'])
					{
						$this->setCommonErrorMsg($err_msg);
						return false;
					}

				$sql = 'SELECT blog_id, subject, '.$this->getUserTableField('display_name').' as asked_by'.
						' FROM '.$this->CFG['db']['tbl']['blogs'].' as b, '.$this->CFG['db']['tbl']['users'].' as u'.
						' WHERE blog_id='.$this->dbObj->Param('blog_id').
						' AND b.user_id=u.'.$this->getUserTableField('user_id');
				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['blog_id']));
				if (!$rs)
					    trigger_db_error($this->dbObj);

				$numrows = $rs->PO_RecordCount();
				if ($numrows > 0 )
					{
						$this->blog_details = $rs->FetchRow();
						return true;
					}
				$this->setCommonErrorMsg($err_msg);
				return false;
			}

		/**
		 * ManageAbuseContentHandler::chkIsValidForumId()
		 *
		 * @param string $err_msg
		 * @return
		 */
		public function chkIsValidForumId($err_msg = '')
			{
				if (!$this->fields_arr['forum_id'])
					{
						$this->setCommonErrorMsg($err_msg);
						return false;
					}

				$sql = 'SELECT forum_id, '.$this->getUserTableField('display_name').' as asked_by'.
						' FROM '.$this->CFG['db']['tbl']['forums'].' as f, '.$this->CFG['db']['tbl']['users'].' as u'.
						' WHERE forum_id = '.$this->dbObj->Param('id').
						' AND f.forum_userid=u.'.$this->getUserTableField('user_id');

				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['forum_id']));
				if (!$rs)
				        trigger_db_error($this->dbObj);

				$numrows = $rs->PO_RecordCount();
				if ($numrows > 0 )
					{
						$this->forum_details = $rs->FetchRow();
						return true;
					}
				$this->setCommonErrorMsg($err_msg);
				return false;
			}

		/**
		 * ManageAbuseContentHandler::chkIsValidTopicId()
		 *
		 * @param string $err_msg
		 * @return
		 */
		public function chkIsValidTopicId($err_msg = '')
			{
				if (!$this->fields_arr['topic_id'])
					{
						$this->setCommonErrorMsg($err_msg);
						return false;
					}

				$sql = 'SELECT g.topic_id, g.forum_id, g.forum_topic, g.topic_status'.
						' FROM '.$this->CFG['db']['tbl']['forum_topics'].' AS g, '.$this->CFG['db']['tbl']['users'].' AS u'.
						' WHERE g.user_id = u.'.$this->getUserTableField('user_id').
						' AND topic_id = '.$this->dbObj->Param('topic_id').
						' AND forum_id = '.$this->dbObj->Param('forum_id');
				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['topic_id'], $this->fields_arr['forum_id']));
				if (!$rs)
					    trigger_db_error($this->dbObj);

				$numrows = $rs->PO_RecordCount();
				if ($numrows > 0 )
					{
						$this->topic_details = $rs->FetchRow();
						return true;
					}

				$this->setCommonErrorMsg($err_msg);
				return false;
			}

		/**
		 * ManageAbuseContentHandler::showAbuseContent()
		 *
		 * @return
		 */
		public function  showAbuseContent()
			{
				$sql = 'SELECT abuse_id, reported_by, reason, DATE_FORMAT(date_abused, \''.$this->CFG['format']['date'].'\') AS date_abused'.
						' FROM '.$this->CFG['db']['tbl']['abuse_questions'].
						' WHERE ques_id='.$this->dbObj->Param('qid');
				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['qid']));
				if (!$rs)
					    trigger_db_error($this->dbObj);

				$showForumTitles_arr = array();
				if ($rs->PO_RecordCount())
					{
						$inc = 1;
						while($row = $rs->FetchRow()){
							$userDetails = $this->getUserDetailsFromUsersTable($this->CFG['db']['tbl']['users'], $row['reported_by']);
							$row['reporter'] = $userDetails['name'];
							$row['oddevenclass'] = ($inc%2)?'clsOddQuestion':'clsEvenQuestion';

							$row['onclick'] = 'ajaxUpdateDiv(\'manageAbuseContent.php\', \'delete=1&qid='.$this->fields_arr['qid'].'&abuse_id='.$row['abuse_id'].'\', \'selShowAbuseContent\')';
							$showForumTitles_arr[$inc]['record'] = $row;
							$inc++;
						}
					}
				return $showForumTitles_arr;
			}

		/**
		 * ManageAbuseContentHandler::showAnswerAbuseContent()
		 *
		 * @return
		 */
		public function  showAnswerAbuseContent()
			{
				$sql = 'SELECT abuse_id, reported_by, reason, DATE_FORMAT(date_abused, \''.$this->CFG['format']['date'].'\') AS date_abused'.
						' FROM '.$this->CFG['db']['tbl']['abuse_answers'].
						' WHERE ques_id='.$this->dbObj->Param('qid').
						' AND ans_id='.$this->dbObj->Param('aid');
				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['qid'], $this->fields_arr['aid']));
				if (!$rs)
					    trigger_db_error($this->dbObj);

				$showForumTitles_arr = array();
				if ($rs->PO_RecordCount())
					{
						$inc = 1;
						while($row = $rs->FetchRow()){
							$userDetails = $this->getUserDetailsFromUsersTable($this->CFG['db']['tbl']['users'], $row['reported_by']);
							$row['reporter'] = $userDetails['name'];
							$row['oddevenclass'] = ($inc%2)?'clsOddQuestion':'clsEvenQuestion';

							$row['onclick'] = 'ajaxUpdateDiv(\'manageAbuseContent.php\', \'delete_ans=1&aid='.$this->fields_arr['aid'].'&qid='.$this->fields_arr['qid'].'&abuse_id='.$row['abuse_id'].'\', \'selShowAbuseContent\')';
							$showForumTitles_arr[$inc]['record'] = $row;
							$inc++;
						}
					}
				return $showForumTitles_arr;
			}

		/**
		 * ManageAbuseContentHandler::showBlogAbuseContent()
		 *
		 * @return
		 */
		public function  showBlogAbuseContent()
			{
				$sql = 'SELECT abuse_id, reported_by, reason, DATE_FORMAT(date_abused, \''.$this->CFG['format']['date'].'\') AS date_abused'.
						' FROM '.$this->CFG['db']['tbl']['abuse_blog'].
						' WHERE blog_id='.$this->dbObj->Param('qid');
				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['blog_id']));
				if (!$rs)
					    trigger_db_error($this->dbObj);

				$showForumTitles_arr = array();
				if ($rs->PO_RecordCount())
					{
						$inc = 1;
						while($row = $rs->FetchRow()){
							$userDetails = $this->getUserDetailsFromUsersTable($this->CFG['db']['tbl']['users'], $row['reported_by']);
							$row['reporter'] = $userDetails['name'];
							$row['oddevenclass'] = ($inc%2)?'clsOddQuestion':'clsEvenQuestion';

							$row['onclick'] = 'ajaxUpdateDiv(\'manageAbuseContent.php\', \'delete_blg=1&blog_id='.$this->fields_arr['blog_id'].'&abuse_id='.$row['abuse_id'].'\', \'selShowAbuseContent\')';
							$showForumTitles_arr[$inc]['record'] = $row;
							$inc++;
						}
					}
				return $showForumTitles_arr;
			}

		/**
		 * ManageAbuseContentHandler::showTopicAbuseContent()
		 *
		 * @return
		 */
		public function  showTopicAbuseContent()
			{
				$sql = 'SELECT abuse_id, reported_by, reason, DATE_FORMAT(date_abused, \''.$this->CFG['format']['date'].'\') AS date_abused'.
						' FROM '.$this->CFG['db']['tbl']['abuse_forum'].
						' WHERE topic_id='.$this->dbObj->Param('topic_id');

				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['topic_id']));
				if (!$rs)
					    trigger_db_error($this->dbObj);

				$showForumTitles_arr = array();
				if ($rs->PO_RecordCount())
					{
						$inc = 1;
						while($row = $rs->FetchRow()){
							$userDetails = $this->getUserDetailsFromUsersTable($this->CFG['db']['tbl']['users'], $row['reported_by']);
							$row['reporter'] = $userDetails['name'];
							$row['oddevenclass'] = ($inc%2)?'clsOddQuestion':'clsEvenQuestion';

							$row['onclick'] = 'ajaxUpdateDiv(\'manageAbuseContent.php\', \'delete_tpc=1&forum_id='.$this->fields_arr['forum_id'].'&topic_id='.$this->fields_arr['topic_id'].'&abuse_id='.$row['abuse_id'].'\', \'selShowAbuseContent\')';
							$showForumTitles_arr[$inc]['record'] = $row;
							$inc++;
						}
					}
				return $showForumTitles_arr;
			}

		/**
		 * ManageAbuseContentHandler::deleteAbuseContent()
		 *
		 * @return
		 */
		public function  deleteAbuseContent()
			{
				$sql = 'DELETE FROM '.$this->CFG['db']['tbl']['abuse_questions'].
						' WHERE abuse_id='.$this->dbObj->Param('abuse_id').
						' AND ques_id='.$this->dbObj->Param('qid');
				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['abuse_id'], $this->fields_arr['qid']));
				if (!$rs)
					    trigger_db_error($this->dbObj);

				if ($this->dbObj->Affected_Rows())
					{
						$sql = 'UPDATE '.$this->CFG['db']['tbl']['questions'].
								' SET abuse_count=abuse_count-1'.
								' WHERE ques_id='.$this->dbObj->Param('qid').
								' AND abuse_count>0';
						$stmt = $this->dbObj->Prepare($sql);
						$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['qid']));
						if (!$rs)
							    trigger_db_error($this->dbObj);
					}
				return true;
			}

		/**
		 * ManageAbuseContentHandler::deleteAnswerAbuseContent()
		 *
		 * @return
		 */
		public function  deleteAnswerAbuseContent()
			{
				$sql = 'DELETE FROM '.$this->CFG['db']['tbl']['abuse_answers'].
						' WHERE abuse_id='.$this->dbObj->Param('abuse_id').
						' AND ques_id='.$this->dbObj->Param('qid').
						' AND ans_id='.$this->dbObj->Param('aid');
				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['abuse_id'], $this->fields_arr['qid'], $this->fields_arr['aid']));
				if (!$rs)
					    trigger_db_error($this->dbObj);

				if ($this->dbObj->Affected_Rows())
					{
						$sql = 'UPDATE '.$this->CFG['db']['tbl']['answers'].
								' SET abuse_count=abuse_count-1'.
								' WHERE ans_id='.$this->dbObj->Param('aid').
								' AND abuse_count>0';
						$stmt = $this->dbObj->Prepare($sql);
						$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['aid']));
						if (!$rs)
							    trigger_db_error($this->dbObj);
					}
				return true;
			}

		/**
		 * ManageAbuseContentHandler::deleteBlogAbuseContent()
		 *
		 * @return
		 */
		public function  deleteBlogAbuseContent()
			{
				$sql = 'DELETE FROM '.$this->CFG['db']['tbl']['abuse_blog'].
						' WHERE abuse_id='.$this->dbObj->Param('abuse_id').
						' AND blog_id='.$this->dbObj->Param('qid');
				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['abuse_id'], $this->fields_arr['blog_id']));
				if (!$rs)
					    trigger_db_error($this->dbObj);

				if ($this->dbObj->Affected_Rows())
					{
						$sql = 'UPDATE '.$this->CFG['db']['tbl']['blogs'].
								' SET abuse_count=abuse_count-1'.
								' WHERE blog_id='.$this->dbObj->Param('blog_id').
								' AND abuse_count>0';
						$stmt = $this->dbObj->Prepare($sql);
						$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['blog_id']));
						if (!$rs)
							    trigger_db_error($this->dbObj);
					}
				return true;
			}

		/**
		 * ManageAbuseContentHandler::deleteTopicAbuseContent()
		 *
		 * @return
		 */
		public function  deleteTopicAbuseContent()
			{
				$sql = 'DELETE FROM '.$this->CFG['db']['tbl']['abuse_forum'].
						' WHERE abuse_id='.$this->dbObj->Param('abuse_id').
						' AND topic_id='.$this->dbObj->Param('topic_id');
				$stmt = $this->dbObj->Prepare($sql);
				$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['abuse_id'], $this->fields_arr['topic_id']));
				if (!$rs)
					    trigger_db_error($this->dbObj);

				if ($this->dbObj->Affected_Rows())
					{
						$sql = 'UPDATE '.$this->CFG['db']['tbl']['forum_topics'].
								' SET abuse_count=abuse_count-1'.
								' WHERE topic_id='.$this->dbObj->Param('topic_id').
								' AND abuse_count>0';
						$stmt = $this->dbObj->Prepare($sql);
						$rs = $this->dbObj->Execute($stmt, array($this->fields_arr['topic_id']));
						if (!$rs)
							    trigger_db_error($this->dbObj);
					}
				return true;
			}
    }
//<<<<<---------------- Class ManageAbuseContentHandler ends -------------//
//--------------------- Code begins -------------------->>>>>//
$manageabusecontent = new ManageAbuseContentHandler();
$manageabusecontent->setPageBlockNames(array('form_abuse_content'));

//set the form field
$manageabusecontent->setFormField('qid', '');
$manageabusecontent->setFormField('aid', '');
$manageabusecontent->setFormField('blog_id', '');
$manageabusecontent->setFormField('forum_id', '');
$manageabusecontent->setFormField('topic_id', '');
$manageabusecontent->setFormField('abuse_id', '');
$manageabusecontent->question_title = $LANG['manageabusecontent_question_title'];

$manageabusecontent->sanitizeFormInputs($_REQUEST);
$manageabusecontent->showTitle = true;

if($manageabusecontent->isFormGETed($_REQUEST, 'aid') and $manageabusecontent->isFormGETed($_REQUEST, 'qid'))
	{
		$manageabusecontent->chkIsValidQuestionId($LANG['err_tip_invalid_question_id']) and
			$manageabusecontent->chkIsValidAnswerId($LANG['err_tip_invalid_answer_id']);

		if ($manageabusecontent->isValidFormInputs())
			{
				$manageabusecontent->setAllPageBlocksHide();
				if ($manageabusecontent->isFormGETed($_REQUEST, 'delete_ans'))
					{
						$manageabusecontent->showTitle = false;
						$manageabusecontent->deleteAnswerAbuseContent();
						$manageabusecontent->setPageBlockShow('block_msg_form_success');
						$manageabusecontent->setCommonSuccessMsg($LANG['abused_content_deleted_succesfully']);
					}
				$manageabusecontent->setPageBlockShow('form_abuse_content');
				$manageabusecontent->question_title = wordWrapManual($manageabusecontent->answer_details['answer'], $CFG['admin']['question']['line_length'], $CFG['admin']['question']['total_length']);
				$manageabusecontent->form_abuse_content['showAbuseContent_arr'] = $manageabusecontent->showAnswerAbuseContent();
			}
		else
			{
				$manageabusecontent->setAllPageBlocksHide();
				$manageabusecontent->setPageBlockShow('block_msg_form_error');
			}
	}
elseif ($manageabusecontent->isFormGETed($_REQUEST, 'qid'))
	{
		$manageabusecontent->chkIsValidQuestionId($LANG['err_tip_invalid_question_id']);
		if ($manageabusecontent->isValidFormInputs())
			{
				$manageabusecontent->setAllPageBlocksHide();
				if ($manageabusecontent->isFormGETed($_REQUEST, 'delete'))
					{
						$manageabusecontent->showTitle = false;
						$manageabusecontent->deleteAbuseContent();
						$manageabusecontent->setPageBlockShow('block_msg_form_success');
						$manageabusecontent->setCommonSuccessMsg($LANG['abused_content_deleted_succesfully']);
					}
				$manageabusecontent->setPageBlockShow('form_abuse_content');
				$manageabusecontent->question_title = wordWrapManual($manageabusecontent->question_details['question'], $CFG['admin']['question']['line_length'], $CFG['admin']['question']['total_length']);
				$manageabusecontent->form_abuse_content['showAbuseContent_arr'] = $manageabusecontent->showAbuseContent();
			}
		else
			{
				$manageabusecontent->setAllPageBlocksHide();
				$manageabusecontent->setPageBlockShow('block_msg_form_error');
			}
	}
elseif($manageabusecontent->isFormGETed($_REQUEST, 'blog_id'))
	{
		$manageabusecontent->chkIsValidBlogId($LANG['err_tip_invalid_question_id']);

		if ($manageabusecontent->isValidFormInputs())
			{
				$manageabusecontent->setAllPageBlocksHide();
				if ($manageabusecontent->isFormGETed($_REQUEST, 'delete_blg'))
					{
						$manageabusecontent->showTitle = false;
						$manageabusecontent->deleteBlogAbuseContent();
						$manageabusecontent->setPageBlockShow('block_msg_form_success');
						$manageabusecontent->setCommonSuccessMsg($LANG['abused_content_deleted_succesfully']);
					}
				$manageabusecontent->setPageBlockShow('form_abuse_content');
				$manageabusecontent->question_title = wordWrapManual($manageabusecontent->blog_details['subject'], $CFG['admin']['question']['line_length'], $CFG['admin']['question']['total_length']);
				$manageabusecontent->form_abuse_content['showAbuseContent_arr'] = $manageabusecontent->showBlogAbuseContent();
			}
		else
			{
				$manageabusecontent->setAllPageBlocksHide();
				$manageabusecontent->setPageBlockShow('block_msg_form_error');
			}
	}
elseif($manageabusecontent->isFormGETed($_REQUEST, 'forum_id') and $manageabusecontent->isFormGETed($_REQUEST, 'topic_id'))
	{
		$manageabusecontent->chkIsValidForumId($LANG['err_tip_invalid_forum_id']) and
			$manageabusecontent->chkIsValidTopicId($LANG['err_tip_invalid_topic_id']);

		if ($manageabusecontent->isValidFormInputs())
			{
				$manageabusecontent->setAllPageBlocksHide();
				if ($manageabusecontent->isFormGETed($_REQUEST, 'delete_tpc'))
					{
						$manageabusecontent->showTitle = false;
						$manageabusecontent->deleteTopicAbuseContent();
						$manageabusecontent->setPageBlockShow('block_msg_form_success');
						$manageabusecontent->setCommonSuccessMsg($LANG['abused_content_deleted_succesfully']);
					}
				$manageabusecontent->setPageBlockShow('form_abuse_content');
				$manageabusecontent->question_title = wordWrapManual($manageabusecontent->topic_details['forum_topic'], $CFG['admin']['question']['line_length'], $CFG['admin']['question']['total_length']);
				$manageabusecontent->form_abuse_content['showAbuseContent_arr'] = $manageabusecontent->showTopicAbuseContent();
			}
		else
			{
				$manageabusecontent->setAllPageBlocksHide();
				$manageabusecontent->setPageBlockShow('block_msg_form_error');
			}
	}
//<<<<<----------------- Code ends -------------------//
//--------------- Page block templates begins ------------>>>>>//
//include the header file
$manageabusecontent->includeAjaxHeader();
//include the content of the page
setTemplateFolder('admin/');
$smartyObj->display('manageAbuseContent.tpl');
//<<<<<<--------------------Page block templates Ends--------------------//
//include the footer of the page
$manageabusecontent->includeAjaxFooter();
?>