Private
Server IP : 192.124.249.33  /  Your IP : 66.248.200.33
Web Server : Apache
System : Linux 141.134.66.148.host.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els6.x86_64 #1 SMP Fri Sep 13 13:42:20 UTC 2024 x86_64
User : tarangglobal ( 1001)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/tarangglobal/public_html/cyber/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/tarangglobal/public_html/cyber/admin/manage_earning_contracts.php
<?php require_once('pdoconfig.php');
$off_id=$_SESSION['poster_id'];
?>

<!DOCTYPE html>
<html>
<head>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="description" content="Materia - Admin Template">
	<meta name="keywords" content="materia, webapp, admin, dashboard, template, ui">
	<meta name="author" content="solutionportal">
	<!-- <base href="/"> -->

	<title>Earning Contracts</title>
	
	<link rel="stylesheet" href="fonts/ionicons/css/ionicons.min.css">
	<link rel="stylesheet" href="fonts/font-awesome/css/font-awesome.min.css">

	<!-- Plugins -->
	<link rel="stylesheet" href="styles/plugins/c3.css">
	<link rel="stylesheet" href="styles/plugins/waves.css">
	<link rel="stylesheet" href="styles/plugins/perfect-scrollbar.css">
	<link rel="stylesheet" href="css/bootstrap-datepicker.css" />

	
	<!-- Css/Less Stylesheets -->
	<link rel="stylesheet" href="styles/bootstrap.min.css">
	<link rel="stylesheet" href="styles/main.min.css">

<link href='http://fonts.googleapis.com/css?family=Roboto:400,500,700,300' rel='stylesheet' type='text/css'>
<!-- Match Media polyfill for IE9 -->
<!--[if IE 9]> <script src="scripts/ie/matchMedia.js"></script>  <![endif]--> 

<style>
.form-control {
	border:1px solid#ddd;
}
.table-1 td{
	padding:5px;
	border:1px solid#ddd;
}
.active{
	background-color: rgb(58, 57, 57) !important;
}

</style>
	

