-
Notifications
You must be signed in to change notification settings - Fork 0
/
publicar.php
110 lines (97 loc) · 5.48 KB
/
publicar.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="google" content="notranslate">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AustrianEconomicsForum</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="img/icon.png">
<script src="php/icon-proxy.php?url=https://kit.fontawesome.com/b685f735ab.js" crossorigin="anonymous"></script>
</head>
<body>
<?php
session_start();
$user = $_SESSION['user'];
if (!isset($user['username']) || strlen($user['username']) < 4) {
header("Location: log-in.html");
}
$id=$user['user-id'];
?>
<div class="container-all-index">
<div class="menu">
<a href="index.php"><img src="img/logo-dark-menu.png" class="menu_logo"></a>
<nav class="navbar">
<a href="index.php">
<div class="menu_item">
<i class="fa-solid fa-house fa-lg" style="color: #ffffff;"></i>
<p>Inicio</p>
</div>
</a>
<div class="menu_item" id="search-button">
<i class="fa-solid fa-magnifying-glass fa-lg" style="color: #ffffff;"></i>
<p>Buscar</p>
</div>
<a href="explore.php">
<div class="menu_item">
<i class="fa-solid fa-compass fa-lg" style="color: #ffffff;"></i>
<p>Explorar</p>
</div>
</a>
<a href="publicar.php">
<div class="menu_item">
<i class="fa-solid fa-plus fa-lg" style="color: #ffffff;"></i>
<p>Publicar</p>
</div>
</a>
<a href="noticias.php" ><div class="menu_item">
<i class="fa-sharp fa-solid fa-newspaper"></i><p>Noticias</p>
</div></a>
<div class="menu_item " id="notificacion">
<i class="fa-solid fa-bell" style="color: #f2f2f2;"></i><p>Notificaciones</p>
<div id="noti-ball"></div>
</div>
<div class="lista-peticiones" id="lista-peticiones"><p style="text-align:center;">No tienes notificaciones pendientes.</p></div>
<a <?php echo "href='perfil.php?id=$id'"?> ><div class="menu_item">
<img src="img/icon.png" class="index-perfil-img"><p><?php echo $user['username']; ?></p>
</div></a>
</nav>
<div class='options-container'>
<form class='closed-options' id='options-form' methos='POST' action='session-destroy.php'>
<ul class='closed-options'id='options-container'>
<li class='options-item'><button type='submit' class='options-button'>Cerrar sesión</button></li>
<li class='options-item'>Modo Día</li>
</ul>
</form>
<div class='menu_item options' id='options-button'><i id='bars' class="fa-sharp fa-solid fa-bars fa-lg"></i><p>Opciones</p></div>
</div>
</div>
<div class="search-bar-container" id="search-bar-container">
<form action="searching.php" method="POST">
<input autocomplete="off" placeholder="Search..." class="search-bar" id='search-bar' name='search-bar' type="text"></input>
<button class='search-button normal_button' id='search-button2' type="submit">Buscar</button>
</form>
</div>
<div id='result'></div>
<div class="content-container">
<form class='public-form' action="validate-publi.php" method='POST' enctype="multipart/form-data">
<input maxlength="100" autocomplete="off" class='input' id='title' name='title' type='text' placeholder='Título del post...' required>
<textarea id='body' name='body' class='input' maxlength='10000' placeholder='Texto del post...' style="height:150px;"></textarea>
<input autocomplete="off" class="input-file" id='file' name='file' type="file" accept="image/*, video/*, audio/*, text/plain, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/pdf">
<p style="margin: 0 auto;">Tamaño máximo de archivos 60MB aprox.</p>
<!--<input autocomplete="off" class='input' type='text' id='hagstag' name='hagstag' placeholder='Introduce temáticas relacionadas con el post: #inflacion #pesoargentino #2023'>-->
<button type="submit" class='normal_button public_button'>Publicar</button>
</form>
<h2 id="progress"></h2>
<img class="loading-publi" src="img/gif_loading.gif">
<div class="archivo-subido"><p>La publicacion se ha subido con éxito!</p><i class="fas fa-check" style="color: #00ff40;"></i></div>
<div class="archivo-fallido"><p>El archivo no se ha podido subir con éxito!</p><i class="fa-solid fa-xmark" style="color: red;"></i></i></div>
</div>
<script src="js/search.js"></script>
<script src='js/options.js'></script>
<script src='js/peticiones-amistad.js'></script>
<script src="js/subir-publicacion.js"></script>
</body>
</html>