<?php
include_once 'db.php'; 
// Check if Dine In is enabled (from settings table)
$dineinEnabled = false;

$result = $conn->query("
    SELECT value FROM settings 
    WHERE code = 'dine_in' 
      AND category_id = 4 
      AND is_active = 1 
    LIMIT 1
");

if ($row = $result->fetch_assoc()) {
    $dineinEnabled = ($row['value'] === '1');
}
?>


</head>

<body>
	<div id="global-loader">
		<div class="whirly-loader"> </div>
	</div>

		<!-- Sidebar -->
		<div class="sidebar" id="sidebar">
			<div class="sidebar-inner slimscroll">
				<div id="sidebar-menu" class="sidebar-menu">
					<ul>
						<li class="submenu-open">
							<h6 class="submenu-hdr">Updates</h6>
							<ul>
								
								<li class="submenu">
									<a href="javascript:void(0);"><i data-feather="grid"></i><span>Features</span><span class="menu-arrow"></span></a>
									<ul>
    								<li><a href="view_new_features.php" class="active">New Features</a></li>	
    								<li><a href="check_update.php" class="active">Check For Updates</a></li>
    								<li><a href="apply_update.php" class="active">Apply Update</a></li>
    							
								</ul>

								</li>
							</ul>
						</li>
						<li class="submenu-open">
							<h6 class="submenu-hdr">Inventory</h6>
							<ul>
								<li><a href="item_list.php"><i data-feather="box"></i><span>Products</span></a></li>
								<li><a href="tax_rate_list.php"><i data-feather="plus-square"></i><span>Tax Rate</span></a></li>
								<li><a href="category_list.php"><i data-feather="codesandbox"></i><span>Item Categories</span></a></li>
								<li><a href="uom_management.php"><i data-feather="plus-square"></i><span>Unit Of Measurement</span></a></li>
								   <?php if ($dineinEnabled): ?>
        <li><a href="table_list.php"><i data-feather="layout"></i><span>Tables</span></a></li>
        <li><a href="floor_list.php"><i data-feather="layers"></i><span>Floors</span></a></li>
    <?php endif; ?>
							
								
							</ul>
						</li>

						<li class="submenu-open">
							<h6 class="submenu-hdr">User Management</h6>
							<ul>
								<li><a href="users.php"><i data-feather="user-check"></i><span>Users & Permissions</span></a></li>
								<li><a href="rider_list.php"><i data-feather="user-check"></i><span>Riders</span></a></li>
							</ul>
						</li>
						<!-- <li class="submenu-open">
							<h6 class="submenu-hdr">Expenses</h6>
							<ul>
								<li><a href="expense_list.php"><i data-feather="package"></i><span>Expense List</span></a></li>
								<li><a href="expense_accounts.php"><i data-feather="clipboard"></i><span>Expense Accounts</span></a></li>
								<li><a href="expense_category.php"><i data-feather="truck"></i><span>Expense Categories</span></a></li>
							</ul>
						</li> -->
						

						<li class="submenu-open">
							<h6 class="submenu-hdr">Customers</h6>
							<ul>
								<li><a href="customer_list.php"><i data-feather="layers"></i><span>Customers</span></a></li>
								<li><a href="customer_category_list.php"><i data-feather="map"></i><span>Categories</span></a></li>
							
								
							</ul>
						</li>
				

<li class="submenu-open">
							<h6 class="submenu-hdr">Vendor & Purchases</h6>
							<ul>
								<li><a href="purchase-list.php"><i data-feather="shopping-cart"></i><span>Purchases</span></a></li>
								<li><a href="supplier-list.php"><i data-feather="file-text"></i><span>Suppliers</span></a></li>
							
								
							</ul>
						</li>


				
						<li class="submenu-open">
							<h6 class="submenu-hdr">Devices</h6>
							<ul>
								<li><a href="devices.php"><i data-feather="shopping-bag"></i><span>Devices</span></a></li>
								
							</ul>
						</li>
						<li class="submenu-open">
    <h6 class="submenu-hdr">Finance & Accounts</h6>
    <ul>
        <!-- Expenses Submenu -->
        <li class="submenu">
            <a href="javascript:void(0);">
                <i data-feather="file-text"></i><span>Expenses</span><span class="menu-arrow"></span>
            </a>
            <ul>
                <li><a href="expense_list.php">Expenses</a></li>
                <li><a href="expense_accounts.php">Expense Accounts</a></li>
                <li><a href="expense_category.php">Expense Categories</a></li>
            </ul>
        </li>

        <!-- Bank Accounts Submenu -->
        <li class="submenu">
            <a href="javascript:void(0);">
                <i data-feather="credit-card"></i><span>Accounts</span><span class="menu-arrow"></span>
            </a>
            <ul>
                <li><a href="bank_account_list.php">Bank Accounts</a></li>
            </ul>
        </li>

<li class="submenu">
            <a href="javascript:void(0);">
                <i data-feather="dollar-sign"></i><span>Payments</span><span class="menu-arrow"></span>
            </a>
            <ul>
                <li><a href="customer_payments.php">Customer Payments</a></li>
				<li><a href="supplier_payments.php">Supplier Payments</a></li>
				
            </ul>
        </li>

    </ul>
</li>

						
					



<li class="submenu-open">
    <h6 class="submenu-hdr">Reports</h6>
    <ul>
        <!-- Expenses Submenu -->
        <li class="submenu">
            <a href="javascript:void(0);">
                <i data-feather="bar-chart-2"></i><span>Sales</span><span class="menu-arrow"></span>
            </a>
            <ul>
                <li><a href="sales_report.php">Sales Report</a></li>
				<li><a href="sale_return_report.php">Sale Return Report</a></li>
				<li><a href="daily_sales_report.php">Day Wise Sale Summary</a></li>
                <li><a href="itemwise_sales_report.php">Item Wise Sales Report</a></li>
                <li><a href="shift_report.php">Cashier Shift Report</a></li>
				<li><a href="tax_wise_report.php">Tax Wise Report</a></li>
            </ul>
        </li>

        <!-- Bank Accounts Submenu -->
        <li class="submenu">
            <a href="javascript:void(0);">
                <i data-feather="box"></i><span>Inventory</span><span class="menu-arrow"></span>
            </a>
            <ul>
                <li><a href="purchase_report.php">Purchase report</a></li>
				<li><a href="stock_balance_report.php">Stock Balance Report</a></li>
				<li><a href="stock_valuation_report.php">Stock Valuation Report</a></li>
				<li><a href="item_ledger_report.php">Item Ledger Report</a></li>
				<li><a href="purchase_return_report.php">Purchase Return Report</a></li>

            </ul>
        </li>

		 <li class="submenu">
            <a href="javascript:void(0);">
                <i data-feather="credit-card"></i><span>Accounts</span><span class="menu-arrow"></span>
            </a>
            <ul>
				<li><a href="customer_ledger.php">Customer Ledger</a></li>
				<li><a href="customer_statement.php">Customer Statement</a></li>
				<li><a href="supplier_ledger.php">Supplier Ledger</a></li>
				<li><a href="supplier_statement.php">Supplier Statement</a></li>
                <li><a href="profit_loss_report.php">Profit & Loss Report</a></li>
				<li><a href="account_ledger.php">Account Ledger</a></li>
				<li><a href="account_report.php">Accounts Report</a></li>

            </ul>
        </li>
    </ul>
</li>

						
<!-- 								
						<li class="submenu-open">
							<h6 class="submenu-hdr">Reports</h6>
							<ul>
								<li><a href="sales_report.php"><i data-feather="bar-chart-2"></i><span>Sales Report</span></a></li>
								<li><a href="itemwise_sales_report.php"><i data-feather="box"></i><span>Item Wise Sales Report</span></a></li>
								<li><a href="purchase_report.php"><i data-feather="pie-chart"></i><span>Purchase report</span></a></li>
								<li><a href="shift_report.php"><i data-feather="user"></i><span>Cashier Shift Report</span></a></li>
								<li><a href="stock_balance_report.php"><i data-feather="pie-chart"></i><span>Stock Balance Report</span></a></li>
								<li><a href="profit_loss_report.php"><i data-feather="clipboard"></i><span>Profit & Loss Report</span></a></li>
						
							</ul>
						</li> -->
						
						<!-- <li class="submenu-open">
							<h6 class="submenu-hdr">Pages</h6>
							<ul>
								<li><a href="profile.html"><i data-feather="user"></i><span>Profile</span></a></li>
								<li class="submenu">
									<a href="javascript:void(0);"><i data-feather="shield"></i><span>Authentication</span><span class="menu-arrow"></span></a>
									<ul>
										<li class="submenu submenu-two"><a href="javascript:void(0);">Login<span class="menu-arrow inside-submenu"></span></a>
											<ul>
												<li><a href="signin.html">Cover</a></li>
												<li><a href="signin-2.html">Illustration</a></li>
												<li><a href="signin-3.html">Basic</a></li>
											</ul>
										</li>
										<li class="submenu submenu-two"><a href="javascript:void(0);">Register<span class="menu-arrow inside-submenu"></span></a>
											<ul>
												<li><a href="register.html">Cover</a></li>
												<li><a href="register-2.html">Illustration</a></li>
												<li><a href="register-3.html">Basic</a></li>
											</ul>
										</li>
										<li class="submenu submenu-two"><a href="javascript:void(0);">Forgot Password<span class="menu-arrow inside-submenu"></span></a>
											<ul>
												<li><a href="forgot-password.html">Cover</a></li>
												<li><a href="forgot-password-2.html">Illustration</a></li>
												<li><a href="forgot-password-3.html">Basic</a></li>
											</ul>
										</li>
										<li class="submenu submenu-two"><a href="javascript:void(0);">Reset Password<span class="menu-arrow inside-submenu"></span></a>
											<ul>
												<li><a href="reset-password.html">Cover</a></li>
												<li><a href="reset-password-2.html">Illustration</a></li>
												<li><a href="reset-password-3.html">Basic</a></li>
											</ul>
										</li>
										<li class="submenu submenu-two"><a href="javascript:void(0);">Email Verification<span class="menu-arrow inside-submenu"></span></a>
											<ul>
												<li><a href="email-verification.html">Cover</a></li>
												<li><a href="email-verification-2.html">Illustration</a></li>
												<li><a href="email-verification-3.html">Basic</a></li>
											</ul>
										</li>
										<li class="submenu submenu-two"><a href="javascript:void(0);">2 Step Verification<span class="menu-arrow inside-submenu"></span></a>
											<ul>
												<li><a href="two-step-verification.html">Cover</a></li>
												<li><a href="two-step-verification-2.html">Illustration</a></li>
												<li><a href="two-step-verification-3.html">Basic</a></li>
											</ul>
										</li>
										<li><a href="lock-screen.html">Lock Screen</a></li>
									</ul>
								</li>
								<li class="submenu">
									<a href="javascript:void(0);"><i data-feather="file-minus"></i><span>Error Pages</span><span class="menu-arrow"></span></a>
									<ul>
										<li><a href="error-404.html">404 Error </a></li>
										<li><a href="error-500.html">500 Error </a></li>
									</ul>
								</li>
								<li class="submenu">
									<a href="javascript:void(0);"><i data-feather="map"></i><span>Places</span><span class="menu-arrow"></span></a>
									<ul>
										<li><a href="countries.html">Countries</a></li>
										<li><a href="states.html">States</a></li>
									</ul>
								</li>
								<li>
									<a href="blank-page.html"><i data-feather="file"></i><span>Blank Page</span> </a>
								</li>
								<li>
									<a href="coming-soon.html"><i data-feather="send"></i><span>Coming Soon</span> </a>
								</li>
								<li>
									<a href="under-maintenance.html"><i data-feather="alert-triangle"></i><span>Under Maintenance</span> </a>
								</li>
							</ul>
						</li> -->
						<li class="submenu-open">
    <h6 class="submenu-hdr">Settings</h6>
    <ul>
        <li>
            <a href="sys_settings.php"><i data-feather="settings"></i><span>General Settings</span></a>
        </li>
        <li>
            <a href="branch_list.php"><i data-feather="smartphone"></i><span>Branch Settings</span></a>
        </li>
         <li>
            <a href="clear_data_panel.php"><i data-feather="globe"></i><span>Data Base Operation</span></a>
        </li>
        <!-- <li>
            <a href="email-settings.html"><i data-feather="monitor"></i><span>System Settings</span></a>
        </li>
        <li>
            <a href="payment-gateway-settings.html"><i data-feather="dollar-sign"></i><span>Payment Settings</span></a>
        </li>
        <li>
            <a href="storage-settings.html"><i data-feather="hexagon"></i><span>Other Settings</span></a>
        </li> --> 
        <!-- <li>
            <a href="logout.php"><i data-feather="log-out"></i><span>Logout</span></a>
        </li> -->
    </ul>
</li>

						<!-- <li class="submenu-open">
							<h6 class="submenu-hdr">UI Interface</h6>
							<ul>
								<li class="submenu">
									<a href="javascript:void(0);">
										<i data-feather="layers"></i><span>Base UI</span><span class="menu-arrow"></span>
									</a>
									<ul>
										<li><a href="ui-alerts.html">Alerts</a></li>
										<li><a href="ui-accordion.html">Accordion</a></li>
										<li><a href="ui-avatar.html">Avatar</a></li>
										<li><a href="ui-badges.html">Badges</a></li>
										<li><a href="ui-borders.html">Border</a></li>
										<li><a href="ui-buttons.html">Buttons</a></li>
										<li><a href="ui-buttons-group.html">Button Group</a></li>
										
									</ul>
								</li>
								<li class="submenu">
									<a href="javascript:void(0);">
										<i data-feather="layers"></i><span>Advanced UI</span><span class="menu-arrow"></span>
									</a>
									<ul>
										<li><a href="ui-ribbon.html">Ribbon</a></li>
										<li><a href="ui-clipboard.html">Clipboard</a></li>
										<li><a href="ui-drag-drop.html">Drag & Drop</a></li>
										<li><a href="ui-rangeslider.html">Range Slider</a></li>
									
									</ul>
								</li>
								<li class="submenu">
									<a href="javascript:void(0);"><i data-feather="bar-chart-2"></i>
										<span>Charts</span><span class="menu-arrow"></span>
									</a>
									<ul>
										<li><a href="chart-apex.html">Apex Charts</a></li>
										<li><a href="chart-c3.html">Chart C3</a></li>
										<li><a href="chart-js.html">Chart Js</a></li>
										<li><a href="chart-morris.html">Morris Charts</a></li>
										<li><a href="chart-flot.html">Flot Charts</a></li>
										<li><a href="chart-peity.html">Peity Charts</a></li>
									</ul>
								</li>
								<li class="submenu">
									<a href="javascript:void(0);"><i data-feather="database"></i>
										<span>Icons</span><span class="menu-arrow"></span>
									</a>
									<ul>
										<li><a href="icon-fontawesome.html">Fontawesome Icons</a></li>
										<li><a href="icon-feather.html">Feather Icons</a></li>
										<li><a href="icon-ionic.html">Ionic Icons</a></li>
								
									</ul>
								</li>
								<li class="submenu">
									<a href="javascript:void(0);">
										<i data-feather="edit"></i><span>Forms</span><span class="menu-arrow"></span>
									</a>
									<ul>
										<li class="submenu submenu-two">
											<a href="javascript:void(0);">Form Elements<span class="menu-arrow inside-submenu"></span></a>
											<ul>
												<li><a href="form-basic-inputs.html">Basic Inputs</a></li>
												<li><a href="form-checkbox-radios.html">Checkbox & Radios</a></li>
												<li><a href="form-input-groups.html">Input Groups</a></li>
												<li><a href="form-grid-gutters.html">Grid & Gutters</a></li>
												<li><a href="form-select.html">Form Select</a></li>
												<li><a href="form-mask.html">Input Masks</a></li>
												<li><a href="form-fileupload.html">File Uploads</a></li>
											</ul>
										</li>
										<li class="submenu submenu-two">
											<a href="javascript:void(0);">Layouts<span class="menu-arrow inside-submenu"></span></a>
											<ul>
												<li><a href="form-horizontal.html">Horizontal Form</a></li>
												<li><a href="form-vertical.html">Vertical Form</a></li>
												<li><a href="form-floating-labels.html">Floating Labels</a></li>
											</ul>
										</li>
										<li><a href="form-validation.html">Form Validation</a></li>
										<li><a href="form-select2.html">Select2</a></li>
										<li><a href="form-wizard.html">Form Wizard</a></li>
									</ul>
								</li>
								<li class="submenu">
									<a href="javascript:void(0);"><i data-feather="columns"></i><span>Tables</span><span
											class="menu-arrow"></span></a>
									<ul>
										<li><a href="tables-basic.html">Basic Tables </a></li>
										<li><a href="data-tables.html">Data Table </a></li>
									</ul>
								</li>
							</ul>
						</li> -->
		
    <!-- Contact Support (WhatsApp Link) -->
    <li class="submenu-open">
  <h6 class="submenu-hdr">Help</h6>
  <ul>
    <li>
      <a href="https://wa.me/923113917777" target="_blank">
        <i data-feather="message-square"></i>
        <span>Contact Support</span>
      </a>
    </li>
  </ul>
												</li>
											</ul>
										</li>
									</ul>
								</li>
							</ul>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<!-- /Sidebar -->