PHP Ionic Angularjs Phonegap AJAX Javascript CSS MySQL jQuery Forum

รบกวนหน่อยครับ จะทำอย่างงไรให้ sidebar menu ค้างค่าที่เลือกไว้

รบกวนหน่อยครับ จะทำอย่างงไรให้ sidebar menu ค้างค่าที่เลือกไว้
<div class="navbar-default navbar-static-side" role="navigation">
                <div class="sidebar-collapse">
                    <ul class="nav" id="side-menu">
                        
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-files-o fa-fw"></i> Select Forms<span class="fa arrow"></span></a>
							<ul class="nav nav-second-level">
							
								<? if($_SESSION[ses_status] == "user"){?>
								
								<li>
                                       <a href="form4.php">Request</a>
                                </li>
								<li>
                                       <a href="form1.php">Division Requisition</a>
                                </li>
                                
							</ul>
						</li>						
						<li>
									 <a href='#'><i class="fa fa-envelope fa-fw"></i> Receive<span class='fa arrow'></span></a>
									 <ul class='nav nav-second-level'>
								         <li>
											 <a href='receive.php'>Receive Division</a>
										 </li>
										 <li>
											 <a href='receive2.php'>Receive Request</a>
                                             
										 </li>

						<?}?>

								<?
								$query = "SELECT * FROM user WHERE id_user LIKE '$_SESSION[ses_username]' ";
								$result = mysql_query($query);
								$row = mysql_fetch_array($result);
								$boss = $row['boss'];
								
								
								if($_SESSION[ses_status] == "admin"&&$boss=="2")
							{echo "
								<li>
                                    <a href='form4.php'>Request</a>
                                </li>
								<li>
                                    <a href='form2.php'>Purchase Request</a>
                                </li>
								<li>
                                    <a href='form3.php'>Purchase Order</a>
                                </li>";
							}?>
                         
							</ul>
							
							
                        </li>		
						<?
							if($_SESSION[ses_status] == "boss")
							{
								
								if($boss != "1"){
								 echo "
								<li>
									 <a href='#'><i class='fa fa-edit fa-fw'></i> Approve<span class='fa arrow'></span></a>
									 <ul class='nav nav-second-level'>
										 <li>
											 <a href='approve_req_boss.php'>Request</a>
										 </li>
										 <li>
											 <a href='approve_boss.php'>Division Requisition</a>
										 </li>
										 <li>
											 <a href='approve_boss2.php'>Purchase Request</a>
										 </li>									 
									 </ul>
									  <!-- /.nav-second-level -->
								 </li>";
							    }
								else
								{
								echo "
								<li>
									 <a href='#'><i class='fa fa-edit fa-fw'></i> Approve<span class='fa arrow'></span></a>
									 <ul class='nav nav-second-level'>
										 <li>
											 <a href='approve_md.php'>Purchase Request & Purchase Order</a>
										 </li>
										 <li>
											 <a href='approve_his_md.php'>Check Approve History</a>
										 </li>
									 </ul>
									  <!-- /.nav-second-level -->
								 </li>
								 ";
								}								
						    }
	                    		
							else if($_SESSION[ses_status] == "admin")
							{
								
								if($boss!="3"){
								 echo "
								 <li>
									 <a href='#'><i class='fa fa-edit fa-fw'></i> Approve<span class='fa arrow'></span></a>
									 <ul class='nav nav-second-level'>";
									
										if($boss=="2"){
										echo "<li>
											 <a href='approve_admin.php'>Division Requisition</a>
										 </li>";	}
										 if($boss == '1'){
										 echo "
										 <li>
											 <a href='approve_req_boss.php'>Request</a>
										 </li>
										 <li>
											 <a href='approve_admin2.php'>Purchase Request</a>
										 </li>
										 <li>
											 <a href='approve_admin3.php'>Purchase Order</a>
										 </li>";
										 }
										 else{
										 echo "
										 <li>
											 <a href='approve_admin4.php'>Purchase Request</a>
										 </li>";
										 }										 
								echo "		
									 </ul>
									  
								 </li>";}
						

								;
								 echo "
								 <li>
							

                            <a href='#'><i class='fa fa-wrench fa-fw'></i> Manage Data<span class='fa arrow'></span></a>
                            <ul class='nav nav-second-level'>
                                <li>
                                    <a href='manage_user.php'>Manage User</a>
                                </li>
                                <li>
                                    <a href='manage_signature.php'>Manage Signature</a>
                                </li>
								<li>
                                    <a href='manage_detail.php'>Manage Detail</a>
                                </li>
                                <li>
                                    <a href='manage_suplier.php'>Manage Suplier</a>
                                </li>
								<li>
                                    <a href='manage_unit.php'>Manage Unit</a>
                                </li>
								
								<li>	 <a href='#'>EDIT<span class='fa arrow'></span></a>
									<ul class='nav nav-third-level'>
								<li>
                                    <a href='edit_request.php'>Edit Request</a>
                                </li>
								 <li>
                                    <a href='edit_dr.php'>Edit Division Requisition</a>
                                </li>
								 <li>
                                    <a href='edit_pr.php'>Edit Purchase Request</a>
                                </li>
								 <li>
                                    <a href='edit_po.php'>Edit Purchase Order</a>
                                </li>
                                </ul>
								</li>
                            </ul>
                            <!-- /.nav-second-level -->
                        </li>
                        ";
						 echo "
								 <li>
							

                            <a href='stock.php'><i class='fa fa-wrench fa-fw'></i> Manage Stock</a>
                           
                            <!-- /.nav-second-level -->
                        </li>
                        ";
						echo "
								 <li>
							

                            <a href='#'><i class='fa fa-wrench fa-fw'></i> Fixed Asset<span class='fa arrow'></span></a>
                            <ul class='nav nav-second-level'>
                                <li>	 <a href='#'>MITH<span class='fa arrow'></span></a>
									<ul class='nav nav-third-level'>
								<li>
                                    <a href='fixed_mith_asset.php'>OFFICE EQUIPMENT</a>
                                </li>
								 <li>
                                    <a href='fixed_mith_asset2.php'>FURNITURE&FIXTURE</a>
                                </li>
								 <li>
                                    <a href='fixed_mith_asset3.php'>TOOLS&EQUIPMENT</a>
                                </li>
								 <li>
                                    <a href='fixed_mith_asset4.php'>MOTOR VEHICLE</a>
                                </li>
								 <li>
                                    <a href='fixed_mith_asset5.php'>SOFTWARE</a>
                                </li>
									</ul>

								<li><a href='#'>MILT<span class='fa arrow'></span></a>
									<ul class='nav nav-third-level'>
								<li><a href='fixed_milt_asset.php'>OFFICE EQUIPMENT</a></li>
								<li><a href='fixed_milt_asset2.php'>FURNITURE&FIXTURE</a></li>
								<li><a href='fixed_milt_asset3.php'>TOOLS&EQUIPMENT</a></li>
								<li><a href='fixed_milt_asset4.php'>MOTOR VEHICLE</a></li>
								<li><a href='fixed_milt_asset5.php'>SOFTWARE</a></li>
								<li><a href='fixed_milt_asset6.php'>LAND</a></li>
								<li><a href='fixed_milt_asset7.php'>BUILDING</a></li>
									</ul>

								<li>	 <a href='#'>MITT<span class='fa arrow'></span></a>
									<ul class='nav nav-third-level'>
								<li>
                                    <a href='fixed_mitt_asset.php'>OFFICE EQUIPMENT</a>
                                </li>
								 <li>
                                    <a href='fixed_mitt_asset2.php'>FURNITURE&FIXTURE</a>
                                </li>
								 <li>
                                    <a href='fixed_mitt_asset3.php'>TOOLS&EQUIPMENT</a>
                                </li>
								 <li>
                                    <a href='fixed_mitt_asset4.php'>MOTOR VEHICLE</a>
                                </li>
								 <li>
                                    <a href='fixed_mitt_asset5.php'>SOFTWARE</a>
                                </li>
									</ul>

							</ul>
									
                            <!-- /.nav-second-level -->
                        </li>
                        ";
									echo "
								 <li>
									<a href='#'><i class='fa fa-sitemap fa-fw'></i> View All Data<span class='fa arrow'></span></a>
									<ul class='nav nav-second-level'>									
									<li>
										<a href='viewr.php'>Report Request</a>
									</li>
									<li>
										<a href='viewdr.php'>Division Requisition</a>
									</li>
									<li>
										<a href='viewpr.php'>Purchase Request</a>
									</li>
									<li>
										<a href='viewpo.php'>Purchase Order</a>
									</li>
									</li>
									<li>	 <a href='#'>REPORT FINISH ALL<span class='fa arrow'></span></a>
									<ul class='nav nav-third-level'>
								<li>
                                    <a href='viewr_finish.php'>Report Request Finish</a>
                                </li>
								 <li>
                                    <a href='viewdr_finish.php'>Division Requisition Finish</a>
                                </li>
								 <li>
                                    <a href='viewpr_finish.php'>Purchase Request Finish</a>
                                </li>
								 <li>
                                    <a href='viewpo_finish.php'>Purchase Order Finish</a>
                                </li>
                                </ul>
								</li>
                            <!-- /.nav-second-level -->";
									 if($boss == '2'){
									echo "
										</ul>
								<li>
									 <a href='report.php'><i class='fa fa-bar-chart-o fa-fw'></i> Report</a>
								 </li>";
								 	
								 /*echo "
								<li>
									 <a href='fixed_asset_null.php'><i class='fa fa-wrench fa-fw'></i>Fixed Asset</a>
								</li>
								<li>
									 <a href='stock.php'><i class='fa fa-wrench fa-fw'></i>Stock</a>
								</li>";*/}
                    
                     		}

							if($ses_status !='admin' &&$boss!='1'){
							echo "

								<li>
									 <a href='#'><i class='fa fa-bar-chart-o fa-fw'></i> Status <span class='fa arrow'></span></a>
									 
									 <ul class='nav nav-second-level'>";
									 if($ses_status =='user'){
										echo " 

										<li>
											 <a href='viewlog_request.php'>Request Status</a>
										 </li>
										 <li>
                                       <a href='viewlog.php'>Division Requisition Status</a>
                               			 </li>
                               			 ";}
                               		 /*if($boss == '1'){
										echo " 
										
                               			 ";}*/
									else{
										 echo "<li>
											 <a href='viewlog_request2.php'>Request Status</a>
										 </li>
										 <li>
											 
											 <a href='viewlog2.php'>Division Requisition Status</a>
										 </li>
										 
										 ";}
							
								 
								 }					
									 	if($ses_status =='admin'&&$boss=='2'){
												echo " <li>
																	<a href='#'><i class='fa fa-envelope fa-fw'>
															</i> Receive<span class='fa arrow'></span></a>
																	<ul class='nav nav-second-level'>
														<li>
															<a href='addreceive.php'>Add Division Receive</a>
														</li>
														<li>
															<a href='addreceive2.php'>Add Request Receive</a>
														</li>
														 <li>
															<a href='receive.php'>Receive Division</a>
														</li>
														<li>
															<a href='receive2.php'>Receive Request</a>
														</li>";								 
										}?>										 									
									 </ul>
			
								 </li>
								 <? if($_SESSION['ses_status'] == "user"){?>
								 <li>
									 <a href='download_stock.php'><i class="fa fa-edit fa-fw"></i> Stock File</a>
								</li>
								
									  
								 </li>
				
								 <?}?>

								 <? if($ses_status =='admin'&&$boss=='2'){?>
								 
								 <li>
									 <a href='download_stock.php'><i class="fa fa-edit fa-fw"></i> Stock File</a>
								</li>
								 <?}?>
                      
                
                   				 <? if($_SESSION['ses_status'] != "" && $boss!='1'){?>
				
								<li>
									 <a href='#'><i class="fa fa-warning fa-fw"></i> Reject <span class='fa arrow'></span></a>
									 <ul class='nav nav-second-level'>
									 		
								<li>
                                       <a href="request_reject.php">Request Reject</a>
                                </li>
								<li>
                                       <a href="division_request_reject.php">Division Request Reject</a>
                                </li>
                            
							<?}?>
					</ul>
                    <!-- /#side-menu -->
                </div>
                <!-- /.sidebar-collapse -->
            </div>


โดย:  Kingwawawa IP: 61.90.159.xxx วันที่: 12-09-2016 เวลา: 09:52:27

คำแนะนำ และการใช้งาน

สมาชิก กรุณา ล็อกอินเข้าระบบ เพื่อตั้งคำถามใหม่ หรือ ตอบคำถาม สมาชิกใหม่ สมัครสมาชิกได้ที่ สมัครสมาชิก


  • ถาม-ตอบ กรุณา ล็อกอินเข้าระบบ


  • ( หรือ สามารถทำการ สมัครสมาชิก และล็อกอิน ด้วย ปุ่ม Log in with Facebook ด้านล่าง )
 ความคิดเห็นที่ 3
 

โดย:  Ninenik IP: 180.183.52.xxx วันที่: 12-09-2016
 ความคิดเห็นที่ 2
 เมนูหลักที่เลือกอะครับ ตามภาพๆ


โดย:  Kingwawawa IP: 61.90.159.xxx วันที่: 12-09-2016 เวลา: 11:07:39
 ความคิดเห็นที่ 1


โดย:  Ninenik IP: 180.183.52.xxx วันที่: 12-09-2016