</head>
<body id="app" class="app off-canvas">
	<!-- #Start header -->
	<?php include('_header.php');?>

	<!-- #end header -->

	<!-- main-container -->
	
	
	<div class="main-container clearfix">
		<!-- main-navigation -->
		<?php include('_left-menu.php');?>
		<!-- #end main-navigation -->

		<!-- content-here -->
		<div class="content-container" id="content">
			<!-- dashboard page -->
			<div class="page page-dashboard">

				<div class="page-wrap">

					<div class="row">
						<!-- dashboard header -->
						<div class="col-md-12">
							<div class="dash-head clearfix mt30 mb20">
								<div class="left">
									<h4 class="mb5 text-light" style="font-weight:bold;">Manage Earning Contracts Master</h4>
								</div>
								<div class="right mt10">
									<h5 class="text-bold mb0 mt5"><a href="manage_earning_contracts.php?act=add">Add New Record</a></h5>
								</div>
							</div>
						</div>
					</div> <!-- #end row -->

					<!-- mini boxes -->
					<div class="row">
						<?php 
						$act=$_REQUEST['act'];
						$catid=$_REQUEST['catid'];
						
						if(isset($_REQUEST['catid']))
						{
							$catid=$_REQUEST['catid'];						
							
							$sqlu="select * from contract_master where cont_id=$catid";
							$res= $action->select($sqlu);

							foreach ($res as $id=>$row){
							
							$by=$row['off_id']; 
							$reg_no=$row['reg_no']; 
							$ct_mode=$row['ct_mode'];
							$contTyp_id=$row['contTyp_id'];
							$contSubTyp_id=$row['contSubTyp_id'];
							$st_id=$row['st_id']; 
							$reserve_price=$row['reserve_price'];
							$reserve_price_vetted=$row['reserve_price_vetted'];
							$tender_no=$row['tender_no'];
							$tender_date=$row['tender_date'];
							$tender_last_date=$row['tender_last_date'];
							$tender_open_date=$row['tender_open_date'];
							
							
							}
						  
						}
						
						if($tender_date==''){$tender_date=date('d-m-Y');}
						if($tender_last_date==''){$tender_last_date=date('d-m-Y');}
						if($tender_open_date==''){$tender_open_date=date('d-m-Y');}
						?>
						<?php if($act=='add' || $act=='edit' || $act=='del'){?>
						<div class="col-md-8" style="margin:auto;float:none;">
					<form action="manage_earning_contracts_act.php" method="post" onsubmit="return valid()">
						<input name="catid" type="hidden" value="<?=$catid?>"/>
						<input name="act" type="hidden" value="<?=$act?>"/>						
							<div style="width:100%;float:left;background-color:#fff;padding:15px;">
													
								<div class="col-md-12" style="padding:0px;">
									<div class="col-md-6" style="margin-bottom:10px;display:none;">
										<label>Officer Id</label>
										<input type="text" class="form-control" placeholder="Officer Id" name="off_id" value="<?=($by=='')?$off_id:$by;?>"/>
									</div>
									<div class="col-md-6" style="margin-bottom:10px;">
										<label>Contract Mode</label>
										<select class="form-control" name="ct_mode">
											<option value="0">-- Select Contract Mode --</option>
											<option value="1" <?php if($ct_mode=='1') {echo "Selected";} ?>>Open Tender</option>
											<option value="2" <?php if($ct_mode=='2') {echo "Selected";} ?>>Quotation</option>
										</select>
									</div>

									
									<div class="col-md-6" style="margin-bottom:10px;">
										<label>Reg No</label>
										<input type="text" class="form-control" placeholder="Reg No." name="reg_no" value="<?=$reg_no;?>"/>
									</div>
									
									<div class="col-md-6" style="margin-bottom:10px;">
										<label>Station</label>
										<select class="form-control" name="st_id" id="st_id">
											<option value="0">-- Select Station--</option>
											<?php 
												$sql1="select * from station_master";
												$res=$action->select($sql1);
												foreach ($res as $id=>$row){
											?>
											<option value="<?=$row['st_id'];?>" <?php if($row['st_id']==$st_id) { echo "Selected"; }?>><?=$row['st_name'];?></option>
											<?php } ?>
										</select>
									</div>
									<div class="col-md-6" style="margin-bottom:10px;">
										<label>Contract Type</label>
										<select class="form-control" name="contTyp_id" onchange="price_val(this.value)">
										<option value="0">-- Select Contract Type--</option>
										<?php 
											$sql2="select temp.*, contract_type.contTyp_id sec_id,contract_type.contTyp_desc section_name from( select contract_type.* from contract_type where isnull(level) or level=0 ) temp left join contract_type on temp.contTyp_id =contract_type.level order by contTyp_id";
											$res=$action->select($sql2);
											foreach ($res as $id=>$row){
													
											if ($row['sec_id'])
											{
												$pval=$row['contTyp_id']."|".$pval=$row['sec_id'];
												$pdesc=$row['contTyp_desc']."(".$row['section_name'].")";	
											}
											else
											{
												$pval=$row['contTyp_id']."|0";
												$pdesc=$row['contTyp_desc'];		
											}
											$ctype=$contTyp_id."|".$contSubTyp_id;
										?>
										<option value="<?=$pval;?>" <?php if($ctype==$pval) {echo "Selected";} ?>><?=$pdesc;?></option>
										<?php } ?>
									</select>
									</div>
									<div class="col-md-6" style="margin-bottom:10px;">
										<label>Proposed Reserve Price</label>
										<input type="text" class="form-control" placeholder="Proposed Reserve Price" name="reserve_price" id="reserve_price" value="<?=$reserve_price;?>" readonly/>
									</div>
									<div class="col-md-6" style="margin-bottom:10px;">
										<label>Vetted Reserve Price</label>
										<input type="text" class="form-control" placeholder="Vetted Reserve Price" name="reserve_price_vetted" id="reserve_price_vetted" value="<?=$reserve_price_vetted;?>" readonly/>
									</div>
									<div class="col-md-6" style="margin-bottom:10px;">
										<label>Tender/ Quotation No.</label>
										<input type="text" class="form-control" placeholder="Tender/ Quotation No." name="tender_no" value="<?=$tender_no;?>"/>
									</div>
									<div class="col-md-6" style="margin-bottom:10px;">
										<label>Tender/ Quotation Date</label>
										<div class="input-group date" id="datepickerDemo">
											<input type="text" name="tender_date" id="dob" class="form-control" placeholder="Tender/ Quotation Date" value="<?=date('d-m-Y',strtotime($tender_date));?>"/>
											<span class="input-group-addon"><i class=" ion ion-calendar"></i></span>
										</div>
									</div>
									<div class="col-md-6" style="margin-bottom:10px;">
										<label>Tender/ Quotation Opening Date</label>
										<div class="input-group date" id="datepickerDemo2">
											<input type="text" name="tender_open_date" id="dob2" class="form-control" placeholder="Tender/ Quotation Opening Date" value="<?=date('d-m-Y',strtotime($tender_open_date));?>"/>
											<span class="input-group-addon"><i class=" ion ion-calendar"></i></span>
										</div>
									</div>
									<div class="col-md-6" style="margin-bottom:10px;">
										<label>Tender/ Quotation Last Date</label>
										<div class="input-group date" id="datepickerDemo3">
											<input type="text" name="tender_last_date" id="dob3" class="form-control" placeholder="Tender/ Quotation Last Date" value="<?=date('d-m-Y',strtotime($tender_last_date));?>"/>
											<span class="input-group-addon"><i class=" ion ion-calendar"></i></span>
										</div>
									</div>									
								</div>
							
								
								<div class="col-md-12" style="text-align:center;margin-top:20px;">
									 <?php if($act=='add'){?>
										<button class="btn btn-primary mr5 waves-effect" type="submit" value="add" id="btn-add">Save</button>
									 <?php } 
									 else if($act=='edit')
									 { ?>
										<button class="btn btn-primary mr5 waves-effect" type="submit" value="edit" id="btn-add">Save</button>
									 <a href="manage_earning_contracts_act.php?catid=<?=$catid;?>&amp;act=del" class="btn btn-primary mr5 waves-effect">Delete</a>
									 <?php } ?>
								</div>
							</div>
							</form>
						</div>						
						<?php } ?>
						
						<div class="col-md-8" style="margin:auto;float:none;display:none;">
							<div style="width:100%;float:left;background-color:#fff;padding:15px;">							
								<div class="col-md-12"><hr style="border:2px solid#ddd;"/></div>
								<div class="col-md-12" style="padding:0px;">								
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>Contract Period</label>
									<input type="text" class="form-control" placeholder="" name="contprd" value=""/>
								</div>
								<div class="col-md-8" style="margin-bottom:10px;">
									<label>Party Name</label>
									<input type="text" class="form-control" placeholder="" name="prtyname" value=""/>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>City</label>
									<input type="text" class="form-control" placeholder="" name="city" value=""/>
								</div>
								<div class="col-md-6" style="margin-bottom:10px;">
									<label>Purpose</label>
									<select class="form-control" name="purpose">
										<option value="">-- Select Purpose --</option>
										<option>Pay and Park Contract</option>
									</select>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>Amount</label>
									<input type="text" class="form-control" placeholder="" name="amount" value=""/>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>LOA No.</label>
									<input type="text" class="form-control" placeholder="" name="agtamt" value=""/>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>LOA Date</label>
									<input type="text" class="form-control" placeholder="" name="agtformdt" value=""/>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>Station</label>
									<input type="text" class="form-control" placeholder="" name="station" value=""/>
								</div>								
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>Location</label>
									<input type="text" class="form-control" placeholder="" name="location" value=""/>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>Platform</label>
									<input type="text" class="form-control" placeholder="" name="platform" value=""/>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>Penalty</label>
									<input type="text" class="form-control" placeholder="" name="penalty" value=""/>
								</div>								
								
								<div class="col-md-3" style="margin-bottom:10px;">
									<label style="font-size:13px;">License Fee Due/ Year</label>
									<input type="text" class="form-control" placeholder="" name="licnsdue" value=""/>
								</div>
								<div class="col-md-3" style="margin-bottom:10px;">
									<label>TCS Due</label>
									<input type="text" class="form-control" placeholder="" name="tcsdue" value=""/>
								</div>
								<div class="col-md-3" style="margin-bottom:10px;">
									<label>Security Deposit Due</label>
									<input type="text" class="form-control" placeholder="" name="secdepdue" value=""/>
								</div>
								<div class="col-md-3" style="margin-bottom:10px;">
									<label>Service Tax Due</label>
									<input type="text" class="form-control" placeholder="" name="srvtax" value=""/>
								</div>
								
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>Agt No.</label>
									<input type="text" class="form-control" placeholder="" name="agtno" value=""/>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>Agt From Date</label>
									<input type="text" class="form-control" placeholder="" name="agtno" value=""/>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>Agt To Date</label>
									<input type="text" class="form-control" placeholder="" name="agtno" value=""/>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>Periodicity of Payment</label>
									<select class="form-control" name="periodypmt">
										<option value="">-- Select Periodicity --</option>
										<option>Quarterly</option>
										<option>Healfyerly</option>
										<option>Yearly</option>
									</select>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>Eextension From</label>
									<input type="text" class="form-control" placeholder="" name="agtno" value=""/>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>Eextension To</label>
									<input type="text" class="form-control" placeholder="" name="agtno" value=""/>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>Status</label>
									<select class="form-control" name="status">
										<option value="">-- Select Status --</option>
										<option>Live</option>
									</select>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;">
									<label>Closed Date</label>
									<input type="text" class="form-control" placeholder="" name="closddt" value=""/>
								</div>
								<div class="col-md-4" style="margin-bottom:10px;padding-top:20px;">
									<label><input type="checkbox" name="vettedbyact"> Vetted By Act</label>
									<label><input type="checkbox" name="cavettedbyact"> CA Vetted By Accts</label>
								</div>
								
							</div>
							
								
								<div class="col-md-3" style="text-align:center">&nbsp;</div>
								<div class="col-md-5" style="text-align:center">
									<button class="btn btn-primary mr5 waves-effect" type="submit" value="edit" id="btn-add">Save</button>
									<button class="btn btn-primary mr5 waves-effect" type="submit" value="edit" id="btn-add">Cancle</button>
									<button class="btn btn-primary mr5 waves-effect" type="submit" value="edit" id="btn-add">Exit</button>
								</div>			
								</div>
						</div>
					</div> <!-- #end row -->
					
					
					
					
					<?php 
				 	if(isset($_REQUEST['Submit1']))
				 	{
					   $search=$_REQUEST['search'];						   
					   $cond=" and concat(officer_master.off_name,desig,user_id_email) like '%$search%'"; 
					}
					?>

					<div class="row">
						<div class="col-md-12">
							<div style="width:100%;float:left;margin-top:20px;padding:15px;background-color:#fff;">
								<h4 class="mb5 text-light" style="font-weight:bold;margin:0px;width:auto;float:left;">List 
								of Earning Contracts</h4>
								
								<table style="width:auto;float:right;margin-right:0px;margin-bottom:10px;">
									<tr><form method="post"><td style="padding-right:5px;"><input name="search" type="text" class="form-control" value="<?=$search;?>"/></td><td><button name="Submit1" type="submit" value="submit" class="btn btn-primary mr5 waves-effect waves-effect">Search</button></td></form></tr>
								</table>
								<table style="width:100%;float:left;" class="table-1"> 
									<tr style="background:#f2f2f2;">
										<td style="width:50px;">#</td>
										<td>Officers id</td>
										<td>Reg. No.</td>
										<td>Contract Type</td>
										<td>Contract Sub Type</td>
										<td>Proposed Reserve Price</td>
										<td>Vetted Reserve Price</td>
										<td>Tender/ Quotation No.</td>
										<td>Tender/ Quotation Date</td>
										<td>Tender/ Quotation Open Date</td>
										<td>Tender/ Quotation Last Date</td>
										<td style="width:100px;">Action</td>
									</tr>
									<?php
									$num_rec_per_page=15;
									if (isset($_GET["page"])) { $page  = $_GET["page"]; } else { $page=1; }; 
									$i=1+$start_from = ($page-1) * $num_rec_per_page;
									
									$sql="select * from(
									select temp2.*,t2.contTyp_desc sect_name from (
									select temp.*,contract_type.contTyp_desc from(
									SELECT * FROM contract_master WHERE off_id=$off_id order by cont_id )temp 
									left join contract_type
									on temp.contTyp_id=contract_type.contTyp_id)temp2
									left join contract_type t2
									on temp2.contSubTyp_id=t2.contTyp_id)temp3
									left join officer_master
									on temp3.off_id=officer_master.off_id";
									//echo $sql;
									$res= $action->select($sql);
									foreach ($res as $id=>$row){
									$a=$row['active'];
									?>
									<tr>
										<td><?=$i++;?></td>
										<td><?=$row['off_name'];?></td>
										<td><?=$row['reg_no'];?></td>
										<td><?=$row['contTyp_desc'];?></td>
										<td><?=$row['sect_name'];?></td>
										<td><?=$row['reserve_price'];?></td>
										<td><?=$row['reserve_price_vetted'];?></td>
										<td><?=$row['tender_no'];?></td>
										<td><?=date('d/m/y',strtotime($row['tender_date']));?></td>
										<td><?=date('d/m/y',strtotime($row['tender_last_date']));?></td>
										<td><?=date('d/m/y',strtotime($row['tender_open_date']));?></td>
										<td><a href="manage_earning_contracts.php?catid=<?=$row['cont_id']?>&amp;act=edit" class="link btn-primary" style="padding:5px;border-radius:2px">Update</a><br>
										   <a href="sanjay.php?contid=<?=$row['cont_id']?>" class="link btn-primary" style="padding:5px;border-radius:2px;margin-top:5px">Add Party</a>
										   <a href="contract_price_asign.php?contid=<?=$row['cont_id']?>" class="link btn-primary" style="padding:5px;border-radius:2px;margin-top:5px">Assign</a></td>
									</tr>
									<?php } ?>
								</table>
								
