HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/barbeatleanalyti/public_html/baris.beatleanalytics.com/site/template/watering.php
<?php 
set_time_limit(0);   
?>
<!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;

   $valck[] = array();

if(!in_array('WAT', 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">
        <!-- Content Header (Page header) -->
        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <!-- /.box -->
                    <div class="box">
                        <!-- /.box-header -->
                        <div class="box-body">
                            <!------------------------------------------------------------------>
                            <form method="post" action="watering.html" name="frmSearch" id="frmSearch" class="pe-no-print">  
                                <div class="box-header">
                                    <h3 class="box-title" style="width:100%;">
                           <div class="form-group" >
                              <?php $rsStation = $objScorecardctsnew->fetchStation(); ?>
                              <!-- <label class=" control-label station_select"> Select Station</label>-->
                              <div class=" col-md-2 station_select_opction ">
                                 <select class="form-control input-md" id="org_list" name="Station">
                                    <option value="0">Select Station </option>
                                    <?php if(count($rsStation) > 0) { 
                                       for($s=0; $s<count($rsStation); $s++) { ?>
                                    <option <?php if($StationId === $rsStation[$s]['stationId']) echo 'selected="selected"'; ?> value="<?php echo $rsStation[$s]['stationId']?>"><?php echo $rsStation[$s]['stationName']?></option>
                                    <?php }
                                       }else{ ?>
                                    <option value="0">No any station found</option>
                                    <?php } ?>
                                 </select>
                              </div>
                              <div class=" col-xs-12 col-md-3 col-lg-2 form-group">
                                 <select class="form-control input-md" id="org_list" name="Question">
                                    <?php //$rsQuestion = $objScorecardctsnew->FetchQuestion(); ?>
                                    <option value="0">Select Question </option>
                                    <option selected="selected" value="14">Watering Of Coaches</option>
                                 </select>
                              </div>
                              <div class=" col-xs-12 col-md-3 col-lg-2 form-group">
                                 <select class="form-control input-md" id="org_list" name="Auditor">
                                    <?php $rsAuditor = $objScorecardctsnew->FetchAuditor(); ?>
                                    <option value="0">Select Auditor </option>
                                    <?php if(count($rsAuditor) > 0) { 
                                       for($a=0; $a<count($rsAuditor); $a++) { ?>
                                    <option <?php if($AuditorId === $rsAuditor[$a]['userId']) echo 'selected="selected"'; ?> value="<?php echo $rsAuditor[$a]['userId']?>"><?php echo $rsAuditor[$a]['db_username']?></option>
                                    <?php }
                                       }else{ ?>
                                    <option value="0">No any auditor found</option>
                                    <?php } ?>
                                 </select>
                              </div>
                              <div class="col-md-2 col-xs-6 form-group">
                                 <input type="text" readonly="readonly" id="FromDate" name="FromDate" placeholder="Start date.." class="form-control input-md" value="<?php echo $FromDate;?>">
                              </div>
                              <div class="col-md-2 col-xs-6 form-group">
                                 <input type="text" readonly="readonly" id="ToDate" name="ToDate" placeholder="End date.." class="form-control input-md" value="<?php echo $ToDate;?>">
                              </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>
                                 </span>
                              </div>
                           </div>
                        </h3>
                                </div>
                            </form>
                            <?php 
                     if(!empty($QuestionId) && !empty($StationId)){
                      //$rsPagesIDS = QuestionGroupIDS('pages',$QuestionId);

                      //$rsParamIDS = QuestionGroupIDS('params',$QuestionId);
                      
                      $rsUserInfo = $objScorecardctsnew->FetchUsersData(); 

                      ?>
                  <div class="NEWCTS">
				  	
						 <div class="fixed-btn">				  
				   <a href="watsummary.html"  class="btn summary-btn" target="_blank">WAT - Summary </a>  
                    <div class="table_print- pe-no-print">
					
					

					
                      <form name="myform" class="print_cheked">
							 <button type="button" class="print print_btn" >Print All</button>
                          <!-- onClick="breakeveryheader()" -->
                          <input type="checkbox" name="mybox" checked="" style="display: none;">
                      </form>
                    </div>
					
					</div>
					<div class="printTable pe-preserve-ancestor" id="printTable">
                
<?php
//$no = 1;
$totalAvgVer = 0;
$zeroTotalAvgVer = 0;
  if(count($rsUserInfo)>0){ 

    for ($u=0;$u< count($rsUserInfo);$u++)
      { 

        // $rsQuestionsInfo = $objScorecardctsnew->FetchQuestionsData($rsUserInfo[$u]['db_surveyUserid']);
        $rsQuestionsInfo = $objScorecardctsnew->FetchQuestionsData($rsUserInfo[$u]);
         if(count($rsQuestionsInfo)>0){ 
                            
          $idArr = array();
                            
          for ($i=0;$i< count($rsQuestionsInfo);$i++)
          { 
           $noofcoach_attended =0;
            // echo "<pre>";
            // print_r($rsQuestionsInfo[$i]);
                              
            ?>
            <div class="creat_new_page_print"></div>
			<table id="" class="display-- new_print_display" style="width:100%; margin-bottom:87px;">
  
	<!---<colgroup width="68"></colgroup>
	<colgroup width="150"></colgroup>
	<colgroup width="148"></colgroup>
	<colgroup span="4" width="68"></colgroup>
	<colgroup width="71"></colgroup>
	<colgroup span="20" width="68"></colgroup>--->
	
	
	<colgroup width="10"></colgroup>
	<colgroup width="100"></colgroup>
	<colgroup width="10"></colgroup>
	<colgroup span="4" width="10"></colgroup>
	<colgroup width="10"></colgroup>
	<colgroup span="20" width="10"></colgroup>
	
		
	
		
		<tr class="no_br report_header2">
			<td colspan="28" height="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">"Score Card Platform Turnaround / Watering Of Coaches  "</span> </td>
   </tr>
   
   <tr class="no_br report_header2 " style="border-bottom: 1px solid #bfbfbf;">
      <td colspan="28" height="28" align="center" valign="bottom">
    
    SCORE CARD (TO BE FILED BY THE DEPOT HOUSE KEEPING INSPECTOR)  </td>
   </tr>
		
		<tr class="no_br"><td height="100" style=" height: 12px !important;"></td></tr>
		
		
		
	<tr class="no_br report_header2">
		<td colspan="28" height="28" align="center" valign="bottom">Agreement No :<span class="t_nas">xxxx</span>     dated  :<span class="t_nas">xxxx</span>     Name of Contractor :<span class="t_nas"><?php echo $objScorecardctsnew->getcommondata('baris_organization','db_Orgname','OrgID',$rsQuestionsInfo[$i][0]['OrgID']) ?></span>     Date of Inspection :<span class="t_nas" id="dateofinspection<?php echo $u.$i;?>">10-8-2020</span>  
		Name of Depot :<span class="t_nas"><?php echo $objScorecardctsnew->getcommondata('baris_station','stationName','stationId',$rsQuestionsInfo[$i][0]['db_surveyStationId']) ?></span>  </td> 
		</tr>
		
		<tr class="no_br report_header2">
	<td colspan="28" height="28" align="center" valign="bottom"> 
					
					Name of Supervisor :<span class="t_nas" id="auditorname<?php echo $u.$i;?>">xxxxx xxxxx</span>
					Train No. :<span class="t_nas" id="trainno<?php echo $u.$i;?>">75895</span>
					Time Work Started :<span class="t_nas" id="deptime<?php echo $u.$i;?>"></span>
					Time Work Completed :<span class="t_nas" id="timeworkcompleted<?php echo $u.$i;?>"></span>  
					
			</td> 
		</tr>
		
		
		
		<tr class="no_br report_header2">
      <td colspan="28" height="28" align="center" valign="bottom">  
	  No.of Caches in the rake :<span class="t_nas" id="noofcoach_intrain<?php echo $u.$i;?>"> xxxx xxxxx</span> 
	No.of Coaches attended :<span class="t_nas" id="noofcoach_attended<?php echo $u.$i;?>"> xxxx xxxxx</span> 
	   Division :<span class="t_nas" id=""><?php echo $objScorecardctsnew->getcommondata('baris_division','DivisionName','DivisionId',$rsQuestionsInfo[$i][0]['DivisionId']) ?></span> 
    <!-- Overall score :<span class="t_nas" id="totalscore_obtained<?php echo $u.$i;?>"></span>-->
  
      </td>
   </tr>
		
		<tr class="no_br"><td height="100" style=" height: 12px !important;"></td></tr>
	<tr>
		<td height="20" valign=middle>S.N.</td>
		<td  valign=middle>Coach srl No</td>
		<td valign=middle><br></td>
		<?php  
          $rsCoachList = $objScorecardctsnew->FetchCoachList($rsQuestionsInfo[$i][0]['tokenid']);
          /*for ($c=0;$c< count($rsCoachList);$c++)
          { ?>
            <th id="tbl-<?php echo $val;?>"><?php echo $rsCoachList[$c][0];?></th>
          } */

          for ($c=0;$c < 24;$c++){?>

          <td valign=middle sdval="<?php echo $c+1; ?>" sdnum="1033;"> C<?php echo $c+1; ?> <span class="c_num"><br><?php echo wordwrap(str_replace($rsCoachList[$c][0]." ","",$rsCoachList[$c][1]),6,"<br>\n",TRUE);?></span> </td>
        <?php } ?>
		
	</tr>
	
	<?php 
      $no = 1;
      $totalCountOfOne = 0;
      $totalCount = 0;
      $totalRatingBox = 0;
      $inaccessibleCount = 0;
      for ($j=0;$j< count($rsQuestionsInfo[$i]);$j++){ ?>
        <tr>
        <?php if($rsQuestionsInfo[$i][$j]['db_surveyPageId'] == 42){ ?>
        <td height="20" valign=middle><br></td>
        <?php } ?>
        
        
        <?php if ($rsQuestionsInfo[$i][$j]['db_surveyPageId'] == 42){?> 
          <td valign=middle>Watering of coaches</td>
          <?php }?>
       
        <td valign=bottom>
          <?php //echo $objScorecardctsnew->SelectBarisPageName($rsQuestionsInfo[$i][$j]['db_surveyPageId']);?>
          A1
        </td>
        <?php
          $totalScore = 0;

          //$rsCoachList = $objScorecardctsnew->FetchCoachList($rsQuestionsInfo[$i][0]['tokenid']);
          // echo "<pre>";
          // print_r($rsCoachList);
          //die;
          // for ($c=0;$c< count($rsCoachList);$c++)
          for ($c=0;$c < 24;$c++)
          {
          /*}
          foreach($rsParamIDS as $val) {*/
          	if(count($rsCoachList) > $c){

	             $avgVal = $objScorecardctsnew->FetchValueScore($rsQuestionsInfo[$i][$j]['db_surveyQuestionId'],$rsQuestionsInfo[$i][$j]['db_surveySubQuestionId'],'',$rsQuestionsInfo[$i][$j]['db_surveyPageId'],$rsQuestionsInfo[$i][$j]['tokenid'],$rsCoachList[$c][0]);
	        	
	             $totalRatingBox++;
	             $totalCount++;
	          	
	            if($avgVal == "no"){  
	          	  //$avgVal = 'no';
              }elseif($avgVal == "yes"){
	            	$totalCountOfOne++;
	            	$totalScore++;
                //$avgVal = "yes";
	          	} 
          	}else{
          		$avgVal ="-";
        	}

        	if($rsQuestionsInfo[$i][$j]['db_totalCoachCount'] <= $c)
          		$avgVal ="";

        	?>
          <td valign=middle><?php echo $avgVal;?></td>
      <?php } ?>
    </tr>
          <script>
            $("#dateofinspection<?php echo $u.$i;?>").html('<?php echo date("Y-m-d",strtotime($rsQuestionsInfo[$i][$j]['created_date']));?>');
            //$("#timeworkcompleted<?php echo $u.$i;?>").html('<?php echo date("h:m",strtotime($rsQuestionsInfo[$i][$j]['created_date']));?>');
            $("#auditorname<?php echo $u.$i;?>").html('<?php echo $rsQuestionsInfo[$i][$j]['db_username'];?>');
            $("#trainno<?php echo $u.$i;?>").html('<?php echo $rsQuestionsInfo[$i][$j]['db_trainno'];?>');
            //$("#deptime<?php echo $u.$i;?>").html('<?php echo $rsQuestionsInfo[$i][$j]['db_depart_time'];?>');
            $("#noofcoach_intrain<?php echo $u.$i;?>").html('<?php echo $rsQuestionsInfo[$i][$j]['db_totalCoachCount'];?>');
            $("#totalscore_obtained<?php echo $u.$i;?>").html('<?php echo round(($totalCountOfOne/$totalCount)*100,2); ?>%');
            //$("#score_inaccessible<?php echo $u.$i;?>").html('<?php echo round(($inaccessibleCount/$totalRatingBox)*100,2); ?>%');
          </script>
        <?php } ?>
        <?php
      $vertiScoreZero1 = 0;
      $vertiScoreX1 = 0;
      for ($c=0;$c < 24;$c++){ 
          
      $vertiScoreZero = 0;
      $vertiScoreX = 0;
      if(!empty($rsCoachList[$c][0])){
        for ($j=0;$j< count($rsQuestionsInfo[$i]);$j++)
        {
            $avgVal = $objScorecardctsnew->FetchValueScore($rsQuestionsInfo[$i][$j]['db_surveyQuestionId'],$rsQuestionsInfo[$i][$j]['db_surveySubQuestionId'],'',$rsQuestionsInfo[$i][$j]['db_surveyPageId'],$rsQuestionsInfo[$i][$j]['tokenid'],$rsCoachList[$c][0]);
            if($avgVal == "0"){
              $vertiScoreZero++;
            } 
            if($avgVal == "X"){
              $vertiScoreX++;
            } 
        }
        if($vertiScoreZero==1){
          $vertiScoreZero1++;
        }
        if($vertiScoreX==1){
          $vertiScoreX1++;
        }
      }
      ?>

    <?php  } 
    //echo "zeros".$vertiScoreZero1;
    //echo "xs".$vertiScoreX1;

    ?>
   <script type="text/javascript">
            $("#noofcoach_attended<?php echo $u.$i;?>").html('<?php echo count($rsCoachList)-($vertiScoreZero1+$vertiScoreX1);?>');
   </script>
	
		<tr class="no_br"><td height="100" style=" height: 12px !important;"></td></tr>
		<tr class="comments">
		
      <td colspan="28" height="28" align="center" valign="top" style="  border: 1px solid #000; height: 160px !important; width: 100% !important;  text-align: left;  margin-top: 23px !important;">  
	&nbsp;&nbsp;Comments
      </td>
	 
   </tr>
		<tr class="no_br report_header2" style="">
      <td colspan="28" height="28" align="center" valign="bottom" style=" padding-top: 28px !important;">
		  <span class="t_nas" id="" style=" padding: 13px 32px; margin-right: 20%;">Sig. Rly Contractor </span>
		  <span class="t_nas" id="" style="padding: 13px 32px; margin-left: 20%;">Sig. Rly Authority</span> 
	  </td>
</tr>

 
		
</table>
<?php }
        }
          }       
           }?> 
                      
 </div> 
				 
								
</div> 
				 
				   
				    
					
					</div> 
					
					
					
                <?php }else{ ?>

                  <!----NEWCTS-start---->
                     <center>
					 <img class="report_sch_img" src="http://baris.beatleanalytics.com/theme/black/dist/img/searchfeedback4.jpg" 
					 style="width:100%;"> </center>
								

								<!----NEWCTS-End----> 

                                    <?php } ?>
                        </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>
	
	
    <!-- page script -->
    <script>
        $(document).ready(function() {
            /**   $('#question_report').append('<caption style="caption-side: bottom">A fictional company\'s staff table.</caption>');
              $('#question_report').append('<caption style="caption-side: top">A fictional company\'s staff table.</caption>');****/

            $('#question_report').DataTable({
                scrollY: "900px",
                scrollX: true,
                footer: true,
                scrollCollapse: true,
                paging: true,
                dom: 'Bfrtip',
                lengthMenu: [
                    [10, 20, 30, -1],
                    ['10 rows', '20 rows', '30 rows', 'Show all']
                ],
				
                buttons: [{
                        extend: 'pageLength',
                        footer: true
                    },
                    

                    {
                        extend: 'print',
                        footer: true,
                        messageTop: '<center class="print_title" style="font-size: 20px;"><p><span style=" margin-right: 30px;">Date of Inspection : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">02/01/2020</b></span><span style=" margin-right: 30px;">Auditor : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">gautam prajapati</b></span><span style=" margin-right: 30px;">Train No. : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">54820</b></span> <span style=" margin-right: 30px;">Dep.Time : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">5:50</b></span> </p><p><span style=" margin-right: 30px;">No.of Coaches Attended by contractor  : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">224</b></span> <span style=" margin-right: 30px;">Total No. of Coaches in the train : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">24</b></span>  </p> <p><span style=" margin-right: 30px;">Total Scores obtained : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">80%</b></span><span style=" margin-right: 30px;">Inaccessible : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">10%</b></span></p></center>',
                        messageBottom: '<BR><BR><P style="width:80%; margin:0 auto; font-size: 20px;"><span class="pull-left"  style="    border-bottom: 1px solid #656565dd;  height: 49px;  padding: 0 84px 0 84px;  float: left !IMPORTANT;">Sig. Rly Authority----</span><span class="pull-right" style="    border-bottom: 1px solid #656565dd;  height: 49px;  padding: 0 84px 0 84px;  float: right !IMPORTANT;">Sig. Rly Contractor---</span></P> '
                    },

                ]

            });
        });
    </script>

 
    <script>
        $(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>

   

 
     <!---16-3-2020--->
	
   
    <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>
    <!--//creat_new_page_print -->


    <script>
        $(document).ready(function() {
            /**   $('#question_report').append('<caption style="caption-side: bottom">A fictional company\'s staff table.</caption>');
              $('#question_report').append('<caption style="caption-side: top">A fictional company\'s staff table.</caption>');****/

            $('.display').DataTable({
                scrollY: "900px",
                scrollX: true,
                footer: true,
                scrollCollapse: true,
                paging: false,
                dom: 'Bfrtip',
               

                buttons: [{
                        extend: false,
                        footer: true
                    },
                  

                    {
                        extend: 'print',
                        footer: true,
                        messageTop: '<center class="print_title" style="font-size: 20px;"><p><span style=" margin-right: 30px;">Date of Inspection : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">02/01/2020</b></span><span style=" margin-right: 30px;">Auditor : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">1</b></span><span style=" margin-right: 30px;">Train No. : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">54820</b></span> <span style=" margin-right: 30px;">Dep.Time : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">5:50</b></span> </p><p><span style=" margin-right: 30px;">No.of Coaches Attended by contractor  : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">224</b></span> <span style=" margin-right: 30px;">Total No. of Coaches in the train : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">24</b></span>  </p> <p><span style=" margin-right: 30px;">Total Scores obtained : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">80%</b></span><span style=" margin-right: 30px;">Inaccessible : <b style="    border-bottom: 1px solid;padding: 0 33px 0 4px;">10%</b></span></p></center>',
                        messageBottom: '<p><b>Note : </b> Please give marks for each item as either 0 or 1 or X "_". All items as above which are inaccessible should be marked "X" and shall not be counted in total score </p><br><p> <b>Item not available should be marked "_". No column should be left blank</b> </p> <p class="reason_w100" style=" width: 100%;     display: inline-block"><div class="cn_reason" style="float: left; width:23%;padding: 0px;margin: 0 16px 0 0;border: 1px solid #ddd;height: 70px;text-align: left;"><div class="c_num" style="border: none; float: left; text-align: left; width: 85px; MARGIN: 0PZ; margin: 0px; padding: 5px 3px 4px 5px; height: 23px;">Coach No : </div ><div class="c_reason" style="float: left; width: 76px; padding: 0px; margin: 0px; height: 20px;border-bottom: 1px solid #656565dd;"></div> </div><div class="cn_reason" style="float: left; width:23%;padding: 0px;margin: 0 16px 0 0;border: 1px solid #ddd;height: 70px;text-align: left;"><div class="c_num" style="border: none; float: left; text-align: left; width: 85px; MARGIN: 0PZ; margin: 0px; padding: 5px 3px 4px 5px; height: 23px;">Coach No : </div ><div class="c_reason" style="float: left; width: 76px; padding: 0px; margin: 0px; height: 20px;border-bottom: 1px solid #656565dd;"></div> </div><div class="cn_reason" style="float: left; width:23%;padding: 0px;margin: 0 16px 0 0;border: 1px solid #ddd;height: 70px;text-align: left;"><div class="c_num" style="border: none; float: left; text-align: left; width: 85px; MARGIN: 0PZ; margin: 0px; padding: 5px 3px 4px 5px; height: 23px;">Coach No : </div ><div class="c_reason" style="float: left; width: 76px; padding: 0px; margin: 0px; height: 20px;border-bottom: 1px solid #656565dd;"></div> </div><div class="cn_reason" style="float: left; width:23%;padding: 0px;margin: 0 16px 0 0;border: 1px solid #ddd;height: 70px;text-align: left;"><div class="c_num" style="border: none; float: left; text-align: left; width: 85px; MARGIN: 0PZ; margin: 0px; padding: 5px 3px 4px 5px; height: 23px;">Coach No : </div ><div class="c_reason" style="float: left; width: 76px; padding: 0px; margin: 0px; height: 20px;border-bottom: 1px solid #656565dd;"></div> </div></p> <BR><BR><P style="padding-top: 50px; width:80%; margin:0 auto; font-size: 20px;"><span class="pull-left"  style="    border-bottom: 1px solid #656565dd;  height: 49px;  padding: 0 84px 0 84px;  float: left !IMPORTANT;">Sig. Rly Authority</span><span class="pull-right" style="    border-bottom: 1px solid #656565dd;  height: 49px;  padding: 0 84px 0 84px;  float: right !IMPORTANT;">Sig. Rly Contractor<span></P> '
                    },

                ]

            });
        });
    </script>

   <style>
        table.dataTable thead .sorting_asc {
            background-image: url(<?php echo $curImagePath?>/dist/img/sort_asc.png) !IMPORTANT;
        }
		 table.dataTable thead .sorting_desc {
            background-image: url(<?php echo $curImagePath?>/dist/img/sort_desc.png) !IMPORTANT;
        }
        
        table.dataTable thead .sorting {
            background-image: url(<?php echo $curImagePath?>/dist/img/sort_both.png) !IMPORTANT;
        }
		.dt-buttons button:first-child {display: none;}
   </style>
    <!---//16-3-2020--->
	
	
	
	
	<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>
 <style> 
 @media print {
    .new_print_display { page-break-after: always; }
}
 </style>
 
<style>
	@page {size: A4 landscape;}
	</style>