UnknownSec Bypass
403
:
/
var
/
www
/
cotutilitydash
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
graphical_consumption_report.php
<?php include "header.php"?> <?php include "sidemenu.php"?> <?php $query = " select * from permissiontb where formname='graphical_consumption_report.php' and userid='".$_SESSION['userid']."' and isdeleted=0"; $result = mysqli_query($conn, $query); while ($row=mysqli_fetch_array($result)) { $data["show"] = $row["pshow"]; } if($data["show"]==1) { }else{ ?> <script type='text/javascript'> window.location.href = 'dashboard.php' </script> <?php } ?> <div id="page-wrapper"> <div class="col-md-12 graphs"> <div class="xs"> <h3>Graphical Consumption Report</h3> <input type="hidden" class="form-control1" id="hdid" name="hdid"> <div class="well1 white"> <fieldset> <div class="form-group"> <div class="row"> <div class="col-md-12"> <label class="control-label">Select Graph</label> <select class="form-control1 ng-invalid ng-invalid-required" ng-model="model.select" required="" id="graph" name="graph"> <option value="Select Graph">Select Graph</option> <option value="Pie Chart">Pie Chart</option> <option value="Histogram">Histogram</option> </select> </div> </div> <br> <div class="row"> <div class="col-md-6 grid_box1"> <label class="control-label">Select Area</label> <select class="form-control1 ng-invalid ng-invalid-required" ng-model="model.select" required="" id="area" name="area" onchange="getequipment(this.value,'');"> </select> </div> <div class="col-md-6"> <label class="control-label">Select Equipmenr</label> <select class="form-control1 ng-invalid ng-invalid-required" ng-model="model.select" required="" id="equipment" name="equipment" onchange="getsubarea(this.value,'');"> </select> </div> <div class="clearfix"> </div> </div> </div> <div class="form-group"> <div class="row"> <div class="col-md-6 grid_box1"> <label class="control-label">Select Sub Area</label> <select class="form-control1 ng-invalid ng-invalid-required" ng-model="model.select" required="" id="subarea" name="subarea[]" multiple="multiple"> </select> </div> <div class="clearfix"> </div> </div> </div> <div class="form-group"> <div class="row"> <div class="col-md-6 grid_box1"> <label class="control-label">From Date</label> <input type="date" id="txtfromdate" name="txtfromdate" class="form-control1" placeholder="from date"> </div> <div class="col-md-6"> <label class="control-label">To Date</label> <input type="Date" id="txttodate" name="txttodate" class="form-control1" placeholder="To Date"> </div> <div class="clearfix"> </div> </div> </div> <div class="form-group"> <button type="submit" class="btn btn-primary" id="btnsave" onclick="show();">SHOW</button> <button type="reset" class="btn btn-default" id="btnreset" onclick="reset();">Reset</button> </div> </fieldset> </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(drawChart); } 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 inputField2 = document.getElementById("equipment"); if (inputField2.value == "Select Equipment") { flag = false; alert("Please select equipment."); document.getElementById("equipment").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 equipment = document.getElementById("equipment").value; var foo = $('#subarea').val(); var subarea=foo.toString(); var fromdate = document.getElementById("txtfromdate").value; var todate = document.getElementById("txttodate").value; var graph = document.getElementById("graph").value; $.ajax({ type: "Post", url: "get_graphreport.php", data: '&area=' + area +'&equipment=' + equipment + '&subarea=' + subarea + '&fromdate=' + fromdate + '&todate=' + todate, dataType: "JSON", success: function(res) { if (graph == "Pie Chart") { window.location.href = "piechartdisplay.php"; } else if (graph == "Histogram") { window.location.href = "histogram_graphreport.php"; } } }); } function getequipment(val,val1) { var sel = $("#equipment"); sel.empty(); $.ajax({ type: "Post", url: "get_userwise_equipment.php", data: '&area=' + val, success: function(res) { var data = JSON.parse(res); $("#equipment").append('<option>Select Equipment</option>'); for (var i = 0; i < data.length; i++) { if (data[i].tname == val1) { 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); } }); } function getsubarea(equipment,val) { var area = document.getElementById("area").value; var sel = $("#subarea"); sel.empty(); $.ajax({ type: "Post", url: "get_userwise_subarea.php", data: '&area=' + area+'&equipment=' + equipment, success: function(res) { var data = JSON.parse(res); $("#subarea").append('<option selected=true></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>'); } } } }); } function getarea(val) { $.ajax({ type: "Post", url: "get_userwise_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() { getarea(""); }); </script> <?php include "footer.php"?>
Copyright © 2025 - UnknownSec