-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbandeja3.php
192 lines (143 loc) · 7.26 KB
/
bandeja3.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
186
187
188
189
190
191
192
<?php require_once('conexion.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bandeja de Entrada</title>
<meta charset="utf-8">
<meta name="viewport" content="width=900px"/>
<!--<link href="https://fonts.googleapis.com/css?family=Muli:300,400,700,900" rel="stylesheet"> -->
<link rel="stylesheet" href="fonts/icomoon/style.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/jquery-ui.css">
<link rel="stylesheet" href="css/owl.carousel.min.css">
<link rel="stylesheet" href="css/owl.theme.default.min.css">
<link rel="stylesheet" href="css/owl.theme.default.min.css">
<link rel="stylesheet" href="css/jquery.fancybox.min.css">
<link rel="stylesheet" href="css/bootstrap-datepicker.css">
<link rel="stylesheet" href="fonts/flaticon/font/flaticon.css">
<link rel="stylesheet" href="css/aos.css">
<link href="css/jquery.mb.YTPlayer.min.css" media="all" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/style.css">
</head>
<body data-spy="scroll" data-target=".site-navbar-target" data-offset="300">
<?php
if($_SESSION['sessionRango']=="administrador"){
include 'menu4.php';
}
if($_SESSION['sessionRango']=="estudiante"){
include 'menu2.php';
}
if($_SESSION['sessionRango']=="profesor"){
include 'menu3.php';
}
if ($_SESSION['sessionRango']==NULL) {
header ("Location: index.php");
}
?>
<div class="site-section ftco-subscribe-1 site-blocks-cover pb-4" style="background-image: url('images/course_2.jpg')">
<div class="container">
<div class="row align-items-end">
<div class="col-lg-7">
<h2 class="mb-0">Bandeja de Entrega</h2>
<p>Aqui puedes visualizar tus correos recientes </p>
</div>
</div>
</div>
</div>
<div></div>
<div class="custom-breadcrumns border-bottom">
<div class="container">
<a href="userAdmin.php">Home</a>
<span class="mx-3 icon-keyboard_arrow_right"></span>
<span class="current">Bandeja de Entrada</span>
</div>
</div>
<div class="site-section">
<div class="container">
<div class="row justify-content-center">
<div class="row">
<div class="col-12">
<div class="row mb-5 justify-content-center text-center">
<h2 class="section-title-underline mb-5">
<span>Tabla de Mensajes</span>
</h2>
</div>
<?php
$ci= $_SESSION['sessionCI'];
//se busca las clases de la ci en sesion
$consulta = "SELECT * FROM contacto" or die("Error en la consulta" . mysqli_error($link));
$resultado = mysqli_query($conection,$consulta) or die ("Hay algo mal en la tabla");
//se crea una tabla para los valores
echo "<table border='1' bordercolor='green' align='center'>";
echo "<tr align='center'>";
echo "<th > Nombre </th>";
echo "<th > Apellido </th>";
echo "<th > Email </th>";
echo "<th > Telefono </th>";
echo "<th > Detalles </th>";
echo "</tr>";
while ($columna = mysqli_fetch_array($resultado)){
?>
<?php
echo "<td align='center'>" . $columna['nombre'] . "</td>";
echo "<td align='center'>" . $columna['apellido'] . "</td>";
echo "<td align='center'>" . $columna['email'] . "</td>";
echo "<td align='center'>" . $columna['telefono'] . "</td>";
$id=$columna['id'];
$email=$columna['email'];
$nombre=$columna['nombre'];
$apellido=$columna['apellido'];
$telefono=$columna['telefono'];
if($columna['view']=="si"){
echo "<td align='center'>" . "<a href='bandejaMaster.php?contacto=$id&email=$email&nombre=$nombre&apellido=$apellido&telefono=$telefono' class='small btn btn-primary px-2 py-2 rounded-0' ><span class='icon-envelope-open'></span> Visto </a>" . "</td>";
}
else{
echo "<td align='center'>" . "<a href='bandejaMaster.php?contacto=$id&email=$email&nombre=$nombre&apellido=$apellido&telefono=$telefono' class='small btn btn-primary px-2 py-2 rounded-0' ><span class='icon-envelope'></span>Nuevo</a>" . "</td>";
}
echo "<td align='center'>" . "<a href='escribirRegistro.php?contactos=$id&email=$email&nombre=$nombre&apellido=$apellido&telefono=$telefono' class='small btn btn-primary px-2 py-2 rounded-0' ><span class='icon-trash'></span>Borrar </a>" . "</td>";
echo "</tr>";
}
echo "</table>";
?>
</div>
</div>
</div>
</div>
</div>
<div class="section-bg style-1" style="background-image: url('images/about_1.jpg');">
<div class="container">
<div class="row">
<div class="col-lg-4">
<h2 class="section-title-underline style-2">
<span>Classroom Endogeno</span>
</h2>
</div>
<div class="col-lg-8">
<p class="lead">Es una webApp desarrollada por un grupo de jovenes que desean llevar a los estudiantes y profesores a experimentar una nueva herramienta.</p>
<p>Classroom Endogeno es la nueva herramienta que promete revolucionar el concepto de salon de clase virtual</p>
</div>
</div>
</div>
</div>
<div class="site-section ftco-subscribe-1" style="background-image: url('images/bg_1.jpg')">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-7">
<h2>Buscar</h2>
<p>Busqueda en la web</p>
</div>
<div class="col-lg-5">
<form method=GET action="http://google.com/search" class="d-flex">
<input type=text name=q size=31 maxlength=255 value="" class="rounded form-control mr-2 py-3" placeholder="Introduce un texto">
<input name=btnG VALUE="busqueda Google" class="btn btn-primary rounded py-3 px-4" type="submit"></input>
</form>
</div>
</div>
</div>
</div>
<?php
include 'cabeceraInfe.php';
?>
</body>
</html>