HEX
Server: Apache/2.4.59 (Debian)
System: Linux skycube.cz 4.19.0-25-amd64 #1 SMP Debian 4.19.289-2 (2023-08-08) x86_64
User: ilya (534)
PHP: 7.3.31-1~deb10u7
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/ilya/data/www/irk2.ru/templates/skin/habra/actions/ActionBlog/comment.tpl
<div id="form_comment" style="display: none;">
	<div class="comment_text" id="text_preview"></div>
	<div style="clear: both;"></div><br>
	<div class="panel_topic_form" style="background: #eaecea; ">   				
	 			<a href="#" onclick="voidPutTag2('form_comment_text','b'); return false;" class="button"><img src="{$DIR_STATIC_SKIN}/img/bold_ru.gif" width="20" height="20" title="жирный"></a>
	 			<a href="#" onclick="voidPutTag2('form_comment_text','i'); return false;" class="button"><img src="{$DIR_STATIC_SKIN}/img/italic_ru.gif" width="20" height="20" title="курсив"></a>	 			
	 			<a href="#" onclick="voidPutTag2('form_comment_text','u'); return false;" class="button"><img src="{$DIR_STATIC_SKIN}/img/underline_ru.gif" width="20" height="20" title="подчеркнуть"></a>	 			
	 			<a href="#" onclick="voidPutTag2('form_comment_text','s'); return false;" class="button"><img src="{$DIR_STATIC_SKIN}/img/strikethrough.gif" width="20" height="20" title="зачеркнутый"></a>	 			
	 			&nbsp;
	 			<a href="#" onclick="voidPutURL('form_comment_text'); return false;" class="button"><img src="{$DIR_STATIC_SKIN}/img/link.gif" width="20" height="20"  title="вставить ссылку"></a>
	 			<a href="#" onclick="voidPutTag2('form_comment_text','code'); return false;" class="button"><img src="{$DIR_STATIC_SKIN}/img/code.gif" width="30" height="20" title="код"></a>
	 			<a href="#" onclick="showWindow('window_load_img'); return false;" class="button"><img src="{$DIR_STATIC_SKIN}/img/img.gif" width="20" height="20" title="изображение"></a>
	 			
	 </div>
 	<form action="" method="POST">
    	<textarea class="input_comments_reply" name="comment_text" id="form_comment_text" style="width: 100%; height: 100px;"></textarea>    	
    	<input type="submit" name="submit_comment" value="добавить">  <input type="submit" name="submit_preview" value="предпросмотр" onclick="ajaxTextPreview('form_comment_text',false); return false;">  	
    	<input type="hidden" name="reply" value="" id="form_comment_reply">
    </form>
</div>

{include file='window_load_img.tpl' sToLoad='form_comment_text'}

{literal}
<script type="text/javascript">
var currentShowForm=-1;

