コード例 #1
0
ファイル: home_sub.php プロジェクト: Battlenub/amateurlcs
                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>
										';
                break;
        }
コード例 #2
0
ファイル: new.php プロジェクト: Battlenub/amateurlcs
		    </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>
	</div>
    </div>
  </div>
<script>
	$("#save_user").on('click',function(){
		$.ajax({
コード例 #3
0
ファイル: functions.php プロジェクト: Battlenub/amateurlcs
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>';
}