Here's the entire code from side.inc.php
Code:
if (!empty($a_action) && ($a_action == 'valid')) {
?>
- Navigation
- if (empty($page) || $page == 'home') { echo "class='active'"; } ?>>Home
- if ($page == 'orders' || $page == 'editcodes') { echo "class='active'"; } ?>>Orders
- if ($page == 'items' || $page == 'editimages' || $page == 'edititem' || $page == 'newitem') { echo "class='active'"; } ?>>Products
- if ($page == 'editcats') { echo "class='active'"; } ?>>Categories
- if ($page == 'reviews') { echo "class='active'"; } ?>>Reviews
- if ($page == 'settings' || $page == 'pages' || $page == 'blocks') { echo "class='active'"; } ?>>Settings
- if ($page == 'logout') { echo "class='active'"; } ?>>Log Out
} else {
echo '- Categories
';
if (empty($cat_id)) {
$cat_id = (($page == 'cats') && !empty($_GET['id'])) ? $_GET['id'] : 0;
}
$root_id = $cat_id;
if (($cat_id > 0) && (($page == 'item') || ($page == 'cats'))) {
$curr_cat = get_cat(safe_sql_str($cat_id));
if (!empty($curr_cat) && ($curr_cat != 'N/A')) {
$curr_cat = mysql_fetch_assoc($curr_cat);
if ($curr_cat['Parent'] > 0) {
$root_id = $curr_cat['Parent'];
}
}
}
if (!empty($categories) && ($categories != 'N/A')) {
mysql_data_seek($categories, 0);
while ($category = mysql_fetch_assoc($categories)) {
if ($category['Active']) {
$c_active = ($root_id == $category['CatID']) ? ' class="active"' : '' ;
$img_html = (empty($category['Image'])) ? '' : ".$category['Image']."' alt='' width='20' height='20' />";
$catc_count = count_file_cat(safe_sql_str($category['CatID']));
$sub_cats = get_scats($category['CatID']);
$subc_total = 0;
$total_cats = 0;
if (!empty($sub_cats) && ($sub_cats != 'N/A')) {
while ($row = mysqli_fetch_assoc($sub_cats)) {
if ($row['Active']) {
$subc_total += count_file_cat(safe_sql_str($row['CatID']));
}
}
$total_cats = $subc_total + $catc_count;
}
echo "- $c_active>.$category['CatID'].
";
"'>".$img_html.' '.safe_str($category['Name'])." ($total_cats)
}
}
}
}
?>
if (empty($a_action)) {
if ($best_prods) { require(dirname(__FILE__).'/bestfiles.inc.php'); }
if ($top_prods) { require(dirname(__FILE__).'/topfiles.inc.php'); }
}
?>