-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcharacters.php
More file actions
85 lines (82 loc) · 3.94 KB
/
Copy pathcharacters.php
File metadata and controls
85 lines (82 loc) · 3.94 KB
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
77
78
79
80
81
82
83
84
85
<?php
session_start();
include "includes/characters.inc.php";
if(!isset($_GET['characterid'])) {
header("HTTP/1.1 404 Not Found");
include "not-found-page.php";
exit();
}
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title><?php echo $characterName.' - MinhaLista';?></title>
<meta charset="UTF-8">
<link rel="shortcut icon" href="img/icon1.png">
<link rel="stylesheet" type="text/css" href="css/characters.css">
<link rel="stylesheet" type="text/css" href="css/menu.css">
<link rel="stylesheet" type="text/css" href="css/footer.css">
<link rel="stylesheet" type="text/css" href="css/fontawesome.min.css">
</head>
<body>
<?php
include "menu.php";
?>
<div class="page-wrap">
<div class="container">
<div class="character-container">
<div class="character-grid">
<div class="character-avatar-favorite">
<a class="character-avatar" style="background-image:url(media/characters/avatar/<?php echo $characterAvatar; ?>"></a>
<?php
if(isset($_SESSION['userID'])) {
if($resultCharacterFavorite > 0) {
echo '<form action="includes/characters.inc.php?characterid='.$characterID.'" method="post">
<input type="submit" name="favorite-delete" value="* Remover dos favoritos" class="favorite-add remove">
</form>
'.$characterFavoritesTotal.' favoritos.';
}
else {
echo '
<form action="includes/characters.inc.php?characterid='.$characterID.'" method="post">
<input type="submit" name="favorite-submit" value="* Adicionar aos favoritos" class="favorite-add">
</form>
'.$characterFavoritesTotal.' favoritos.';
}
}
else {
echo '<div class="not-login">Gostaria de adicionar esse personagem aos seus favoritos? <a href="login.php">Entre</a> ou <a href="register.php">Registre-se</a> primeiro!</div>';
}
?>
</div>
<div class="character-content">
<div class="character-name">
<?php
echo $characterName.' ';
if(isset($_SESSION['userID'])) {
if($_SESSION['userPermissions'] > 0) {
echo '<a href="admin-edit.php?config=edit&characterid='.$characterID.'" class="edit">(Editar)</a>';
}
}
?>
</div>
<div class="character-info">
<?php
if(empty($characterInfo)) {
echo "Nenhuma informação sobre este personagem foi adicionada.";
}
else {
echo $characterInfo;
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include "footer.php";
?>
</body>
</html>