function showCommentForm(reply) {	
	if (document.getElementById('reply_'+currentShowForm)) {		
		var div_form_comment=document.getElementById('reply_'+currentShowForm);
		div_form_comment.style.display='none';
	} else {
		var div_form_comment=document.getElementById('form_comment');
	}
	var div_reply=document.getElementById('reply_'+reply);
	
	var form_comment_reply=document.getElementById('form_comment_reply');
	
	document.getElementById('text_preview').innerHTML='';
	
	form_comment_reply.value=reply;
	var s=div_form_comment.innerHTML;
	div_form_comment.innerHTML='';	
	div_reply.innerHTML=s;		
	div_reply.style.display='block';	
	currentShowForm=reply;
	document.getElementById('form_comment_text').focus();
}
</script>
{/literal}





	<div id="commentsdiv">
		<div class="text_comments"> 
		
		{if count($aComments)}
		
  			<div class="head_comments_holder">
  				<a name="comments"><img src="{$DIR_STATIC_SKIN}/img/comment.gif"></a>
  				<span class="news_page_comments_title">комментарии({$oTopic->getCountComment()}):</span>&nbsp;  				
  			</div> 
  			
  			{foreach from=$aComments item=oComment}
  			
			<div class=
			 {if $oComment->getDelete() and $oUserCurrent and $oUserCurrent->isAdministrator()}
				"comment_item_del_admin"
			 {elseif $oUserCurrent and $oComment->getUserId()==$oUserCurrent->getId()}	
			 	"comment_item_self"
			 {elseif $dDateTopicRead<=$oComment->getDate()}			 	
			 	"comment_item_new2"
			 {else}
			 	"comment_item"			 
			 {/if} 
				 style="margin-left: {$oComment->getLevel()*30}px;">  
				
				<a name="comment{$oComment->getId()}" href="{$DIR_WEB_ROOT}/profile/{$oComment->getUserLogin()}/"><img class="comments_avatar"   src="{$oComment->getUserProfileAvatarPath(24)}" width="24" height="24" alt="" title="{$oComment->getUserLogin()}" border="0"></a>
   				<div class="service_text_comments_holder">
   					<a href="{$DIR_WEB_ROOT}/profile/{$oComment->getUserLogin()}/" class="comments_nickname">{$oComment->getUserLogin()}</a>  
   					<span class="comments_date">{date_format date=$oComment->getDate()}</span> 
   					<a href="#comment{$oComment->getId()}" class="small" title=" ссылка ">#</a> 
   					{if !$oComment->getDelete() and $oUserCurrent and $oUserCurrent->isAdministrator()}
   						<span id="comment_delete_{$oComment->getId()}">&nbsp;<a href="#" title="удалить комментарий" onclick="ajaxCommentDelete({$oComment->getId()}); return false;"><img src="{$DIR_STATIC_SKIN}/img/comment_del.gif" border="0" alt="удалить"></a></span>
   					{/if}
   					{if $oComment->getDelete() and $oUserCurrent and $oUserCurrent->isAdministrator()}
   						<span id="comment_repair_{$oComment->getId()}">&nbsp;<a href="#" title="восстановить комментарий" onclick="ajaxCommentRepair({$oComment->getId()}); return false;"><img src="{$DIR_STATIC_SKIN}/img/comment_repair.gif" border="0" alt="восстановить"></a></span>
   					{/if}
				</div>
   				<div class="rating_comment_holder" id="voter{$oComment->getId()}">
   				{if !$oComment->getDelete()}
   					<span class="comments_rating_off" style="color: {if $oComment->getRating()<0}#d00000{else}#008000{/if};"  id="comment_rating_{$oComment->getId()}">{$oComment->getRating()}</span>&nbsp;
   					
   					<span class="voter">
   					<a class="vote_down" href="#" onclick="ajaxVoteComment2({$oComment->getId()},this,-1); return false;"></a>
   					<a class="vote_up" href="#" onclick="ajaxVoteComment2({$oComment->getId()},this,1); return false;"></a>
   					</span>
   					
   					
   					
   					<span id="comment_vote_self_{$oComment->getId()}" style="display: none;">
						<img src="{$DIR_STATIC_SKIN}/img/vote_comment_down_gray.gif" border="0" alt="-" title="нельзя голосовать за свой комментарий"> 
						<img src="{$DIR_STATIC_SKIN}/img/vote_comment_up_gray.gif" border="0" alt="+" title="нельзя голосовать за свой комментарий">
					</span>	
					<span id="comment_vote_is_vote_up_{$oComment->getId()}" style="display: none;">
						<img src="{$DIR_STATIC_SKIN}/img/vote_comment_down_gray.gif" border="0" alt="-" title="вы уже голосовали за этот комментарий"> 
						<img src="{$DIR_STATIC_SKIN}/img/vote_comment_up.gif" border="0" alt="+" title="вы уже голосовали за этот комментарий">
					</span>
					<span id="comment_vote_is_vote_down_{$oComment->getId()}" style="display: none;">
						<img src="{$DIR_STATIC_SKIN}/img/vote_comment_down.gif" border="0" alt="-" title="вы уже голосовали за этот комментарий"> 
						<img src="{$DIR_STATIC_SKIN}/img/vote_comment_up_gray.gif" border="0" alt="+" title="вы уже голосовали за этот комментарий">
					</span>
					<span id="comment_vote_ok_{$oComment->getId()}" style="display: none;">
						<a href="#" onclick="ajaxVoteComment({$oComment->getId()},-1); return false;"><img src="{$DIR_STATIC_SKIN}/img/vote_comment_down.gif" border="0" alt="-" title="плохой комментарий"></a>
						<a href="#" onclick="ajaxVoteComment({$oComment->getId()},1); return false;"><img src="{$DIR_STATIC_SKIN}/img/vote_comment_up.gif" border="0" alt="+" title="хороший комментарий"></a>							
					</span>
					<span id="comment_vote_anonim_{$oComment->getId()}" style="display: none;">
						<img src="{$DIR_STATIC_SKIN}/img/vote_comment_down_gray.gif" border="0" alt="-" title="для голосования необходимо авторизоваться"> 
						<img src="{$DIR_STATIC_SKIN}/img/vote_comment_up_gray.gif" border="0" alt="+" title="для голосования необходимо авторизоваться">
					</span>
   					
   					{if $oUserCurrent}  
   						{if $oComment->getUserId()==$oUserCurrent->getId()}
   							<script>showCommentVote('comment_vote_self',{$oComment->getId()});</script>
   						{else}	
   							{if $oComment->getUserIsVote()}		
   								{if $oComment->getUserVoteDelta()>0}
   									<script>showCommentVote('comment_vote_is_vote_up',{$oComment->getId()});</script>
   								{else}
   									<script>showCommentVote('comment_vote_is_vote_down',{$oComment->getId()});</script>
   								{/if}
   							{else}		
   								<script>showCommentVote('comment_vote_ok',{$oComment->getId()});</script>
   							{/if}
						{/if}
					{else}
						<script>showCommentVote('comment_vote_anonim',{$oComment->getId()});</script>					
					{/if}													
				{/if}	
   				</div>
   				<div class="comment_text" id="comment_content_{$oComment->getId()}"> 
   				
   				{if !$oComment->getDelete() or ($oUserCurrent and $oUserCurrent->isAdministrator())}
   				   	{if $oComment->isBad()}
						<div style="display: none;" id="comment_text_{$oComment->getId()}">
					    	{$oComment->getText()}
					    </div>
					    <a href="#" onclick="$('comment_text_{$oComment->getId()}').style.display='block';$(this).style.display='none';return false;">раскрыть комментарий</a>
					{else}	
					    {$oComment->getText()}
					{/if}	
   				{else}
         			<font color="#c5c5c5">комментарий был удален</font>
				{/if}   				
   				
       			</div>       			
       			{if $oUserCurrent and !$oComment->getDelete() and !$oTopic->getForbidComment()}
       			<div class="comments_reply">
    				<div class="reply_word_holder">(<a href="javascript:showCommentForm({$oComment->getId()});">ответить</a>)</div>    				
    				<div style="display: none;" id="reply_{$oComment->getId()}"></div>
    			</div>
    			{/if}
      		</div>
      		
      		{/foreach}
      		{/if}
      			
      {if $oTopic->getForbidComment()}
      		<div class="text">
  				<br />
				Автор топика запретил оставлять комментарии.
			</div>
      {else}
      	{if $oUserCurrent}			
			<div class="WriteCommentHolder">
  				<img src="{$DIR_STATIC_SKIN}/img/comment.gif"> <a name="comment" href="javascript:showCommentForm(0);" class="news_page_comments_title">написать комментарий</a>
  				<br />
  				<span class="form_note">
  					<a href="{$DIR_WEB_ROOT}/profile/{$oUserCurrent->getLogin()}/"><img  class="img_border" src="{if $oUserCurrent->getProfileAvatar()}{$oUserCurrent->getProfileAvatarPath(24)}{else}{$DIR_STATIC_SKIN}/img/avatar_24x24.jpg{/if}" width="24" height="24" alt="" title=" это я! " border="0"></a>
  					&nbsp;&nbsp;&nbsp;вы&nbsp;&mdash;&nbsp;
  					<a href="{$DIR_WEB_ROOT}/profile/{$oUserCurrent->getLogin()}/" class="comments_nickname">{$oUserCurrent->getLogin()}</a>  	
  				</span><br /><br />
				<div style="display: none;" id="reply_0"></div>
			</div>
		{else}
			<div class="text">
  				<br />
				Только зарегистрированные и авторизованные пользователи могут оставлять комментарии.
  				<a href="{$DIR_WEB_ROOT}/login/">Авторизуйтесь</a>, пожалуйста, или 
  				<a href="{$DIR_WEB_ROOT}/registration/">зарегистрируйтесь</a>, если не зарегистрированы.<br><br>
			</div>			
		{/if}      		
      {/if}			
			
		</div>
	</div>