{if ($myobj->isShowPageBlock('block_msg_form_error') || $myobj->isShowPageBlock('blogsEditor')) and !$myobj->isShowPageBlock('selBlogsListBlock')}
		{include file='../general/information.tpl'}
{/if}

{if $myobj->isShowPageBlock('blogsUpgrade')}
	{if chkIsPaymentAllowed('payment_blog') and chkIsPaymentAlertMessageAllowed()}
	    <ul class="clsQuistionHind">
	    	{if $myobj->blog_add.notifyBlog_arr.total_notify eq $CFG.plan.unlimited_text && $myobj->blog_add.notifyBlog_arr.today_notify eq $CFG.plan.unlimited_text}
				<li> <p>{$LANG.notify_unlimited}</p></li>
			{elseif $myobj->blog_add.notifyBlog_arr.total_notify eq $CFG.plan.unlimited_text}
				<li> <p>{$LANG.notify_unlimited}</p></li>
				<li> <p>{$myobj->blog_add.notifyBlog_arr.today_notify}</p></li>
			{else}
	            <li> <p>{$myobj->blog_add.notifyBlog_arr.total_notify}</p></li>
	            <li> <p>{$myobj->blog_add.notifyBlog_arr.today_notify}</p></li>
	        {/if}
	    </ul>
	{/if}
{/if}

<div id="selManageBlog">

	{if $myobj->isShowPageBlock('blogsTitle') or $myobj->isShowPageBlock('selBlogsListBlock')}
	<div class="clsManageBlogHeading clsClearfix">
		<div class="clsBlogLeft"><h2>{$myobj->manageBlogCommon.page_title}</h2></div>
		<div class="clsBlogRight">
			<ul class="clsFloatright clsBlogListLinks">
				<li class="clsLastBlogInfo"><span><a href="{$myobj->manageBlogCommon.blogs_addurl}">{$LANG.back_to_blog}</a></span></li>
				<li class="{$myobj->manageBlogCommon.manageblogActive}"><span><a href="{$myobj->manageBlogCommon.manageblog_url}">{$LANG.common_manage_blog}</a></span></li>
				<li class="{$myobj->manageBlogCommon.addblogActive}"><span><a href="{$myobj->manageBlogCommon.manageblog_addurl}">{$LANG.common_add_blog}</a></span></li>
			</ul>
		</div>
	</div>
	{/if}


	{if $myobj->isShowPageBlock('blogsEditor')}
	<!-- Confirmation Div -->
	  	<div id="selMsgConfirm" class="selMsgConfirm" style="display:none;position:absolute;">
	    	<form name="formConfirm" id="formConfirm" method="post" action="{$myobj->getCurrentUrl()}">
	      		<p id="confirmMessage"></p>
	      		<table summary="{$LANG.container_to_get_confirmation}">
	        		<tr><td>
						<input type="button" class="clsPopSubmitButton" name="confirm_action" id="confirm_action" value="{$LANG.common_yes_option}" tabindex="{smartyTabIndex}" onClick="hideAllBlocks(); doRemoveAction();"/>
	            		&nbsp;
	            		<input type="button" class="clsPopCancelButton" name="cancel" id="cancel" value="{$LANG.common_no_option}" tabindex="{smartyTabIndex}" onClick="return hideAllBlocks();" />
	          		</td></tr>
	      		</table>
	      		<input type="hidden" name="action" />
	    	</form>
	  	</div>
		{literal}
			<script language="javascript" type="text/javascript">
				var videoPreviewUrl = {/literal}'{$myobj->blogsEditBlock.manageBlogs_arr.video_default_preview_url}'{literal};
				var audioPreviewUrl = {/literal}'{$myobj->blogsEditBlock.manageBlogs_arr.audio_default_preview_url}'{literal};
				var video_not_encoded_info = {/literal}'{$myobj->blogsEditBlock.manageBlogs_arr.video_not_encoded_info}'{literal};
				var externalVideoPreviewUrl = {/literal}'{$myobj->blogsEditBlock.manageBlogs_arr.external_video_preview_url}'{literal};
				var audio_not_encoded_info = {/literal}'{$myobj->blogsEditBlock.manageBlogs_arr.audio_not_encoded_info}'{literal};
				var externalAudioPreviewUrl = {/literal}'{$myobj->blogsEditBlock.manageBlogs_arr.external_audio_preview_url}'{literal};
	        </script>
		{/literal}
