<div id="selblogList">
	<div class="clsManageBlogHeading">
		<div class="clsBlogHeading">
		  <h2 class="clsBlogTitle">{$LANG.commentpage_title}</h2>
		</div>
	</div>
	{include file='information.tpl'}
	{if $myobj->isShowPageBlock('selBlogDetails')}
	<div>
		<table border="1" summary="{$LANG.tbl_summary}">
			<tr>
				<td class="">
					<p class="clsBold">
						<strong>
							{$myobj->getFormField('subject')}
						</strong>
					</p>
					<p class="clsDesc">
						{$myobj->selBlogDetails.displayBlog.wordWrapManual}
					</p>
					<span>
						{$LANG.common_comment_posted_by}{$LANG.common_title_seperator}
					</span>
					&nbsp;
					<span>
						{$myobj->selBlogDetails.displayBlog.stripString}
					</span>
					<span>
						{$LANG.common_date_added}{$LANG.common_title_seperator}
					</span>
					&nbsp;
					<span>
						{$myobj->getFormField('date_added')}
					</span>
					<span>
						{$LANG.blog_cmd_total_views}{$LANG.common_title_seperator}
					</span>
					&nbsp;
					<span>
						{$myobj->getFormField('total_views')}
					</span>
					<span>
						{$LANG.blog_cmd_total_comments}{$LANG.common_title_seperator}
					</span>
						&nbsp;
					<span>
					{$myobj->getFormField('total_comments')}
					</span>
						<div class="clsUserUploaded clsNoLeftBgPadngMrgn">
						{if chkVideoModuleAllowed('blog') and $myobj->getFormField('blog_video')}
                        	<a id="{$myobj->selBlogDetails.displayBlog.ans_view_video.on_click}" href="{$myobj->selBlogDetails.displayBlog.ans_view_video.url}" onClick="{$myobj->getBrowser($myobj->selBlogDetails.displayBlog.ans_view_video.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-qusvideo1.gif" alt="{$LANG.questions_video_available}" title="{$LANG.questions_video_available}" /></a>
                    	{/if}
                    	{if chkAudioModuleAllowed('blog') and $myobj->getFormField('blog_audio')}
                        	<a id="{$myobj->selBlogDetails.displayBlog.ans_view_audio.on_click}" href="{$myobj->selBlogDetails.displayBlog.ans_view_audio.url}" onClick="{$myobj->getBrowser($myobj->selBlogDetails.displayBlog.ans_view_audio.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-qusaudio1.gif" alt="{$LANG.common_audio_available}" title="{$LANG.common_audio_available}" /></a>
                    	{/if}
                    	{if chkExternalVideoModuleAllowed('blog') and $myobj->getFormField('blog_ext_video')}
                        	<a id="{$myobj->selBlogDetails.displayBlog.ext_ans_view_video.on_click}" href="{$myobj->selBlogDetails.displayBlog.ext_ans_view_video.url}" onClick="{$myobj->getBrowser($myobj->selBlogDetails.displayBlog.ext_ans_view_video.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-externalvideo-qus.gif" alt="{$LANG.external_video_available}" title="{$LANG.external_video_available}" /></a>
                    	{/if}
                    	{if chkExternalAudioModuleAllowed('blog') and $myobj->getFormField('blog_ext_audio')}
                        	<a id="{$myobj->selBlogDetails.displayBlog.ext_ans_view_audio.on_click}" href="{$myobj->selBlogDetails.displayBlog.ext_ans_view_audio.url}" onClick="{$myobj->getBrowser($myobj->selBlogDetails.displayBlog.ext_ans_view_audio.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-externalaudio-qus.gif" alt="{$LANG.external_video_available}" title="{$LANG.external_video_available}" /></a>
                    	{/if}
					</div>
					<p class="clsCommentsReplySection">
						<span>
							<a href="{$myobj->selBlogDetails.displayBlog.manageBlogs_url}">
								{$LANG.common_edit}
							</a>
						</span>
						&nbsp;
						<span>
							<a href="#" id="{$myobj->selBlogDetails.displayBlog.anchor}" onClick="{$myobj->selBlogDetails.displayBlog.Confirmation}">
								{$LANG.common_delete}
							</a>
						</span>
					</p>
				</td>
			</tr>
		</table>
	</div>
	{if isMember()}
		<a href="#" id="{$myobj->selCommentListBlock.hidden_array}"></a>
		<div id="selMsgAbuseConfirm" class="selMsgAbuseConfirm" style="display:none;position:absolute;">
			<form name="formAbuseConfirm" id="formAbuseConfirm" method="post" action="{$myobj->getCurrentUrl()}">
			  <p id="confirmAbuseMessage"></p>
			  <table>
				<tr>
				  <td><p>{$LANG.common_reason}</p>
					<p>
					  <textarea class="clsCommonTextArea" name="reason" id="reason" tabindex="{smartyTabIndex}">{$myobj->getFormField('reason')}</textarea>
					</p>
					<p id="validReason"></p></td>
				</tr>
				<tr>
				  <td><input type="submit" class="clsSubmitButton" name="confirm_action" id="confirm_action" value="{$LANG.common_yes_option}" tabindex="{smartyTabIndex}" onClick="return chkIsAbuseReasonExists();" />
					&nbsp;
					<input type="button" class="clsCancelButton" name="cancel" id="cancel" value="{$LANG.common_no_option}" tabindex="{smartyTabIndex}" onClick="removeReasonErrors(); return hideAllBlocks();" />
				  </td>
				</tr>
			  </table>
			  <input type="hidden" name="content_id" id="content_id" value="" />
			</form>
		</div>
		{/if}
  {/if}
  {if $myobj->isShowPageBlock('selCommentListBlock')}
  	  <div id="selDelMsgConfirm" class="clsPopupConfirmation" style="display:none;position:absolute;">
		<p id="msgConfirmText"></p>
      	<form name="msgConfirmform" id="msgConfirmform" method="post" action="{$myobj->getCurrentUrl()}">
        	<table summary="{$LANG.blog_cmd_confirm_tbl_summary}">
	          	<tr>
	            	<td>
					  	<input type="submit" class="clsSubmitButton" name="confirm" id="confirm" value="{$LANG.common_yes_option}" tabindex="{smartyTabIndex}" /> &nbsp;
		              	<input type="button" class="clsCancelButton" name="no" id="no" value="{$LANG.common_no_option}" tabindex="{smartyTabIndex}" onClick="return hideAllBlocks()" />
						<input type="hidden" name="act" id="act" />
		              	<input type="hidden" name="comment_id" id="comment_id" />
		              	<input type="hidden" name="main_comment_id" id="main_comment_id" />
		              	{$myobj->populateHidden($myobj->selCommentListBlock.hidden_array)}
					</td>
	          	</tr>
        	</table>
      	</form>
 	 </div>
	  <div id="selCommentBlock">
	  	{if $myobj->selCommentListBlock.showCommentsList.RecordCount}
	  		{if $CFG.admin.navigation.top}
				{include file='pagination.tpl'}
			{/if}
			<form name="blogsListForm" id="blogsListForm" method="post" action="{$myobj->getCurrentUrl()}" >
				<table border="1" summary="{$LANG.tbl_summary}">
					<tr>
						<th><input type="checkbox" class="clsCheckRadio" name="check_all" onclick = "CheckAll(document.blogsListForm.name, document.blogsListForm.check_all.name)" tabindex="{smartyTabIndex}" /></th>
						<th>{$LANG.common_total_comments}</th>
					</tr>
					{foreach key=inc item=value from=$myobj->selCommentListBlock.showCommentsList.row}
						<tr>
							<td><input type="checkbox" class="clsCheckRadio" name="comment_id[]" onClick="disableHeading('blogsListForm');"  value="{$value.record.comment_id}"  tabindex="{smartyTabIndex}" /></td>
							<td>
							<p><span id="selEditCommentTxt_{$value.record.comment_id}">{$value.wordWrapManual_cmd}</span><span id="selEditComments_{$value.record.comment_id}"></span></p>
							<p>
							  {if chkVideoModuleAllowed('blog') and ($value.video_id)}
		                      	<a id="{$value.ans_view_video.on_click}" href="{$value.ans_view_video.url}" onClick="{$myobj->getBrowser($value.ans_view_video.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-qusvideo.gif" alt="{$LANG.questions_video_available}" title="{$LANG.questions_video_available}" /></a>
		                      {/if}
		                      {if chkAudioModuleAllowed('blog') and ($value.audio_id)}
		                        <a id="{$value.ans_view_audio.on_click}" href="{$value.ans_view_audio.url}" onClick="{$myobj->getBrowser($value.ans_view_audio.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-qusaudio.gif" alt="{$LANG.common_audio_available}" title="{$LANG.common_audio_available}" /></a>
		                      {/if}

		                      {if chkExternalVideoModuleAllowed('blog') and ($value.external_video_id)}
		                      	<a id="{$value.ext_ans_view_video.on_click}" href="{$value.ext_ans_view_video.url}" onClick="{$myobj->getBrowser($value.ext_ans_view_video.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-externalvideo.gif" alt="{$LANG.external_video_available}" title="{$LANG.external_video_available}" /></a>
		                      {/if}
		                      {if chkExternalAudioModuleAllowed('blog') and ($value.external_audio_id)}
		                        <a id="{$value.ext_ans_view_audio.on_click}" href="{$value.ext_ans_view_audio.url}" onClick="{$myobj->getBrowser($value.ext_ans_view_audio.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-externalaudio.gif" alt="{$LANG.external_audio_available}" title="{$LANG.external_audio_available}" /></a>
		                      {/if}

							</p>
							<p><span >{$LANG.common_comment_posted_by}{$LANG.common_title_seperator}</span>&nbsp; <span>{$value.stripString_name} </span>
							<span>{$LANG.common_date_added}{$LANG.common_title_seperator}</span>&nbsp;<span >{$value.date_added}</span>
							{if $value.record.status eq 'ToActivate'}
								<span id="selViewDeleteComment_{$value.record.comment_id}"><a href="#" id="{$value.anchor}" onClick="{$value.publish_Confirmation}">{$LANG.common_publish}</a></span>
							{/if}
							<span id="selViewDeleteComment_{$value.record.comment_id}"><a href="#" id="{$value.anchor}" onClick="{$value.delete_Confirmation}">{$LANG.common_delete}</a></span>
							{if  $myobj->hasReply($value.record.comment_id)}
								<span class="clsShowHide"><a href="{$myobj->getCurrentUrl()}" onclick="Effect.toggle('{$value.liFormId}', 'BLIND'); return false;">{$LANG.blogcomment_show_hide_reply}</a></span>
								<div id="{$value.liFormId}" style="display:none;">
								{foreach key=inc item=val from=$value.fetchReply}
									<div class="clsBlogReply">
										  <div class="clsUserBlogDetails">
											<div class="clsBlogDetails">
											  <p><span id="selEditCommentTxt_{$val.record.comment_id}">{$val.wordWrapManual_comment}</span></p>
											</div>
										  </div>
										  <div class="clsReplysection">
										  <p>
										    <span class="clsBlogInfoTitle">{$LANG.replied_by}{$LANG.common_title_seperator}</span>&nbsp;{$val.stripString_name}
											<span class="clsBlogInfoTitle">{$LANG.common_date_added}{$LANG.common_title_seperator}</span>&nbsp;{$val.date_added}
											{if  $CFG.user.user_id==$val.record.user_id || $CFG.user.user_id eq $myobj->getFormField('user_id')}
												<span class="clsBlogInfoTitle">
													<a href="#" id="{$val.anchor}" onClick="{$val.deletereplies_Confirmation}" class="more">{$LANG.common_delete}</a></span>
											{/if}
										  </p>
										  </div>
										 </div>
									{/foreach}
								</div>
							{/if}
							</p>
							</td>
						</tr>
					{/foreach}
					<tr>
						<td colspan="2">
						<input type="button" class="clsSubmitButton" name="publish_submit" id="publish_submit" tabindex="{smartyTabIndex}" value="Publish" onClick="if(getMultiCheckBoxValue('blogsListForm', 'check_all', '{$LANG.select_atleast_one}')){$myobj->selCommentListBlock.showCommentsList.publish_Confirmation_1}" />
						&nbsp;<input type="button" class="clsSubmitButton" name="delete_submit" id="delete_submit" tabindex="{smartyTabIndex}" value="Delete" onClick="if(getMultiCheckBoxValue('blogsListForm', 'check_all', '{$LANG.select_atleast_one}')){$myobj->selCommentListBlock.showCommentsList.delete_Confirmation_1}" />
						</td>
					</tr>
			</table>
		</form>
		{if $CFG.admin.navigation.bottom}
	   		{include file='pagination.tpl'}
   	 	{/if}
	{else}
		<div id="selMsgAlert">
  			<p>{$LANG.no_comments_found}</p>
		</div>
	{/if}
	  </div>
  {/if}
</div>