<!--THIS IS FOR GETTING THE TOTAL PENDING IN ALL STAGES-->
<?php
if($mani_menu_id == 4){

$SLCT_d11 = "SELECT COUNT(design_det_id) AS pen_cnt FROM design_det WHERE design_status = 'New Design'";
$QURY_d11 = mysqli_query($connect,$SLCT_d11);
$FTCH_d11 = mysqli_fetch_object($QURY_d11);

//---------------- $SLCT_d1 = "SELECT COUNT(cad_loading_id) AS pen_cnt FROM cad_loading WHERE cad_status = 'no'";
$SLCT_d1 = "SELECT COUNT(cad_loading_id) AS pen_cnt FROM `cad_loading` WHERE `emp_det_id`=0 AND `cad_status`='no' AND `design_det_id` NOT IN(SELECT `design_det_id` FROM `emp_current_design`)";
$QURY_d1 = mysqli_query($connect,$SLCT_d1);
$FTCH_d1 = mysqli_fetch_object($QURY_d1);


//----------------$SLCT_d1a = "SELECT COUNT(cad_loading_id) AS pen_cnt FROM cad_loading WHERE emp_det_id!=0";
$SLCT_d1a = "SELECT COUNT(cad_loading_id) AS pen_cnt FROM cad_loading WHERE emp_det_id!=0 AND `cad_status`='no' AND `design_det_id` NOT IN(SELECT `design_det_id` FROM emp_current_design)";
$QURY_d1a = mysqli_query($connect,$SLCT_d1a);
$FTCH_d1a = mysqli_fetch_object($QURY_d1a);

//----------------$SLCT_alt_q = mysqli_query($connect,"SELECT design_det_id FROM cad_loading WHERE emp_det_id!=0");
//----------------
//----------------while($FTCH_alt_q = mysqli_fetch_object($SLCT_alt_q))
//----------------{
//----------------	$SLCT_alt_q1 = mysqli_query($connect,"SELECT `design_det_id` FROM emp_current_design WHERE design_det_id != $FTCH_alt_q->design_det_id");
//----------------	while($FTCH_alt_q = mysqli_fetch_object($SLCT_alt_q))
//----------------	{	
//----------------		echo $FTCH_alt_q->design_det_id;
//----------------		echo "<br>";
//----------------	}
//----------------}



//----------------$SLCT_d2 = "SELECT COUNT(cad_finishing_des_id) AS pen_cnt FROM cad_finishing_des WHERE `design_det_id` NOT IN (SELECT `design_det_id` FROM cam_loading UNION ALL SELECT `design_det_id` FROM silver_loading) AND to_rtv_load = 'no'";
//----------------$QURY_d2 = mysqli_query($connect,$SLCT_d2);
//----------------$FTCH_d2 = mysqli_fetch_object($QURY_d2);

$SLCT_d2a = "SELECT COUNT(emp_current_design_id) AS pen_cnt FROM emp_current_design WHERE curr_status = 'finished' AND `design_det_id` NOT IN (SELECT `design_det_id` FROM cad_finishing_des)";
$QURY_d2a = mysqli_query($connect,$SLCT_d2a);
$FTCH_d2a = mysqli_fetch_object($QURY_d2a);

$SLCT_d2b = "SELECT COUNT(emp_current_design_id) AS pen_cnt FROM emp_current_design WHERE curr_status = 'waiting' AND `design_det_id` NOT IN (SELECT `design_det_id` FROM cad_finishing_des)";
$QURY_d2b = mysqli_query($connect,$SLCT_d2b);
$FTCH_d2b = mysqli_fetch_object($QURY_d2b);

$SLCT_d2c = "SELECT COUNT(emp_current_design_id) AS pen_cnt FROM emp_current_design WHERE curr_status = 'closed' AND `design_det_id` IN (SELECT `design_det_id` FROM cad_finishing_des WHERE cad_fin_status='no')";
$QURY_d2c = mysqli_query($connect,$SLCT_d2c);
$FTCH_d2c = mysqli_fetch_object($QURY_d2c);

$SLCT_d2d = "SELECT COUNT(emp_current_design_id) AS pen_cnt FROM emp_current_design WHERE curr_status = 'process' AND `design_det_id` NOT IN (SELECT `design_det_id` FROM cad_finishing_des)";
//----------------echo $SLCT_d2d;
$QURY_d2d = mysqli_query($connect,$SLCT_d2d);
$FTCH_d2d = mysqli_fetch_object($QURY_d2d);

$SLCT_dd1 = "SELECT COUNT(cad_finishing_des_id) AS pen_cnt FROM cad_finishing_des WHERE `to_rtv_load` = 'no' AND `to_silver_load` = 'no' AND `cad_fin_status` = 'no' AND design_det_id IN(SELECT design_det_id FROM cam_loading WHERE cam_status='no')";
$QURY_dd1 = mysqli_query($connect,$SLCT_dd1);
$FTCH_dd1 = mysqli_fetch_object($QURY_dd1);

$SLCT_dd2 = "SELECT COUNT(cad_finishing_des_id) AS pen_cnt FROM cad_finishing_des WHERE `to_rtv_load` = 'yes' AND `cad_fin_status` = 'no'";
$QURY_dd2 = mysqli_query($connect,$SLCT_dd2);
$FTCH_dd2 = mysqli_fetch_object($QURY_dd2);

$SLCT_dd3 = "SELECT COUNT(cad_finishing_des_id) AS pen_cnt FROM cad_finishing_des WHERE `to_silver_load` = 'yes' AND design_det_id NOT IN (SELECT design_det_id FROM silver_loading)";
$QURY_dd3 = mysqli_query($connect,$SLCT_dd3);
$FTCH_dd3 = mysqli_fetch_object($QURY_dd3);

$SLCT_d3 = "SELECT COUNT(cam_loading_id) AS pen_cnt FROM cam_loading WHERE cam_status = 'no'";
$QURY_d3 = mysqli_query($connect,$SLCT_d3);
$FTCH_d3 = mysqli_fetch_object($QURY_d3);

$SLCT_d4 = "SELECT COUNT(cam_finishing_id) AS pen_cnt FROM cam_finishing WHERE `design_det_id` NOT IN (SELECT `design_det_id` FROM rtv_loading)";
$QURY_d4 = mysqli_query($connect,$SLCT_d4);
$FTCH_d4 = mysqli_fetch_object($QURY_d4);

$SLCT_d5 = "SELECT COUNT(rtv_loading_id) AS pen_cnt FROM rtv_loading WHERE rtv_status = 'no'";
$QURY_d5 = mysqli_query($connect,$SLCT_d5);
$FTCH_d5 = mysqli_fetch_object($QURY_d5);

$SLCT_d6 = "SELECT COUNT(rtv_finishing_des.rtv_finishing_des_id) AS pen_cnt FROM rtv_finishing_des,design_det WHERE rtv_finishing_des.rtv_fin_status = 'no' AND rtv_finishing_des.up_status = 'no' AND design_det.design_det_id = rtv_finishing_des.design_det_id AND design_det.statu_s='active' AND design_det.up_status='no'";
$QURY_d6 = mysqli_query($connect,$SLCT_d6);
$FTCH_d6 = mysqli_fetch_object($QURY_d6);

$SLCT_d7 = "SELECT COUNT(wax_finishing_id) AS pen_cnt FROM wax_finishing,design_det WHERE wax_finishing.wax_fin_status = 'no' AND design_det.design_det_id=wax_finishing.design_det_id AND design_det.statu_s='active' AND design_det.up_status='no' AND wax_finishing.up_status='no'";
$QURY_d7 = mysqli_query($connect,$SLCT_d7);
$FTCH_d7 = mysqli_fetch_object($QURY_d7);

/*-------------$SLCT_d14 = "SELECT COUNT(cad_finishing_des_id) AS pen_cnt FROM cad_finishing_des WHERE design_det_id NOT IN(SELECT design_det_id FROM silver_loading) AND cad_finishing_des.to_silver_load = 'yes'";
//----------------echo $SLCT_d14;
$QURY_d14 = mysqli_query($connect,$SLCT_d14);
$FTCH_d14 = mysqli_fetch_object($QURY_d14);*/

$SLCT_d14 = "SELECT COUNT(silver_loading_id) AS pen_cnt FROM silver_loading WHERE silver_status = 'no'";
$QURY_d14 = mysqli_query($connect,$SLCT_d14);
$FTCH_d14 = mysqli_fetch_object($QURY_d14);

$SLCT_d15 = "SELECT COUNT(silver_finishing_id) AS pen_cnt FROM silver_finishing WHERE to_solder_load = 'no'";
$QURY_d15 = mysqli_query($connect,$SLCT_d15);
$FTCH_d15 = mysqli_fetch_object($QURY_d15);

$SLCT_d15a = "SELECT COUNT(casting_finishing_id) AS pen_cnt FROM casting_finishing WHERE cas_fin_status = 'no' AND up_status='no'";
$QURY_d15a = mysqli_query($connect,$SLCT_d15a);
$FTCH_d15a = mysqli_fetch_object($QURY_d15a);

/*------------- $SLCT_d16 = "SELECT COUNT(*) AS pen_cnt FROM (SELECT CF.cast_weight, DD.design_det_id, DD.master_cat_id, DD.design_no, DD.mas_fin_ext, DD.cad_fin_ext, DD.imag_ext FROM casting_finishing AS CF,design_det AS DD WHERE CF.cas_fin_status = 'no' AND DD.design_det_id = CF.design_det_id AND DD.statu_s='active' AND DD.up_status='no' AND CF.up_status='no' UNION ALL SELECT SF.silver_weight, DD.design_det_id, DD.master_cat_id, DD.design_no, DD.mas_fin_ext, DD.cad_fin_ext, DD.imag_ext FROM silver_finishing AS SF,design_det DD WHERE SF.to_solder_load = 'no' AND DD.design_det_id = SF.design_det_id AND DD.statu_s='active' AND DD.up_status='no') AS TBL2";
//----------------echo $SLCT_d16;
$QURY_d16 = mysqli_query($connect,$SLCT_d16);
$FTCH_d16 = mysqli_fetch_object($QURY_d16);*/

$SLCT_d16 = "SELECT COUNT(soldering_loading_id) AS pen_cnt FROM soldering_loading WHERE soldering_status = 'no'";
$QURY_d16 = mysqli_query($connect,$SLCT_d16);
$FTCH_d16 = mysqli_fetch_object($QURY_d16);

$SLCT_d8 = "SELECT COUNT(sol_finishing_id) AS pen_cnt FROM sol_finishing_des WHERE sol_fin_status = 'no'";
$QURY_d8 = mysqli_query($connect,$SLCT_d8);
$FTCH_d8 = mysqli_fetch_object($QURY_d8);

$SLCT_d17 = "SELECT COUNT(buf_loading_id) AS pen_cnt FROM buf_loading WHERE buf_status = 'no'";
$QURY_d17 = mysqli_query($connect,$SLCT_d17);
$FTCH_d17 = mysqli_fetch_object($QURY_d17);

//$SLCT_d9 = "SELECT COUNT(buf_finishing_des_id) AS pen_cnt FROM buf_finishing_des WHERE buf_fin_status ='no' AND up_status='no'";
//$QURY_d9 = mysqli_query($connect,$SLCT_d9);
//$FTCH_d9 = mysqli_fetch_object($QURY_d9);

$SLCT_d10 = "SELECT COUNT(buf_finishing_des_id) AS pen_cnt FROM buf_finishing_des WHERE buf_fin_status ='no' AND up_status='no'";
$QURY_d10 = mysqli_query($connect,$SLCT_d10);
$FTCH_d10 = mysqli_fetch_object($QURY_d10);

$SLCT_d12 = "SELECT COUNT(mas_finishing_id) AS pen_cnt FROM mas_finishing WHERE show_status ='no' AND up_status='no'";
$QURY_d12 = mysqli_query($connect,$SLCT_d12);
$FTCH_d12 = mysqli_fetch_object($QURY_d12);

$SLCT_d13 = "SELECT COUNT(show_case_id) AS pen_cnt FROM show_case WHERE up_status='no'";
$QURY_d13 = mysqli_query($connect,$SLCT_d13);
$FTCH_d13 = mysqli_fetch_object($QURY_d13);
}
?>

