コード例 #1
0
ファイル: retLineUpTable.php プロジェクト: robmat/samplebator
} else {
    $event_ID = 0;
}
if (isset($_POST['laction'])) {
    $client_action = strip_tags($_POST['laction']);
} else {
    $client_action = "";
}
$dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
/*
 * no security here this is used for some public lineUp displays ...
$usertoken=initLsdbSec($dbi);
$ac=$usertoken['eventmap'][$event_ID];
if ($ac<3) die("<b>X2</b>");
*/
$RS = DB_listTeamLineUp($dbi, $team_id, $team_name, $player_type);
$aTH = array('Team', 'Vorname', 'Nachname', '&Ouml;DSO', '&Ouml;DV', 'Aufstellung');
if (strlen($client_action) > 1) {
    $aTH[] = 'Aktion';
}
$OUT = "<table class=\"tchild\" id=\"lineupT{$team_id}\" name=\"lineupT{$team_id}\">";
$OUT = $OUT . ArrayToTableHead($aTH);
if (strlen($client_action) > 1) {
    # this is an adm request -> inject the lineup selector and modify out RS
    $RSOUT = array();
    foreach ($RS as $r) {
        $r_out = array();
        $r_out = $r;
        $r_out[10] = Select_LineUpType('ltype', $r[10], 'changetype(' . $r[0] . ',this)') . '<div id=\'l_' . $r[0] . '\'></div>';
        $RSOUT[] = $r_out;
    }
コード例 #2
0
ファイル: team.php プロジェクト: robmat/samplebator
 /**
  *	purpose:	generate LineUp Table for this Team
  * 	params:		nop
  *	returns:	Recordset Array
  */
 function getLineUp()
 {
     $RS = array();
     $RS = DB_listTeamLineUp($this->DB, $this->aDATA['id']);
     return $RS;
 }
コード例 #3
0
ファイル: func_lsdb.php プロジェクト: robmat/samplebator
/**
*	purpose:	generate performance graph for a team
* 	params:		team_id
*	returns:	complete table with Google API graphics
*/
function getTeamAvgHist($vtid)
{
    # changed to google API and using the api_rs layer
    #TODO here we still are hardcoded to 501 playing ...
    global $dbi;
    $OUT = "";
    $RS = DB_listTeamLineUp($dbi, $vtid);
    # TP.lid,T.id,T.tname,P.pid,P.pfname,P.plname,P.pfkey1,P.pfkey2,TY.TEXT,TP.leventid #
    foreach ($RS as $row) {
        $PlayerDat = DB_listLegStatAverageBreakdown($dbi, 0, $row[9], '>0', 501, $row[3]);
        # E.evname,P.pid,P.pfname,P.plname,M.mdate,L.ldarts,L.lfinish,(501-L.lscore),round((L.lscore/L.ldarts),2) AVG
        if (sizeof($PlayerDat) > 0) {
            $arAVG = array();
            foreach ($PlayerDat as $rowleg) {
                $arAVG[] = round($rowleg[8]) * 2;
            }
            $imgURL = '<img src="' . _googleAVGChart('l', $arAVG) . '"/><br/>';
            # to tu kurwa
            $OUT = $OUT . '<tr><td>' . mb_convert_encoding($rowleg[2], 'UTF-8') . ' ' . mb_convert_encoding($rowleg[3], 'UTF-8') . '</td><td>' . $imgURL . '</td></tr>';
        }
    }
    $RET = OpenTable('teamdata', 1);
    $RET = $RET . $OUT;
    $RET = $RET . CloseTable(1);
    return $RET;
}