Exemplo n.º 1
0
      <div class="medium-12 columns field" style="padding: 0;">
        <h5 style="text-align: center;">Gegevens</h5>
        <table style="width: 100%; margin:0;">
          <tr>
            <th width="80%">Inschrijvingen</th>
            <th>Aantal</th>
          </tr>

          <?php 
require_once 'resources/includes/MySQL_Manager.php';
$mysql = new MySQL_Manager();
try {
    $mysql->connect();
    $results = $mysql->getSubsByDay();
    $mysql->closeConnection();
    $vrijdag = 0;
    $zaterdag = 0;
    $beide = 0;
    $les = 0;
    $i = 0;
    while ($row = mysql_fetch_row($results)) {
        /*echo "<tr>";
          echo "<td>$row[0] $row[1]</td>";
          echo "<td style=\"text-align: center\">$row[2]</td>";
          echo "</tr>";*/
        if ($row[0] && $row[1]) {
            $beide++;
        } elseif ($row[0]) {
            $vrijdag++;
        } elseif ($row[1]) {
Exemplo n.º 2
0
<?php

if (is_string($_POST["password"])) {
    $config = (include 'config.php');
    if ($_POST["password"] == $config["results-password"]) {
        $mode = 0;
        // Correct password
        require_once 'sql/MySQL_Manager.php';
        $mySQL = new MySQL_Manager();
        $results = $mySQL->getExamPoll_SQL()->get_results();
        $mySQL->closeConnection();
        $vote_options = (include 'options.php');
    } else {
        $mode = 1;
        // Wrong password
    }
} else {
    $mode = 2;
    // No password yet
}
?>

<!DOCTYPE html>
<html>
  <head>
    <title>Poll resultaten</title>
    <link type="text/css" rel="stylesheet" href="foundation/css/foundation.css">
    <link type="text/css" rel="stylesheet" href="foundation/css/exampoll.css">
    <script src="chartjs/Chart.js"></script>
    <meta charset='utf-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>