function _vereinteammatchlist($vid, $show = 'home') { global $dbi; // step 1 collect the teams for this verein // step 2 for each team we collect the schedule and create click-rows to the matchsheet echo '<h3>Alle Vereins Teams und ihre Heim Spiele</h3>'; $RS = DB_listTeams($dbi, 0, 0, "", 1, "", $vid); foreach ($RS as $row) { if ($show == 'home') { $MATCHLIST = DB_listMatches($dbi, 1, 0, $row[4], "", "", 1); } elseif ($show = 'away') { $MATCHLIST = DB_listMatches($dbi, 1, 0, $row[4], "", "", 0); } elseif ($show = 'all') { // this doesn't work ... $MATCHLIST = DB_listMatches($dbi, 1, 0, $row[4], "", "", "", "", "logic"); } $aTH = array("Runde", "Datum", "Spielort", "Status", "", "Sets", "Legs", "Team", "Teamname"); echo "<div class=\"sectionhead\">Team {$row['5']} in {$row['2']} (" . sizeof($MATCHLIST) . " Matches)</div><br/>"; echo '<div class="child">'; OpenTable(); echo ArrayToTableHead($aTH); echo RecordsetToClickTable($MATCHLIST, 4, "ls_system.php?func=showmatch&vmkey=%P1%&eventid=%P2%", 3, 0); CloseTable(); echo '</div><br/>'; } }
function _teampage($team_id) { /* * generate the teampage */ global $dbi; $RS = DB_listMatches($dbi, 1, 0, $team_id, '', '', '', '', 'raw'); $aTH = array('Liga', 'Runde', 'Datum', 'Location', 'Sets', 'Legs', 'Team'); $ROWS = RecordsetToDataTable($RS, array(1, 4, 5, 6, 9, 10, 12)); /* * Output */ echo '<h3>Team Schedule</h3>'; echo '<p><table>' . ArrayToTableHead($aTH) . $ROWS . '</table></p>'; echo '<h3>Team Averages</h3>'; echo '<p>Chronologische Darstellung der erzielten Averages in allen Legs aller eingesetzen Spieler eines Teams. Aus dieser Kurve lassen sich Leistungssteigerungen und Einbrüche ableiten.<i>Falls Spieler gemeldet aber nie eingesetzt wurden so werden NULL werte angezeigt ...</i></p>'; echo getTeamAvgHist($team_id); }
/** * purpose: fetch a complete match -> render as schedule ROW+active input boxes * params: match_key * returns: HTML TABLE * security: none -> public result view .... */ function _getMatchRow($match_key) { global $dbi; $RS = DB_listMatches($dbi, 1, 0, 0, '', '', '', '', 'logic', $match_key); if (!sizeof($RS) == 1) { die_red('E119:Match:Match not found'); } /* * structure = array 5 -> 13, identical to schedule Page,$R[2]= match ID */ foreach ($RS as $R) { $ROW = '<tr><td width="80px">' . $R[5] . '</td><td width="140px">' . $R[6] . '</td><td width="120px">' . $R[7] . '</td><td>' . _input(0, 'mkey' . $R[2], $match_key) . _input(1, 'sh' . $R[2], $R[8], 3, 2) . '</td><td>' . _input(1, 'lh' . $R[2], $R[9], 3, 2) . '</td>' . '<td>:</td><td>' . _input(1, 'sa' . $R[2], $R[10], 3, 2) . '</td><td>' . _input(1, 'la' . $R[2], $R[11], 3, 2) . '</td><td width="120px">' . $R[12] . '</td><td>' . matchStatusToImage($R[13]) . '</td></tr>'; } return '<table>' . $ROW . '</table>'; }
if (strlen($_GET['vmkey']) > 7) { $m_key = $_GET['vmkey']; } else { $m_key = "e0"; } if (strlen($_GET['eid']) > 0 && is_numeric($_GET['eid'])) { $event_ID = $_GET['eid']; } else { $event_ID = 0; } #debug($event_ID.":".$m_key); #foreach($_GET as $a) echo strlen($a)."=".$a."<br/>"; #return; $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname); $aTH = array("Runde", "Datum", "Spielort", "Heim Team", "Set", "Leg", "Set", "Leg", "Gast Team", "Status"); $RS = DB_listMatches($dbi, 1, $event_ID, 0, "", "", "", "", 'logic', $m_key); $fields = array(4, 5, 6, 7, 8, 9, 10, 11, 12, 13); $ROWS = RecordsetToDataTable($RS, $fields); $GSRS = DB_listGames($dbi, 0, $m_key, 'single'); $GPRS = DB_listGames($dbi, 0, $m_key, 'pair'); #debug($ROWS); # SECTION 0 Navigation # section 1 MATCH $OUT = "<script type=\"text/javascript\">window.lsdb=new Array();window.lsdb.eventid={$event_ID};window.lsdb.matchkey='{$m_key}';</script>"; $OUT = $OUT . "<h3>Matchbericht :: Administration View</h3>"; $OUT = $OUT . OpenTable('matchhead', 1); $OUT = $OUT . ArrayToTableHead($aTH); $OUT = $OUT . $ROWS; $OUT = $OUT . CloseTable(1); /* * we need to know how many game DIV to create, we need the game ID's for correct
function _listMatches($eventgroup, $vmstatus) { /* * Modul: Controlling * purpose: List matches from event_groups based on MatchStatus FLAG * param: $vmstatus (int) 0-x * v4 BH using the layer architecture */ global $dbi, $orangepic, $redpic, $bluepic; echo form_EventGroupSelect('ls_debug.php?func=matches', '', $eventgroup, $vmstatus); if (!$eventgroup > 0) { return; } if (!$vmstatus > 0) { return; } $aTH = array("Bewerb", "ID", "Runde", "Datum", "Spielort", "Heim Team", "Sets", "Legs", "Sets", "Legs", "Gast Team", "S"); $RS = DB_listMatches($dbi, 1, 0, 0, "", "<curdate()", "", "={$vmstatus}", "logic", "", $eventgroup); echo "<h3>Liste aller Spiele mit STATUS=" . $vmstatus . "</h3>"; echo "<p>Jede Zeile funktioniert als Hyperlink und springt direkt in den betreffenden Spielbericht</p>"; OpenTable(); echo ArrayToTableHead($aTH); echo RecordsetToClickTable($RS, 1, "ls_system.php?func=showmatch&vmkey=%P1%&eventid=%P2%", 3, 0); CloseTable(); }