File: /home/barbeatleanalyti/public_html/baris.beatleanalytics.com/site/template/rodant.php
<!DOCTYPE html>
<?php
// Declare new object
$objScorecardctsnew = object;
// Assing object
$objScorecardctsnew = $objDB->objController;
// Assign all variable's value
$pg = $objScorecardctsnew->pg;
$acn = $objScorecardctsnew->acn;
$v = $objScorecardctsnew->v;
$State = $objScorecardctsnew->State;
$ReligionName = $objScorecardctsnew->ReligionName;
$sort = $objScorecardctsnew->sort;
$ReligionID = $objScorecardctsnew->ReligionID;
$field = $objScorecardctsnew->field;
$error = $objScorecardctsnew->error;
$msg = $objScorecardctsnew->msg;
$perpage = $objScorecardctsnew->perpage;
$start = $objScorecardctsnew->start;
$limit = $objScorecardctsnew->limit;
$SearchValue = $objScorecardctsnew->SearchValue;
$s = $objScorecardctsnew->s;
$CustomerID = $objScorecardctsnew->CustomerID;
$SurveyID = $objScorecardctsnew->SurveyID;
$TokenID = $objScorecardctsnew->TokenID;
$pType = $objScorecardctsnew->pType;
$OrgID = $objScorecardctsnew->OrgID;
$BranchID = $objScorecardctsnew->BranchID;
$IndustryID = $objScorecardctsnew->IndustryID;
$FromDate = $objScorecardctsnew->FromDate;
$ToDate = $objScorecardctsnew->ToDate;
$StationId = $objScorecardctsnew->StationId;
$QuestionId = $objScorecardctsnew->QuestionId;
$AuditorId = $objScorecardctsnew->AuditorId;
$Year = $objScorecardctsnew->Year;
$Month = $objScorecardctsnew->Month;
$valck[] = array();
if(!in_array('EQP', explode(',', $userdata[0]['reportType']))){
ReturnPostFormData($ValidateArr = array(),"error.html","<span class='error-msg'>Method <strong>".$acn."</strong> does not exist in <strong>".$pg."</strong> file !</span>",2);
}
?>
<!-- jQuery 3 -->
<script src="<?php echo $curImagePath?>/bower_components/jquery/dist/jquery.min.js"></script>
<link rel="stylesheet" href="<?php echo $curImagePath?>/datatable/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="<?php echo $curImagePath?>/datatable/css/buttons.dataTables.min.css">
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">-->
<link rel="stylesheet" href="<?php echo $curImagePath?>/dist/css/Custom.css">
<link rel='stylesheet' type='text/css' href='<?php echo $curImagePath?>/datepikar2/datepicker3.css'>
<link rel='stylesheet' type='text/css' href='<?php echo $curImagePath?>/datepikar2/daterangepicker-bs3.css'>
<script src="<?php echo $curImagePath?>/dist/js/jQuery.print.min.js"></script>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-body">
<form method="post" action="rodant.html" name="frmSearch" id="frmSearch" class="pe-no-print" style="display:block;">
<div class="box-header">
<h3 class="box-title" style="width:100%;">
<a class="btn btn-info btn-sm back_btn" href="dashboard.html"> <i class="fa fa-long-arrow-left"></i> Back </a>
<div class="form-group ">
<div class=" col-xs-12 col-md-3 col-lg-2 form-group col-md-offset-3">
<select class="form-control input-md" id="month" name="Month">
<option selected="" value="">--Select Month--</option>
<option value="01">Janaury</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
</div>
<div class="col-xs-12 col-md-3 col-lg-2 form-group">
<select class="form-control input-md" id="year" name="Year">
<?php
$firstYear = 2020;
$lastYear = (int)date('Y');
for($i=$firstYear;$i<=$lastYear;$i++){
echo '<option value='.$i.'>'.$i.'</option>';
}?>
</select>
</div>
<div class="input-group input-group-sm pull-right- text-right">
<span class="pull-right text-right form-group no-padding">
<a class="btn btn-success btn-sm" onclick="myFunction()" href="#"> <i class="fa fa-search"></i> GO </a>
<script>
function myFunction() {
$(".loader").show();
document.getElementById("frmSearch").submit();
}
$(window).bind("load", function() {
//$(".loader").hide();
});
</script>
<?php if ($userdata[0]['db_usertype'] != 'viewer' ){ ?>
<a class="btn btn-success btn-sm dailytarget" href="manpowerattendancerodent.html"> mark a attendance </a>
<?php } ?>
</span>
</div>
</div>
</h3>
</div>
</form>
<div class="NEWCTS">
<!---<div class="fixed-btn">
<div class="table_print- pe-no-print">
<form name="myform" class="print_cheked">
<button type="button" class="print print_btn" >Print All</button>
<input type="checkbox" name="mybox" checked="" style="display: none;">
</form>
</div>
</div>--->
<?php
$rsStation = $objScorecardctsnew->fetchStation();
$rsPagesIDS = SubQuestionGroupIDS('pages',$rsStation[0]['paramId']);
// echo "<pre>";
// print_r($rsPagesIDS);
// die;
?>
<div class="printTable pe-preserve-ancestor" id="printTable">
<br>
<table cellspacing="0" border="0" style="margin:0 auto;">
<colgroup width="64"></colgroup>
<colgroup width="151"></colgroup>
<colgroup width="185"></colgroup>
<colgroup width="100"></colgroup>
<colgroup width="100"></colgroup>
<colgroup width="100"></colgroup>
<colgroup width="100"></colgroup>
<tr class="no_br report_header2">
<td colspan="28" align="center" valign="bottom"> NORTH EASTERN RAILWAY </td>
</tr>
<tr class="no_br report_header2">
<td colspan="28" height="28" align="center" valign="bottom"><span class="report_name">
MANPOWER - PEST AND RODENT CONTROL
</span>
</td>
</tr>
<tr class="no_br report_header2 " style="border-bottom: 1px solid #bfbfbf;">
<td colspan="28" align="center" valign="bottom">
</td>
</tr>
<tr class="no_br">
<td height="100" style=" height: 12px !important;"></td>
</tr>
<tr>
<td>S.No</td>
<td>Description </td>
<td>To be Provided as Per Norms</td>
<?php
// $a_date = $Year.'-'.$Month.'-01';
function weekOfMonth($date) {
// estract date parts
list($y, $m, $d) = explode('-', date('Y-m-d', strtotime($date)));
// current week, min 1
$w = 1;
// for each day since the start of the month
for ($i = 1; $i <= $d; ++$i) {
// if that day was a sunday and is not the first day of month
if ($i > 1 && date('w', strtotime("$y-$m-$i")) == 0) {
// increment current week
++$w;
}
}
// now return
return $w;
}
$totalWeeks = weekOfMonth(date($Year."-".$Month."-t"));
for ($i=1; $i <= $totalWeeks; $i++) {
echo "<td>Week ".$i."</td>";
}
?>
</tr>
<tr>
<td rowspan="2" sdval="1" sdnum="1033;">1</td>
<td rowspan="2">Housekeeper</td>
<td rowspan="2">Once a week</td>
<?php
for ($i=1; $i <= $totalWeeks; $i++) {
$avgVal = $objScorecardctsnew->FetchValueScore("60",$i,$rsStation[0]['stationId'],$rsStation[0]['DivisionId']);
if(!empty($avgVal['AvgValue']))
echo "<td>".date('d-F-Y',strtotime($avgVal['created_date']))."</td>";
else
echo "<td></td>";
}
?>
</tr>
<tr>
<?php
for ($i=1; $i <= $totalWeeks; $i++) {
$avgVal = $objScorecardctsnew->FetchValueScore("60",$i,$rsStation[0]['stationId'],$rsStation[0]['DivisionId']);
echo "<td>".$avgVal['AvgValue']."</td>";
}
?>
</tr>
<!-- <tr>
<td rowspan="2" sdval="1" sdnum="1033;">1</td>
<td rowspan="2">Housekeeper</td>
<td rowspan="2">Once a week</td>
<td>1-feb-2021</td>
<td>8-feb-2021</td>
<td>18-feb-2021</td>
<td>30-feb-2021</td>
</tr>
<tr>
<td>P</td>
<td>P</td>
<td>P</td>
<td>P</td>
</tr> -->
</table>
</div>
</div>
</div>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Bootstrap 3.3.7 -->
<script src="<?php echo $curImagePath?>/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="<?php echo $curImagePath?>/datatable/js/jquery.dataTables.min.js"></script>
<script src="<?php echo $curImagePath?>/datatable/js/dataTables.buttons.min.js"></script>
<script src="<?php echo $curImagePath?>/datatable/js/buttons.flash.min.js"></script>
<script src="<?php echo $curImagePath?>/datatable/js/buttons.print.min.js"></script>
<!-- SlimScroll -->
<script src="<?php echo $curImagePath?>/bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="<?php echo $curImagePath?>/bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="<?php echo $curImagePath?>/dist/js/demo.js"></script>
<script src="<?php echo $curImagePath?>/datepikar2/bootstrap-datepicker.js"></script>
<script src="<?php echo $curImagePath?>/datepikar2/daterangepicker.js"></script>
<script src="<?php echo $curImagePath?>/datepikar2/moment.min.js"></script>
<script>
$('#year').val('<?php echo $Year ?>');
$('#month').val('<?php echo $Month ?>');
$(document).ready(function() {
$("#FromDate").datepicker({
format: 'dd-mm-yyyy'
});
$("#ToDate").datepicker({
format: 'dd-mm-yyyy'
});
//document.forms["frmSearch"].submit();
});
function validateDate() {
var D1 = document.getElementById("ToDate");
var D2 = document.getElementById("FromDate");
if (D1.value.trim() == "") {
D1.style.border = "1px solid red";
return false;
}
if (D2.value.trim() == "") {
D2.style.border = "1px solid red";
return false;
}
}
</script>
<!---creat_new_page_print--->
<script>
function breakeveryheader() {
if (!document.getElementById) {
alert("You need IE5 or NS6 to run this example")
return
}
var thestyle = (document.forms.myform.mybox.checked) ? "always" : "auto"
for (i = 0; i < document.getElementsByClassName("creat_new_page_print").length; i++)
document.getElementsByClassName("creat_new_page_print")[i].style.pageBreakBefore = thestyle
}
</script>
<script>
$('.print_btn').on('click', function() { // select print button with class "print," then on click run callback function
breakeveryheader();
$.print("#printTable"); // inside callback function the section with class "content" will be printed
});
</script>
<!--//creat_new_page_print -->
<style>
@media print {
.new_print_display { page-break-after: always; }
}
@page { size: A4; }
</style>