public function getTeam() { return TeamData::getById($this->team_id); }
<?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) {
<?php $user = TeamData::getById($_GET["id"]); $user->del(); print "<script>window.location='index.php?view=teams';</script>";
<?php if (count($_POST) > 0) { $user = TeamData::getById($_POST["team_id"]); $user->name = $_POST["name"]; $user->is_favorite = isset($_POST["is_favorite"]) ? 1 : 0; $user->update(); print "<script>window.location='index.php?view=teams';</script>"; }
<?php $user = $params["user"]; $team_id = $params["team_id"]; $team = TeamData::getById($team_id); $url = "storage/teams/" . $team->id . "/" . $team->image; $gotourl = ""; $gotourl = "./?view=team&id=" . $team->id; ?> <div class="well"> <div class="row"> <div class="col-md-4"> <?php if ($team->image != "") { ?> <img src="<?php echo $url; ?> " class="img-responsive img-thumbnail"> <?php } else { ?> [No hay Imagen] <?php } ?> </div> <div class="col-md-8"> <h5><a href="<?php echo $gotourl; ?>
<?php if (!empty($_POST)) { $profile = TeamData::getById($_SESSION["user_id"]); $profile->title = $_POST["title"]; $profile->description = $_POST["description"]; $image = new Upload($_FILES["image"]); if ($image->uploaded) { $image->Process("storage/teams/" . $_POST["team_id"] . "/"); if ($image->processed) { $profile->image = $image->file_dst_name; } else { echo "Error: " . $image->error; } } $profile->update(); Core::redir("./?view=editteam&id={$_POST['team_id']}"); }
<?php $sucursal = TeamData::getById($_GET["id"]); ?> <div class="page-content"> <!-- Header Bar --> <?php Action::load("header"); ?> <!-- End Header Bar --> <div class="row"> <div class="col-lg-12"> <h2><?php echo $sucursal->name; ?> </h2> <div class="widget"> <div class="widget-title"> <i class="fa fa-male"></i> Departamento </div> <div class="widget-body"> <form class="form-horizontal" role="form" method="post" action="./?r=team/upd"> <div class="form-group"> <label for="inputEmail1" class="col-lg-2 control-label">Nombre</label> <div class="col-lg-10"> <input type="text" name="name" value="<?php echo $sucursal->name;