public function show($id)
 {
     try {
         $iteration = Iterations::findOrFail($id);
         $iterations = Iterations::where('projectid', '=', $iteration->projectid)->get();
         $project = Project::findOrFail($iteration->projectid);
         $issues = Issue::where('iterationid', '=', $id)->get();
         //$issues = $iteration->issues;
         $countIssues = sizeof($issues);
         $categories = Category::all();
         $idCategory = 0;
         $totalPoints = $issues->sum('points');
         $materiales = Material::all();
         $personal = PersonalType::all();
         $team = Teams::where('projectid', '=', $project->id)->get()->first();
         $members = DB::table('memberof')->where('teamid', '=', $team->id)->get();
         $hasmembers = sizeof($members) > 0 ? true : false;
         $users = array();
         foreach ($members as $member) {
             $users[] = User::findOrFail($member->usersid);
             echo $hasmembers;
         }
         $this->layout->content = View::make('layouts.iterations.show')->with('iteration', $iteration)->with('iterations', $iterations)->with('issues', $issues)->with('categories', $categories)->with('idCategory', $idCategory)->with('countIssues', $countIssues)->with('totalPoints', $totalPoints)->with('project', $project)->with('materiales', $materiales)->with('personal', $personal)->with('hasmembers', $hasmembers)->with('members', $members)->with('users', $users)->with('message', '');
     } catch (Illuminate\Database\Eloquent\ModelNotFoundException $e) {
         return Redirect::to('/projects/')->with('message', 'Error al crear la iteraciĆ³n');
     }
 }
Example #2
0
 public function render($parameters = array())
 {
     if (isset($parameters['categoryId'])) {
         $teams = Teams::whereTeamcatId($parameters['categoryId'])->orderBy('title', 'ASC')->get();
     } else {
         $teams = Teams::all()->orderBy('title', 'ASC')->get();
     }
     return View::make('teams::widget', compact('teams'))->render();
 }
 public function destroy($id)
 {
     //project
     $teams = Teams::find($id);
     if (sizeof($teams->iterations) < 1) {
         $teams->delete();
     }
     $organization = app('organization');
     return Redirect::to('organization/name/' . $organization->auxName . '/teams')->with('message', 'Equipo eliminado');
 }
Example #4
0
 public function render($parameters = array())
 {
     $limit = isset($parameters['limit']) ? (int) $parameters['limit'] : self::LIMIT;
     if (isset($parameters['categoryId'])) {
         $teams = Teams::whereTeamcatId($parameters['categoryId'])->published()->orderBy('title', 'ASC')->get();
     } else {
         $teams = Teams::published()->orderBy('title', 'ASC')->get();
     }
     return View::make('teams::widget', compact('teams'))->render();
 }
Example #5
0
 * Change the messaging system on this page to follow other pages messaging.
 * Task to refer : http://www.ofuz.net/Task/8993
 * The team concept is on hold
*/
exit;
/**COPYRIGHTS**/
// Copyrights 2008 - 2010 all rights reserved, SQLFusion LLC, info@sqlfusion.com
$pageTitle = 'Ofuz :: ' . _('Team');
$Author = 'SQLFusion LLC';
$Keywords = 'Keywords for search engine';
$Description = 'Description for search engine';
$background_color = 'white';
include_once 'config.php';
include_once 'includes/ofuz_check_access.script.inc.php';
include_once 'includes/header.inc.php';
$do_teams = new Teams();
$do_teams->getTeams();
$teams_count = $do_teams->getNumRows();
?>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
	
	//'Create New' link clicked
    $('#AncCreateNewTeam').click(function() {
		$("#OfuzSuccessMessage").hide('slow');
		$("#OfuzSuccessMessage")[0].innerHTML = "";
		$('#DivTeamsList').hide('slow');
		$('#DivCreateNewTeam').show('slow');
    });
    
Example #6
0
 public function teams()
 {
     return Teams::Instance();
 }
Example #7
0
                            </tr>
                        </thead>
                        <tbody>
                        @foreach ($users as $user)
                            <tr>
                                <td class="capitalize">{{ $user->name }}</td>

                                <td><?php 
$summoners = Summoners::findOrFail($user->summoner_id);
echo $summoners->name;
?>
</td>

                                <td class="capitalize"><?php 
if ($user->team_id > 0) {
    $team = Teams::findOrFail($user->team_id);
    echo $team->name;
} else {
    echo "No team";
}
?>
</td>

                                <td><?php 
