Delete main.php

parent 2b16741c
<?php
$servername = "localhost";
$username = "root";
$password = "";
$database = "inteljr";
// Create connection
$conn = mysqli_connect($servername, $username, $password,$database);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>IntelJr</title>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart1);
function drawChart1() {
var data = google.visualization.arrayToDataTable([
['class Name','Students'],
<?php
$query = "SELECT * from class";
$exec = mysqli_query($conn,$query);
while($row = mysqli_fetch_array($exec)){
echo "['".$row['class_name']."',".$row['students']."],";
}
?>
]);
var options = {
title: 'Number of Students according to their class',
pieHole: 0.5,
pieSliceTextStyle: {
color: 'black',
},
legend: 'none'
};
var chart = new google.visualization.PieChart(document.getElementById('chart_div1'));
chart.draw(data, options);
}
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart2);
function drawChart2() {
var data = google.visualization.arrayToDataTable([
['Year', 'Skills', 'Expenses'],
['2013', 1000, 400],
['2014', 1170, 460],
['2015', 660, 1120],
['2016', 1030, 540]
]);
var options = {
title: 'Students Performance',
hAxis: {title: 'Year', titleTextStyle: {color: '#333'}},
vAxis: {minValue: 0}
};
var chart = new google.visualization.AreaChart(document.getElementById('chart_div2'));
chart.draw(data, options);
}
// Reminder: you need to put https://www.google.com/jsapi in the head of your document or as an external resource on codepen //
</script>
</head>
<body>
<div class="container-fluid mt-4">
<h2>Welcome, Bhagya!</h2>
<hr>
<p class="lead mt-4">Dashboard</p>
<div class="row">
<div class="col-md-3">
<div class="card-counter primary">
<i class="fa fa-users"></i>
<span class="count-numbers">256</span>
<span class="count-name">Users</span>
</div>
</div>
<div class="col-md-3">
<div class="card-counter danger">
<i class="fa fa-file"></i>
<span class="count-numbers">599</span>
<span class="count-name">Activities</span>
</div>
</div>
<div class="col-md-3">
<div class="card-counter success">
<i class="fa fa-comment"></i>
<span class="count-numbers">6503</span>
<span class="count-name">Comments</span>
</div>
</div>
<div class="col-md-3">
<div class="card-counter info">
<i class="fa fa-tasks"></i>
<span class="count-numbers">35</span>
<span class="count-name">Pending tasks</span>
</div>
</div>
</div>
<hr>
<p class="lead mt-4">Analytics Charts</p>
<div class="row">
<div class="clearfix"></div>
<div class="col-md-6">
<div id="chart_div1" class="chart mx-auto d-block"></div>
</div>
<div class="col-md-6">
<div id="chart_div2" class="chart mx-auto d-block"></div>
</div>
</div>
</div>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment