Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
20_21-J09
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
20_21-J09
20_21-J09
Commits
2b16741c
Commit
2b16741c
authored
Nov 08, 2020
by
IT17176798_Bhagya Dilhara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main.php file added
parent
43ef02e4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
155 additions
and
0 deletions
+155
-0
main.php
main.php
+155
-0
No files found.
main.php
0 → 100644
View file @
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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment