Exemplo n.º 1
0
                contentType : false,
                success : function(res){
                	if(res == 0){
                		alert("Team name already exists");
                	}else if(res ==1){
                		window.location.reload();
                	}else if($res == 2){
                		alert('Something is wrong with your logo. Try again later');
                		window.location.reload();
                	}               	
                }
            })
        })
    </script>		
	<?php 
}
?>
<script>
	if("<?php 
echo $type;
?>
" > 2){
		window.location.href= "index.php?module=teams&id=<?php 
echo GetTeamOfUser($_SESSION['user_id']);
?>
";
	}
</script>


Exemplo n.º 2
0
    if (!$team_id) {
        echo "Invalid team.";
        return;
    }
    // Query static shizzle so we can lower the amount of querys ( name, captainname and stuff)
    $team_name = TeamGetInfoByColumn('name', 'id', $team_id);
    $team_tag = TeamGetInfoByColumn('tag', 'id', $team_id);
    // Check if the user is a captain
    $captain_id = TeamGetInfoByColumn('captain_id', 'id', $team_id);
    $c_captain = false;
    if ($captain_id == $_SESSION['user_id']) {
        $c_captain = true;
    }
    // Check if the user is a member
    $c_member = false;
    if (GetTeamOfUser($_SESSION['user_id']) == $team_id) {
        $c_member = true;
    }
    ?>
<div class="row">
    <div class="col-md-2">
        <div class="box box-primary">
            <div class="box-body box-profile">
                <img class="profile-user-img img-responsive img-circle" style="width:180px;" src="<?php 
    echo GetTeamBanner($team_id);
    ?>
" alt="User profile picture">
                <h3 class="profile-username text-center"><?php 
    echo $team_name;
    ?>
</h3>
Exemplo n.º 3
0
GlobalRankSelection('current_rank', $current_rank);
?>
		    </div>		 
		    <label for="inputEmail3" class="col-md-2 control-label">Set password</label>
		    <div class="col-md-4">
				<input id='password' type="text" class='form-control'/>
		    </div>		 
 		 </div>
 		  <hr>
 		 <h4 class='form-section'>Team related</h4>  
 		 	         
       <div class="form-group ">
		    <label for="inputEmail3" class="col-md-2 control-label">Current team</label>
		    <div class="col-md-4">
				<?php 
GetCurrentTeamSelection('current_team', GetTeamOfUser($user_id));
?>
		    </div>		
		    <label for="inputEmail3" class="col-md-2 control-label">Current role</label>
		    <div class="col-md-4">
				<?php 
GlobalRoleSelection('current_role', GetCurrentRoleOfUser($user_id));
?>
		    </div>		        
 		 </div>

      </form>
      </div>
     <div class="modal-footer">
		<button type="button" data-dismiss='modal' class="btn btn-primary">Close</button>
		<button type='button'  data-dismiss='modal'  id='save_user' class='btn btn-success'>Save</button>
Exemplo n.º 4
0
        switch ($key) {
            case "username":
                $row[] = "<a href='index?module=user_profile&id=" . $aRow['id'] . "' target='_blank'>" . $aRow["username"] . "</a>";
                break;
            case "email":
                $row[] = $aRow["email"];
                break;
            case "type":
                $row[] = GlobalGetAccountType($aRow['type']);
                break;
            case "rank":
                $rank = UserGetStatistics($aRow['id']);
                $row[] = GlobalGetRank('value', 'id', $rank[0]['rank_solo']);
                break;
            case "team":
                $row[] = TeamGetInfoByColumn('name', 'id', GetTeamOfUser($aRow['id']));
                break;
            case "role":
                $row[] = GlobalGetRole(GetCurrentRoleOfUser($aRow['id']));
                break;
            case "last_login":
                if (date('d-m-Y H:i:s', strtotime($aRow['last_login'])) == '01-01-1970 01:00:00') {
                    $row[] = "No data";
                } else {
                    $row[] = date('d-m-Y H:i:s', strtotime($aRow['last_login']));
                }
                break;
            case 'actions':
                $row[] = '
  											  <button type="button" data-id="' . $aRow['id'] . '" class="btn btn-danger delete"><i class="fa fa-times"></i></button>
 											  <button type="button" data-id="' . $aRow['id'] . '" class="btn btn-warning edit"><i class="fa fa-cogs"></i></button>