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
lineup.php
65 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
<?php
$title = "Startelva";
$pageId = "lineup";
$pageStyle = '
#displaylineup {
border-radius: 10px;
display: grid;
grid-template-columns: auto auto;
border-color:#333;
box-shadow: 10px 10px 5px #888;
text-align: center;
}
#displaylineup > div{
display: inline-block;
background-color: lightgreen;
margin: 10px 100px;
text-align: center;
}
#MV{
grid-column-start: 1;
grid-column-end: 3;
}
h1{
text-align: center;
}
';
require_once("classes/lineup.php");
$newLineup = new Lineup($dbconn);
include("incl/protected.php");
include("incl/header.php");
$userid = $_SESSION['userid'];
$spelare = [];
if (isset($_POST['submit'])) {
for ($i = 1; $i < 8; $i++) {
if (!in_array($_POST[$i], $spelare)) {
$spelare[] = htmlspecialchars($_POST[$i], ENT_QUOTES,'UTF-8');;
$newLineup->addtolineup($userid, $_POST[$i], $i);
}
}
header("Location: " . $_SERVER['REQUEST_URI']); // Redirect to the same page
exit;
}
?>
<section>
<div>
<form action="" method="post">
<?php
$newLineup->ownedplayersbypos(1, $userid, 'ANF');
$newLineup->ownedplayersbypos(2, $userid, 'ANF');
$newLineup->ownedplayersbypos(3, $userid, 'MF');
$newLineup->ownedplayersbypos(4, $userid, 'MF');
$newLineup->ownedplayersbypos(5, $userid, 'FÖR');
$newLineup->ownedplayersbypos(6, $userid, 'FÖR');
$newLineup->ownedplayersbypos(7, $userid, 'MV');
?>
<button type="submit" name="submit">Skapa</button>
</form>
</div>
<?php
$newLineup->displaylineup($userid);
?>
</div>
</section>
<?php include("incl/footer.php") ?>