393 lines
13 KiB
PHP
393 lines
13 KiB
PHP
<?php
|
|
include('header.php');
|
|
|
|
|
|
include_once("includes/functions.php");
|
|
date_default_timezone_set("Asia/Calcutta");
|
|
include_once('access.php');
|
|
?>
|
|
<html>
|
|
|
|
<head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Menucool ddmenu</title>
|
|
<link href="css/rightHandSideMenuCss/ddmenu.css" rel="stylesheet" type="text/css" />
|
|
<script src="css/rightHandSideMenuCss/ddmenu.js" type="text/javascript"></script>
|
|
|
|
</head>
|
|
<link href="includes/css-js/admin.css" rel="stylesheet" type="text/css" />
|
|
<link href="css/flexigrid.css" rel="stylesheet" type="text/css" />
|
|
<link href="css/flexigrid.pack.css" rel="stylesheet" type="text/css" />
|
|
<script src="js/Jquery.js" langugage="Javascript" ></script>
|
|
<script src="js/flexigrid.js" langugage="Javascript"/></script>
|
|
<script>
|
|
var oDP = null;
|
|
function init()
|
|
{
|
|
oDate=new Date();
|
|
oDP=new frameDatePicker.DatePicker("divDatePicker", oDate.getFullYear()-100, oDate.getFullYear()+100);
|
|
}
|
|
</script>
|
|
|
|
<style type="text/css">
|
|
|
|
body {
|
|
margin-left: 0px;
|
|
margin-top: 0px;
|
|
margin-right: 0px;
|
|
margin-bottom: 100px;
|
|
}
|
|
.style1 {
|
|
font-family: "Lucida Sans Unicode";
|
|
font-size: 12px;
|
|
color: #CC0000;
|
|
border-right-color: #CCCCCC;
|
|
border-bottom-color: #B8DCEF;
|
|
border-top-width: 1px;
|
|
border-right-width: 1px;
|
|
border-bottom-width: 1px;
|
|
border-left-width: 1px;
|
|
border-top-style: solid;
|
|
border-right-style: solid;
|
|
border-bottom-style: solid;
|
|
border-left-style: solid;
|
|
background-color: #ECF4F9;
|
|
border-top-color: #B8DCEF;
|
|
border-left-color: #CCCCCC;
|
|
}
|
|
#frozen1{
|
|
z-index:100;
|
|
position:fixed;
|
|
min-width:1000px;
|
|
width:100%;
|
|
left:0px;
|
|
top:0px;
|
|
}
|
|
#nofreeze{
|
|
z-index:0;
|
|
position:absolute;
|
|
top:22px;
|
|
min-width:1000px;
|
|
width:100%;
|
|
|
|
}
|
|
#frozen2{
|
|
z-index:100;
|
|
position:fixed;
|
|
min-width:1000px;
|
|
width:100%;
|
|
left:0px;
|
|
top:50px;
|
|
}
|
|
#frozen4{
|
|
z-index:100;
|
|
position:fixed;
|
|
min-width:1000px;
|
|
width:100%;
|
|
left:0px;
|
|
bottom:0px;
|
|
}
|
|
|
|
#frozenheader{
|
|
z-index:100;
|
|
position:fixed;
|
|
min-width:1000px;
|
|
width:100%;
|
|
left:0px;
|
|
|
|
}
|
|
#frozenfilter{
|
|
z-index:100;
|
|
position:fixed;
|
|
min-width:1000px;
|
|
width:100%;
|
|
left:0px;
|
|
top:120px;
|
|
}
|
|
|
|
</style>
|
|
<table width="100%">
|
|
<tr bgcolor="#FFA61C">
|
|
<td bgcolor="#FFA61C" height="20px" align="right">
|
|
<?php include('rightHandSideMenu.php');?>
|
|
<DIV ID="divDatePicker"STYLE="position:absolute; left:160px; width:230px; z-index:1; visibility:hidden">
|
|
<IFRAME NAME="frameDatePicker" WIDTH="120" HEIGHT="142" SRC="/Trai/Style/datepicker.htm" NORESIZE SCROLLING="no" FRAMEBORDER="no" BORDER="0" FRAMESPACING="0"></IFRAME>
|
|
<SCRIPT EVENT="onclick()" FOR="document">if(divDatePicker!=null)divDatePicker.style.visibility="hidden";</SCRIPT>
|
|
</DIV>
|
|
<?php
|
|
$top_user=$_SESSION['user_name'];
|
|
?>
|
|
<div style="position:absolute; width:200px; z-index:100; left: 0px; top:0px; bgcolor:#9999ff" >
|
|
<ul id="imenus0" class="menu_text" onMouseOver="ff();" onMouseOut="fff();" >
|
|
|
|
|
|
<li style="width:50px;" ><a TABINDEX=-1 href="top1.php" style="background-color:#FFA61C">Home</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
$sql_master = "select distinct(m.menu_id),m.menu_name,m.menu_description,m.menu_url,m.parent_id from assign_menu a, menu_master m where a.menu_id= m.menu_id and parent_id=0 and a.role_id='".$_SESSION['RoleId']."' and m.menu_id<=20 order by convert(m.menu_id, signed )";
|
|
//echo $sql_master;
|
|
$res_master=mysqli_query($conn,$sql_master);
|
|
$num_rows=@mysqli_num_rows($res_master);
|
|
if($num_rows>0){
|
|
?>
|
|
|
|
<li style="width:70px;" ><a TABINDEX=-1 href="#" style="background-color:#FFA61C">Masters</a>
|
|
<ul style="width:140px;">
|
|
<?php
|
|
while($transaction_rowmaster=@mysqli_fetch_array($res_master))
|
|
{
|
|
?>
|
|
<li >
|
|
<a TABINDEX=-1 href="<?php echo $transaction_rowmaster['menu_url']?>"><?php echo $transaction_rowmaster['menu_name']?></a>
|
|
<?php
|
|
if($transaction_rowmaster['menu_url']<=1){
|
|
$sql_transactionmaster = "select distinct(m.menu_id),m.menu_name,m.menu_description,m.menu_url,m.parent_id from assign_menu a, menu_master m where a.menu_id= m.menu_id and a.role_id='".$_SESSION['RoleId']."' and m.parent_id ='".$transaction_rowmaster['menu_id']."' ORDER BY m.menu_id ASC";
|
|
//echo $sql_transaction1;
|
|
$res_transactionmaster=mysqli_query($conn,$sql_transactionmaster);
|
|
$num_rows2master=@mysqli_num_rows($res_transactionmaster);
|
|
if($num_rows2master>0){
|
|
?>
|
|
<ul style="width:140px;left:140px;top:1px;">
|
|
<?php
|
|
while($transaction_rowmaster=@mysqli_fetch_array($res_transactionmaster)){
|
|
?>
|
|
<li class=""><a TABINDEX=-1 href="<?php echo $transaction_rowmaster['menu_url']?>"><?php echo $transaction_rowmaster['menu_name']?></a></li>
|
|
|
|
<?php }
|
|
//end of while
|
|
?>
|
|
</ul>
|
|
<?php }?>
|
|
<?php }?>
|
|
</li>
|
|
|
|
<?php }// end of outer while
|
|
?>
|
|
</ul>
|
|
</li>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<?php
|
|
$sql_transaction = "select distinct(m.menu_id),m.menu_name,m.menu_description,m.menu_url,m.parent_id from assign_menu a, menu_master m where a.menu_id= m.menu_id and parent_id=0 and a.role_id='".$_SESSION['RoleId']."' and m.menu_id >20 and m.menu_id <=40 order by convert(m.menu_id, signed )";
|
|
//echo $sql_transaction;
|
|
$res_transaction=mysqli_query($conn,$sql_transaction);
|
|
$num_rows1=@mysqli_num_rows($res_transaction);
|
|
if($num_rows1>0){
|
|
?>
|
|
<li style="width:55px;" >
|
|
<a href="#" style="background: url(arrow_d.gif) center right no-repeat;background-color:#FFA61C">Sales</a>
|
|
<ul style="width:140px;">
|
|
<?php
|
|
while($transaction_row=@mysqli_fetch_array($res_transaction))
|
|
{
|
|
?>
|
|
<li class="">
|
|
<a TABINDEX=-1 href="<?php echo $transaction_row['menu_url']?>"><?php echo $transaction_row['menu_name']?></a>
|
|
<?php
|
|
if($transaction_row['menu_url']<=1){
|
|
$sql_transaction1 = "select distinct(m.menu_id),m.menu_name,m.menu_description,m.menu_url,m.parent_id from assign_menu a, menu_master m where a.menu_id= m.menu_id and a.role_id='".$_SESSION['RoleId']."' and m.parent_id ='".$transaction_row['menu_id']."' ORDER BY m.menu_id ASC";
|
|
//echo $sql_transaction1;
|
|
$res_transaction1=mysqli_query($conn,$sql_transaction1);
|
|
$num_rows2=@mysqli_num_rows($res_transaction1);
|
|
if($num_rows2>0){
|
|
?>
|
|
<ul style="width:100px;left:100px;top:1px;">
|
|
<?php
|
|
while($transaction_row1=@mysqli_fetch_array($res_transaction1)){
|
|
?>
|
|
<li class=""><a TABINDEX=-1 href="<?php echo $transaction_row1['menu_url']?>"><?php echo $transaction_row1['menu_name']?></a></li>
|
|
|
|
<?php }
|
|
//end of while
|
|
?>
|
|
</ul>
|
|
<?php }?>
|
|
<?php }?>
|
|
</li>
|
|
|
|
<?php }// end of outer while
|
|
?>
|
|
</ul>
|
|
</li>
|
|
|
|
<?php }//end of nowrows1 if ?>
|
|
|
|
|
|
|
|
|
|
|
|
<?php // coding for purchase order
|
|
$sql_transaction = "select distinct(m.menu_id),m.menu_name,m.menu_description,m.menu_url,m.parent_id from assign_menu a, menu_master m where a.menu_id= m.menu_id and parent_id=0 and a.role_id='".$_SESSION['RoleId']."' and m.menu_id >=60 and m.menu_id <70 order by convert(m.menu_id, signed )";
|
|
//echo $sql_transaction;
|
|
$res_transaction=mysqli_query($conn,$sql_transaction);
|
|
$num_rows1=@mysqli_num_rows($res_transaction);
|
|
if($num_rows1>0){
|
|
?>
|
|
<li style="width:70px;" >
|
|
<a href="#" style="background: url(arrow_d.gif) center right no-repeat;background-color:#FFA61C">Purchase </a>
|
|
<ul style="width:140px;">
|
|
<?php
|
|
while($transaction_row=@mysqli_fetch_array($res_transaction))
|
|
{
|
|
?>
|
|
<li class="">
|
|
|
|
<a TABINDEX=-1 href="<?php echo $transaction_row['menu_url']?><?php if($transaction_row['menu_id']>=61){ ?>?p=<?php echo $_SESSION['user_id'] ?><?php } ?>"><?php echo $transaction_row['menu_name']?></a>
|
|
<?php
|
|
if($transaction_row['menu_url']<=1){
|
|
$sql_transaction1 = "select distinct(m.menu_id),m.menu_name,m.menu_description,m.menu_url,m.parent_id from assign_menu a, menu_master m where a.menu_id= m.menu_id and a.role_id='".$_SESSION['RoleId']."' and m.parent_id ='".$transaction_row['menu_id']."' ORDER BY m.menu_id ASC";
|
|
//echo $sql_transaction1;
|
|
$res_transaction1=mysqli_query($conn,$sql_transaction1);
|
|
$num_rows2=@mysqli_num_rows($res_transaction1);
|
|
if($num_rows2>0){
|
|
?>
|
|
<ul style="width:100px;left:100px;top:1px;">
|
|
<?php
|
|
while($transaction_row1=@mysqli_fetch_array($res_transaction1)){
|
|
?>
|
|
<li class=""><a TABINDEX=-1 href="<?php echo $transaction_row1['menu_url']?><?php if($transaction_row1['menu_id']>=61){ ?>?p=<?php echo $_SESSION['user_id'] ?><?php } ?>"><?php echo $transaction_row1['menu_name']?></a></li>
|
|
|
|
<?php }
|
|
//end of while
|
|
?>
|
|
</ul>
|
|
<?php }?>
|
|
<?php }?>
|
|
</li>
|
|
|
|
<?php }// end of outer while
|
|
?>
|
|
</ul>
|
|
</li>
|
|
|
|
<?php }//end of nowrows1 if // coding for purchase order ends ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
$sql_transaction = "select distinct(m.menu_id),m.menu_name,m.menu_description,m.menu_url,m.parent_id from assign_menu a, menu_master m where a.menu_id= m.menu_id and parent_id=0 and a.role_id='".$_SESSION['RoleId']."' and m.menu_id >99 and m.menu_id <=150 order by m.menu_id asc";
|
|
//echo $sql_transaction;
|
|
$res_transaction=mysqli_query($conn,$sql_transaction);
|
|
$num_rows1=@mysqli_num_rows($res_transaction);
|
|
if($num_rows1>0){
|
|
?>
|
|
<li style="width:70px;" >
|
|
<a href="#" style="background: url(arrow_d.gif) center right no-repeat;background-color:#FFA61C">Accounts</a>
|
|
<ul style="width:140px;">
|
|
<?php
|
|
while($transaction_row=@mysqli_fetch_array($res_transaction))
|
|
{
|
|
?>
|
|
<li class="">
|
|
<a TABINDEX=-1 href="<?php echo $transaction_row['menu_url']?>"><?php echo $transaction_row['menu_name']?></a>
|
|
<?php
|
|
if($transaction_row['menu_url']<=1){
|
|
$sql_transaction1 = "select distinct(m.menu_id),m.menu_name,m.menu_description,m.menu_url,m.parent_id from assign_menu a, menu_master m where a.menu_id= m.menu_id and a.role_id='".$_SESSION['RoleId']."' and m.parent_id ='".$transaction_row['menu_id']."' order by m.menu_id asc";
|
|
//echo $sql_transaction1;
|
|
$res_transaction1=mysqli_query($conn,$sql_transaction1);
|
|
$num_rows2=@mysqli_num_rows($res_transaction1);
|
|
if($num_rows2>0){
|
|
?>
|
|
<ul style="width:100px;left:100px;top:1px;">
|
|
<?php
|
|
while($transaction_row1=@mysqli_fetch_array($res_transaction1)){
|
|
?>
|
|
<li class=""><a TABINDEX=-1 href="<?php echo $transaction_row1['menu_url']?>?p=<?php echo $_SESSION['user_id']?>&pagekey=<?php echo $transaction_row1['menu_id']?>"><?php echo $transaction_row1['menu_name']?></a></li>
|
|
|
|
<?php }
|
|
//end of while
|
|
?>
|
|
</ul>
|
|
<?php }?>
|
|
<?php }?>
|
|
</li>
|
|
|
|
<?php }// end of outer while
|
|
?>
|
|
</ul>
|
|
</li>
|
|
|
|
<?php }//end of nowrows1 if ?>
|
|
|
|
|
|
<?php
|
|
$sql_transaction = "select distinct(m.menu_id),m.menu_name,m.menu_description,m.menu_url,m.parent_id from assign_menu a, menu_master m where a.menu_id= m.menu_id and parent_id=0 and a.role_id='".$_SESSION['RoleId']."' and m.menu_id >50 and m.menu_id <=59 order by convert(m.menu_id, signed )";
|
|
//echo $sql_transaction;
|
|
$res_transaction=mysqli_query($conn,$sql_transaction);
|
|
$num_rows1=@mysqli_num_rows($res_transaction);
|
|
|
|
if($num_rows1>0){
|
|
?>
|
|
<li style="width:70px;" >
|
|
<a href="#" style="background: url(arrow_d.gif) center right no-repeat;background-color:#FFA61C">Reports</a>
|
|
<ul style="width:140px;">
|
|
<?php
|
|
while($transaction_row=@mysqli_fetch_array($res_transaction))
|
|
{
|
|
?>
|
|
<li class="">
|
|
<a TABINDEX=-1 href="<?php echo $transaction_row['menu_url']?>"><?php echo $transaction_row['menu_name']?></a>
|
|
<?php
|
|
if($transaction_row['menu_url']<=1){
|
|
$sql_transaction1 = "select distinct(m.menu_id),m.menu_name,m.menu_description,m.menu_url,m.parent_id from assign_menu a, menu_master m where a.menu_id= m.menu_id and a.role_id='".$_SESSION['RoleId']."' and m.parent_id ='".$transaction_row['menu_id']."' order by convert(m.menu_id, signed )";
|
|
//echo $sql_transaction1;
|
|
$res_transaction1=mysqli_query($conn,$sql_transaction1);
|
|
$num_rows2=@mysqli_num_rows($res_transaction1);
|
|
// echo $num_row2;
|
|
if($num_rows2>0){
|
|
?>
|
|
<ul style="width:100px;left:100px;top:1px;">
|
|
<?php
|
|
while($transaction_row1=@mysqli_fetch_array($res_transaction1)){
|
|
?>
|
|
<li class=""><a TABINDEX=-1 href="<?php echo $transaction_row1['menu_url']?>"><?php echo $transaction_row1['menu_name']?></a></li>
|
|
|
|
<?php }
|
|
//end of while
|
|
?>
|
|
</ul>
|
|
<?php }?>
|
|
<?php }?>
|
|
</li>
|
|
|
|
<?php }// end of outer while
|
|
?>
|
|
</ul>
|
|
</li>
|
|
|
|
<?php }//end of nowrows1 if ?>
|
|
|
|
|
|
<script src="menucode.js"></script></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<link href="includes/css-js/cs2.css" rel="stylesheet" type="text/css">
|
|
<script src="dhtmlxCombo/codebase/dhtmlxcommon.js"></script>
|
|
<script src="dhtmlxCombo/codebase/dhtmlxcombo.js"></script>
|
|
<link rel="STYLESHEET" type="text/css" href="dhtmlxCombo/codebase/dhtmlxcombo.css">
|
|
<script> window.dhx_globalImgPath="dhtmlxCombo/codebase/imgs/"; </script>
|
|
<tr><td><table id="nofreeze" width="100%" border="0" cellspacing="0" cellpadding="0" >
|
|
|