Created
July 7, 2017 13:38
-
-
Save AladinDridi/f180cb605dc37d063ba8d51be7a5e2f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('select_projects.php'); | |
$projects=utf8_encode($option2); | |
$host="localhost"; | |
$user="root"; | |
$pass=""; | |
$db="calendar"; | |
$connect=mysqli_connect($host,$user,$pass,$db); | |
if(isset($_POST['stat'])&&($_POST)){ | |
$name=$_POST['stat']; | |
$query = "SELECT status, count(*) as number FROM taches WHERE projets='$name' GROUP BY status"; | |
$result =mysqli_query($connect, $query); | |
} else{ | |
echo "non selectionnement encore"; | |
} | |
?> | |
<html> | |
<header> | |
<meta charset="utf-8"> | |
<title>Login</title> | |
<!-- Bootstrap Core CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | |
<!-- FullCalendar --> | |
<link href='css/fullcalendar.css' rel='stylesheet' /> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> | |
<script type="text/javascript"> | |
google.charts.load('current', {'packages':['corechart']}); | |
google.charts.setOnLoadCallback(drawChart); | |
function drawChart() | |
{ | |
var data = google.visualization.arrayToDataTable([ | |
['Gender', 'Number'], | |
<?php | |
while($row = mysqli_fetch_array($result)) | |
echo "['".utf8_encode($row["status"])."', ".$row["number"]."],"; | |
?> | |
]); | |
var options = { | |
title: 'Taux avancement', | |
//is3D:true, | |
pieHole: 0.4 | |
}; | |
var chart = new google.visualization.PieChart(document.getElementById('piechart')); | |
chart.draw(data, options); | |
} | |
</script> | |
<!-- Custom CSS --> | |
<style> | |
body { | |
padding-top: 70px; | |
/* Required padding for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */ | |
} | |
form{ | |
margin-bottom: 150px; | |
} | |
</style> | |
</header> | |
<body> | |
<!-- Navigation --> | |
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> | |
<div class="container"> | |
<!-- Brand and toggle get grouped for better mobile display --> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> | |
<span class="sr-only"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</button> | |
<a class="navbar-brand" href="index2.php">Calendrier</a> | |
</div> | |
<!-- Collect the nav links, forms, and other content for toggling --> | |
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> | |
<ul class="nav navbar-nav"> | |
<li> | |
<a href="subscription.php">Ajouter utilisateur</a> | |
</li> | |
</ul> | |
</div> | |
<!-- /.navbar-collapse --> | |
</div> | |
<!-- /.container --> | |
</nav> | |
<div class="btn-group"> | |
<button onclick="document.location.href='taches.php'" class="btn"> tâches</button> | |
</div> | |
<div class="container"> | |
<div class="col-lg-4"></div> | |
<div class="col-lg-4"></div> | |
<div class="col-lg-4"></div> | |
<div class="jumborton" style="margin-top:150px;"> | |
</div> | |
<h2 style="text-align:center;">Ajoutez un projet</h2> | |
<div class="form-group"> | |
<form method="post"> | |
<label for="stat">selectionnez</label> | |
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span> | |
<select name="stat" class="form-control"> | |
<?php echo $projects; ?> | |
</select> | |
<Button type="submit" class="btn btn-primary form-control" name="submit">afficher </Button> | |
</form> | |
</div> | |
</div> | |
<div class="col-lg-4"></div> | |
<div id="piechart"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment