コード例 #1
0
        </div>
</div><!--close pa tab-->
    
    
    <div id="tc" class="tab-pane fade">
      <h3>Technical Competitions</h3>
      </div><!--close tech tab-->

    <div id="tfe" class="tab-pane fade">
      <h3>Technical Fun Events</h3>
      <div class="col-md-3 portfolio-item">
                         <a class="portfolio-box" data-toggle="modal" data-target="#">
                        <img height="150px" width="265px" src="images/fa/kalay.jpg" class="img-responsive" alt="">
                        <div class="portfolio-box-caption">
                            <div class="portfolio-box-caption-content" onclick="goToRegister(<?php 
$n = getEventId('kalayouth');
echo $n;
?>
)">
                                <div class="project-category text-faded">Kala Youth</div>
                                <div class="project-name">Register</div>
                            </div>
                        </div>
        </a>        
            </div>
      </div><!--close tech tab-->
      
    <div id="spt" class="tab-pane fade">
        <h3>Sportsmania</h3>
<div class="col-md-3 portfolio-item">
                         <a class="portfolio-box" data-toggle="modal" data-target="#">
コード例 #2
0
ファイル: team.php プロジェクト: fvilpoix/badnet
<?php

// ------ GET CURRENT EVENT ID ------ \\
require_once __DIR__ . DIRECTORY_SEPARATOR . 'common.php';
$evtId = getEventId();
if (!$evtId) {
    exit('Pas de tournoi en cours');
}
$evtId = getEventId();
$lastMatch = getLastMatch();
// ------ FETCH ALL AVAILABLES TEAMS ------ \\
$teams = getTeams($evtId);
// ------ PARSE URL PARAMETERS TO KNOW WHAT WE SHOW ------ \\
$team = null;
if (array_key_exists('team', $_GET)) {
    $teamAbbr = $_GET['team'];
    $team = findTeam($teams, $teamAbbr);
    $matchs = getMatchs($team['id']);
    usort($matchs, function ($match1, $match2) {
        return $match1['num'] > $match2['num'] ? 1 : -1;
    });
    $matchs_done = array_filter($matchs, function ($match) {
        return (bool) $match['score'];
    });
    $matchs_inprogress = array_filter($matchs, function ($match) {
        return (bool) $match['begin'] && !$match['end'];
    });
    usort($matchs_inprogress, function ($match1, $match2) {
        return $match1['begin']['time'] < $match2['begin']['time'] ? 1 : -1;
        // DESC
    });
コード例 #3
0
    if (($values[] = getRecord('regionalSingleRecord')) === null) {
        error('Invalid calling - no regionalSingleRecord');
    }
    if (($values[] = getRecord('regionalAverageRecord')) === null) {
        error('Invalid calling - no regionalAverageRecord');
    }
    $values[] = $resultId;
    pdo_query('UPDATE Results ' . 'SET value1=?, value2=?, value3=?, value4=?, value5=?, best=?, average=?, regionalSingleRecord=?, regionalAverageRecord=? ' . 'WHERE id=?', $values);
    die('{"success":1}');
} else {
    // provide data
    if (!($personId = getPersonId())) {
        error('Invalid calling - no personId');
    }
    if ($competitionId = getCompetitionId()) {
        if ($eventId = getEventId()) {
            $roundId = getRoundId();
        } else {
            $roundId = null;
        }
    } else {
        $eventId = null;
        $roundId = null;
    }
    $return = array();
    if (!$competitionId) {
        $result = pdo_query('SELECT name FROM Persons WHERE id=?', array($personId));
        if (!count($result)) {
            error('Person ID not found', 0);
        }
        $personName = $result[0]['name'];
コード例 #4
0
ファイル: invite.php プロジェクト: joaoDavidGB/LTWprojeto
<?
  include_once('../database/userFunc.php'); 
  include_once('../database/eventFunc.php'); 
  
  $name = $_POST['name'];
  $evento = $_POST['evento']; 

  $idEvent = getEventId($evento);
  if (!existUser($name)){
    echo "user_not_exist";
    return false;
  }
  $idUser = getUserID($name);

  try {
    $invite = invite($idUser, $idEvent);
    if ($invite === false){
      echo "fail";
    }
    else if ($invite === true){
      echo "success";
    }
  } catch (PDOException $e) {
    die($e->getMessage());
  }
?>
コード例 #5
0
ファイル: editEvent.php プロジェクト: joaoDavidGB/LTWprojeto
<?
  include_once('../database/eventFunc.php'); 
  
  $antigoNome = $_POST['antigoNome'];
  $name = $_POST['name'];
  $date = $_POST['date'];
  $timeH = $_POST['timeH'];
  $type = $_POST['type'];
  $local = $_POST['local'];
  $description = $_POST['description'];
  $privateEvent = $_POST['privateEvent'];
  $image = $_POST['image'];

  $idEvent = getEventId($antigoNome);

  try {
    $event = editEvent($idEvent,$name, $date, $timeH, $type, $description, $local, $privateEvent, $image);
    if ($event === false){
      echo "fail";
    }
    else if ($event === true){
      echo "success";
    }
  } catch (PDOException $e) {
    die($e->getMessage());
  }
?>
コード例 #6
0
ファイル: search.php プロジェクト: joaoDavidGB/LTWprojeto
<?
  include_once('../database/eventFunc.php'); 
  

  try {
    $exist = existEvent($_POST['name']);
    if ($exist === false){
      echo "fail";
    }
    else if ($exist === true){
      $idEvent = getEventId($_POST['name']);
      if ($idEvent == -1){
        echo "fail";
      }
      else
        echo $idEvent;
    }
  } catch (PDOException $e) {
    die($e->getMessage());
  }
?>