{{getCollectionByCategory CollectionID=3 ColumnID=1 Value=$smarty.session.UserID OrderColumn=1 var=Groups}} 
{{assign var=generalUser value=0}} 
{{assign var=moderatorUser value=0}} 
{{foreach from=$Groups item=v key=k}} 
{{if $v.Collection_3_2 eq 1 or $v.Collection_3_2 eq 5 }} {{assign var=moderatorUser value=1}} {{/if}} 
{{if $v.Collection_3_2 eq 3 or $v.Collection_3_2 eq 4 }} {{assign var=generalUser value=1}} {{/if}} 
{{/foreach}}

{{assign var=DescCollection value=61}}
{{assign var=CommentsCollection value=62}}
{{getCollectionByCategory CollectionID=$DescCollection OrderColumn=1 OrderWay=1 var=Articles ColumnID='ID' Value=$smarty.get.article}}
{{assign var=ArticleData value=$Articles[0]}}
{{assign var=Topic value=2|fieldName:$DescCollection}}

{{getCollectionByCategory CollectionID=1 OrderColumn=1 OrderWay=1 var=User ColumnID='ID' Value=$ArticleData.Collection_61_6}} 
{{assign var=UData value=$User[0]}} 
{{if $smarty.session.UserID eq $UData.Collection_1_ID or $moderatorUser eq 1}} 



{{getCollectionByCategory CollectionID=$CommentsCollection OrderColumn=ID OrderWay=1 var=Comments ColumnID='4' Value=$smarty.get.article}} 
{{foreach from=$Comments item=v key=k}}
	{{CollectionDeleteRow CollectionID=$CommentsCollection RowID=$v.Collection_62_ID}}
{{/foreach}}

{{CollectionDeleteRow CollectionID=$DescCollection RowID=$smarty.get.article}}
{{urlredirect page='/blog-topics.html?topic='|concat:$ArticleData.$Topic}}
{{else}}
{{urlredirect page='/blog.html'}}
{{/if}}