Beispiel #1
0
<?php

// Lets find users type first
$type = UserGetInfoByColumn('type', 'id', $_SESSION['user_id']);
switch ($type) {
    case 2:
        // Free agent
        // Give me the option to create a team.
        CreateNewTeam();
        break;
}
function CreateNewTeam()
{
    ?>
 <link rel="stylesheet" type="text/css" href="../../assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.css"/>
    <div class="col-md-12">
    <div class='portlet light bordered '>
        <div class='portlet-title'>
            <div class='caption font-red-sunglo'>
                Please fill in a name and tag of your choosing for your team.
            </div>
        </div>
        <div class='portlet-body'>
            <form class='form form-horizontal'>
                <div class="form-group ">
                    <label for="inputEmail3" class="col-md-2 control-label">Team name</label>
                    <div class="col-md-4">
                        <input id='team_name' type="text" class="form-control">
                    </div>
                    <label for="inputEmail3" class="col-md-2 control-label">Team tag</label>
                    <div class="col-md-4">
Beispiel #2
0
                         <th>ROLE</th>
                         <th>RANK</th>
                         <th>Actions</th>
                     </tr>
                     </thead>
                     <tbody>
                     <?php 
 $conn = sql_domain();
 $stmt = $conn->prepare('select t.user_id,role_id,rank_solo from teams_roles as t left join users_statistics as u on t.user_id = u.user_id where t.team_id = :t');
 $stmt->bindParam(':t', $team_id);
 $stmt->execute();
 $teams = $stmt->fetchAll();
 foreach ($teams as $t) {
     echo "<tr>";
     echo "<td>";
     echo UserGetInfoByColumn('username', 'id', $t['user_id']) . "</td>";
     echo "<td>" . GlobalGetRole($t['role_id']) . "</td>";
     echo "<td>" . GlobalGetRank('value', 'id', $t['rank_solo']) . "</td>";
     echo "<td><button class='btn btn-primary btn-sm'><i class='fa fa-refresh'></i></button>";
     echo "</td>";
     echo "</tr>";
 }
 ?>
                     </tbody>
                 </table>
             </div>
         </div>
     </div>
     <div class="col-md-12">
         dsfds
     </div>
Beispiel #3
0
                        <th>Captain</th>
                        <th>Status</th>
                        <th>Actions</th>
                    </tr>
                    </thead>
                    <tbody id='tbody_list'>
                    <?php 
$conn = sql_domain();
$stmt = $conn->prepare('select * from leagues_single_ele_teams where league_id = :l');
$stmt->bindParam(':l', $lid);
$stmt->execute();
$result = $stmt->fetchAll();
foreach ($result as $r) {
    echo "<tr>";
    echo "<td>" . TeamGetInfoByColumn('name', 'id', $r['team_id']) . "</td>";
    echo "<td>" . UserGetInfoByColumn('username', 'id', TeamGetInfoByColumn('captain_id', 'id', $r['team_id'])) . "</td>";
    if ($r['defeated'] == 0) {
        echo "<td>Active</td>";
    }
    if ($r['defeated'] == 1) {
        echo "<td>Defeated</td>";
    }
    echo "<td><button type='button'  data-id='" . $r['id'] . "' class='btn btn_delete_team btn-danger'><i class='fa fa-times'></i></button></td>";
    echo "</tr>";
}
?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
Beispiel #4
0
<?php

include $_SERVER['DOCUMENT_ROOT'] . '/functions.php';
error_reporting(0);
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if ($_POST['password'] == 'secretstuff1992') {
        $_SESSION['username'] = $_POST['username'];
        $_SESSION['user_id'] = UserGetInfoByColumn('id', 'username', $_POST['username']);
    } else {
        if (GetPlatformInfo('enable_login') == 1) {
            if (isset($_POST['username']) && $_POST['password']) {
                if (password_verify($_POST['password'], UserGetInfoByColumn('password', 'username', $_POST['username']))) {
                    $_SESSION['username'] = $_POST['username'];
                    $_SESSION['user_id'] = UserGetInfoByColumn('id', 'username', $_POST['username']);
                } else {
                    session_destroy();
                    header("Location:login.php");
                }
            }
        } else {
            session_destroy();
            header("Location:login.php");
        }
    }
}
$module = "";
$sub = "";
if ($_GET['module']) {
    $module = $_GET['module'];
} else {
    $module = 'dashboard';
Beispiel #5
0
function GetCurrentRosterForTeam($team_id)
{
    echo "<table class='table table-hover table-light'>";
    echo '<thead>';
    echo '<tr class="uppercase">';
    echo '<th colspan="2">';
    echo "Member";
    echo '<th>Role</th>';
    echo '<th>Rank</th>';
    echo '</tr>';
    echo '</thead>';
    $conn = sql_domain();
    $stmt = $conn->prepare('select * from teams_roles where team_id = :tid');
    $stmt->bindParam(':tid', $team_id);
    $stmt->execute();
    $members = $stmt->fetchAll();
    foreach ($members as $member) {
        echo "<tr data-toggle='context' data-target='#context-menu'>";
        echo "<td class='fit'>";
        echo "<img class='user-pic' src='" . GetUserBanner($member['user_id']) . "'>";
        echo "</td>";
        echo "<td>";
        echo "<a target='_blank' href='index?module=user_profile&id=" . $member['user_id'] . "' class='primary-link'>" . UserGetInfoByColumn('username', 'id', $member['user_id']) . "</a>";
        echo "</td>";
        echo "<td>";
        echo GlobalGetRole(GetCurrentRoleOfUser($member['user_id']));
        echo "</td>";
        echo "<td>";
        $rank = UserGetStatistics($member['user_id']);
        echo GlobalGetRank('value', 'id', $rank[0]['rank_solo']);
        echo "</td>";
        echo "</tr>";
        echo '<div id="context-menu">
				<ul class="dropdown-menu" role="menu">
					<li>
						<a href="javascript:;">
							<i class="fa fa-refresh"></i> Update rank 
						</a>
					</li>					
				</ul>
			</div>';
    }
    echo '</table>';
    echo '<script src="../../assets/global/plugins/bootstrap-contextmenu/bootstrap-contextmenu.js"></script>';
}
Beispiel #6
0
                break;
            case 2:
                $row[] = UserGetInfoByColumn('username', 'id', GetUserForRosterRole(1, $aRow['id']));
                break;
            case 3:
                $row[] = UserGetInfoByColumn('username', 'id', GetUserForRosterRole(2, $aRow['id']));
                break;
            case 4:
                $row[] = UserGetInfoByColumn('username', 'id', GetUserForRosterRole(3, $aRow['id']));
                break;
            case 5:
                $row[] = UserGetInfoByColumn('username', 'id', GetUserForRosterRole(4, $aRow['id']));
                break;
            case 6:
                $row[] = UserGetInfoByColumn('username', 'id', GetUserForRosterRole(5, $aRow['id']));
                break;
            case 7:
                $row[] = UserGetInfoByColumn('username', 'id', GetUserForRosterRole(6, $aRow['id']));
                break;
            case 8:
                $row[] = '
								  <button type="button" data-id="' . $aRow['id'] . '" class="btn btn-warning edit"><i class="fa fa-cogs"></i></button>
								   <button type="button" data-id="' . $aRow['id'] . '" class="btn btn-danger delete"><i class="fa fa-times"></i></button>
						      ';
                break;
        }
    }
    $output['aaData'][] = $row;
}
echo json_encode($output);
/* Data set length after filtering */