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) {
<div class="row"> <div class="col-md-12"> <div class="btn-group pull-right"> <a href="index.php?view=newteam" class="btn btn-default"><i class='fa fa-th-list'></i> Nuevo Grupo</a> </div> <h1>Grupos Favoritos</h1> <br> <?php $teams = TeamData::getFavoritesByUserId($_SESSION["user_id"]); if (count($teams) > 0) { // si hay usuarios ?> <table class="table table-bordered table-hover"> <thead> <th></th> <th>Nombre</th> <th></th> </thead> <?php foreach ($teams as $team) { ?> <tr> <td style="width:130px;"><a href="index.php?action=selectteam&id=<?php echo $team->id; ?> " class="btn btn-default btn-xs">Seleccionar <i class="fa fa-arrow-right"></i></a></td> <td><a href="./?view=team&id=<?php echo $team->id; ?> "><?php
<div class="row"> <div class="col-md-12"> <div class="btn-group pull-right"> <a href="index.php?view=newteam" class="btn btn-default"><i class='fa fa-th-list'></i> Nuevo Grupo</a> </div> <h1>Grupos</h1> <br> <?php $teams = TeamData::getAllByUserId($_SESSION["user_id"]); if (count($teams) > 0) { // si hay usuarios ?> <table class="table table-bordered table-hover"> <thead> <th></th> <th>Nombre</th> <th></th> </thead> <?php foreach ($teams as $team) { ?> <tr> <td style="width:130px;"><a href="index.php?action=selectteam&id=<?php echo $team->id; ?> " class="btn btn-default btn-xs">Seleccionar <i class="fa fa-arrow-right"></i></a></td> <td><a href="./?view=team&id=<?php echo $team->id; ?> "><?php
<?php $user = TeamData::getById($_GET["id"]); $user->del(); print "<script>window.location='index.php?view=teams';</script>";
Sugerencia </label> </div> </div> <div class="col-lg-3"> <div class="radio"> <label> <input type="radio" name="kind" value="3" required> Agradecimiento </label> </div> </div> </div> <?php $teams = TeamData::getAll(); ?> <div class="form-group"> <label for="inputPassword1" class="col-lg-3 control-label">Departamento</label> <div class="col-lg-9"> <select name="team_id" class="form-control" required="required"> <option value="">-- SELECCIONE DEPARTAMENTO --</option> <?php foreach ($teams as $team) { ?> <option value="<?php echo $team->id; ?> "><?php echo $team->name; ?>
<?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 if (!empty($_POST) && isset($_SESSION["user_id"])) { $t = new TeamData(); $t->title = $_POST["title"]; $t->user_id = $_SESSION["user_id"]; $ti = $t->add(); Core::redir("./?view=team&id=" . $ti[1]); } Core::redir("./");
<?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 (count($_POST) > 0) { $user = new TeamData(); $user->name = $_POST["name"]; $user->is_favorite = isset($_POST["is_favorite"]) ? 1 : 0; $user->user_id = $_SESSION["user_id"]; $user->add(); print "<script>window.location='index.php?view=teams';</script>"; }
<?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 $persons = TeamData::getAll(); ?> <div class="page-content"> <!-- Header Bar --> <?php Action::load("header"); ?> <!-- End Header Bar --> <div class="row"> <div class="col-lg-12"> <a href="./?r=team/new" class="btn btn-default pull-right">Agregar Departamento</a> <h1>Departamentos</h1> <?php if (count($persons) == 0) { ?> <p class="alert alert-danger">No hay Departamentos</p> <?php } ?> <div class="widget"> <div class="widget-title"> <i class="fa fa-th-list"></i> Departamentos </div> <div class="widget-body no-padding"> <div class="table-responsive"> <?php
<?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;