<div style="width:100%;float:left;text-align:center;background:#fff;padding: 10px;">				
<div style="width:100%;float:left;">
<?php 
$params = $_SERVER['QUERY_STRING'];
$params=str_replace("page=","",$params);
$p=substr($params,0,strpos($params,"&"));

$sql="select * from officer_master where 1=1 ".$cond;
 
//echo $sql;
$res= $action->select($sql); //run the query
$total_records =count($res);  //count number of records
//echo $total_records;
$total_pages = ceil($total_records / $num_rec_per_page); 
	echo "<a style='background-color: rgb(255, 45, 0);color:#fff;padding: 1px 4px;' href='officer_master.php?page=1&$params'>".'First'."</a> "; // Goto 1st page  
for ($i=1; $i<=$total_pages; $i++) 
{ 
$a="";
if($p==$i){ $a="active"; }
	echo "<a class='$a' style='background-color: rgb(255, 45, 0);color:#fff;padding: 1px 4px;' href='officer_master.php?page=".$i."&".$params."'>".$i."</a> "; 
}; 
echo "<a style='background-color: rgb(255, 45, 0);color:#fff;padding: 1px 4px;' href='officer_master.php?page=$total_pages&$params'>".'Last'."</a> "; // Goto last page
?>
</div>
</div>
								
							</div>
						</div>
					</div>

					
				</div> <!-- #end page-wrap -->
			</div>
			<!-- #end dashboard page -->
		</div>
	</div>
	

	<!-- theme settings -->
	<div class="site-settings clearfix hidden-xs">
		<div class="settings clearfix">
			<div class="trigger ion ion-settings left"></div>
			<div class="wrapper left">
				<ul class="list-unstyled other-settings">
					<li class="clearfix mb10">
						<div class="left small">av Horizontal</div>
						<div class="md-switch right">
							<label>
								<input type="checkbox" id="navHorizontal"> 
								<span>&nbsp;</span> 
							</label>
						</div>
						
						
					</li>
					<li class="clearfix mb10">
						<div class="left small">Fixed Header</div>
						<div class="md-switch right">
							<label>
								<input type="checkbox"  id="fixedHeader"> 
								<span>&nbsp;</span> 
							</label>
						</div>
					</li>
					<li class="clearfix mb10">
						<div class="left small">av Full</div>
						<div class="md-switch right">
							<label>
								<input type="checkbox"  id="navFull"> 
								<span>&nbsp;</span> 
							</label>
						</div>
					</li>
				</ul>
				<hr/>
				<ul class="themes list-unstyled" id="themeColor">
					<li data-theme="theme-zero" class="active"></li>
					<li data-theme="theme-one"></li>
					<li data-theme="theme-two"></li>
					<li data-theme="theme-three"></li>
					<li data-theme="theme-four"></li>
					<li data-theme="theme-five"></li>
					<li data-theme="theme-six"></li>
					<li data-theme="theme-seven"></li>
				</ul>
			</div>
		</div>
	</div>
	<!-- #end theme settings -->


	

	<!-- Dev only -->
	<!-- Vendors -->
