-
Notifications
You must be signed in to change notification settings - Fork 0
/
mangalist.php
185 lines (165 loc) · 9.03 KB
/
mangalist.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<?php
session_start();
include "includes/mangalist.inc.php";
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title><?php echo $userName.' | Lista Mangá - MinhaLista'?></title>
<meta charset="UTF-8">
<link rel="shortcut icon" href="img/icon1.png">
<link rel="stylesheet" type="text/css" href="css/list.css">
<link rel="stylesheet" type="text/css" href="css/fontawesome.min.css">
</head>
<body>
<div class="page-wrap">
<div class="bg-color"></div>
<div class="container">
<div class="header">
<div class="menu">
<a href="index.php">
<div class="menu-logo" style="background-image: url(img/logo2.png)"></div>
</a>
<div class="menu-buttons">
<div class="menu-content">
<span>Visualizando a</span>
<span class="menu-redirect" id="dropdown2">
<?php
$list = basename( __FILE__ );
if($list == 'animelist.php') {
echo 'Lista de Anime';
}
else {
echo 'Lista de Mangá';
}
?>
</span>
<span>de</span>
<a href="profile.php?userid=<?php echo $userID; ?>" title="Ir para o perfil de <?php echo $userName; ?>"class="menu-redirect"><?php echo $userName; ?></a>
<i class="fa fa-angle-down" id="dropdown"></i>
</div>
<div class="list-display-none" id="display">
<?php
if($list == 'animelist.php') {
echo '<a href="mangalist.php?userid='.$userID.'&status=5">Lista Manga</a>';
}
else {
echo '<a href="animelist.php?userid='.$userID.'&status=5">Lista Anime</a>';
}
if(isset($_SESSION['userID'])) {
echo '<a href="profile.php?userid='.$_SESSION['userID'].'">Meu perfil</a>';
}
else {
echo '<a href="signup.php">Registrar</a>';
echo '<a href="login.php">Entrar</a>';
}
?>
</div>
</div>
</div>
</div>
<div class="list-container">
<div class="list-background" style=background-image:url(media/users/bannerList/<?php echo $userBannerList.')';?>>
<div class="shadow"></div>
</div>
<div class="status-menu">
<a href="mangalist.php?userid=<?php echo $userID ?>&status=5" class="status-button">TODOS OS MANGÁ</a>
<a href="mangalist.php?userid=<?php echo $userID ?>&status=1" class="status-button">ATUALMENTE LENDO</a>
<a href="mangalist.php?userid=<?php echo $userID ?>&status=2" class="status-button">COMPLETADO</a>
<a href="mangalist.php?userid=<?php echo $userID ?>&status=3" class="status-button">DESISTIU</a>
<a href="mangalist.php?userid=<?php echo $userID ?>&status=4" class="status-button">PLANEJA LER</a>
</div>
<div class="list-status">
<?php
$status = $_GET['status'];
switch($status) {
case '1':
$status = 'ATUALMENTE LENDO';
break;
case '2':
$status = 'COMPLETADO';
break;
case '3':
$status = 'DESISTIU';
break;
case '4':
$status = 'PLANEJA LER';
break;
case '5':
$status = 'TODOS OS MANGÁ';
break;
}
echo $status;
?>
</div>
<table class="list">
<tr class="list-table-header">
<td class="data-header status"></td>
<td class="data-header rank">#</td>
<td class="data-header image">Avatar</td>
<td class="data-header title">Mangá</td>
<td class="data-header score">Pontuação</td>
<td class="data-header type">Tipo</td>
<td class="data-header progress">Capítulos</td>
<td class="data-header progress">Volumes</td>
</tr>
<?php
for($i = 0, $ii = 1; $i < $resultCheck, $i < count($mangaID), $i < count($mangaTitle), $i < count($mangaAvatar), $i < count($mangaType), $i < count($mangaChapters), $i < count($mangaVolumes), $i < count($userStatus), $i < count($userScore), $i < count($userChapters), $i < count($userVolumes); $i++, $ii++) {
if($userStatus[$i] == '1') {
$userStatus[$i] = 'watching';
}
if($userStatus[$i] == '2') {
$userStatus[$i] = 'completed';
}
if($userStatus[$i] == '3') {
$userStatus[$i] = 'dropped';
}
if($userStatus[$i] == '4') {
$userStatus[$i] = 'plantowatch';
}
if(empty($userScore[$i])) {
$userScore[$i] = '-';
}
if(empty($mangaChapters[$i])) {
$mangaChapters[$i] = '?';
}
if(empty($mangaVolumes[$i])) {
$mangaVolumes[$i] = '?';
}
echo'
<tr class="list-table-data">
<td class="data status '.$userStatus[$i].'"></td>
<td class="data rank">'.$ii.'</td>
<td class="data image">
<a href="manga.php?mangaid='.$mangaID[$i].'" class="avatar" style="background-image: url(media/manga/avatar/'.$mangaAvatar[$i].')"></a>
</td>
<td class="data title">
<a href="manga.php?mangaid='.$mangaID[$i].'">'.$mangaTitle[$i].'</a>
</td>
<td class="data score">'.$userScore[$i].'</td>
<td class="data type">'.$mangaType[$i].'</td>
<td class="data progress">'.$userChapters[$i].' / '.$mangaChapters[$i].'</td>
<td class="data progress">'.$userVolumes[$i].' / '.$mangaVolumes[$i].'</td>
</tr>'
;
}
?>
</table>
<?php
if($resultCheck < 1) {
echo '<div class="block"></div>';
}
?>
<div class="list-total"></div>
</div>
</div>
</div>
<div class="footer">
<div class="copyright">
MinhaLista é uma propriedade de MinhaLista. ©2020 Todos os direitos reservados.
</div>
</div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/script-list.js"></script>
</body>
</html>