<div id="sidebar">

	<!-- Main nav -->
    <div class="mainNav">
    <div class="user">
    		  <?php
				$admin_id=$_SESSION['admin_login_id'];
				$SLCT_msp = "SELECT  * FROM admin WHERE admin_id='$admin_id'";	
				//echo $SLCT_msp;
				$QURY_msp = mysqli_query($connect,$SLCT_msp);
				$FTCH_msp = mysqli_fetch_object($QURY_msp);
                 ?>
           <a title="" class="leftUserDrop"><img src="images/userLogin3.png" alt="" /><span><strong><?php echo $menu_id; ?></strong></span></a><span><?php echo $FTCH_msp->user_name/*{'admin.user_name'}*/?></span>
            <ul class="leftUser">
                <li><a href="#" title="" class="sProfile">My profile</a></li>
                 <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="db_backup.php" <?php } ?> title="DB Back Up" class="sData">DB Backup</a></li>
               	<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="change_password.php" <?php } ?> title="Change Password" class="sChange">Change Password</a></li>
                <li><a href="bl/login-BL.php?daid=<?=$_SESSION['admin_login_id']?>&dunm=<?=$_SESSION['admin_username']?>" title="" class="sLogout">Logout</a></li>
            </ul>
        </div>
      <div class="altNav">
          <div class="userSearch">
                <form action="">
                 <input type="text" placeholder="search..." name="userSearch" />
                 <input type="submit" value="" />
                </form>
            </div>
            <!-- User nav -->
            <ul class="userNav">
                <li><a href="#" title="" class="profile"></a></li>
                <li><a href="#" title="" class="messages"></a></li>
                <li><a href="#" title="" class="settings"></a></li>
                <li><a href="#" title="" class="logout"></a></li>
            </ul>
      	</div>
        <!-- Main nav -->
        <ul class="nav">
       <?php 
		//	if($admin_flagg==1){
		?>
            <!--<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="login_det_list.php" <?php } ?> title=""><img src="images/icons/mainnav/other.png" alt="" /><span <?php if($mani_menu_id == 7){ ?> style="color:#FFF;" <?php } ?> >Login Details</span></a></li>-->
			<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="master_category_list.php" <?php } ?> title=""><img src="images/icons/mainnav/database_page.png" alt="" /><span <?php if($mani_menu_id == 1){ ?> style=" color:#FFF;" <?php } ?>>Master </span></a></li>
			 <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="party_list.php" <?php } ?> title=""><img src="images/icons/mainnav/ui.png" alt="" /><span <?php if($mani_menu_id == 2){ ?> style=" color:#FFF;" <?php } ?> >Registration</span></a></li>
			<!-- <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="design_list.php" <?php } ?> title=""><img src="images/icons/mainnav/tables.png" alt="" /><span <?php if($mani_menu_id == 4){ ?> style=" color:#FFF;" <?php } ?> >Design History</span></a></li>-->
            <!--<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="party_list.php" <?php } ?> title=""><img src="images/icons/mainnav/ui.png" alt="" /><span <?php if($mani_menu_id == 2){ ?> style=" color:#FFF;" <?php } ?> >Registration</span></a></li>-->
			<?php

		//	}
		?>
        </ul>
  </div>
    <?php

	$ac_pg_id1 = base64_encode(base64_encode(base64_encode(base64_encode(1))));
	$ac_pg_id2 = base64_encode(base64_encode(base64_encode(base64_encode(2))));
	$tot_bill_amt_viw	= 0;
	$tot_rec_amt_viw	= 0;
	$tot_dis_amt_viw	= 0;
	$tot_pen_amt_viw	= 0;
	$tot_cr_amt_viw		= 0;
	$SLCT = "SELECT party_det_id FROM ac_party_det WHERE comp_status ='no' ORDER BY party_det_id ASC";
	//echo $SLCT;
	$QURY = mysqli_query($connect,$SLCT);
	$loop=1;
	if(mysqli_num_rows($QURY)>0)
	{
		while($FTCH = mysqli_fetch_object($QURY))
		{
			list($tot_bil_amt,$tot_re_amt,$tot_adv_amt,$tot_pen_amt,$tot_dis_amt) = total_acc_call($FTCH->party_det_id);

			$tot_bill_amt_viw 	= "0";//$tot_bill_amt_viw+$tot_bil_amt;
			$tot_rec_amt_viw 	= "0";//$tot_rec_amt_viw+$tot_re_amt;
			$tot_cr_amt_viw 	= "0";//$tot_cr_amt_viw+$tot_adv_amt;
			$tot_pen_amt_viw 	= "0";//$tot_pen_amt_viw+$tot_pen_amt;
			$tot_dis_amt_viw 	= $tot_dis_amt_viw+$tot_dis_amt;
		}
	}
	?>
    <style>
		.secTop1 {
		height: 32px;
		/*background: url(../images/backgrounds/contentTop.png) repeat-x;*/
		position: relative;
		}
	</style>
    <!-- Secondary nav -->
    <div class="secNav">
        <div class="secWrapper">
        	<?php 
				if($admin_flagg==1)
				{
			?>
                    <div class="secTop1">
                    <a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="balance_list.php?page_id=<?php echo $ac_pg_id1; ?>"  <?php } ?>>
                        <div class="balance">
                            <div class="balInfo">Balance:</div>
                            <div class="balAmount"><span><?php echo number_format($tot_pen_amt_viw,2); ?></span></div>
                        </div>

                        </a>
                    </div>
                    <div class="secTop1">
                    <a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="balance_list.php?page_id=<?php echo $ac_pg_id2; ?>"  <?php } ?>>
                        <div class="balance">
                            <div class="balInfo">Advance:</div>
                            <div class="balAmount"><span><?php echo number_format($tot_cr_amt_viw,2); ?></span></div>
                        </div>
                        </a>
                    </div>
           	<?php
				}
			?>

            <!-- Tabs container -->
            <div id="tab-container" class="tab-container">
            	 <ul class="iconsLine ic2 etabs">
                 	<li><a href="#general" title=""><span class="icos-fullscreen"></span></a></li> 
					<?php 
                        if($admin_flagg==1)
                        {
                    ?>
                            <li><a href="#alt1" title="Notepad"><span class="icos-create2"></span></a></li>
					<?php
                        }
                    ?>
               	</ul>
                <div class="divider"><span></span></div>

                <div id="general">
                    <ul class="subNav">
						<?php 
							//if($admin_flagg==1){
						?>
						<?php 
						if($mani_menu_id == 1){ ?>
						<?php $des_list = check_rights('14','view');
						if($des_list==1){
						?>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="master_category_list.php" <?php } ?> title=""><span class="icos-robot"></span>Design Category <?php if($menu_id == 1){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="master_cad_cat_list.php" <?php } ?> title=""><span class="icos-robot"></span>CAD Category <?php if($menu_id == 2){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="master_sub_category_list.php" <?php } ?> title=""><span class="icos-robot"></span>Sub Category <?php if($menu_id == 52){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="master_cour_list.php" <?php } ?> title=""><span class="icos-robot"></span>Courier Details <?php if($menu_id == 29){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="master_stone_list.php" <?php } ?> title=""><span class="icos-robot"></span>Master Stones  <?php if($menu_id == 45){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="master_country_list.php" <?php } ?> title=""><span class="icos-robot"></span>Master Country <?php if($menu_id == 150){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="master_cad_remarks_list.php" <?php } ?> title=""><span class="icos-robot"></span>Master Cad Remarks <?php if($menu_id == 146){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="master_dept_list.php" <?php } ?> title=""><span class="icos-robot"></span>Master Departments <?php if($menu_id == 49){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="master_member_list.php" <?php } ?> title=""><span class="icos-robot"></span>Membership List <?php if($menu_id == 49){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="master_operation_types.php" <?php } ?> title=""><span class="icos-robot"></span>Operation Types <?php if($menu_id == 49){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php 
						}
						if($mani_menu_id == 2){ ?>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="party_list.php" <?php } ?> title="" class=""><span class="icos-user"></span>Party Registration <span class="dataNumGreen">></span></a></li>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="employee_list.php" <?php } ?> title="" class=""><span class="icos-user"></span>Employee Registration
 <span class="dataNumGreen">></span></a></li>
                        <?php } 
						//} ?>
						<?php
				if($mani_menu_id == 4){ ?>

		 <div style="width:30%; margin-left:20%;">
			<table>
				<tr><td><input type="radio" name="rad_m" id="rad_m1" onchange="$('#mould_design').show(); $('#dc_design').hide();" <?php if(@$_GET['ot']==1 || @$_GET['ot']==''){ echo "checked"; }  ?> ></td><td style="vertical-align:top;">&nbsp;&nbsp;Mould&nbsp;&nbsp;</td><!--<td> <input type="radio" name="rad_m" id="rad_m" onchange="$('#mould_design').hide(); $('#dc_design').slideToggle();" <?php if(@$_GET['ot']==2){ echo "checked"; } else { echo "";}?> ></td><td  style="vertical-align:top;">&nbsp;&nbsp;DC</td>--></tr>
			</table>
			</div> 

				<span id="mould_design" 
						style="display:<?php if($_GET['ot']==1 || $_GET['ot']==''){ echo "block"; } else { echo "none";}?>">
				<?php
				$SLCT_COUNT = "SELECT `design_status` as des_sts, count(`design_det_id`) as des_cnt FROM `design_det` group by `design_status`";
				$QURY_COUNT = mysqli_query($connect,$SLCT_COUNT);
				$FTCH_COUNT = mysqli_fetch_array($QURY_COUNT); ?>

						<?php $des_list24 = check_rights('24','view');
						if($des_list24==1){ ?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0);" <?php } else if($ip_flagg==1){ ?> href="design_new_list.php" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span > New Design Entry</span></a>
						<?php if($des_list24==1){ ?>
						<span class="dataNumRed" style="margin-right:20px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(1)))?>','<?php echo $FTCH_d11->pen_cnt; ?>','0');"><?php echo $FTCH_d11->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 32){ ?><span class="dataNumGreen">></span><?php } ?>
						</li>
						<?php } ?>
						<?php $des_list23 = check_rights('23','view');
						if($des_list23==1){
						?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0);" <?php } else if($ip_flagg==1){ ?> href="design_list.php?ot=1" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span>Design Reload</span></a>
						<?php if($des_list23==1){ ?>
						<span class="dataNumRed" style="margin-right:20px; cursor: pointer;" onclick="window.location='export_pending_designs.php'" title="Export the total pending designs in all Dept" >Export</span><?php if($menu_id == 4){ ?><span class="dataNumGreen">></span>
						<?php } ?>
						<?php } ?>
						<?php } ?></li>
						<?php $des_list25 = check_rights('25','view');
						if($des_list25==1){
						?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="cad_loading_list.php?ot=1" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >Cad Loading </span></a>
						<?php if($des_list25==1){ ?>
						<span class="dataNumRed tips" title="Cad Load Pen Qty" style="margin-right:50px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(2)))?>','<?php echo $FTCH_d1->pen_cnt; ?>','0');"><?php echo $FTCH_d1->pen_cnt; ?></span><span class="dataNumRed tips" title="Allort Qty" style="margin-right:20px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(25)))?>','<?php echo $FTCH_d1a->pen_cnt; ?>','0');"><?php echo $FTCH_d1a->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 5){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
						<?php $des_list26 = check_rights('26','view');
						if($des_list26==1){ ?>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="waiting_for_appr.php?ot=1" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >W.Approval </span></a>
						<?php if($des_list26==1){ ?>
						<span class="dataNumRed tips" title="Wip Qty" style="margin-right:80px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(27)))?>','<?php echo $FTCH_d2d->pen_cnt; ?>','0');"><?php echo $FTCH_d2d->pen_cnt; ?></span><span class="dataNumRed tips" title="Finished Qty" style="margin-right:20px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(19)))?>','<?php echo $FTCH_d2a->pen_cnt; ?>','0');"><?php echo $FTCH_d2a->pen_cnt; ?></span><span class="dataNumRed tips" title="Waiting Qty" style="margin-right:50px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(20)))?>','<?php echo $FTCH_d2b->pen_cnt; ?>','0');"><?php echo $FTCH_d2b->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 43){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						<?php $des_list27 = check_rights('27','view');
						if($des_list27==1){
						?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="cad_finishing.php?ot=1" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >CAD Finishing </span></a>
						<?php if($des_list27==1){ ?>
						<span class="dataNumRed" style="margin-right:20px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(21)))?>','<?php echo $FTCH_d2c->pen_cnt; ?>','0');"><?php echo $FTCH_d2c->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 44){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						<!--<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="cad_finishing_list.php" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span class="tips" title="CAM or RTV or Silver Loading" >C / R / S</span></a><span class="dataNumRed tips" title="CAM Pen Qty" style="margin-right:80px;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(22)))?>','<?php echo $FTCH_dd1->pen_cnt; ?>','0');"><?php echo $FTCH_dd1->pen_cnt; ?></span><span class="dataNumRed tips" title="RTV Pen Qty" style="margin-right:50px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(23)))?>','<?php echo $FTCH_dd2->pen_cnt; ?>','0');"><?php echo $FTCH_dd2->pen_cnt; ?></span><span class="dataNumRed tips" title="Silver Pen Qty" style="margin-right:20px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(24)))?>','<?php echo $FTCH_dd3->pen_cnt; ?>','0');"><?php if ($FTCH_dd3->pen_cnt == 0) { echo 0; } else { echo $FTCH_dd3->pen_cnt - 1; } ?></span><?php if($menu_id == 6){ ?><span class="dataNumGreen">></span><?php } ?></li>-->
						<?php $des_view28 = check_rights('28','view');
						if($des_view28==1){
						?>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="cam_loading_list.php?ot=1" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >Cam Loading </span></a>
						<?php if($des_view28==1){ ?>
						<span class="dataNumRed" style="margin-right:20px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(4)))?>','<?php echo $FTCH_d3->pen_cnt; ?>','0');"><?php echo $FTCH_d3->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 7){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						<?php $des_view29 = check_rights('29','view');
						if($des_view29==1){
						?>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="cam_finishing_list.php?ot=1" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >Cam Receiving </span></a>
						<?php if($des_view29==1){ ?>
						<span class="dataNumRed" style="margin-right:20px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(5)))?>','<?php echo $FTCH_d4->pen_cnt; ?>','0');"><?php echo $FTCH_d4->pen_cnt; ?></span>
						</span>
						<?php if($menu_id == 8){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						<?php } ?>
						<!--<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="rtv_loading_list.php" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >Rtv Loading </span></a><span class="dataNumRed" style="margin-right:20px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(6)))?>','<?php echo $FTCH_d5->pen_cnt; ?>','0');"><?php echo $FTCH_d5->pen_cnt; ?></span><?php if($menu_id == 9){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="rtv_finishing_list.php" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >Rtv Finishing </span></a><?php if($menu_id == 10){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="wax_finishing_list.php" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >Wax </span></a><span class="dataNumRed" style="margin-right:20px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(7)))?>','<?php echo $FTCH_d6->pen_cnt; ?>','0');"><?php echo $FTCH_d6->pen_cnt; ?></span><?php if($menu_id == 11){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="casting_finishing_list.php" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >Casting </span></a><span class="dataNumRed" style="margin-right:20px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(8)))?>','<?php echo $FTCH_d7->pen_cnt; ?>','0');"><?php echo $FTCH_d7->pen_cnt; ?></span><?php if($menu_id == 12){ ?><span class="dataNumGreen">></span><?php } ?></li>-->
						<?php $des_view30 = check_rights('30','view');
						if($des_view30==1){
						?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="silver_loading_list.php?ot=1" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >Silver Loading </span></a>
						<?php if($des_view30==1){ ?>
						<span class="dataNumRed" style="margin-right:20px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(14)))?>','<?php echo $FTCH_d14->pen_cnt; ?>','0');"><?php echo $FTCH_d14->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 35){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						<?php $des_view31 = check_rights('31','view');
						if($des_view31==1){
						?>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="silver_finishing_list.php?ot=1" <?php } ?> title="" class=""><span class="icos-paintbrush"></span>
						<span >Silver Receiving </span></a>
						<?php if($des_view31==1){ ?>
						<span class="dataNumRed tips" title="Silver Finish Pen Qty" style="margin-right:50px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(15)))?>','<?php echo $FTCH_d15->pen_cnt; ?>','0');"><?php echo $FTCH_d15->pen_cnt; ?></span><span class="dataNumRed tips" title="Casting Pen Qty" style="margin-right:20px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(26)))?>','<?php echo $FTCH_d15a->pen_cnt; ?>','0');"><?php echo $FTCH_d15a->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 36){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						<?php $des_view32 = check_rights('32','view');
						if($des_view32==1){
						?>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="sol_loading_list.php?ot=1" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >Soldering Loading </span></a>
						<?php if($des_view32==1){ ?>
						<span class="dataNumRed" style="margin-right:20px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(16)))?>','<?php echo $FTCH_d16->pen_cnt; ?>','0');"><?php echo $FTCH_d16->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 37){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						<?php $des_view33 = check_rights('33','view');
						if($des_view33==1){
						?>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="sol_finishing_list.php?ot=1" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >Soldering Finishing </span></a>
						<?php if($des_view33==1){ ?>
						<span class="dataNumRed" style="margin-right:20px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(9)))?>','<?php echo $FTCH_d8->pen_cnt; ?>','0');"><?php echo $FTCH_d8->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 13){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						<!--<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="buf_loading_list.php" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >Buffing Loading </span></a><span class="dataNumRed" style="margin-right:20px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(17)))?>','<?php echo $FTCH_d17->pen_cnt; ?>','0');"><?php echo $FTCH_d17->pen_cnt; ?></span><?php if($menu_id == 38){ ?><span class="dataNumGreen">></span><?php } ?></li>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="buf_finishing_list.php" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >Buffing Finishing </span></a><?php /*?><span class="dataNumRed" style="margin-right:20px;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(10)))?>','<?php echo $FTCH_d9->pen_cnt; ?>','0');"><?php echo $FTCH_d9->pen_cnt; ?></span><?php */?><?php if($menu_id == 14){ ?><span class="dataNumGreen">></span><?php } ?></li>-->
						<?php 
						$des_view34 = check_rights('34','view');
						if($des_view34==1){ ?>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="mas_finishing_list.php?ot=1" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span ><!--Master Pieces-->Wax Finishing </span></a>
						<?php if($des_view34==1){ ?>
						<span class="dataNumRed" style="margin-right:20px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(11)))?>','<?php echo $FTCH_d10->pen_cnt; ?>','0');"><?php echo $FTCH_d10->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 15){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						<?php 
						$des_view3s = check_rights('35','view');
						if($des_view3s==1){ ?>
                        <?php
						if($admin_flagg==1){
						?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="show_case_list.php?ot=1" <?php } ?> ><span class="icos-paintbrush"></span><span>Show Case</span></a>
						<?php if($des_view3s==1){ ?>
						<span class="dataNumRed" style="margin-right:20px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(12)))?>','<?php echo $FTCH_d12->pen_cnt; ?>','0');"><?php echo $FTCH_d12->pen_cnt; ?> - <?php echo $FTCH_d13->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 28){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						<?php } ?>
						</span>
						<span id="dc_design" style="display:<?php if(@$_GET['ot']==2){ echo "block"; } else { echo "none";}?>">
						<?php $des_list24 = check_rights('24','view');
						if($des_list24==1){ ?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0);" <?php } else if($ip_flagg==1){ ?> href="design_new_list.php?ot=2" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span > New Design Entry</span></a>
						<?php if($des_list24==1){ ?>
						<span class="dataNumRed" style="margin-right:20px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(1)))?>','<?php echo $FTCH_d11->pen_cnt; ?>','0');"><?php echo $FTCH_d11->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 32){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						
					   <?php $des_list23 = check_rights('23','view');
						if($des_list23==1){	?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="design_list.php?ot=2" <?php } ?> title="" class=""><span class="icos-paintbrush"></span>
						<span >Design Reload</span></a>
						<?php if($des_list23==1){ ?>
						<span class="dataNumRed" style="margin-right:20px; cursor: pointer;" onclick="window.location='export_pending_designs.php'" title="Export the total pending designs in all Dept" >Export</span>
						<?php } ?>
						<?php if($menu_id == 4){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						<?php $des_list25 = check_rights('25','view');
						if($des_list25==1){
						?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="cad_loading_list.php?ot=2" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >Cad Loading </span></a>
						<?php if($des_list25==1){ ?>
						<span class="dataNumRed tips" title="Cad Load Pen Qty" style="margin-right:50px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(2)))?>','<?php echo $FTCH_d1->pen_cnt; ?>','0');"><?php echo $FTCH_d1->pen_cnt; ?></span><span class="dataNumRed tips" title="Allort Qty" style="margin-right:20px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(25)))?>','<?php echo $FTCH_d1a->pen_cnt; ?>','0');"><?php echo $FTCH_d1a->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 5){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
						<?php $des_list26 = check_rights('26','view');
						if($des_list26==1){ ?>
						<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="waiting_for_appr.php?ot=2" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >W.Approval </span></a>
						<?php if($des_list26==1){ ?>
						<span class="dataNumRed tips" title="Wip Qty" style="margin-right:80px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(27)))?>','<?php echo $FTCH_d2d->pen_cnt; ?>','0');"><?php echo $FTCH_d2d->pen_cnt; ?></span><span class="dataNumRed tips" title="Finished Qty" style="margin-right:20px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(19)))?>','<?php echo $FTCH_d2a->pen_cnt; ?>','0');"><?php echo $FTCH_d2a->pen_cnt; ?></span><span class="dataNumRed tips" title="Waiting Qty" style="margin-right:50px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(20)))?>','<?php echo $FTCH_d2b->pen_cnt; ?>','0');"><?php echo $FTCH_d2b->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 43){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						<?php $des_list27 = check_rights('27','view');
						if($des_list27==1){
						?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="cad_finishing.php?ot=2" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span >CAD Finishing </span></a>
						<?php if($des_list27==1){ ?>
						<span class="dataNumRed" style="margin-right:20px;  cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(21)))?>','<?php echo $FTCH_d2c->pen_cnt; ?>','0');"><?php echo $FTCH_d2c->pen_cnt; ?></span>
						<?php } ?>
						<?php if($menu_id == 44){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						<?php 
						$des_view3s = check_rights('35','view');
						if($des_view3s==1){ ?>
                        <?php
						if($admin_flagg==1){
						?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="show_case_list.php?ot=2" <?php } ?> title="" class=""><span class="icos-paintbrush"></span><span>Show Case</span></a>
						<?php if($des_view3s==1){ ?>
						<span class="dataNumRed" style="margin-right:20px; cursor: pointer;" onclick="imag_print('<?php echo base64_encode(base64_encode(base64_encode(12)))?>','<?php echo $FTCH_d12->pen_cnt; ?>','0');"><?php echo $FTCH_d12->pen_cnt; ?> - <?php echo $FTCH_d13->pen_cnt; ?></span>
						<?php 
						} ?>
						<?php if($menu_id == 28){ ?><span class="dataNumGreen">></span><?php } ?></li>
						<?php } ?>
						<?php }  ?> 
						</span>
						<?php } ?>
                        <?php if($mani_menu_id == 5){ 
						$des_view36 = check_rights('36','view');
						if($des_view36==1){ ?>

                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="cli_ord_req_list.php" <?php } ?> title="" class=""><span class="icos-speech-bubbles2"></span>Client Order Request <?php if($menu_id == 24){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
                       	<?php
						if($admin_flagg==1)
						{
						$des_view37 = check_rights('37','view');
						if($des_view37==1){
						?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="guest_ord_req_list.php" <?php } ?> title="" class=""><span class="icos-speech-bubbles2"></span>Guest Order Request <?php if($menu_id == 31){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
						<?php
						}

						$des_view38 = check_rights('38','view');
						if($des_view38==1){ ?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="po_entry_list.php" <?php } ?> title="" class=""><span class="icos-cart"></span>Order Entry <?php if($menu_id == 16){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php }
						$des_view39 = check_rights('39','view');
						if($des_view39==1){ ?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="po_finishing_list.php" <?php } ?> title="" class=""><span class="icos-trolly"></span>Order Finishing <?php if($menu_id == 17){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
						<?php
						$des_view40 = check_rights('40','view');
						if($des_view40==1){ ?>
                        <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="po_delivery_list.php" <?php } ?>><span class="icos-truck"></span>Order Delivery <?php if($menu_id == 18){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php }
						}
					//	if($admin_flagg==1){
						?>
						<?php if($mani_menu_id == 6){ 
						$des_view41 = check_rights('41','view');
						if($des_view41==1){ 
						?>
                            <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="billing_list.php" <?php } ?> title="" class=""><span class="icos-bill"></span>Billing <?php if($menu_id == 19){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
						<?php 
						$des_view42 = check_rights('42','view');
						if($des_view42==1){ 
						?>
                            <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="collection_list.php" <?php } ?> title="" class=""><span class="icos-archive"></span>Collection <?php if($menu_id == 20){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
						<?php 
						$des_view43 = check_rights('43','view');
						if($des_view43==1){ 
						?>
                            <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="acc_list.php" <?php } ?> title="" class=""><span class="icos-ind-rup"></span>Accounts <?php if($menu_id == 21){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
                            <?php } ?>
                            <?php if($mani_menu_id == 7){ ?>
							<?php 
						$des_view44 = check_rights('44','view');
						if($des_view44==1){ 
						?>
                            <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="design_analize.php" <?php } ?> title="" class=""><span class="icos-bullseye"></span>Design <?php if($menu_id == 25){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
						<?php
						$des_view45 = check_rights('45','view');
						if($des_view45==1){ 
						?>
                            <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="po_analize.php" <?php } ?> title="" class=""><span class="icos-companies"></span>PO <?php if($menu_id == 26){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
						<?php 
						$des_view46 = check_rights('46','view');
						if($des_view46==1){ 
						?>
                            <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="acc_analize.php" <?php } ?> title="" class=""><span class="icos-ind-rup"></span>Accounts <?php if($menu_id == 27){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
						<?php 
						$des_view47 = check_rights('47','view');
						if($des_view47 =1){ ?>
                            <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="party_analize.php" <?php } ?> title="" class=""><span class="icos-comment"></span>Party <?php if($menu_id == 33){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
							<?php } ?>
							<?php 
						$des_view48 = check_rights('48','view');
						if($des_view48==1){ 
						?>
                            <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="stock_analize.php" <?php } ?> title="" class=""><span class="icos-comment"></span>Stock <?php if($menu_id == 34){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
						<?php 
						$des_view49 = check_rights('49','view');
						if($des_view49==1){
						?>
                            <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="mov_non_mov_analyze.php" <?php } ?> title="" class=""><span class="icos-comment"></span>Mov Non Mov Analyze <?php if($menu_id == 46){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
						<?php
						$des_view50 = check_rights('50','view');
						if($des_view50==1){ 
						?>
                            <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="courier_list.php" <?php } ?> title="" class=""><span class="icos-truck"></span>Courier List<?php if($menu_id == 47){ ?><span class="dataNumGreen">></span><?php } ?></a></li> 
						<?php } ?>
						<?php 
						$des_view51 = check_rights('51','view');
						if($des_view51==1){ 
						?>
                            <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="prod_sell_analize.php" <?php } ?> title="" class=""><span class="icos-truck"></span>Production/Selling Report<?php if($menu_id == 48){ ?><span class="dataNumGreen">></span><?php } ?></a></li> 
						<?php } ?>
						<?php 
						$des_view52 = check_rights('52','view');
						if($des_view52==1){ 
						?>
                            <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="ftr_analize.php" <?php } ?> title="" class=""><span class="icos-truck"></span>FTR Report<?php if($menu_id == 50){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
						<?php 
						$des_view53 = check_rights('53','view');
						if($des_view53==1){ 
						?>
                            <li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="statistics.php" <?php } ?> title="" class=""><span class="icos-truck"></span>Statistics Report<?php if($menu_id == 51){ ?><span class="dataNumGreen">></span><?php } ?></a></li>
						<?php } ?>
                            <!--<li><a <?php if($ip_flagg==0){ ?> href="javascript:void(0)" <?php } else if($ip_flagg==1){ ?> href="sms_tracking.php" <?php } ?> title="" class=""><span class="icos-mobile"></span>SMS Tracking<?php if($menu_id == 48){ ?><span class="dataNumGreen">></span><?php } ?></a></li>-->
                            <?php  //} 
						}
						?>
                    </ul>
                </div>

                <div class="divider"><span></span></div>
            </div>

            <!-- Sidebar buttons --><!-- Sidebar datepicker -->
            <!--<div class="sideWidget">
                <div class="inlinedate"></div>
            </div>-->
        </div> 
        <div class="clear"></div>
   </div>
</div>
<script type="text/javascript">
function imag_print(ids,cnt,lim)
{
	if(cnt>0)
	{
		if(lim!=0)
		{
			var bob=window.open('','_blank');bob.location = 'depart_pend_img_pdf.php?dep_id='+ ids+'&lim='+ lim;
		}
		else
		{
			var bob=window.open('','_blank');bob.location = 'depart_pend_img_pdf.php?dep_id='+ ids;
		}
	}
	else
	{
		alert('Oops The Count is Zero!...');
	}
}
function imag_print_view(ids,cnt,lim,cat_id)
{
	if(cnt>0)
	{
		if(lim!=0)
		{
			var bob=window.open('','_blank');bob.location = 'depart_pend_img_pdf.php?dep_id='+ ids+'&lim='+ lim+'&cat_id='+ cat_id;
		}
		else
		{
			var bob=window.open('','_blank');bob.location = 'depart_pend_img_pdf.php?dep_id='+ ids+'&cat_id='+ cat_id;
		}
	}	
	else
	{
		alert('Oops The Count is Zero!...');
	}
}
function each_imag_print(ids,cnt,nxt,lim)
{
	if(lim!=0)
	{
		var bob=window.open('','_blank');bob.location = 'each_dpt_img_pdf.php?dep_id='+ ids+'&key_det='+ cnt+'&nxt_det='+ nxt+'&lim='+ lim;
	}
	else
	{
		var bob=window.open('','_blank');bob.location = 'each_dpt_img_pdf.php?dep_id='+ ids+'&key_det='+ cnt+'&nxt_det='+ nxt;
	}
}
function each_imag_print_view(ids,cnt,nxt,lim,lod_tm)
{
	if(lim!=0)
	{
		var bob=window.open('','_blank');bob.location = 'each_dpt_img_pdf.php?dep_id='+ ids+'&key_det='+ cnt+'&nxt_det='+ nxt+'&lim='+ lim+'&lod_tim='+ lod_tm;
	}
	else
	{
		var bob=window.open('','_blank');bob.location = 'each_dpt_img_pdf.php?dep_id='+ ids+'&key_det='+ cnt+'&nxt_det='+ nxt+'&lod_tim='+ lod_tm;
	}
}
function each_imag_print_view_sol(ids,cnt,nxt,lim,lod_tm,kdm_id)
{
	var bob=window.open('','_blank');bob.location = 'each_dpt_img_pdf.php?dep_id='+ ids+'&key_det='+ cnt+'&nxt_det='+ nxt+'&lod_tim='+ lod_tm+'&kdm_id='+ kdm_id;
}
function validate_note()
{
	if(document.getElementById("notes").value.trim()=='')
	{
		alert("Please enter the notes");
		document.getElementById("notes").value=document.getElementById("notes").value.trim();
		document.getElementById("notes").focus();
		return false;
	}
}
</script>