{foreach name="photoes" from=$allmain item="maincat"}
<td valign="top" width="50%">
<div class="moduletable_yjnf7">
<h3>
<a href="newssection.php?secid={$maincat.id}">
{$maincat.s_name}</a><a style="BACKGROUND-IMAGE: url(templates/default/images/show.jpg); WIDTH: 18px; DISPLAY: block; FLOAT: left; HEIGHT: 16px" class="collapse"></a></h3>
<div class="yj_news_flash_c">
<div style="POSITION: absolute; TOP: 110px; FONT-WEIGHT: bold; LEFT: 30px; dispaly: inline"></div>
<div style="POSITION: absolute; BOTTOM: 0px; FONT-WEIGHT: bold; LEFT: 30px; dispaly: inline">
<a href="http://wafdnews.com/index.php?option=com_mysection&view=section&id=5">
<img border="0" src="templates/default/images/more.gif"></a></div>
<ul class="nw_block">
{section name="subcat" loop=$alls max=5}
{*التحقق من ان الاي دي تبع الحقل الاب = الايد دي تبع الحقل الفرعي*}
{if $alls[subcat].c_id eq $maincat.id}
<li>
<a title="{$subcat.n_title}" href="news.php?newsid={$subcat.id}">
{$alls[subcat].n_title}</a></li>
{/if}
{/section}
</ul>
<br>
</div>
</div>
</td>
</tr>
{/foreach}