<div id="selBlogsEditor">
<div class="clsBlogMain">
  <!--rounded corners-->
   <div class="clsShadedBg">
  <div class="lbtopanalyst">
    <div class="rbtopanalyst">
      <div class="bbtopanalyst">
        <div class="blctopanalyst">
          <div class="brctopanalyst">
            <div class="tbtopanalyst">
              <div class="tlctopanalyst">
                <div class="trctopanalyst">

			<div class="clsManageBlogRichText">{ if $CFG.feature.html_editor eq 'richtext' }
			   <form name="frmBlogsEditor" action="{$myobj->getCurrentUrl(true)}" method="post" onSubmit="return getHTMLSource('rte1', 'frmBlogsEditor', 'message');" autocomplete="off">
			{else}
			   <form name="frmBlogsEditor" action="{$myobj->getCurrentUrl(true)}" method="post" autocomplete="off">
			{/if}
					<table summary="{$LANG.manageBlog_tbl_summary}" class="clsAddBlog clsRichTextTable">
						<tr>
							<td class="{$myobj->getCSSFormLabelCellClass('subject_new')}"><label for="subject">{$LANG.common_subject}</label><span class="clsMandatory">*</span></td>
							<td class="{$myobj->getCSSFormFieldCellClass('subject_new')}">
								<input type="text" class="clsTextBox {$myobj->getCSSFormFieldElementClass('subject_new')}" name="subject_new" id="subject_new" tabindex="{smartyTabIndex}" value="{$myobj->getFormField('subject_new')}" />
								{$myobj->getFormFieldElementErrorTip('subject_new')}
							</td>
						</tr>
						<tr>
							<td class="{$myobj->getCSSFormFieldCellClass('message')}" colspan="2">
							{if $CFG.feature.html_editor eq 'textarea'}
								<textarea name="message" id="message" tabindex="{smartyTabIndex}" cols="100" rows="15">{$myobj->getFormField('message')}</textarea>
									<p>{$LANG.manageBlog_put_the_html_code}</p>
							{else}
								{if (chkBrowser() ||  $CFG.feature.html_editor eq 'fckeditor')}
									{if $CFG.feature.html_editor eq 'fckeditor' || $CFG.feature.html_editor eq 'richtext'}
											{$myobj->populateHtmlEditor('message')}
									{else}
										<textarea name="message" id="message" tabindex="{smartyTabIndex}" cols="100" rows="15">{$myobj->getFormField('message')}</textarea>
									{/if}
								{else}
									<textarea name="message" id="message" tabindex="{smartyTabIndex}" cols="100" rows="15">{$myobj->getFormField('message')}</textarea>
									<p>{$LANG.manageBlog_put_the_html_code}</p>
								{/if}
							{/if}	{$myobj->getFormFieldElementErrorTip('message')}
							</td>
						</tr>
						<tr>
							<td class="{$myobj->getCSSFormLabelCellClass('accept_comments')}"><label for="accept_comments">{$LANG.manageBlog_accept_comments}</label></td>
							<td class="{$myobj->getCSSFormFieldCellClass('accept_comments')}">
								<input type="radio" class="clsCheckRadio" name="accept_comments" id="accept_comments2" tabindex="{smartyTabIndex}" value="Yes"{$myobj->isCheckedRadio('accept_comments', 'Yes')} /><label for="accept_comments2">{$LANG.common_yes_option}</label>&nbsp;
								<input type="radio" class="clsCheckRadio" name="accept_comments" id="accept_comments3" tabindex="{smartyTabIndex}" value="No"{$myobj->isCheckedRadio('accept_comments', 'No')} /><label for="accept_comments3">{$LANG.common_no_option}</label>{$myobj->getFormFieldElementErrorTip('accept_comments')}
							</td>
						</tr>
						{if $CFG.admin.blogs_comment_auto_publish.allowed and !$CFG.admin.blogs_auto_publish.allowed }
							<tr>
								<td class="{$myobj->getCSSFormLabelCellClass('publish_comments')}"><label for="accept_comments">{$LANG.manageBlog_publish_comments}</label></td>
								<td class="{$myobj->getCSSFormFieldCellClass('publish_comments')}">
									<input type="radio" class="clsCheckRadio" name="publish_comments" id="publish_comments" tabindex="{smartyTabIndex}" value="Yes"{if $myobj->getFormField('publish_comments') eq 'Yes'} checked {else} ''{/if} /><label for="publish_comments2">{$LANG.common_yes_option}</label>&nbsp;
									<input type="radio" class="clsCheckRadio" name="publish_comments" id="publish_comments" tabindex="{smartyTabIndex}" value="No"{if $myobj->getFormField('publish_comments') eq 'No'}  checked {else}''{/if} /><label for="publish_comments3">{$LANG.common_no_option}</label>{$myobj->getFormFieldElementErrorTip('publish_comments')}
									<p class="clsZeroColour">{$LANG.common_msg_comment_publish_help}</p>
								</td>
							</tr>
						{/if}
						<tr id="selCategoryBlock">
							<td class="{$myobj->getCSSFormLabelCellClass('blog_category_id')}">
								<label for="blog_category_id">{$LANG.manageBlog_blogwriting_blog_category_id}</label><span class="clsMandatory">*</span>
							</td>
							<td class="{$myobj->getCSSFormFieldCellClass('blog_category_id')}">
								<div id="selGeneralCategory">
									<select name="blog_category_id" class="{$myobj->getCSSFormFieldElementClass('blog_category_id')}" id="blog_category_id" tabindex="{smartyTabIndex}" onBlur="manualLiveValidation(this, '1');return false;"><option value="">{$LANG.common_select_choose}</option>
	                                    {$myobj->generalPopulateArray($myobj->blogsEditor.populateCategories_arr, $myobj->getFormField('blog_category_id'))}
									</select>
								</div>
									{$myobj->getFormFieldElementErrorTip('blog_category_id')}
							</td>
						</tr>
						</table>
						{if chkVideoModuleAllowed('blog') || chkExternalVideoModuleAllowed('blog') || chkAudioModuleAllowed('blog') || chkExternalAudioModuleAllowed('blog')}
						<table class="clsAskQuestion clsAskQuestionUpload" summary="{$LANG.manageBlog_tbl_summary}">
							<tr>
								<td colspan="2">
									<div class="AskQuestionSubHead">{$LANG.common_attachments}</div>
								</td>
							</tr>
							<tr>
								{if chkVideoModuleAllowed('blog') || chkExternalVideoModuleAllowed('blog')}
				        		<td class="{$myobj->getCSSFormFieldCellClass('blog_video')} {if chkAudioModuleAllowed('blog') || chkExternalAudioModuleAllowed('blog')} clsQuestionVideo {/if}clsVideoUpload30">
				        			{if chkVideoModuleAllowed('blog')}
										<div class="clsVideoUpload clsClearfix" id="video_first" {$myobj->blogsEditBlock.manageBlogs_arr.style_add_video}>
											<div class="clsVideoContainer">
											<a id="video_add" href="{$myobj->blogsEditBlock.manageBlogs_arr.video_upload_url}" onClick="{$myobj->getBrowser('video_add')}"></a>
					        				{$myobj->getFormFieldErrorTip('question_video')}
											</div>
											<div class="clsVideoDetails">
												<a href="{$myobj->blogsEditBlock.manageBlogs_arr.video_upload_url}" onClick="{$myobj->getBrowser('video_add')}">
													<p>{$LANG.common_record_video}</p>
													<p>{$LANG.common_using_webcams}</p>
												</a>
											</div>
										</div>
										<div class="clsAudioUpload clsClearfix" id="video_secnd" {if $myobj->blogsEditBlock.manageBlogs_arr.style_add_video==''} style="display:none;" {/if}>

											<div class="clsAudioDetails clsAudioOptions">
												<div >
													<p class="clsAVDelete"><a {$myobj->blogsEditBlock.manageBlogs_arr.style_delete_video} id="video_delete" href="{$myobj->getCurrentUrl()}" onClick="return confrimRemove('video', 'video_delete', '{$LANG.are_you_sure_to_delete}');">{$LANG.delete_video}</a></p>
													<p class="clsAVPreview"><a {$myobj->blogsEditBlock.manageBlogs_arr.style_preview_video} id="video_preview" href="{$myobj->blogsEditBlock.manageBlogs_arr.video_preview_url}" onClick="{$myobj->getBrowser('video_preview')}">{$LANG.preview_video}</a></p>
												</div>
											</div>
										</div>
									{/if}
									{if chkExternalVideoModuleAllowed('blog')}
										<div class="clsExternalUploadBox">
											<div class="clsVideoUpload" id="external_video_add1" {$myobj->blogsEditBlock.manageBlogs_arr.style_add_external_video}>
												<div class="clsExternalVideoContainer">
													<a {$myobj->blogsEditBlock.manageBlogs_arr.style_add_external_video} id="external_video_add" href="{$myobj->blogsEditBlock.manageBlogs_arr.external_video_upload_url}" onClick="{$myobj->getBrowser('external_video_add')}">{$LANG.add_external_video}</a>
						        					{$myobj->getFormFieldErrorTip('audio')}
												</div>

											</div>
											<div class="clsAudioUpload" id="external_video_add2" {if $myobj->blogsEditBlock.manageBlogs_arr.style_add_external_video==''} style="display:none;" {/if}>
												<div class="clsAudioDetails clsAudioOptions">
													<div >
														<p class="clsAVDelete"><a {$myobj->blogsEditBlock.manageBlogs_arr.style_delete_external_video} id="external_video_delete" href="{$myobj->getCurrentUrl()}" onClick="return confrimRemove('external_video', 'external_video_delete','{$LANG.are_you_sure_to_delete}');">{$LANG.delete_external_video}</a></p>
														<p class="clsAVPreview"><a {$myobj->blogsEditBlock.manageBlogs_arr.style_preview_external_video} id="external_video_preview" href="{$myobj->blogsEditBlock.manageBlogs_arr.external_video_preview_url}" onClick="{$myobj->getBrowser('external_video_preview')}">{$LANG.preview_external_video}</a></p>
													</div>
												</div>
											</div>
										</div>
									{/if}
				        		</td>
							    {/if}
				        		{if chkAudioModuleAllowed('blog') || chkExternalAudioModuleAllowed('blog')}
				        		<td class="{$myobj->getCSSFormFieldCellClass('audio')}">
				        			{if chkAudioModuleAllowed('blog')}
										<div class="clsAudioUpload clsClearfix" id="audio_first" {$myobj->blogsEditBlock.manageBlogs_arr.style_add_audio}>
											<div class="clsAudioContainer">
												<a id="audio_add" href="{$myobj->blogsEditBlock.manageBlogs_arr.audio_upload_url}" onClick="{$myobj->getBrowser('audio_add')}"></a>
					        					{$myobj->getFormFieldErrorTip('audio')}
											</div>
											<div class="clsAudioDetails">
												<div>
													<a href="{$myobj->blogsEditBlock.manageBlogs_arr.audio_upload_url}" onClick="{$myobj->getBrowser('audio_add')}">
														<p>{$LANG.common_record_audio}</p>
														<p>{$LANG.common_using_recorder}</p>
													</a>
												</div>
											</div>
										</div>
										<div class="clsAudioUpload clsClearfix" id="audio_secnd" {if $myobj->blogsEditBlock.manageBlogs_arr.style_add_audio==''} style="display:none;" {/if}>
											<div class="clsAudioDetails clsAudioOptions">
												<div >
													<p class="clsAVDelete"><a {$myobj->blogsEditBlock.manageBlogs_arr.style_delete_audio} id="audio_delete" href="{$myobj->getCurrentUrl()}" onClick="return confrimRemove('audio', 'audio_delete', '{$LANG.are_you_sure_to_delete}');">{$LANG.delete_audio}</a></p>
													<p class="clsAVPreview"><a {$myobj->blogsEditBlock.manageBlogs_arr.style_preview_audio} id="audio_preview" href="{$myobj->blogsEditBlock.manageBlogs_arr.audio_preview_url}"  onClick="{$myobj->getBrowser('audio_preview')}">{$LANG.preview_audio}</a></p>
												</div>
											</div>
										</div>
									{/if}
									{if chkExternalAudioModuleAllowed('blog')}
										<div class="clsExternalUploadBox">
											<div class="clsAudioUpload" id="external_audio_add1" {$myobj->blogsEditBlock.manageBlogs_arr.style_add_external_audio}>
												<div class="clsExternalAudioContainer">
													<a id="external_audio_add" href="{$myobj->blogsEditBlock.manageBlogs_arr.external_audio_upload_url}" onClick="{$myobj->getBrowser('external_audio_add')}">{$LANG.add_external_audio}</a>
						        					{$myobj->getFormFieldErrorTip('audio')}
												</div>
											</div>
											<div class="clsAudioUpload" id="external_audio_add2" {if $myobj->blogsEditBlock.manageBlogs_arr.style_add_external_audio==''} style="display:none;" {/if}>
												<div class="clsAudioDetails clsAudioOptions">
													<div >
														<p class="clsAVDelete"><a {$myobj->blogsEditBlock.manageBlogs_arr.style_delete_external_audio} id="external_audio_delete" href="{$myobj->getCurrentUrl()}" onClick="return confrimRemove('external_audio', 'external_audio_delete', '{$LANG.are_you_sure_to_delete}');">{$LANG.delete_external_audio}</a></p>
														<p class="clsAVPreview"><a {$myobj->blogsEditBlock.manageBlogs_arr.style_preview_external_audio} id="external_audio_preview" href="{$myobj->blogsEditBlock.manageBlogs_arr.external_audio_preview_url}"  onClick="{$myobj->blogsEditBlock.manageBlogs_arr.external_audio_onclick}">{$LANG.preview_external_audio}</a></p>
													</div>
												</div>
											</div>
										</div>
									{/if}
								</td>
								{/if}
							</tr>
						</table>
						{/if}
						<table>
						{$myobj->populateHidden($myobj->blogsEditBlock.populateHidden)}
						{if $myobj->isShowPageBlock('blogsEditBlock')}
							<tr>
                            	<td><!----></td>
								<td class="{$myobj->getCSSFormFieldCellClass('update_submit')}">
									<div class="clsSubmitLeft">
                                    	<div class="clsSubmitRight">
                                     	  <input type="submit" class="clsSubmitButton" name="update_submit" id="update_submit" tabindex="{smartyTabIndex}" value="{$LANG.common_update}" />
                                  		</div>
                                    </div>
									<div class="clsCancelLeft">
                                        <div class="clsCancelRight">
                                      	  <input type="submit" class="clsCancelButton" name="update_cancel" id="update_cancel" tabindex="{smartyTabIndex}" value="{$LANG.common_cancel}" />
                                        </div>
                                    </div>
								</td>
							</tr>
						{else}
							<tr>
			                    <td><!----></td>
								<td class="clsButtonAlignment {$myobj->getCSSFormFieldCellClass('add_submit')}">
									<div class="clsSubmitLeft">
                                        <div class="clsSubmitRight">
                                     	   <input type="submit" class="clsSubmitButton" name="add_submit" id="add_submit" tabindex="{smartyTabIndex}" value="{$LANG.common_add}" />
                                        </div>
                                    </div>
									<div class="clsCancelLeft">
                                        <div class="clsCancelRight">
                                     	   <input type="submit" class="clsCancelButton" name="update_cancel" id="update_cancel" tabindex="{smartyTabIndex}" value="{$LANG.common_cancel}" />
                                        </div>
                                    </div>
								</td>
							</tr>
						{/if}
					</table>
				</form></div>
                 </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  </div>
  <!--end of rounded corners-->
