Exemplo n.º 1
0
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\RegisterStudent\Controller\RegisterStudentController as RegisterStudent;
$class = $_GET["class"];
$view = new RegisterStudent();
$fields = $view->getTableFields();
$students = $view->getStudents($class);
?>
          <table id="example1" class="table table-bordered table-striped">
            <thead>
              <tr>
                <?php 
foreach ($fields as $field) {
    $name = $field["Name"];
    echo "<th>{$name}</th>";
}
?>
              </tr>
            </thead>
            <tbody>
              <?php 
foreach ($students as $student) {
    if (isset($student[0])) {
        $student = $student[0];
    }
    for ($i = 2; $i < count($student) / 2; $i++) {
        if (isset($student[$i])) {
            echo "<td>{$student[$i]}</td>";
        }
    }
Exemplo n.º 2
0
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\RegisterStudent\Controller\RegisterStudentController as RegisterStudent;
$view = new RegisterStudent();
$fields = $view->getTableFields();
$students = $view->getStudents();
?>
<section class="content">
  <div class="row">
    <div class="col-xs-12">
        <div class="box">
        <div class="box-header">
          <h3 class="box-title">You Can Use The Search Form To Filter Data On This Page</h3>
        </div><!-- /.box-header -->
        <div class="box-body">
          <table id="example1" class="table table-bordered table-striped">
            <thead>
              <tr>
                <?php 
foreach ($fields as $field) {
    $name = $field["Name"];
    echo "<th>{$name}</th>";
}
?>
              </tr>
            </thead>
            <tbody>
              <?php 
foreach ($students as $student) {
    echo "<tr>";
Exemplo n.º 3
0
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\RegisterStudent\Controller\RegisterStudentController as RegisterStudent;
$rs = new RegisterStudent();
$result = $rs->getStudents("'1'");