UnknownSec Bypass
403
:
/
var
/
www
/
cotutilitydash
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
piechartdisplay.php
<?php include "header.php"?> <?php include "sidemenu.php"?> <div id="page-wrapper"> <div class="col-md-12 graphs"> <div class="xs"> <table width="100%"> <tr> <td width="50%"> <h3>Chart Reports</h3> </td> <td width="50%" align="right"> <a class="btn btn-primary" href="graphical_consumption_report.php" style="margin: 5px"><i class="fa fa-list"></i> Back To Chart Filter</a> </td> </tr> </table> <div class="bs-example4 tab-content" data-example-id="simple-responsive-table"> <div id="piechart" style="width: 900px; height: 500px;"></div> <?php require_once "config.php"; // $query="Select * from tempconsumptiontb"; $totalconsumption=0; $query="Select DATE_FORMAT(consumptiondate,'%d-%m-%Y') as consumptiondate,area,subarea,totalconsumption from tempconsumptiontb where userid='".$_SESSION['userid']."'"; $fire=mysqli_query($conn,$query); while ($result=mysqli_fetch_assoc($fire)) { // code... $totalconsumption=$totalconsumption+ $result['totalconsumption']; } //echo $totalconsumption; ?> <div align="right"> <h3> <label class="control-label" id="lbltotalconsumption" > Total Consumption : <?php echo $totalconsumption ?></label> </h3> </div> </div> </div> <!-- <div class="xs"> <h3> Pie Chart Consumption Reports</h3> <table width="100%"> <tr> <td width="50%"> </td> <td width="50%" align="right"> <a class="btn btn-primary" href="graphical_consumption_report.php" style="margin: 5px"><i class="fa fa-list"></i> Back To Pic Chart Filter</a> </td> </tr> </table> <div class="bs-example4 tab-content" data-example-id="simple-responsive-table"> </div> </div> --> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script> function reset() { window.location.href = "graphical_consumption_report.php"; $('#area').val(""); $('#subarea').val(""); } function show() { google.charts.load('current', { 'packages': ['corechart'] }); google.charts.setOnLoadCallback(draw); } function draw() { var data = google.visualization.arrayToDataTable([ ['subarea', 'TotalConsumption'], <?php require_once "config.php"; $query="Select * from tempconsumptiontb"; $fire=mysqli_query($conn,$query); while ($result=mysqli_fetch_assoc($fire)) { // code... $sub=$result['consumptiondate'].' '.$result['subarea']; echo "['".$sub."',".$result['totalconsumption']."],"; } ?> ]); var options = { title: 'Pie Chart Report', is3D: true, }; var chart = new google.visualization.PieChart(document.getElementById('piechart')); chart.draw(data, options); } function drawChart() { var flag = true; var inputField1 = document.getElementById("area"); if (inputField1.value == "Select Area") { flag = false; alert("Please select area."); document.getElementById("area").focus(); return false; } var inputField3 = document.getElementById("txtfromdate"); if (inputField3.value == "") { flag = false; alert("Please select from date."); document.getElementById("txtfromdate").focus(); return false; } var inputField4 = document.getElementById("txttodate"); if (inputField4.value == "") { flag = false; alert("Please select to date."); document.getElementById("txttodate").focus(); return false; } var area = document.getElementById("area").value; //var subarea = document.getElementById("subarea").value; var fromdate = document.getElementById("txtfromdate").value var todate = document.getElementById("txttodate").value $.ajax({ type: "Post", url: "get_graphreport.php", data: '&area=' + area + '&fromdate=' + fromdate + '&todate=' + todate, dataType: "JSON", success: function(res) { } }); } function getarea(val) { $.ajax({ type: "Post", url: "get_area.php", success: function(res) { var data = JSON.parse(res); var sel = $("#area"); sel.empty(); $("#area").append('<option>Select Area</option>'); for (var i = 0; i < data.length; i++) { if (data[i].tname == val) { sel.append('<option value="' + data[i].tname + '" selected=true>' + data[i] .tname + '</option>'); } else { sel.append('<option value="' + data[i].tname + '">' + data[i].tname + '</option>'); } } // $('#particular').editableSelect(); /// $("#state").html(data); } }); } $(document).ready(function() { show(); }); </script> <?php include "footer.php"?>
Copyright © 2025 - UnknownSec