function showCat($cat) { global $MODE; echo "<td valign=top width='33%'>"; //echo '<IMG alt=">" src="images/arrow.gif" width="6" height="9" border="0" alt="">'; echo "<A HREF=\"" . htmlentities($_SERVER['PHP_SELF']) . "?cat=" . $cat['CID'] . "\"><span class='cat_heading'>" . jb_escape_html($cat['NAME']) . "'</span></A>"; //echo " (ID: ". ($cat[0]).") "; //if ($cat['allow_records']=='N') echo "<b>†</b>"; if ($cat['CID'] > 0) { showSubcat($cat['CID']); } else { } echo "</td>"; }
function showCat($cat) { global $withSubCat; global $MODE; echo "<td valign=top width='33%'>"; echo '<IMG alt=">" src="images/arrow.gif" width="6" height="9" border="0" alt="">'; echo "<A HREF=\"" . htmlentities($_SERVER['PHP_SELF']) . "?cat={$cat['0']}\"><span class='cat_heading'>{$cat['3']}</span></A>"; //echo " (ID: ". ($cat[0]).") "; if ($cat[5] == 'N') { echo "<b>†</b>"; } if ($MODE = 'ADMIN') { ?> <a onClick="return confirmLink(this, 'Delete this category, are you sure? (This will also delete all sub-categories in this category)') " href="<?php echo htmlentities($_SERVER['PHP_SELF']); ?> ?action=del&category_id=<?php echo $cat[0]; ?> "><IMG src='delete.gif' width='16' height='16' border='0' alt='Delete'></a> <a href="<?php echo htmlentities($_SERVER['PHP_SELF']); ?> ?edit=<?php echo $cat[0]; ?> &cat=<?php echo $cat[0]; ?> "> <IMG alt="edit" src="edit.gif" width="16" height="16" border="0" alt="Edit"/> </a> <?php } else { } ?> <?php if ($withSubCat) { showSubcat($cat[0]); } echo "</td>"; }