<script src="scripts/vendors.js"></script>
<script src="scripts/plugins/d3.min.js"></script>
<script src="scripts/plugins/c3.min.js"></script>
<script src="scripts/plugins/screenfull.js"></script>
<script src="scripts/plugins/perfect-scrollbar.min.js"></script>
<script src="scripts/plugins/waves.min.js"></script>
<script src="scripts/plugins/jquery.sparkline.min.js"></script>
<script src="scripts/plugins/jquery.easypiechart.min.js"></script>
<script src="scripts/plugins/bootstrap-rating.min.js"></script>
<script src="scripts/app.js"></script>
<script src="scripts/index.init.js"></script>
<script src="scripts/plugins/select2.min.js"></script>
<script src="scripts/plugins/bootstrap-colorpicker.min.js"></script>
<script src="scripts/plugins/bootstrap-slider.min.js"></script>
<script src="scripts/plugins/summernote.min.js"></script>
<script src="scripts/plugins/bootstrap-datepicker2.min.js"></script>
<script src="scripts/form-elements.init.js"></script>	

<script>
function price_val(val)
{
  var stid=$("#st_id").val();
  var v=val.split("|");
  var ct=v[0];
  var sct=v[1];
  
  //alert(stid+"="+ct+"="+sct);
  //alert('resource/api.php?stid='+stid+'&cid='+ct+'&scid='+sct);
  $.getJSON('resource/api.php?callback=?','stid='+stid+'&cid='+ct+'&scid='+sct,function(data){
   
    if(data=='')
    {
      $("#reserve_price").val("");
	  $("#reserve_price_vetted").val("");
	  return false;
    }
	  $.each(data,function(i,element){
	  
	  $("#reserve_price").val(element.rsrv_price);
	  $("#reserve_price_vetted").val(element.approved);
	  
	  });
  });
  
}
</script>
<script>
	function valid()
	{
  
	   var rsrv=$("#reserve_price_vetted").val();
	   if(rsrv=='')
	  {
	    alert("Vetted Reserve Price must be fill!");
	    return false;
	  }
	  
	  return true;

      
	}
	</script>
</body>
</html>



Private