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: render table with active memberships for specified player * params: player_id * returns: TABLE */ function LSTable_PlayerActiveMemberShips($idname, $player_id) { global $dbi; $ROWS = ''; $HEAD = ''; $RS = DB_listMemberShips($dbi, $player_id, 0, '>0', 1); $aTH = array('id', 'Verein', 'Art', 'PassNr', 'Ende', 'Vorname', 'Nachname', 'Aktion'); $HEAD = ArrayToTableHead($aTH); $ROWS = RecordsetToDataTable($RS, array(0, 2, 3, 4, 5, 7, 8), array('memberedit', 'memberdel'), array(array(0, 6), array(0, 6)), array('Edit', 'Del')); return '<table class="tchild" id="' . $idname . '" name="' . $idname . '">' . $HEAD . $ROWS . '</table>'; }
/** * purpose this is the system outbox, all messages send by the system * params * returns HTML table with action buttons per row */ function _showOutbox() { global $dbi, $usertoken; if ($usertoken['usertype_id'] < 5) { die_red('Err:Msg95:WrongUser'); } $RS = DB_listMessage($dbi); $HEAD = ''; $ROWS = ''; $ROWS = RecordsetToDataTable($RS, array(1, 2, 3, 5, 6, 7, 8), array('delmessage', 'setmessage'), array(array(0), array(0)), array('Del', 'Chg')); $aTH = array('Status', 'Absender', 'Datum', 'Gruppe', 'Empfänger', 'Link', 'Nachricht', 'Aktion', 'Aktion'); $HEAD = ArrayToTableHead($aTH); // OUTPUT // echo '<script type="text/javascript">$("#pagetitle").html("Outbox");</script>'; echo '<div id=\'mailadm\'>'; echo '<table><tr><td>' . _button('Send Pending Liga', 'msgsendall()') . '</td><td>' . _button('Purge All', 'delall()') . '</td></tr></table>'; echo '</div>'; echo OpenTable('maillist', 1); echo $HEAD . $ROWS; echo CloseTable(1); }
function _showlowstat($eventid) { global $dbi, $tdbg, $event; echo _MakeStatPageHeader($eventid, 0); $sql = ""; if ($event['evsgldarts'] == 1) { $legend = 'Die 20 besten gewonnenen Legs in den Singles (Darts)'; $sql = "select pfname,plname,ldarts from tblleg,tblgame,tplayer where lpid=pid and lgid=gid and gmkey like 'e" . $eventid . "r%' and gtype=1 and lscore=" . $event['evsgldist'] . " order by ldarts asc limit 20"; } elseif ($event['evsglroundcheck'] == 1) { $legend = 'Die 20 besten gewonnenen Legs in den Singles (Runden)'; $sql = "select pfname,plname,lroundcheck from tbllegrounds,tblgame,tplayer where lpid=pid and lgid=gid and gmkey like 'e" . $eventid . "r%' and gtype=1 and lscore=" . $event['evsgldist'] . " order by lroundcheck asc limit 20"; } OpenTable(); echo '<tr><td width="50%" valign="top"><table width="100%">'; if (strlen($sql) > 0) { $precord = sql_query($sql, $dbi); $RS = createRecordSet($precord, $dbi); $ROWS = RecordsetToDataTable($RS, array(0, 1, 2)); echo '<tr><td colspan=3 class="thead">' . $legend . '</td></tr>' . $ROWS; } #################################### $sql = ''; echo '</table></td><td width="50%" valign="top"><table width="100%">'; if ($event['evsgldarts'] == 1) { $legend = 'Die 20 schlechtesten gewonnenen Legs in den Singles (Darts)'; $sql = "select pfname,plname,ldarts from tblleg,tblgame,tplayer where lpid=pid and lgid=gid and gmkey like 'e" . $eventid . "r%' and gtype=1 and lscore=" . $event['evsgldist'] . " order by ldarts desc limit 20"; } if ($event['evsglroundcheck'] == 1) { $legend = 'Die 20 schlechtesten gewonnenen Legs in den Singles (Runden)'; $sql = "select pfname,plname,lroundcheck from tbllegrounds,tblgame,tplayer where lpid=pid and lgid=gid and gmkey like 'e" . $eventid . "r%' and gtype=1 and lscore=" . $event['evsgldist'] . " order by lroundcheck desc limit 20"; } if (strlen($sql) > 0) { $precord = sql_query($sql, $dbi); $RS = createRecordSet($precord, $dbi); $ROWS = RecordsetToDataTable($RS, array(0, 1, 2)); echo '<tr><td colspan=3 class="thead">' . $legend . '</td></tr>' . $ROWS; } ##################################### $sql = ""; $LIM = 20; echo '</table></td></tr>'; echo '<tr><td width="50%"><table width="100%">'; if ($event['evsgldarts'] == 1) { $legend = 'Die ' . $LIM . ' besten Sets in den Singles (Score per Dart)'; $sql = "select pid,pfname,plname,mdate,sum(lscore)/sum(ldarts) AVG from tblmatch,tblgame,tblleg,tplayer where mkey=gmkey and gid=lgid and lpid=pid and mkey like 'e" . $eventid . "r%' and gtype=1 group by lpid,lgid order by AVG desc limit {$LIM}"; } if ($event['evsglroundcheck'] == 1) { $legend = 'Die ' . $LIM . ' besten Sets in den Singles (Score per Round)'; $sql = "select pid,pfname,plname,mdate,sum(lscore)/sum(lroundcheck) AVG from tblmatch,tblgame,tbllegrounds,tplayer where mkey=gmkey and gid=lgid and lpid=pid and mkey like 'e" . $eventid . "r%' and gtype=1 group by lpid,lgid order by AVG desc limit {$LIM}"; } if (strlen($sql) > 0) { $precord = sql_query($sql, $dbi); $RS = createRecordSet($precord, $dbi); $ROWS = RecordsetToDataTable($RS, array(1, 2, 3, 4)); echo '<tr><td colspan=4 class="thead">' . $legend . '</td></tr>' . $ROWS; } echo '</table></td><td width="50%"><table width="100%">'; $sql = ''; $LIM = 20; if ($event['evsgldarts'] == 1) { $legend = 'Die ' . $LIM . ' schlechtesten Sets in den Singles (Score per Dart)'; $sql = "select pid,pfname,plname,mdate,sum(lscore)/sum(ldarts) AVG from tblmatch,tblgame,tblleg,tplayer where mkey=gmkey and gid=lgid and lpid=pid and mkey like 'e" . $eventid . "r%' and gtype=1 group by lpid,lgid order by AVG asc limit {$LIM}"; } if ($event['evsglroundcheck'] == 1) { $legend = 'Die ' . $LIM . ' schlechtesten Sets in den Singles (Score per Round)'; $sql = "select pid,pfname,plname,mdate,sum(lscore)/sum(lroundcheck) AVG from tblmatch,tblgame,tbllegrounds,tplayer where mkey=gmkey and gid=lgid and lpid=pid and mkey like 'e" . $eventid . "r%' and gtype=1 group by lpid,lgid order by AVG asc limit {$LIM}"; } if (strlen($sql) > 0) { $precord = sql_query($sql, $dbi); $RS = createRecordSet($precord, $dbi); $ROWS = RecordsetToDataTable($RS, array(1, 2, 3, 4)); echo '<tr><td colspan=4 class="thead">' . $legend . '</td></tr>' . $ROWS; } $sql = ''; ################################ echo '</table></td></tr>'; echo '<tr><td width="50%" valign="top"><table width="100%">'; # // do we have to show finishstats ??? if ($event['evsglfinish'] == 1) { $legend = 'Die 20 höchsten in den Singles erzielten Finishzahlen'; $precord = sql_query("select lpid,pfname,plname,lfinish from tblleg,tblgame,tplayer where lpid=pid and lgid=gid and gmkey like 'e" . $eventid . "r%' and gtype=1 and lfinish>0 order by lfinish desc limit 20", $dbi); $RS = createRecordSet($precord, $dbi); $ROWS = RecordsetToDataTable($RS, array(1, 2, 3)); echo '<tr><td colspan=4 class="thead">' . $legend . '</td></tr>' . $ROWS; } echo '</table></td></tr><tr><td width="50%" valign="top"><table width="100%">'; if ($event['evsglhighscore171'] == 1) { $legend = 'Anzahl erzielter Highscores 171'; $precord = sql_query("select lpid,pfname,plname,sum(lhighscore171) HS from tblleg,tblgame,tplayer where lpid=pid and lgid=gid and gmkey like 'e" . $eventid . "r%' and gtype=1 and lhighscore171>0 group by lpid order by HS desc", $dbi); $RS = createRecordSet($precord, $dbi); $ROWS = RecordsetToDataTable($RS, array(1, 2, 3)); echo '<tr><td colspan=4 class="thead">' . $legend . '</td></tr>' . $ROWS . '</table>'; } echo '<td width="50%" valign="top"><table width="100%">'; # // how about the HIGHSCORES ??? if ($event['evsglhighscore'] == 1) { $legend = 'Anzahl erzielter Highscores 180'; $precord = sql_query("select lpid,pfname,plname,sum(lhighscore) HS from tblleg,tblgame,tplayer where lpid=pid and lgid=gid and gmkey like 'e" . $eventid . "r%' and gtype=1 and lhighscore>0 group by lpid order by HS desc", $dbi); $RS = createRecordSet($precord, $dbi); $ROWS = RecordsetToDataTable($RS, array(1, 2, 3)); echo '<tr><td colspan=4 class="thead">' . $legend . '</td></tr>' . $ROWS; } echo '</table></td></tr>'; CloseTable(); }
$event_group_id = strip_tags($_POST['eventgroupid']); } else { $event_group_id = 0; } if (isset($_POST['extend']) && strlen($_POST['extend']) < 4) { $ext = strip_tags($_POST['extend']); } else { $ext = ''; } $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname); $RS = DB_listLocations($dbi, $loc_id, $loc_name, $loc_active, $loc_plz, $event_id, $event_group_id); $OUT = '<table class=\'tchild\' id=\'locationtable\' name=\'locationtable\'>'; if ($ext == 'yes') { // L.id,L.lname,L.lcity,L.lplz,L.laddress,L.lphone,L.lactive,L.lcoordinates,E.id,E.evname,T.id,T.tname foreach ($RS as $r) { $OUT = $OUT . '<tr><td>' . $r[11] . '</td><td>' . $r[1] . '</td><td>' . $r[4] . '</td><td>' . $r[2] . '<br/>' . $r[3] . '</td><td>' . $r[5] . '</td><td>'; if (strlen($r[7]) > 5) { $OUT = $OUT . '<button onclick=\'showmap(' . $r[0] . ')\'>Map</button>'; } //if (strlen($r[7])>5) $OUT=$OUT._button('Map','showmap('.$r[0].')'); $OUT = $OUT . '</td></tr>'; $captain = DB_getCaptainDataTeam($dbi, $r[10]); $OUT = $OUT . '<tr><td></td><td>' . $captain['pfname'] . ' ' . $captain['plname'] . '</td><td>' . $captain['ptel1'] . '</td><td>' . $captain['ptel2'] . '</td></tr>'; $OUT = $OUT . '<tr><td colspan=\'6\' class=\'bluebox\'></td></tr>'; } } else { $OUT = $OUT . RecordsetToDataTable($RS, array(1, 2, 3, 4, 5, 6, 9, 11), array('showmap'), array(array(0)), array('Map')); } $OUT = $OUT . '</table>'; header('Content-Type: application/html; charset=ISO-8859-1'); echo $OUT;
} $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', 'ÖDSO', 'Ö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; } $OUT = $OUT . RecordsetToDataTable($RSOUT, array(2, 4, 5, 6, 7, 10), array($client_action), array(array(0, 1)), array('Remove')); } else { $OUT = $OUT . RecordsetToDataTable($RS, array(2, 4, 5, 6, 7, 8)); } $OUT = $OUT . "</table>"; header('Content-Type: application/html; charset=ISO-8859-1'); echo $OUT;
/** * purpose security controlled membership listing + action buttons for non public access * params * returns HTML Table with rows */ function _listMemberShip($player_id, $verein_id, $mtype_id, $verband_ID, $m_active) { global $dbi, $usertoken; /* create a meaningful type_comparison string */ if ($mtype_id > 0) { $type_comp = '=' . $mtype_id; } else { die_red('Err157:MemberTypeRequired'); } $RS = DB_listMemberShips($dbi, $player_id, $verein_id, $type_comp, $m_active, $verband_ID); if (sizeof($RS) > 2000) { die_red('Selection returns more than 2000 rows (' . sizeof($RS) . ')'); } if (sizeof($RS) < 1) { die_green('Search criteria returns nothing ...'); } /* * no actions for non-registermap members ... */ if (sizeof($usertoken['registermap']) < 1) { $aTH = array('Verein', 'Meldeart', 'PassNr', 'Meldung Ende', 'ID', 'Vorname', 'Nachname'); $ROWS = RecordsetToDataTable($RS, array(2, 3, 4, 5, 6, 7, 8)); } else { $aTH = array('Verein', 'Meldeart', 'PassNr', 'Meldung Ende', 'ID', 'Vorname', 'Nachname', 'Aktion'); $ROWS = RecordsetToDataTable($RS, array(2, 3, 4, 5, 6, 7, 8), array('playeredit', 'memberdel'), array(array(6), array(0, 6)), array('Edit Player', 'Del')); } $HEAD = ArrayToTableHead($aTH); $sum = '<div>Search criteria returned ' . sizeof($RS) . ' records.</div>'; return $sum . '<table class="tchild" id="tmembers" name="tmembers">' . $HEAD . $ROWS . '</table>'; }
* c) listCaptain.php eventgroup=5 */ foreach ($_POST as $secvalue) { if (eregi("<[^>]*script*\"?[^>]*>", $secvalue) or eregi("\\([^>]*.*\"?[^>]*\\)", $secvalue)) { die("X"); } } require_once "../code/config.php"; require_once "../includes/sql_layer.php"; require_once "../api_rs.php"; require_once "../api_format.php"; $team_id = 0; $event_id = 0; $event_group_id = 0; if (isset($_POST['teamid']) && is_numeric($_POST['teamid'])) { $team_id = strip_tags($_POST['teamid']); } if (isset($_POST['eventid']) && is_numeric($_POST['eventid'])) { $event_id = strip_tags($_POST['eventid']); } if (isset($_POST['eventgroup']) && is_numeric($_POST['eventgroup'])) { $event_group_id = strip_tags($_POST['eventgroup']); } if ($team_id + $event_id + $event_group_id < 1) { die('X2'); } $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname); $RS = DB_getCaptainDataTeam($dbi, $team_id, $event_id, $event_group_id); $ROWS = RecordsetToDataTable($RS, array(2, 3, 4, 5, 6)); header('Content-Type: application/html; charset=ISO-8859-1'); echo '<table width=\'100%\'>' . $ROWS . '</table>';
if (strlen($pass_nr) + strlen($last_name) < 4) { die('X'); } $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname); $RS = DB_listPlayers($dbi, $player_id, $last_name, '', $pass_nr); if (sizeof($RS) > 15) { debug('Selection returns more than 15 rows ...'); return; } if (sizeof($RS) < 1) { debug('Search criteria returns nothing ...'); return; } if ($team_id > 0) { // this is a lineup manipulation request ... override active field by Team_id into RecordSet $RSOUT = array(); foreach ($RS as $R) { $r_out = $R; $r_out[1] = $team_id; $RSOUT[] = $r_out; } } else { $RSOUT =& $RS; } // we return a table here + costum button box .. $aTH = array('ID', 'Vorname', 'Nachname', 'ÖDSO', 'ÖDV', 'Wohnort', 'Aktion'); $strRET = '<table class=\'tchild\' id=\'qryresult\' name=\'qryresult\'>'; $strRET = $strRET . ArrayToTableHead($aTH); $strRET = $strRET . RecordsetToDataTable($RSOUT, array(0, 2, 3, 4, 5, 7), array($client_action, 'chkplayerteam'), array(array(0, 1), array(0)), array($client_caption, 'Check')); header('Content-Type: application/html; charset=ISO-8859-1'); echo $strRET . '</table>';
/** * purpose: display process action buttons according to object and wfstate of object * params: $item (player,lineup,team),$processstate(1..6) * returns: HTML TABLE with lsdb_buttons and comment field */ function _show_process_buttons($item, &$obj) { global $usertoken; #debug($usertoken); $adm = 0; $processstate = $obj['wfstate_id']; switch ($usertoken['usertype_id']) { case 4: #TODO replace by Access Lookup ... ==> Message Group Membership !! #TODO is member of ligaadmin level 3 ??? break; case 5: case 6: $adm = $usertoken['id']; break; default: $adm = 0; } // layout = table with max of 4 cols, 1-row is requestcomment 2-row is button 3-row is explain $RS = array(); #$r1=array(); $r2 = array(); $r3 = array(); switch ($processstate) { case 1: case 4: $r2[] = _button('Save', 'save' . $item . '()'); $r2[] = _button('Submit', 'submit' . $item . '()'); $r3[] = 'Speichert das Formular <b>ohne</b> es abzuschicken, dieses Formular kann später weiter bearbeitet werden.'; $r3[] = 'Schliesst die Bearbeitung ab und <b>sendet</b> den Antrag an die Liga Verwaltung, der Antrag liegt zur Begutachtung vor und kann erst bei einer Ablehnung wieder bearbeitet werden.'; $r2[] = _button('Delete', 'deleterequest()'); $r3[] = 'Diesen Antrag <b>löschen</b> und aus dem System entfernen.'; break; case 2: if ($adm == 0) { $r2[] = _button('Save', 'save' . $item . '()'); $r3[] = 'Speichert das Formular mit <b>aktualisierten</b> Daten.'; } else { $r2[] = _button('Accept', 'accept' . $item . '()'); $r3[] = 'Den Antrag in dieser Form <b>akzeptieren</b>, alle Daten vorhanden'; $r2[] = _button('Reject', 'reject' . $item . '()'); $r3[] = 'Antrag ist fehlerhat - <b>abweisen</b> und dem Benutzer wieder als zurückgewiesen freischalten.'; } break; case 3: if ($adm > 0) { $r2[] = _button('Process', 'process' . $item . '()'); $r3[] = 'Aktion durchführen und in das Ligasystem <b>übernehmen</b> - Spieler anlegen bzw. Team anlegen usw ...'; $r2[] = _button('Reject', 'reject' . $item . '()'); $r3[] = 'Antrag ist fehlerhat - <b>abweisen</b> und dem Benutzer wieder als zurückgewiesen freischalten.'; } break; case 5: // If the request is processed, user controls shows invoice ... if ($adm > 0) { $r2[] = _button('Close', 'close' . $item . '()'); $r3[] = 'Bearbeitung dieses Antrages beenden und als geschlossen ablegen.'; $r2[] = _button('Delete', 'deleterequest()'); $r3[] = 'Diesen Antrag <b>löschen</b> und aus dem System entfernen.'; } else { $r2[] = _button('Rechnung', 'invoice' . $item . '()'); $r3[] = 'Für diesen Antrag eine Rechnung erstellen.'; } break; case 6: if ($adm > 0) { $r2[] = _button('Open', 'reject' . $item . '()'); $r3[] = 'Antrag erneut öffnen und dem Benutzer wieder als zurückgewiesen freischalten.'; $r2[] = _button('Archive', 'archive' . $item . '()'); $r3[] = 'Diesen Antrag archivieren.'; $r2[] = _button('Delete', 'deleterequest()'); $r3[] = 'Diesen Antrag <b>löschen</b> und aus dem System entfernen.'; } else { $r2[] = _button('Rechnung', 'invoice' . $item . '()'); $r3[] = 'Für diesen Antrag eine Rechnung erstellen.'; } break; } if ($adm > 0) { $r2[] = _button('History', 'historywf()'); $r3[] = 'Zeige die Bearbeitung dieses Antrages in einem neuen Fenster.'; } $RS[] = $r2; $RS[] = $r3; // OUTPUT // $OUT = '<div id="pmsg"></div><table><tr><td valign=\'top\' class=\'bluebox\'>Kommentar</td>'; $OUT = $OUT . '<td>' . _input(1, 'rcomment', $obj['reqcomment'], 80, 100) . '</td></table>'; return $OUT = $OUT . '<table>' . RecordsetToDataTable($RS, array(0, 1, 2, 3)) . '</table>'; }
} 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 * placement no simple enumeration here */
$location_name = strip_tags($_GET['location']); } else { $location_name = ""; } if (isset($_GET['locationid']) && is_numeric($_GET['locationid'])) { $location_id = strip_tags($_GET['locationid']); } else { $location_id = 0; } if (isset($_GET['vereinid']) && is_numeric($_GET['vereinid'])) { $verein_id = strip_tags($_GET['vereinid']); } else { $verein_id = 0; } if (isset($_GET['eventtype']) && is_numeric($_GET['eventtype'])) { $evtype_id = strip_tags($_GET['eventtype']); } else { $evtype_id = 0; } if (isset($_GET['eventid']) && is_numeric($_GET['eventid'])) { $event_id = strip_tags($_GET['eventid']); } else { $event_id = 0; } $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname); $RS = DB_listTeams($dbi, $event_id, $evtype_id, $event_name, $event_active, $team_name, $verein_id, $verein_name, $location_id, $location_name); $OUT = "<table class=\"tchild\" id=\"teamtable\" name=\"teamtable\">"; $OUT = $OUT . RecordsetToDataTable($RS, array(2, 3, 5, 7, 9)); $OUT = $OUT . "</table>"; header('Content-Type: application/xhtml+xml; charset=ISO-8859-1'); echo $OUT;
if (eregi("<[^>]*script*\"?[^>]*>", $secvalue) or eregi("\\([^>]*.*\"?[^>]*\\)", $secvalue)) { die("X"); } } require_once "../code/config.php"; require_once "../includes/sql_layer.php"; require_once "../api_rs.php"; require_once "../api_format.php"; $event_code = 0; $limit = 10; if (isset($_POST['eventid'])) { $event_code = strip_tags($_POST['eventid']); } if (isset($_POST['limit'])) { $limit = strip_tags($_POST['limit']); } if (!is_numeric($event_code)) { return 0; } if (!is_numeric($limit)) { return 0; } $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname); $RSH = DB_listEventTopWinners($dbi, $event_code, $limit, 'H'); $ROWSH = RecordsetToDataTable($RSH, array(0, 1, 2)); $HEADH = "Top 10 Sieg Spieler Herren"; $RSD = DB_listEventTopWinners($dbi, $event_code, $limit, 'D'); $ROWSD = RecordsetToDataTable($RSD, array(0, 1, 2)); $HEADD = "Top 10 Sieg Spieler Damen"; header('Content-Type: application/html; charset=ISO-8859-1'); echo "<table width=100%><tr><td><h3>{$HEADH}</h3></td><td><h3>{$HEADD}</h3></td></tr>" . "<tr><td><table>" . $ROWSH . "</table></td><td><table>" . $ROWSD . "</table></td></tr></table>";
function _listTeamPlayers($eventgroup) { # #// List all Players with their teams for the actual eventgroup #// Hyperlinked list ??? # global $dbi, $tdbg; #TODO replaye by event-config $LigaStichtag = "2008-09-01"; echo form_EventGroupSelect('ls_debug.php?func=allplayers', '', $eventgroup); if (!$eventgroup > 0) { return; } $RS = DB_listEventTeamPlayers($dbi, $eventgroup, 0, '', 0, '', 1, 0, 'team', $LigaStichtag); // field(12) is the day count if positive than youth player <18J else return 1 /* foreach($RS as $r){ #echo $r[12]; if ($r[12]>0) { $r[12]=0; }else { $r[12]=1; } } */ $FIELDS = array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12); $ROWS = RecordsetToDataTable($RS, $FIELDS); $aTH = array("Bewerb", "Saison", "tid", "Teamname", "pid", "Vorname", "Nachname", "PassNr", "PassNr", "18J+"); // OUTPUT echo '<h3>Alle gemeldeten Spieler/Teams der Liga-Gruppe ' . $eventgroup . '</h3>'; echo "<p>Alphabetische Liste aller Teams - <b>aller</b> aktiven Ligen einer Liga Gruppe mit allen gemeldeten Spieler. Falls Spieler innerhalb einer Liga Gruppe in 2 Teams spielen dürfen so werden sie auch 2x angezeigt. Der Stichtag für die Altersgrenze ist der {$LigaStichtag}.</p>"; OpenTable(); echo ArrayToTableHead($aTH); echo "<tr height=5px></tr>"; echo $ROWS; CloseTable(); echo "<p>Anzahl der Spieler: " . count($RS) . "</p>"; }
<?php /** * file : showWFRequestHistory.php * purpose: return request history DATA * params: wfid from WF * returns: HTML Table */ foreach ($_POST as $secvalue) { if (eregi("<[^>]*script*\"?[^>]*>", $secvalue) or eregi("\\([^>]*.*\"?[^>]*\\)", $secvalue)) { die("X"); } } require_once "../code/config.php"; require_once "../includes/sql_layer.php"; require_once "../theme/Lite/theme.php"; require_once "../lsdbcontroller.php"; require_once '../api_rs.php'; require_once '../api_format.php'; if (isset($_POST['wfid']) && is_numeric($_POST['wfid']) && $_POST['wfid'] != "undefined") { $wfid = $_POST['wfid']; } else { $wfid = 0; } $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname); $RS = DB_listWFRequestHistory($dbi, $wfid); $aTH = array('ID', 'Request', 'Date', 'User', 'Status', 'Message'); $OUT = '<table>' . ArrayToTableHead($aTH); $OUT = $OUT . RecordsetToDataTable($RS, array(0, 1, 2, 3, 4, 5)); header('Content-Type: application/html; charset=ISO-8859-1'); echo $OUT . '</table>';