$summoners = Summoners::findOrFail($user->summoner_id);
echo $summoners->lane;
?>
</td>
                                @if (($captain == true) && ($user->id != Auth::User()->id) && ($user->team_id ==  0))
                                    <td><a class="btn btn-default" type="button" href="{{ url('team/invite/' . $user->id) }}">Invite</a></td>
                                @endif
Example #8
0
<?php

/**COPYRIGHTS**/
// Copyrights 2008 - 2010 all rights reserved, SQLFusion LLC, info@sqlfusion.com
$pageTitle = 'Ofuz :: ' . _('Edit Team');
$Author = 'SQLFusion LLC';
$Keywords = 'Keywords for search engine';
$Description = 'Description for search engine';
$background_color = 'white';
include_once 'config.php';
include_once 'includes/ofuz_check_access.script.inc.php';
include_once 'includes/header.inc.php';
$idteam = $_SESSION["eDetail_team"]->getParam("idteam");
$do_team = new Teams();
$do_team->getId($idteam);
?>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
	
	//clicked on 'Skip' button
    $('#btnSkipCW').click(function() {
      window.location = 'teams.php';
    });
    
    //button clicked to edit a Team
    $('#btnEditTeam').click(function () {
		var team_name;
		var auto_share;
		var idteam = <?php 
echo $idteam;
Example #9
0
<?php

require_once "team.php";
require_once "utility.php";
require_once "en.php";
$teams = array();
#NULL POINTER
$teams[] = array("name" => "NULLPOINTER", "members" => "Mehmet Can Demirel", "email" => "*****@*****.**");
$t = new Teams();
foreach ($teams as $team) {
    $pass = base64_encode(generateSalt(10));
    $t->register($team["name"], $pass, $team["email"], explode("<%#:#%>", $team["members"]));
}
Example #10
0
 function eventAddContactToTeamCW(Contact $contact)
 {
     $do_teams = new Teams();
     //gets user's teams which are marked as auto-shared
     $do_teams->getUserTeamsAutoShared();
     if ($do_teams->getNumRows()) {
         while ($do_teams->next()) {
             //gets Co-Workers of the team
             $do_teams_cw = new Teams();
             $do_teams_cw->getCoWorkersOfTheTeam($do_teams->idteam);
             if ($do_teams_cw->getNumRows()) {
                 while ($do_teams_cw->next()) {
                     $this->addNew();
                     $this->idcontact = $contact->idcontact;
                     $this->idteam = $do_teams->idteam;
                     $this->idcoworker = $do_teams_cw->idco_worker;
                     $this->add();
                     $this->free();
                     //building contact view table
                     $do_cv = new ContactView();
                     $do_cv->table = "userid" . $do_teams_cw->idco_worker . "_contact";
                     $do_cv->getId($contact->idcontact);
                     if (!$do_cv->hasData()) {
                         $do_cv->addNew();
                         $do_cv->idcontact = $contact->idcontact;
                         $do_cv->firstname = $contact->firstname;
                         $do_cv->lastname = $contact->lastname;
                         $do_cv->company = $contact->company;
                         $do_cv->idcompany = $contact->idcompany;
                         $do_cv->position = $contact->position;
                         $do_cv->picture = $contact->picture;
                         $do_cv->last_activity = date('Y-m-d h:i:s');
                         $do_cv->last_update = date('Y-m-d h:i:s');
                         $do_cv->first_created = date('Y-m-d h:i:s');
                         $do_cv->add();
                         $do_cv->free();
                     }
                     //Conact sharing with Co-Worker
                     $do_cs_check = new ContactSharing();
                     $contact_shared = $do_cs_check->checkCoWorkerContactRel($contact->idcontact, $do_teams_cw->idco_worker);
                     if (!$contact_shared) {
                         $do_cs = new ContactSharing();
                         $do_cs->addNew();
                         $do_cs->iduser = $_SESSION['do_User']->iduser;
                         $do_cs->idcontact = $contact->idcontact;
                         $do_cs->idcoworker = $do_teams_cw->idco_worker;
                         $do_cs->add();
                         $do_cs->free();
                     }
                     $do_cs_check->free();
                 }
             } else {
                 $this->addNew();
                 $this->idcontact = $_SESSION['ContactEditSave']->idcontact;
                 $this->idteam = $do_teams->idteam;
                 $this->add();
                 $this->free();
             }
             $do_teams_cw->free();
         }
     }
     $do_teams->free();
 }
Example #11
0
            }
        }
    }
}
// if GET request to Delete team
if (isset($_GET['teamID']) && $_GET['teamID'] > 0 && $_GET['delete'] == 1) {
    $team = new Team($_GET['teamID']);
    if ($team->formProcessDelete()) {
        handle_errors($team->get_teamFormErrors());
        $team->formReposts($smarty);
    } else {
        handle_success($team->get_teamFormSuccess());
    }
}
// Build list of teams
$Teams = new Teams();
$TeamsArray = $Teams->get_TeamArray(0);
if (count($TeamsArray) > 0) {
    $count = 0;
    $smarty->assign('teamID', array());
    $smarty->assign('teamName', array());
    $smarty->assign('teamShortName', array());
    $smarty->assign('teamFGColor', array());
    $smarty->assign('teamBGColor', array());
    $smarty->assign('teamSeasons', array());
    $smarty->assign('teamCanDelete', array());
    $smarty->assign('teamFGColorSelect', array());
    $smarty->assign('teamBGColorSelect', array());
    $smarty->assign('div_editobject_style', array());
    foreach ($TeamsArray as $Team) {
        $count++;
 public function postAsigned()
 {
     $members = Input::get('users_id');
     $project_id = Input::get('project_id');
     $team_id = Input::get('team_id');
     $var = null;
     $num = count($members);
     $team = Teams::find($team_id);
     $team->users()->sync($members);
     return Redirect::to('projects/members/' . $project_id)->with('message', 'Se han asignado los miembros  .');
 }
Example #13
0
 public function teamsAction()
 {
     $this->checkLogin();
     if ($this->request->isPost() && $this->request->hasPost("type") && $this->security->checkToken()) {
         $this->session->set("changeOccurred", true);
         $this->session->set("changeSuccessful", true);
         $this->session->set("teamsGenerated", false);
         switch ($this->request->getPost("type")) {
             case 'update':
                 $team = Teams::findFirst(intval($this->request->getPost("id")));
                 if ($team) {
                     $team->setUsername($this->request->getPost("user"));
                     if ($this->request->getPost("pass") != "") {
                         $team->setPassword($this->request->getPost("pass"));
                     }
                     $team->save();
                 } else {
                     $this->session->set("changeSuccessful", false);
                 }
                 break;
             case 'create':
                 $team = new Teams();
                 $team->setUsername($this->request->getPost("user"));
                 $team->setPassword($this->request->getPost("pass"));
                 if (!$team->save()) {
                     $this->session->set("changeSuccessful", false);
                 }
                 break;
             case 'generate':
                 $this->session->set("teamsGenerated", true);
                 $num = intval($this->request->getPost("num"));
                 $name = $this->request->getPost("user");
                 $teams = array();
                 $info = "";
                 for ($i = 0; $i < $num; $i++) {
                     $teams[$i] = new Teams();
                     $teams[$i]->setUsername(str_replace("#", $i + 1, $name));
                     $pass = Phalcon\Text::random(Phalcon\Text::RANDOM_ALNUM, 8);
                     $teams[$i]->setPassword($pass);
                     $info .= $teams[$i]->getUsername() . ":" . $pass . ",";
                     if ($teams[$i]->save() == false) {
                         $this->session->set("changeSuccessful", false);
                         $this->session->set("teamsGenerated", false);
                         for ($j = 0; $j <= $i; $j++) {
                             $teams[$j]->delete();
                         }
                         break;
                     }
                 }
                 $info = substr($info, 0, strlen($info) - 1);
                 $this->session->set("generatedInfo", $info);
                 break;
             case 'delete':
                 $team = Teams::findFirst(intval($this->request->getPost("id")));
                 if ($team->delete() == false) {
                     $this->session->set("changeSuccessful", false);
                 }
                 break;
             default:
                 $this->session->set("changeSuccessful", false);
                 break;
         }
         return $this->response->redirect("/admin/teams");
     } else {
         if ($this->session->has("changeOccurred")) {
             $this->view->changeOccurred = $this->session->get("changeOccurred");
             $this->session->remove("changeOccurred");
         }
         if ($this->session->has("changeSuccessful")) {
             $this->view->changeSuccessful = $this->session->get("changeSuccessful");
             $this->session->remove("changeSuccessful");
         }
         if ($this->session->has("teamsGenerated")) {
             $this->view->teamsGenerated = $this->session->get("teamsGenerated");
             $this->session->remove("teamsGenerated");
         }
         if ($this->session->has("generatedInfo")) {
             $genInfo = $this->session->get("generatedInfo");
             $tempArr = explode(",", $genInfo);
             $genTeams = array();
             for ($i = 0; $i < count($tempArr); $i++) {
                 $tempTeam = explode(":", $tempArr[$i]);
                 $genTeams[$i] = array("username" => $tempTeam[0], "password" => $tempTeam[1]);
             }
             $this->view->genTeams = $genTeams;
             //die(print_r($genInfo));
             $this->session->remove("generatedInfo");
         }
     }
     $this->view->teams = Teams::find();
 }
Example #14
0
 /**
  * Function progress get team by tour ID
  */
 function actionList($id = 2)
 {
     $id = Request::getVar("tour_id", $id);
     $model = Teams::getInstance();
     global $user;
     if (!$user->isSuperAdmin()) {
         YiiMessage::raseNotice("Your account not have permission to add/edit Team");
         $this->redirect(Router::buildLink("gamesport", array('view' => 'teams')));
     }
     $items = $model->ListTeam($id);
     echo json_encode($items);
 }
Example #15
0
<?php

error_reporting(E_ALL);
ini_set('display_error', 1);
require_once '../common/config.inc';
require_once '../common/kiva_utils.inc';
require_once 'Teams.class.php';
date_default_timezone_set('UTC');
// create the database object
try {
    $database = new PDO("mysql:host={$db_host};dbname={$db_name}", $db_user, $db_password);
    $database->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $statement = $database->prepare("TRUNCATE TABLE kiva_teams");
    $statement->execute();
    $statement = $database->prepare("SET CHARACTER SET 'utf8mb4'");
    $statement->execute();
} catch (PDOException $ex) {
    die("Error : " . $ex->getMessage());
}
$teams = new Teams();
$teams->initialize($database);
$teams->get_teams();
echo "done ... \n";
<?php

/**
 * @copyright	@copyright	Copyright (c) 2016 knvbapi. All rights reserved.
 * @license		http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */
// no direct access
defined('_JEXEC') or die;
// include the syndicate functions only once
if (!class_exists('modiCcalendarHelper')) {
    require_once dirname(__FILE__) . '/helper.php';
}
$class_sfx = htmlspecialchars($params->get('class_sfx'));
$json = modKNVBAPI2Helper::SetUrl($params);
$selectie = Selectie::getSelectie();
$getteams = Teams::getTeams();
$getcompetities = Competities::getCompetitie();
$getheader = Headers::getHeaders();
$getsize = Image::getLogoSize($params);
echo $getsize;
// Show Columns of program view
$matchid = $params->get('MatchID');
$wedstijdnummer = $params->get('WedstrijdNummer');
$datum = $params->get('Datum');
$tijd = $params->get('Tijd');
$verzameltijd = $params->get('Verzameltijd');
$thuisclub = $params->get('ThuisClub');
$thuislogo = $params->get('ThuisLogo');
$thuisteamid = $params->get('ThuisTeamID');
$uitclub = $params->get('UitClub');
$uitlogo = $params->get('UitLogo');
Example #17
0
 public function checkLogin()
 {
     if ($this->request->isPost()) {
         $user = $this->request->getPost("user");
         $pass = $this->request->getPost("pass");
         $team = Teams::findFirst(array("conditions" => "user = :user:"******"bind" => array("user" => $user)));
         if ($team && $this->security->checkHash($pass, $team->getPassword())) {
             $this->session->set("team_user", $user);
             $this->session->set("team_id", $team->getId());
             $this->session->set("team_key", $team->getPassword());
             $this->session->set("team_timeout", time() + $this->timeout);
         } else {
             $this->flashSession->error("This username and password combination is incorrect");
             return $this->response->redirect("");
         }
         $this->response->redirect("/team");
     } else {
         if ($this->session->has("team_user") && $this->session->has("team_user") && $this->session->has("team_timeout") && $this->session->get("team_id")) {
             $user = $this->session->get("team_user");
             $id = $this->session->get("team_id");
             $pass = $this->session->get("team_key");
             $time = $this->session->get("team_timeout");
             if (time() > intval($time)) {
                 $this->session->remove("team_user");
                 $this->session->remove("team_id");
                 $this->session->remove("team_key");
                 $this->session->remove("team_timeout");
                 $this->flashSession->error("Your session has expired. Please sign in again.");
                 return $this->response->redirect("");
             }
             $team = Teams::findFirst(array("conditions" => "user = :user: AND pass = :pass:"******"bind" => array("user" => $user, "pass" => $pass)));
             if ($team) {
                 $this->session->set("team_user", $user);
                 $this->session->set("team_id", $id);
                 $this->session->set("team_key", $pass);
                 $this->session->set("team_timeout", time() + $this->timeout);
             } else {
                 $this->flashSession->error("There was an error, please sign in again");
                 return $this->response->redirect("");
             }
         } else {
             $this->flashSession->error("Please sign in first");
             return $this->response->redirect("");
         }
     }
 }