示例#1
0
     $m2edit = 1;
     // 1 o 2 a seconda di quale matchno è stato passato
     $m = 2;
 } else {
     $queryMatch = $match - 1;
     $match2edit = $match;
     $match = $match2edit - 1;
     $m2edit = 2;
     $m = 1;
 }
 //Carico il vettore dei dati validi
 $CurrentTarget = array();
 $validData = GetMaxScores($event, $match, $TeamEvent);
 //Se ho la posizione, salvo la posizione e ri-setto per i punti
 if (!(is_null($size) || is_null($xpos) || is_null($ypos))) {
     $target = new Obj_Target($validData["Arrows"]);
     $arrowHit = $target->getHitValue($size, $xpos, $ypos);
     $arrUpdate = UpdateArrowPosition($match2edit, $event, $TeamEvent, $arrowHit["X"], $arrowHit["Y"]);
     if (!is_null($arrUpdate)) {
         list($what, $index) = preg_split("/[|]/", $arrUpdate);
         $what = $what == 1 ? 't' : 's';
         $arrow = DecodeFromLetter($arrowHit["V"]);
     }
 }
 // 		if($arrow==='0') $arrow='M';
 // 		elseif($arrow==='0*') $arrow='M*';
 //Se ho i valori di freccia, indice della textbox e tipo textbox (std o so) procedo con il salvataggio dei punti
 if (!(is_null($what) || is_null($arrow) || is_null($index) || !preg_match('/^[st]{1}$/i', $what))) {
     // Verifico la arrow se il valore è valido per il target selezionato
     if (array_key_exists(strtoupper(GetLetterFromPrint($arrow, $CurrentTarget)), $validData["Arrows"])) {
         $arrow = GetLetterFromPrint($arrow, $CurrentTarget);
示例#2
0
<?php

require_once dirname(dirname(__FILE__)) . '/config.php';
require_once 'Common/Lib/ArrTargets.inc.php';
require_once "Obj_Target.php";
CheckTourSession(true);
$Event = isset($_REQUEST['Event']) ? $_REQUEST['Event'] : null;
$Match = isset($_REQUEST['Match']) ? $_REQUEST['Match'] : null;
$Team = isset($_REQUEST['Team']) ? $_REQUEST['Team'] : 0;
$Size = isset($_REQUEST['Size']) ? $_REQUEST['Size'] : 100;
$validData = GetMaxScores($Event, $Match, $Team);
$target = new Obj_Target($validData["Arrows"]);
if (!empty($_REQUEST['Arrows'])) {
    $target->setArrowPos($_REQUEST['Arrows']);
}
$target->draw($Size);