This repository has been archived by the owner on Feb 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
invoker.php
70 lines (61 loc) · 2.24 KB
/
invoker.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
require_once('func.php');
if (!empty($_GET['nome']) || !empty($_GET['region'])) {
$API = 'https://'.$_GET['region'].'.api.riotgames.com/lol/summoner/v3/summoners/by-name/'.urlencode($_GET['nome']).'?api_key=<API_KEY>';
$sobreInvocador = json_decode(file_get_contents($API), TRUE);
}
?>
<!DOCTYPE html>
<html>
<head>
<title><?php echo !empty($sobreInvocador['name']) ? $sobreInvocador['name'] : 'Aguardando invocador' ; ?></title>
<link rel="stylesheet" type="text/css" href="\BST\css\bootstrap.css">
<link rel="stylesheet" type="text/css" href="invoker-modify.css">
</head>
<body>
<div>
<div class="caixa-sombra" style="top: 0px;left: 0px;right: 0px;bottom: initial;">
<h1>
<img class="destaque" src="<?php echo pegarIcone(!empty($_GET['nome']), !empty($_GET['region'])) ?>">
<?php echo !empty($sobreInvocador['name']) ? $sobreInvocador['name'] : 'Aguardando invocador' ; ?></h1>
</div>
<div class="campo-direita">
<form class="form-inline" method="GET">
<div class="form-group">
<label class="sr-only">Invocador:</label>
<input type="text" class="form-control" placeholder="Nome de Invocador" name="nome" required>
</div>
<select name="region">
<option value="br1">BR</option>
<option value="eun1">EUNE</option>
<option value="euw1">EUW</option>
<option value="jp1">JP</option>
<option value="kr">KR</option>
<option value="la1">LAN</option>
<option value="la2">LAS</option>
<option value="na1">NA</option>
<option value="oc1">OCE</option>
<option value="tr1">TR</option>
<option value="ru">RU</option>
<option value="pbe1">PBE</option>
</select>
<button type="submit" class="btn btn-default">Invocar</button>
</form>
</div>
</div>
<div class="container">
<div style="background-color: #dcdcdc; text-align: center;"><h2>Maestria</h2></div>
<div class="row">
<div class="container" style="background-color: gray;">
<?php
$mstr = 'https://'.$_GET['region'].'.api.riotgames.com/lol/match/v3/matchlists/by-account/'.$sobreInvocador['accountId'].'?api_key=<API_KEY>';
$mastery = json_decode(file_get_contents($mstr), TRUE);
foreach ($mastery['matches'] as $value) {
echo $value['lane']."<br>";
}
?>
</div>
</div>
</div>
</body>
</html>