function fnGetTransactionsData() { global $wpdb; $data = array(); $query = "SELECT * FROM " . $this->tableName; if (isset($_REQUEST['tid'])) { $query .= ' WHERE team_id =' . $_REQUEST['tid']; } if (isset($_REQUEST['pt_payment_methods']) && $_REQUEST['pt_payment_methods'] !== "0") { $query .= " AND method='" . $_REQUEST['pt_payment_methods'] . "'"; } if (isset($_REQUEST['pt_payment_type']) && $_REQUEST['pt_payment_type'] !== "0") { $query .= " AND type='" . $_REQUEST['pt_payment_type'] . "'"; } if (isset($_REQUEST['s']) && $_REQUEST['s'] !== "") { $query .= " AND transid = '" . $_REQUEST['s'] . "' OR subid ='" . $_REQUEST['s'] . "' OR name LIKE '%" . $_REQUEST['s'] . "%' OR details LIKE '%" . $_REQUEST['s'] . "%' "; } $myrows = $wpdb->get_results($query); foreach ($myrows as $rows) { $transDetails = json_decode($rows->trans_detail, true); $teamname = get_team_name($rows->team_id); $payerName = $rows->donator_name != '' ? $rows->donator_name : ''; $data[] = array('id' => $rows->id, 'transid' => $rows->trans_id, 'method' => $rows->payment_type, 'payername' => $payerName, 'teamname' => $teamname, 'amount' => $rows->amount, 'show_amount' => $rows->show_amount ? 'Yes' : 'No', 'timestamp' => $rows->timestamp); } return $data; }
function setup_game_info() { global $smarty; global $GAMEID; global $Link; $gameInfoSelect = 'SELECT gameID,gameTime,gameGuestTeam,gameHomeTeam FROM ' . GAME; $gameInfoSelect .= ' WHERE gameID=' . $GAMEID; $gameInfoResult = mysql_query($gameInfoSelect, $Link) or die("sp_clubs (Line " . __LINE__ . "): " . mysql_errno() . ": " . mysql_error()); if ($gameInfoResult && mysql_num_rows($gameInfoResult) > 0) { $game = mysql_fetch_assoc($gameInfoResult); $gameGuestID = $game['gameGuestTeam']; $gameHomeID = $game['gameHomeTeam']; $smarty->assign('gameTime', date('D, M j, Y g:i a', $game['gameTime'])); $smarty->assign('gameGuestTeam', get_team_name($gameGuestID)); $smarty->assign('gameHomeTeam', get_team_name($gameHomeID)); } }
function get_args($argv, $port, $team, $host) { $i = 0; while ($argv[$i]) { if ($argv[$i] == "-n" && isset($argv[$i + 1]) == TRUE) { if (($team = get_team_name($argv[$i + 1])) == -1) { return FALSE; } } if ($argv[$i] == "-p" && isset($argv[$i + 1]) == TRUE) { if (($port = get_port($argv[$i + 1])) == -1) { return FALSE; } } if ($argv[$i] == "-h" && isset($argv[$i + 1])) { if (($host = get_host($argv[$i + 1])) == -1) { return FALSE; } } $i++; } return TRUE; }
define('PAGE_ACCESS_LEVEL', 0); define('PAGE_TYPE', 'PUBLIC'); // Set for every page require 'engine/common.php'; if (isset($_POST['teamid']) && $_POST['teamid'] > 0) { $TEAM = $_POST['teamid']; } else { if (isset($_GET['teamid']) && $_GET['teamid'] > 0) { $TEAM = $_GET['teamid']; } else { $TEAM = 0; } } $pageName = ''; if (isset($TEAM) && $TEAM > 0) { $pageName .= get_team_name($TEAM) . ' '; } $pageName .= get_season_name($SEASON) . ' Season Team Roster'; $smarty->assign('page_name', $pageName); setup_team_candidates(); setup_other_seasons('ROSTER'); // Setup roster require 'includes/inc_roster.php'; // Build the page require 'global_begin.php'; $smarty->display('public/roster.tpl'); require 'global_end.php'; /* * ******************************************************************************** * ******************************************************************************** * **************************L O C A L F U N C T I O N S**************************
$smarty->assign('gameDateLabel', array()); $smarty->assign('gameDate', array()); $smarty->assign('gameTime', array()); $smarty->assign('gameGuestTeam', array()); $smarty->assign('gameHomeTeam', array()); $smarty->assign('gameReferee1', array()); $smarty->assign('gameReferee2', array()); $smarty->assign('gameReferee3', array()); $smarty->assign('postponed', array()); $smarty->assign('announcementID', array()); while ($game = mysql_fetch_array($scheduleResult, MYSQL_ASSOC)) { $gameId = $game['gameID']; $gameDate = date('D, M jS', $game['gameTime']); $gameTime = date('g:i a', $game['gameTime']); $gameGuest = get_team_name($game['gameGuestTeam']); $gameHome = get_team_name($game['gameHomeTeam']); $gameRef1 = get_player_name($game['gameReferee1']); $gameRef2 = get_player_name($game['gameReferee2']); $gameRef3 = get_player_name($game['gameReferee3']); $gamePostponed = $game['postponed']; if ($game['announcementID'] > 0) { $gameAnnouncementId = $game['announcementID']; } else { $gameAnnouncementId = 'NA'; } $gameDateLabel = ''; if ($todayBeginningOfDay <= $game['gameTime'] && $game['gameTime'] <= $todayEndOfDay) { $gameDateLabel .= 'Today'; } else { if ($tomorrowBeginningOfDay <= $game['gameTime'] && $game['gameTime'] <= $tomorrowEndOfDay) { $gameDateLabel .= 'Tomorrow';
function getSelectedGameInfo($selectedGameId) { global $Link; $columns = 'gameID, gameTime, gameGuestTeam, gameHomeTeam'; $query = 'SELECT ' . $columns . ' FROM ' . GAME . ' WHERE gameId=' . $selectedGameId; $result = mysql_query($query, $Link) or die("sp_clubs (Line " . __LINE__ . "): " . mysql_errno() . ": " . mysql_error()); if ($result && mysql_num_rows($result) > 0) { $game = mysql_fetch_array($result, MYSQL_ASSOC); return date('D, M j @ g:i a', $game['gameTime']) . ' - ' . get_team_name($game['gameGuestTeam']) . ' VS ' . get_team_name($game['gameHomeTeam']); } return null; }
* TEAM == Player stats only when they play for respected team. * ALL == Player stats of all games they have played in. */ if (isset($_GET['stattype']) && ($_GET['stattype'] == 'TEAM' || $_GET['stattype'] == 'ALL')) { $STATTYPE = $_GET['stattype']; } else { if (isset($_POST['stattype']) && ($_POST['stattype'] == 'TEAM' || $_POST['stattype'] == 'ALL')) { $STATTYPE = $_POST['stattype']; } else { $STATTYPE = 'TEAM'; } } //DB Connection //global $Link; // Assign page name $smarty->assign('page_name', get_season_name($SEASON) . ' ' . get_team_name($TEAM)); // Setup Form // Setup Team Banner setup_team_colors(); // Setup Team Rep setup_team_rep(); // Setup Team Record setup_team_record(); // Setup Team Picture setup_team_picture(); // Setup Team Roster setup_team_roster(); // Setup Team Stats setup_team_stats(); // Setup Team Sponsors setup_team_sponsors();
} } //Check for Rep Id if (isset($_GET['teamrep']) && $_GET['teamrep'] > 0) { $TEAMREP = $_GET['teamrep']; } else { if (isset($_POST['teamrep']) && $_POST['teamrep'] > 0) { $TEAMREP = $_POST['teamrep']; } else { $TEAMREP = 0; } } } else { header("Location: teamrepmanager.php"); } $teamName = get_team_name($TEAMID); $smarty->assign('teamName', $teamName); $smarty->assign('currentTeamRep', $TEAMREP); $smarty->assign('teamid', $TEAMID); setup_rep_form(); if (isset($_POST['action']) && $_POST['action'] == "Edit Rep") { process_editrep_form(); header("Location: teamrepmanager.php"); } $pageName = 'Edit Team Rep for ' . $teamName; $smarty->assign('page_name', $pageName); // Build the page require 'global_begin.php'; $smarty->display('admin/editteamrep.tpl'); require 'global_end.php'; /*
<?php foreach ($data->popularTeams as $teamRank) { ?> <div class="media"> <div class="pull-left"> <img src="<?php echo base_url(); ?> /uploads/teams/<?php echo get_logo($teamRank->team, 'team'); ?> " style="height: 50px;" /> </div> <div class="media-body"> <h5 class="media-heading"><?php echo get_team_name($teamRank->team); ?> </h5> Played <?php echo $teamRank->rank; ?> times </div> </div> <?php } ?> </div> </div> </div>
highlight: "#5AD3D1", label: "Win Percentage" }, { value: <?php echo $stats["all"]["loss_percentage"]; ?> , color:"#F7464A", highlight: "#FF5A5E", label: "Losing Percentage" } ]; </script> <section class="name"> <h1> <?php $name = get_team_name($id); echo "Team" . "<span>­" . $name["team_name"] . "</span>"; ?> </h1> </section> <?php include "sections/generic/games-view.php"; ?> <?php include "sections/generic/money-view.php";