</div>
			</div>
	  {/if}
	{if $myobj->isShowPageBlock('selBlogsListBlock')}





<div class="clsBlogMain">
  <!--rounded corners-->
   <div class="clsShadedBg">
  <div class="lbtopanalyst">
    <div class="rbtopanalyst">
      <div class="bbtopanalyst">
        <div class="blctopanalyst">
          <div class="brctopanalyst">
            <div class="tbtopanalyst">
              <div class="tlctopanalyst">
                <div class="trctopanalyst">
				{include file='../general/information.tpl'}
				{if $myobj->isResultsFound()}
				<div id="selMsgConfirmList" class="selMsgConfirm" style="display:none;position:absolute;">
						<p id="confirmation_msg"></p>
						<form name="deleteForm" id="deleteForm" method="post" action="{$myobj->getCurrentUrl()}" autocomplete="off">
							<table summary="{$LANG.manageBlog_tbl_summary}">
								<tr>
									<td>
										<input type="submit" class="clsPopSubmitButton" name="action_blog" id="action_blog" value="{$LANG.common_yes_option}" tabindex="{smartyTabIndex}" /> &nbsp;
										<input type="button" class="clsPopCancelButton" name="cancel" id="cancel" value="{$LANG.common_no_option}" tabindex="{smartyTabIndex}"  onClick="return hideAllBlocks('blogsListForm');"/>
										<input type="hidden" name="blog_id" id="blog_id" />
										<input type="hidden" name="act" id="act" />
										{$myobj->populateHidden($myobj->selBlogsListBlock.populateHidden)}
									</td>
								</tr>
							</table>
						</form>
			 </div>
			 <form name="blogsListForm" id="blogsListForm" method="post" action="{$myobj->getCurrentUrl()}" autocomplete="off">
				 {if $CFG.admin.navigation.top}
						{include file='../general/pagination.tpl'}
				 {/if}
				 <table summary="{$LANG.manageBlog_tbl_summary}" class="clsForumTbl clsTableBorder">
					<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_subject}</th>
						<th>{$LANG.common_category}</th>
						<th>{$LANG.common_details}</th>
						<th>{$LANG.common_date_added}</th>
						<th class="clsLastPost clsNoBorders">{$LANG.common_action}</th>
					</tr>
					{foreach key=inc item=value from=$myobj->selBlogsListBlock.showBlogsList}
						<tr>
							<td><input type="checkbox" class="clsCheckRadio" name="blog_id[]" onclick="disableHeading('blogsListForm');" value="{$value.record.blog_id}" tabindex="{smartyTabIndex}" /></td>
							<td><a href="{$value.blogcomment_url}">{$value.strip_subject}</a></td>
							<td>{$value.get_blog_category}</td>
							<td>
								<p><span class="clsBlogInfoTitle">{$LANG.common_total_comments}:</span>&nbsp;{$value.record.total_comments}</p>
								<p><span class="clsBlogInfoTitle">{$LANG.common_total_views}:</span>&nbsp;{$value.record.total_views}</p>
								<p><span class="clsBlogInfoTitle">{$LANG.blog_accept_comments}:</span>&nbsp;{$value.yes_or_no}</p>
							</td>
							<td>{$value.record.date_added}</td>
							<td class="clsNoBorders">
								<a id="{$value.anchor}" href="{$value.manageblog_edit_url}">{$LANG.common_edit}</a>
							</td>
						</tr>
					{/foreach}
					<tr>
						<td class="clsButtonAlignment {$myobj->getCSSFormFieldCellClass('add_delete')}" colspan="6">
							{$myobj->populateHidden($myobj->selBlogsListBlock.populateHidden)}
							<a href="#" id="{$myobj->selBlogsListBlock.anchor}"></a>
							<div class="clsCancelLeft">
                         	  <div class="clsCancelRight">
                        	   <input type="button" class="clsSubmitButton" name="delete_submit" id="delete_submit" tabindex="{smartyTabIndex}" value="{$LANG.common_delete}" onClick="{$myobj->selBlogsListBlock.onClick}" />
                         	  </div>
                            </div>
						</td>
					</tr>
				</table>
				{if $CFG.admin.navigation.bottom}
					{include file='../general/pagination.tpl'}
			  	{/if}
				</form>
				{else}
			<div id="selMsgAlert">
				<p>{$LANG.common_no_records_found}</p>
			</div>
		{/if}
				     			</div>
				              </div>
				            </div>
				          </div>
				        </div>
				      </div>
				    </div>
				  </div>
	 			</div>
				  <!--end of rounded corners-->
				</div>

	{/if}
</div>