Show sourcecode
The following files exists in this folder. Click to view.
changeowned.php
classes/
createcard.php
database.php
forgot.php
incl/
index.php
leaderboard.php
lineup.php
login.php
logout.php
newpass.php
otherlineup.php
playerinfo.php
projekt.zip
skapatabeller.php
verify.php
playerinfo.php
76 lines UTF-8 Windows (CRLF)
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
71
72
73
74
75
76
<?php
$title = "Spelarinfo";
$pageId = "playerinfo";
$pageStyle = '
figure {
border-radius: 10px;
border-color:#333;
box-shadow: 10px 10px 5px #888;
}
.stats{
border-radius: 10px;
display: grid;
grid-template-columns: auto auto;
border-color:#333;
text-align: center;
}
.stats p{
display: inline-block;
background-color: lightgreen;
margin: 10px 100px;
text-align: center;
}
';
include("incl/default.php");
include("incl/header.php");
?>
<?php
$playerid = htmlspecialchars($_GET["player"], ENT_QUOTES,'UTF-8');
if (is_numeric($playerid != true)) {
die("fel uppgifter");
};
try {
$sql = "SELECT id, name, age, nation, position, rating, pace, shooting, passing, dribbling, defending, physical FROM players WHERE id= $playerid";
$stmt = $dbconn->prepare($sql);
$data = array();
$stmt->execute($data);
while ($res = $stmt->fetch(PDO::FETCH_ASSOC)) {
echo "<div class ='player'>";
echo "<div class='info'>";
echo "<p > Namn: ";
echo htmlentities($res['name']);
echo "</p> <p > Ålder: ";
echo htmlentities($res['age']);
echo "</p> <p > Land: ";
echo htmlentities($res['nation']);
echo "</p> <p > Position: ";
echo htmlentities($res['position']);
echo "</p> <p id='rating'> Rating: ";
echo htmlentities($res['rating']);
echo "</p>";
echo "</div>";
echo "<div class='stats'>";
echo "<p> Snabb: ";
echo htmlentities($res['pace']);
echo "</p> <p> Skott: ";
echo htmlentities($res['shooting']);
echo "</p> <p> Passning: ";
echo htmlentities($res['passing']);
echo "</p> <p> Dribbling: ";
echo htmlentities($res['dribbling']);
echo "</p> <p> Försvar: ";
echo htmlentities($res['defending']);
echo "</p> <p> Fysik: ";
echo htmlentities($res['physical']);
echo "</div>";
echo "</div>";
}
} catch (PDOException $e) {
echo $sql . "<br />" . $e->getMessage();
}
$dbconn = null;
?>
<?php include("incl/footer.php") ?>