<?php
	include "db_connection/db_connection.php";
	include "config/config.php";
	
	if($_SESSION['admin_login_id'] == '')
	{
		echo "<script>window.location='index.php';</script>";
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title><?php echo $PROJECT_TITLE ?></title>

<script type="text/javascript" src="js/party_add_JS.js"></script>
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<!--[if IE]> <link href="css/ie.css" rel="stylesheet" type="text/css"> <![endif]-->

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>

<script type="text/javascript" src="js/plugins/forms/ui.spinner.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.mousewheel.js"></script>
 
<script type="text/javascript" src="https://ajax.googleapis.com/ajax	/libs/jqueryui/1.8/jquery-ui.min.js"></script>

<script type="text/javascript" src="js/plugins/charts/excanvas.min.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.orderBars.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.pie.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.resize.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.sparkline.min.js"></script>

<script type="text/javascript" src="js/plugins/tables/jquery.dataTables1.js"></script>
<script type="text/javascript" src="js/plugins/tables/jquery.sortable.js"></script>
<script type="text/javascript" src="js/plugins/tables/jquery.resizable.js"></script>

<script type="text/javascript" src="js/plugins/forms/autogrowtextarea.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.uniform.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.inputlimiter.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.maskedinput.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.autotab.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.chosen.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.dualListBox.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.cleditor.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.ibutton.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.validationEngine-en.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.validationEngine.js"></script>

<script type="text/javascript" src="js/plugins/uploader/plupload.js"></script>
<script type="text/javascript" src="js/plugins/uploader/plupload.html4.js"></script>
<script type="text/javascript" src="js/plugins/uploader/plupload.html5.js"></script>
<script type="text/javascript" src="js/plugins/uploader/jquery.plupload.queue.js"></script>

<script type="text/javascript" src="js/plugins/wizards/jquery.form.wizard.js"></script>
<script type="text/javascript" src="js/plugins/wizards/jquery.validate.js"></script>
<script type="text/javascript" src="js/plugins/wizards/jquery.form.js"></script>

<script type="text/javascript" src="js/plugins/ui/jquery.collapsible.min.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.breadcrumbs.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.tipsy.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.progress.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.timeentry.min.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.colorpicker.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.jgrowl.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.fancybox.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.fileTree.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.sourcerer.js"></script>

<script type="text/javascript" src="js/plugins/others/jquery.fullcalendar.js"></script>
<script type="text/javascript" src="js/plugins/others/jquery.elfinder.js"></script>

<script type="text/javascript" src="js/plugins/ui/jquery.easytabs.min.js"></script>
<script type="text/javascript" src="js/files/bootstrap.js"></script>
<script type="text/javascript" src="js/files/functions1.js"></script>

<!-- Shared on MafiaShare.net  --><!-- Shared on MafiaShare.net  --></head>

<body onload="document.getElementById('listpage').focus();">

<!-- Top line begins -->
<?php include "header_footer/header.php"; ?>
<!-- Top line ends -->


<!-- Sidebar begins -->
<?php include "menus/left_menu.php"; ?>
<!-- Sidebar ends -->



<!-- Content begins -->
<div id="content">
   <!-- <div class="contentTop">
        <span class="pageTitle"><span class="icon-key-2"></span>Form validation engines</span>
        <ul class="quickStats">
            <li>
                <a href="" class="blueImg"><img src="images/icons/quickstats/plus.png" alt="" /></a>
                <div class="floatR"><strong class="blue">5489</strong><span>visits</span></div>
            </li>
            <li>
                <a href="" class="redImg"><img src="images/icons/quickstats/user.png" alt="" /></a>
                <div class="floatR"><strong class="blue">4658</strong><span>users</span></div>
            </li>
            <li>
                <a href="" class="greenImg"><img src="images/icons/quickstats/money.png" alt="" /></a>
                <div class="floatR"><strong class="blue">1289</strong><span>orders</span></div>
            </li>
        </ul>
        <div class="clear"></div>
    </div>-->
    <?php include "menus/top_menu.php"; ?> 
    <!-- Breadcrumbs line -->
    <div class="breadLine">
        <div class="bc">
            <ul id="breadcrumbs" class="breadcrumbs">
                <li><a href="home.php">Dashboard</a></li>
                <li><a href="javascritp:">Party Details</a></li>
                
            </ul>
        </div>        
        <?php include "menus/top_left_menu.php"; ?>  
    </div>
    
    <!-- Main content -->
    <div class="wrapper">
        <ul class="middleNavR">
            <!--<li><a href="#" title="Add an article" class="tipN"><img src="images/icons/middlenav/create.png" alt="" /></a></li>
            <li><a href="#" title="Upload files" class="tipN"><img src="images/icons/middlenav/upload.png" alt="" /></a></li>
            <li><a href="#" title="Add something" class="tipN"><img src="images/icons/middlenav/add.png" alt="" /></a></li>
            <li><a href="#" title="Messages" class="tipN"><img src="images/icons/middlenav/dialogs.png" alt="" /></a><strong>8</strong></li>-->
            <li><a href="party_list.php" title="List Party" id="listpage" class="tipN"><img src="images/icons/middlenav/stats.png" alt="" /></a></li>
        </ul>
    	<?php
		$page_id= base64_encode(base64_encode(base64_encode(1))); //THIS IS FOR PAGE IDENTIFICATION IN BL FILE for add		 
		
		$SLCT = "SELECT * FROM party_det ORDER BY party_det_id ASC";
		//echo $SLCT;
		$QURY = mysqli_query($connect,$SLCT);
		if(mysqli_num_rows($QURY)> 0)
		{
			$SLCT_sk = "SELECT COUNT(party_det_id) as max_ids FROM party_det ORDER BY party_det_id ASC";
			$QURY_sk = mysqli_query($connect,$SLCT_sk);  
			$FTCH_sk = mysqli_fetch_object($QURY_sk);
			$max_id = $FTCH_sk->max_ids + 1;
		}
		else
		{
			$max_id = 1;
		}
							 
		?>

        <div class="fluid">
            <form id="validate" name="fm" class="main" method="post" action="bl/party_BL.php?page_id=<?php echo $page_id; ?>" enctype="multipart/form-data">
                <fieldset>
                
                	<div class="widget">
                        <div class="whead"><h6>Party Add</h6><div class="clear"></div></div>
                        	<div class="formRow">
                                <table width="100%">
                                    <tr>
                                        <td width="15%"><label>Party Code:<span style="color:#F00">*</span></label></td>
                                        <td width="37%"><input type="text" value="<?php printf("D-"."%03d",$max_id); ?>" name="p_code" id="p_code" readonly="readonly" style="width:250px ;background-color:#CCC" tabindex="1"/></td>
                                        <td width="19%"></td>
                                        <td width="29%"></td>
                                    </tr>
                                </table>                     
                                <div class="clear"></div>
                            </div>
                            <div class="formRow">
                                <table width="100%">
                                    <tr>
                                        <td width="15%"><label>Company Name:<span style="color:#F00">*</span></label></td>
                                        <td width="37%"><input type="text" class="" name="c_name" id="c_name" style="width:250px"/></td>
                                        <td width="19%"></td>
                                        <td width="29%"></td>
                                    </tr>
                                </table>                     
                                <div class="clear"></div>
                            </div>						
                            <div class="formRow" style=" border:solid 1px #999999; margin-bottom:5px;">
                                <table width="100%">
                                    <tr>
                                        <td width="15%"><label>Con Person 1:<span style="color:#F00">*</span></label></td>
                                        <td width="37%"><input type="text" class="" name="con_nm1" id="con_nm1" style="width:250px"/></td>
                                        <td width="19%"><label>Designation:<span style="color:#F00">*</span></label></td>
                                        <td width="29%"><input type="text" class="" name="des1" id="des1" style="width:250px"/></td>
                                    </tr>
                                    <tr>
                                        <td width="15%">&nbsp;</td>
                                        <td width="37%">&nbsp;</td>
                                        <td width="19%">&nbsp;</td>
                                        <td width="29%">&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td width="15%"><label>Mobile No 1 :<span style="color:#F00">*</span></label></td>
                                        <td width="37%"><input type="text" class="" name="mobile1" id="mobile1" style="width:250px"/></td>
                                        <td width="19%"><label>Land Line No:<span style="color:#F00"></span></label></td>
                                        <td width="29%"><input type="text" class="" name="ln_no1" id="ln_no1" style="width:250px"/></td>
                                    </tr>
                                    <tr>
                                        <td width="15%">&nbsp;</td>
                                        <td width="37%">&nbsp;</td>
                                        <td width="19%">&nbsp;</td>
                                        <td width="29%">&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td width="15%"><label>Email ID 1:<span style="color:#F00">*</span></label></td>
                                        <td width="37%"><input type="text" class="" name="e_id1" id="e_id1" style="width:250px"/></td>
                                        <td width="19%"><label>D.O.B:<span style="color:#F00"></span></label></td>
                                        <td width="29%"><input type="text" class="datepicker" name="dob1" id="dob1" style="width:250px"/></td>
                                    </tr>
                                </table>                     
                                <div class="clear"></div>
                            </div>
                            <div class="formRow" style=" border:solid 1px #999999; margin-bottom:5px;">
                                <table width="100%">
                                    <tr>
                                        <td width="15%"><label>Con Person 2:<span style="color:#F00"></span></label></td>
                                        <td width="37%"><input type="text" class=""  name="con_nm2" id="con_nm2" style="width:250px"/></td>
                                        <td width="19%"><label>Designation:<span style="color:#F00"></span></label></td>
                                        <td width="29%"><input type="text" class="" name="des2" id="des2" style="width:250px"/></td>
                                    </tr>
                                    <tr>
                                        <td width="15%">&nbsp;</td>
                                        <td width="37%">&nbsp;</td>
                                        <td width="19%">&nbsp;</td>
                                        <td width="29%">&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td width="15%"><label>Mobile No 2 :<span style="color:#F00"></span></label></td>
                                        <td width="37%"><input type="text" class="" name="mobile2" id="mobile2" style="width:250px"/></td>
                                        <td width="19%"><label>Land Line No:<span style="color:#F00"></span></label></td>
                                        <td width="29%"><input type="text" class="" name="ln_no2" id="ln_no2" style="width:250px"/></td>
                                    </tr>
                                    <tr>
                                        <td width="15%">&nbsp;</td>
                                        <td width="37%">&nbsp;</td>
                                        <td width="19%">&nbsp;</td>
                                        <td width="29%">&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td width="15%"><label>Email ID 2:<span style="color:#F00"></span></label></td>
                                        <td width="37%"><input type="text" class="" name="e_id2" id="e_id2" style="width:250px"/></td>
                                        <td width="19%"><label>D.O.B:<span style="color:#F00"></span></label></td>
                                        <td width="29%"><input type="text" class="datepicker" name="dob2" id="dob2" style="width:250px"/></td>
                                    </tr>
                                </table>                     
                                <div class="clear"></div>
                            </div>
                            <div class="formRow" style=" border:solid 1px #999999; margin-bottom:5px;">
                                <table width="100%">
                                    <tr>
                                        <td width="15%"><label>Con Person 3:<span style="color:#F00"></span></label></td>
                                        <td width="37%"><input type="text" class="" name="con_nm3" id="con_nm3" style="width:250px"/></td>
                                        <td width="19%"><label>Designation:<span style="color:#F00"></span></label></td>
                                        <td width="29%"><input type="text" class="" name="des3" id="des3" style="width:250px"/></td>
                                    </tr>
                                    <tr>
                                        <td width="15%">&nbsp;</td>
                                        <td width="37%">&nbsp;</td>
                                        <td width="19%">&nbsp;</td>
                                        <td width="29%">&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td width="15%"><label>Mobile No 3 :<span style="color:#F00"></span></label></td>
                                        <td width="37%"><input type="text" class="" name="mobile3" id="mobile3" style="width:250px"/></td>
                                        <td width="19%"><label>Land Line No:<span style="color:#F00"></span></label></td>
                                        <td width="29%"><input type="text" class="" name="ln_no3" id="ln_no3" style="width:250px"/></td>
                                    </tr>
                                    <tr>
                                        <td width="15%">&nbsp;</td>
                                        <td width="37%">&nbsp;</td>
                                        <td width="19%">&nbsp;</td>
                                        <td width="29%">&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td width="15%"><label>Email ID 3:<span style="color:#F00"></span></label></td>
                                        <td width="37%"><input type="text" class="" name="e_id3" id="e_id3" style="width:250px"/></td>
                                        <td width="19%"><label>D.O.B:<span style="color:#F00"></span></label></td>
                                        <td width="29%"><input type="text" class="datepicker" name="dob3" id="dob3" style="width:250px"/></td>
                                    </tr>
                                </table>                     
                                <div class="clear"></div>
                            </div>                           
                        
                            <div class="formRow">
                                <table width="100%">
                                    <tr>
                                        <td width="15%" style="display:table-cell;vertical-align:top">Office Address:<span style="color:#F00">*</span></td>
                                        <td width="33%" ><textarea rows="6" cols="" name="of_add" id="of_add" style="width:250px"></textarea></td>
                                        <td width="4%" style="display:table-cell;vertical-align:middle"><input type="button" class="buttonM bDefault ml10"  value="&nbsp;&gt;&nbsp;&gt;&nbsp;" title="Click for Copy" tabindex="0" onclick="copy_addr();" /></td>
                                        <td width="19%" style="display:table-cell;vertical-align:top"><label>Courier Address:<span style="color:#F00">*</span></label></td>
                                        <td width="29%"><textarea rows="6" cols="" name="co_add" id="co_add" style="width:250px"></textarea></td>
                                    </tr>
                                    
                                </table>
                                <div class="clear"></div>
                            </div> 
                            <!--<div class="formRow"> 
                                <div class="grid2"><label>Office Address:<span style="color:#F00">*</span></label></div>
                                <div class="grid4"><textarea rows="6" cols="" name="of_add" id="of_add"></textarea> </div>
                                
                                <div class="grid2"><label>Courier Address:<span style="color:#F00">*</span></label> <br/><br/>
                                <button id="allTo2" type="button" class="" title="Click for Copy" tabindex="0" onclick="copy_addr();">&nbsp;&gt;&gt;&nbsp;</button>
                                </div>
                                
                                <div class="grid4"><textarea rows="6" cols="" name="co_add" id="co_add"></textarea> </div>
                                
                                <div class="clear"></div>
                            </div>-->         
                            
                         
                         <div class="formRow">
                            <table width="100%">
                                <tr>                                    
                                    <td width="15%"><label>Websit URL:<span style="color:#F00"></span></label></td>
                                    <td width="37%"><input type="text" class="" name="w_url" id="w_url" style="width:250px"/></td>
                                    <td width="19%"><label>CST No:<span style="color:#F00">*</span></label></td>
                                    <td width="29%"><input type="text"  class="" name="cst_no" id="cst_no" style="width:250px"/></td>
                                </tr>
                            </table>                     
                            <div class="clear"></div>
                       	 </div>		
                         <div class="formRow">
                            <table width="100%">
                                <tr>
                                    <td width="15%"><label>Tin No:<span style="color:#F00">*</span></label></td>
                                    <td width="37%"><input type="text"   class="" name="t_no" id="t_no" style="width:250px"/></td>                                    
                                    <td width="19%"><label>Date of Tin:<span style="color:#F00">*</span></label></td>
                                    <td width="29%"><input type="text" name="tn_date" id="tn_date" class="datepicker" style="margin-right:20px;"/></td>
                                </tr>
                            </table>                     
                            <div class="clear"></div>
                        </div>
                	</div>
        	 		<div class="widget">
                    <div class="whead"><h6>Category Cost</h6><div class="clear"></div></div>
                    <div id="dyn" class="hiddenpars">
                        <a href="javascript:0" id="searchlink" onfocus="foc(this.id)" onblur="stnon(this.id)" class="tOptions" title="Options"><img src="images/icons/options.png" alt="" /></a>
                        <div style="max-height:400px; overflow-y:auto;">
                        <table cellpadding="0" cellspacing="0" width="100%" class="dTable check" id="checkAll">
                          <thead>
                                <tr>    
                                	<td width="1"></td>                    
                                    <th width="198">S.No<span class="sorting" style="display: block;"></span></th>
                                    <th width="176">Category</th>
                                    <th width="260">From Date </th>
                               <!--     <th width="208">To Date </th>-->
                                    <th width="208">Cost</th>
                                </tr>
                            </thead>
                            <tbody>  
                                         
                        
                        
                         
                        <?php
                        
                        
                        $SLCT = "SELECT  * FROM master_cat WHERE statu_s = 'active' ORDER BY master_cat_id ASC";
                        //echo $SLCT;
                        $QURY = mysqli_query($connect,$SLCT);
                        $loop=1;
                        if(mysqli_num_rows($QURY)>0)
                        {			
                        while($FTCH = mysqli_fetch_object($QURY))
                        {
                                        
                            if($loop%2 != "0")
                                $bg = "gradeX";
                            else
                                $bg = "class='gradeC'";
                        ?>
                        
                        <tr <?php echo $bg ?>>
                        <td></td>
                        <td align="center"><?php echo $loop ?><input name="cat_id[<?php echo $loop ?>]" id="cat_id<?php echo $loop ?>" type="hidden" value="<?php echo $FTCH->master_cat_id ?>" /></td>
                        <td align="left"><?php echo $FTCH->master_cat_name." - ".$FTCH->cat_expantion; ?></td>
                        
                        <td align="center"><input type="text" class="datepicker" name="fmdate[<?php echo $loop ?>]" id="fmdate<?php echo $loop ?>" style="width:250px"/></td>
                        <?php /*?><td align="center"><input type="text" class="datepicker" name="todate[<?php echo $loop ?>]" id="todate<?php echo $loop ?>" style="width:250px"/></td><?php */?>
                        <td align="center"><input type="text" name="cost_vl[<?php echo $loop ?>]" id="cost_vl<?php echo $loop ?>" class="mas_weit_tx"/></td>
                        
                        <?php /*?><td class="center"><a href="employee_view.php?design_id=<?php echo $design_id ?>">View</a></td>
                        <td class="center"><?php if($FTCH->statu_s=="active"){ ?><a href="bl/design_BL.php?design_id=<?php echo $design_id ?>&page_id=<?php echo $page_id; ?>&statu_s=active">Active</a><?php }else{ ?><a href="bl/design_BL.php?design_id=<?php echo $design_id ?>&page_id=<?php echo $page_id; ?>&statu_s=inactive">Inactive</a> <?php } ?></td><?php */?>
                        </tr>
                        
                        <?php
                        $loop ++;
                    
                         }
                         }
                         ?>
                        <?php if($loop==1){ ?>
                        <tr>
                          <td colspan="12" align="center">
                          <div class="nNote nFailure">
                            <p>Oops Sorry No Data Found...</p>
                          </div>              </td>
                          </tr>
                        <?php } ?>
                            </tbody>                           
                        </table> 
                        </div>
                        </div>
                        
            </div>
        	<input name="tot_cn" id="tot_cn" type="hidden" value="<?php echo $loop ?>" />
         	 <div class="widget">              
                        <div class="formRow">
                        <input type="button" value="Submit" class="buttonM bBlack formSubmit" onclick="fom_validate();" style="margin-left:20px;" />
                        <input type="button" value="Reset" class="buttonM bRed"  onclick="form_rest();" style="float: right; margin-left:20px;"/>
                        <div class="clear"></div></div>
                        <div class="clear"></div>
                    </div>
                </fieldset>
            </form>
        
            <form id="usualValidate" class="main" method="post" action="">
                <fieldset>
                </fieldset>
            </form>
        </div>

            
</div>
</div>
<!-- Content ends -->    
        
</body>
</html>