JezK
Edit File: header.php
<!doctype html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Uflexit</title> <meta name="description" content="Sufee Admin - HTML5 Admin Template"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="apple-touch-icon" href="apple-icon.png"> <link rel="shortcut icon" href="favicon.ico"> <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css"> <link rel="stylesheet" href="css/font-awesome.css" type="text/css"> <link rel="stylesheet" href="css/themify-icons.css" type="text/css"> <link rel="stylesheet" href="css/bootstrap-datetimepicker.min.css" type="text/css"> <link rel="stylesheet" href="css/style.css" type="text/css"> <link rel="stylesheet" href="css/header.css" type="text/css"> <link rel="stylesheet" href="css/jquery.dataTables.min.css" type="text/css" /> <link rel="stylesheet" href="css/ownstyles.css" type="text/css"> <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800' rel='stylesheet' type='text/css'> </head> <?php $page=basename($_SERVER['PHP_SELF']); $w_act = $d_act = $a_act= $u_act = $q_act = $r_act = ""; $d_image = "images/Customer_croppings/Dashboard.png"; $w_image ="images/Customer_croppings/Warehouses.png"; $a_image = "images/Customer_croppings/ASN.png"; $u_image = "images/Customer_croppings/Usermanagement.png"; $q_image ="images/Customer_croppings/QuotationList.png"; $r_image = "images/Customer_croppings/Ratings.png"; if($page =='warehouse.php') { $w_act = "active"; $w_image ="images/Customer_croppings/Warehouses_selected.png"; } if($page =='dashboard.php' || $page =='yourstock.php' || $page =='invoice.php' || $page =='shipment.php') { $d_act = "active"; $d_image ="images/Customer_croppings/Dashboard_selected.png"; } if($page =='quotelist.php') { $q_act = "active"; $q_image ="images/Customer_croppings/Quotationlist_selected.png"; } if($page =='asn.php') { $a_act = "active"; $a_image ="images/Customer_croppings/ASN_selected.png"; } if($page =='usermng.php') { $u_act = "active"; $u_image ="images/Customer_croppings/Usermanagement_selected.png"; } if($page =='ratings.php') { $r_act = "active"; $r_image ="images/Customer_croppings/Ratings_selected.png"; } ?> <body> <!-- Left Panel --> <aside id="left-panel" class="left-panel"> <nav class="navbar navbar-expand-sm navbar-default"> <div class="navbar-header"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-menu" aria-controls="main-menu" aria-expanded="false" aria-label="Toggle navigation"> <i class="fa fa-bars"></i> </button> <a class="navbar-brand" href="./"> <img src="images/loginlogo.png" alt="Logo" class="d-md-block d-none"> <img src="images/mobile_logo.png" alt="Logo" class="d-md-none d-block"> </a> <a class="navbar-brand hidden" href="#"><img src="images/loginlogo.png" alt="Logo"></a> </div> <div id="main-menu" class="main-menu collapse navbar-collapse w-100"> <ul class="nav navbar-nav w-100"> <li class="list-item mt-4 <?php echo $w_act;?>"> <!-- <a href="warehouse.php"> --> <a href="warehouse.php"> <img class="" src="<?php echo $w_image ;?>">Warehouses </a> </li> <?php if(isset($_SESSION['user_id']) && (int)$_SESSION['user_id']){?> <li class="list-item mt-4 <?php echo $d_act;?>"> <a href="dashboard.php"><img src="<?php echo $d_image ;?>">Dashboard </a> </li> <li class="list-item mt-4 <?php echo $q_act;?>"> <a href="quotelist.php"><img src="<?php echo $q_image ;?>">Quotation list </a> </li> <li class="list-item mt-4 <?php echo $a_act;?>"> <a href="asn.php"><img src="<?php echo $a_image ;?>">ASN </a> </li> <li class="list-item mt-4 <?php echo $u_act;?>"> <a href="usermng.php"><img src="<?php echo $u_image ;?>">User Management</a> </li> <li class="list-item mt-4 pl-2 <?php echo $r_act;?>"> <a href="ratings.php"> <img class="" src="<?php echo $r_image ;?>">Rating </a> </li> <li class="list-item mt-4"> <a href="#"><img src="images/Customer_croppings/logout.png">Logout </a> </li> <?php } ?> </ul> </div><!-- /.navbar-collapse --> </nav> </aside><!-- /#left-panel --> <!-- Left Panel --> <!-- Right Panel --> <div id="right-panel" class="right-panel"> <!-- Header--> <header id="header" class="header"> <div class="header-menu d-flex align-items-center"> <div class="col-sm-4"> <a id="menuToggle" class="menutoggle pull-left"><i class="fa fa fa-chevron-left"></i></a> <?php if ($page=='yourstock.php' || $page=='invoice.php' || $page=='shipment.php'){ ?> <a href="javascript:history.back(1)" class="pl-md-4 pl-0 pr-3 pr-md-0"><img src="images/Customer_croppings/back_main.png"></a> <?php } ?> </div> <div class="col-sm-5 float-left"> <!-- <span> English </span> <label class="switch"> <span><input type="checkbox"> <span class="slider round"></span> </span> </label> <span> Arabic</span> --> <div class="role-selector"> <span class="" id="English" style="color: blue;">English</span> <label class="switch"> <input type="checkbox" id="toggle" onclick="checkYesNo()"> <span class="slider round"></span> </label> <span class="" id="Arabic" style="color: grey;">Arabic</span> </div> </div> <?php if(isset($_SESSION['user_id']) && (int)$_SESSION['user_id']){?> <div class="col-sm-1 px-md-0 px-3 b-right header-left d-flex justify-space"> <div class="dropdown for-notification"> <button class="btn btn-secondary dropdown-toggle" type="button" id="notification" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <img src="images/Customer_croppings/notifications.png"> <span class="count bg-danger">5</span> </button> <div class="dropdown-menu" aria-labelledby="notification"> <p class="red">You have 3 Notification</p> <a class="dropdown-item media bg-flat-color-1" href="#"> <i class="fa fa-check"></i> <p>Server #1 overloaded.</p> </a> <a class="dropdown-item media bg-flat-color-4" href="#"> <i class="fa fa-info"></i> <p>Server #2 overloaded.</p> </a> <a class="dropdown-item media bg-flat-color-5" href="#"> <i class="fa fa-warning"></i> <p>Server #3 overloaded.</p> </a> </div> </div> </div> <?php } ?> <div class="col-sm-2 pl-md-3 header-left d-flex justify-content-md-start pl-3 "> <div class="user-area dropdown "> <a href="#" class="dropdown-toggle d-flex"> <?php if (isset($_SESSION['user_id']) && (int)$_SESSION['user_id']) { ?> <img class="user-avatar rounded-circle" src="<?php if(isset($_SESSION['picture']) && !empty($_SESSION['picture'])) echo 'uploads/subadmin_photos/'.$_SESSION['picture']; else echo 'images/profile.png';?>" alt="User Avatar"> <span class="logged-in">●</span> <span class="pl-2 author-name"><?php echo $_SESSION['name'];?></span> <?php } else {/* ?> <img class="user-avatar rounded-circle" src="images/profile.png" alt="User Avatar"> <span class="logged-in">●</span> <span class="pl-2 author-name">Thomas</span> <?php */ } ?> </a> <!-- <div class="user-menu dropdown-menu"> <a class="nav-link" href="usermng.php"><i class="fa fa-user"></i> My Profile</a> <a class="nav-link" href="notifications.php"><i class="fa fa-user"></i> Notifications <span class="count">13</span></a> <a class="nav-link" href="settings.php"><i class="fa fa-cog"></i> Settings</a> <a class="nav-link" href="#"><i class="fa fa-power-off"></i> Logout</a> </div> --> </div> </div> </div> </header><!-- /header --> <!-- Header--> <script> function checkYesNo() { if (document.getElementById('toggle').checked) { document.getElementById('Arabic').style.color = 'blue'; document.getElementById('English').style.color = 'grey'; }else { document.getElementById('English').style.color = 'blue'; document.getElementById('Arabic').style.color = 'grey'; } } </script>