Пример #1
0
<?php

$alumn = AlumnData::getById($_GET["id"]);
$teams = AlumnTeamData::getAllByAlumnId($_GET["id"]);
$allteams = TeamData::getAllByUserId($_SESSION["user_id"]);
$found = false;
$txs = array();
foreach ($allteams as $t) {
    $txs[] = $t->id;
}
$tys = array();
foreach ($teams as $t) {
    $tys[] = $t->team_id;
}
$tzs = array_diff($txs, $tys);
if (empty($tzs)) {
    $found = false;
} else {
    $found = true;
}
?>
<div class="row">
	<div class="col-md-12">
		<h1><?php 
echo $alumn->name . " " . $alumn->lastname;
?>
</h1>
<!-- Single button -->
<div class="btn-group">
  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
    Agregar al Grupo <span class="caret"></span>
Пример #2
0
<?php

include "../core/autoload.php";
include "../core/modules/index/model/TeamData.php";
include "../core/modules/index/model/AlumnTeamData.php";
include "../core/modules/index/model/AlumnData.php";
include "../core/modules/index/model/BlockData.php";
include "../core/modules/index/model/CalificationData.php";
require_once '../PhpWord/Autoloader.php';
use PhpOffice\PhpWord\Autoloader;
use PhpOffice\PhpWord\Settings;
Autoloader::register();
$word = new PhpOffice\PhpWord\PhpWord();
$blocks = BlockData::getAllByTeamId($_GET["team_id"]);
$team = TeamData::getById($_GET["team_id"]);
$alumns = AlumnTeamData::getAllByTeamId($_GET["team_id"]);
$section1 = $word->AddSection();
$section1->addText("CALIFICACIONES - " . strtoupper($team->name), array("size" => 22, "bold" => true, "align" => "right"));
$styleTable = array('borderSize' => 6, 'borderColor' => '888888', 'cellMargin' => 40);
$styleFirstRow = array('borderBottomColor' => '0000FF', 'bgColor' => 'AAAAAA');
$table1 = $section1->addTable("table1");
$table1->addRow();
$table1->addCell()->addText("Nombre Completo");
foreach ($blocks as $block) {
    $table1->addCell()->addText($block->name);
}
foreach ($alumns as $al) {
    $alumn = $al->getAlumn();
    $table1->addRow();
    $table1->addCell(5000)->addText($alumn->name . " " . $alumn->lastname);
    foreach ($blocks as $block) {
Пример #3
0
<?php

if (count($_POST) > 0) {
    $user = new AlumnData();
    $user->name = $_POST["name"];
    $user->lastname = $_POST["lastname"];
    $user->address = $_POST["address"];
    $user->email = $_POST["email"];
    $user->phone = $_POST["phone"];
    $user->c1_fullname = $_POST["c1_fullname"];
    $user->c1_address = $_POST["c1_address"];
    $user->c1_phone = $_POST["c1_phone"];
    $user->c1_note = $_POST["c1_note"];
    $user->user_id = $_SESSION["user_id"];
    $u = $user->add();
    $at = new AlumnTeamData();
    $at->alumn_id = $u[1];
    $at->team_id = $_POST["team_id"];
    $at->add();
    print "<script>window.location='index.php?view=team&id={$_POST['team_id']}';</script>";
}