-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex_student.php
185 lines (159 loc) · 6.69 KB
/
index_student.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();
require_once 'conn.php';
if ($_SESSION['Loggedin'] == true && $_SESSION['type'] == 'student') {
$query = "SELECT * FROM users_student WHERE email = '". $_SESSION['email'] ."'";
$result = mysqli_query($conn, $query);
$row = mysqli_fetch_array($result);
$id = $row['id'];
$seccion = $row['seccion'];
$contraseñaReal = $row['password'];
}else {
header('location:index.php');
}
?>
<?php include 'includes/header.php'; ?>
<title>Inicio</title>
<link rel="stylesheet" href="css/studentstyles.css">
<?php include 'sidebar3.php'; ?>
<body background="img/fondostudent2.png">
<br>
<img src="img/searchstudent.svg" align="right" name="fon" class="fon" >
<!--<img src="img/dato.svg" align="right" name="doc" class="doc" >-->
<div class="datos">
<div class="shadow p-3 mb-5 bg-white rounded">
<img align="right" src="<?php echo $row['avatar'] ?>" height="100" width="100" alt="">
<h1>Datos del estudiante</h1>
<p>Nombre: <?php echo $row['nombre']; ?> <?php echo $row['apellido']; ?></p>
<p>Seccion: <?php echo $row['seccion']; ?> </p><p> ID de Estudiante: <?php echo $row['id']; ?></p>
</div>
</div>
<div style="overflow-x:auto;" class="tabla">
<div class="shadow p-3 mb-5 bg-white rounded">
<table border="1">
<thead>
<th>Materia</th>
<th>1ra Evaluación</th>
<th>2da Evaluación</th>
<th>3ra Evaluación</th>
<th>4ta Evaluación</th>
<th>Calificacion final</th>
</thead>
<tbody>
<!--artistica-->
<?php
$query_artistica = "SELECT nombre, apellido, seccion, 1ra, 2da, 3ra, 4ta, (1ra+2da+3ra+4ta)/4 as final FROM artistica WHERE id='". $id . "' and seccion ='". $seccion ."' ";
$result_artistica = mysqli_query($conn, $query_artistica);
$row_artistica = mysqli_fetch_array($result_artistica);
?>
<tr>
<td>Artística</td>
<td> <?php echo $row_artistica['1ra'] ?> </td>
<td> <?php echo $row_artistica['2da'] ?> </td>
<td> <?php echo $row_artistica['3ra'] ?> </td>
<td> <?php echo $row_artistica['4ta'] ?> </td>
<td> <?php echo ceil($row_artistica['final']); ?> </td>
</tr>
<!--fihr-->
<?php
$query_fihr = "SELECT nombre, apellido, seccion, 1ra, 2da, 3ra, 4ta, (1ra+2da+3ra+4ta)/4 as final FROM fihr WHERE id='". $id . "' and seccion ='". $seccion ."' ";
$result_fihr = mysqli_query($conn, $query_fihr);
$row_fihr = mysqli_fetch_array($result_fihr);
?>
<tr>
<td>Formacion Integral, Humana y Religiosa</td>
<td> <?php echo $row_fihr['1ra'] ?> </td>
<td> <?php echo $row_fihr['2da'] ?> </td>
<td> <?php echo $row_fihr['3ra'] ?> </td>
<td> <?php echo $row_fihr['4ta'] ?> </td>
<td> <?php echo ceil($row_fihr['final']); ?> </td>
</tr>
<!--fisica-->
<?php
$query_fisica = "SELECT nombre, apellido, seccion, 1ra, 2da, 3ra, 4ta, (1ra+2da+3ra+4ta)/4 as final FROM fisica WHERE id='". $id . "' and seccion ='". $seccion ."' ";
$result_fisica = mysqli_query($conn, $query_fisica);
$row_fisica = mysqli_fetch_array($result_fisica);
?>
<tr>
<td>Educación Física</td>
<td> <?php echo $row_fisica['1ra'] ?> </td>
<td> <?php echo $row_fisica['2da'] ?> </td>
<td> <?php echo $row_fisica['3ra'] ?> </td>
<td> <?php echo $row_fisica['4ta'] ?> </td>
<td> <?php echo ceil($row_fisica['final']); ?> </td>
</tr>
<!--ingles-->
<?php
$query_ingles = "SELECT nombre, apellido, seccion, 1ra, 2da, 3ra, 4ta, (1ra+2da+3ra+4ta)/4 as final FROM ingles WHERE id='". $id . "' and seccion ='". $seccion ."' ";
$result_ingles = mysqli_query($conn, $query_ingles);
$row_ingles = mysqli_fetch_array($result_ingles);
?>
<tr>
<td>Inglés</td>
<td> <?php echo $row_ingles['1ra'] ?> </td>
<td> <?php echo $row_ingles['2da'] ?> </td>
<td> <?php echo $row_ingles['3ra'] ?> </td>
<td> <?php echo $row_ingles['4ta'] ?> </td>
<td> <?php echo ceil($row_ingles['final']); ?> </td>
</tr>
<!--lenguaje-->
<?php
$query_lenguaje = "SELECT nombre, apellido, seccion, 1ra, 2da, 3ra, 4ta, (1ra+2da+3ra+4ta)/4 as final FROM lenguaje WHERE id='". $id . "' and seccion ='". $seccion ."' ";
$result_lenguaje = mysqli_query($conn, $query_lenguaje);
$row_lenguaje = mysqli_fetch_array($result_lenguaje);
?>
<tr>
<td>Lenguaje y literatura</td>
<td> <?php echo $row_lenguaje['1ra'] ?> </td>
<td> <?php echo $row_lenguaje['2da'] ?> </td>
<td> <?php echo $row_lenguaje['3ra'] ?> </td>
<td> <?php echo $row_lenguaje['4ta'] ?> </td>
<td> <?php echo ceil($row_lenguaje['final']); ?> </td>
</tr>
<!--matematicas-->
<?php
$query_matematicas = "SELECT nombre, apellido, seccion, 1ra, 2da, 3ra, 4ta, (1ra+2da+3ra+4ta)/4 as final FROM matematicas WHERE id='". $id . "' and seccion ='". $seccion ."' ";
$result_matematicas = mysqli_query($conn, $query_matematicas);
$row_matematicas = mysqli_fetch_array($result_matematicas);
?>
<tr>
<td>Matemáticas</td>
<td> <?php echo $row_matematicas['1ra'] ?> </td>
<td> <?php echo $row_matematicas['2da'] ?> </td>
<td> <?php echo $row_matematicas['3ra'] ?> </td>
<td> <?php echo $row_matematicas['4ta'] ?> </td>
<td> <?php echo ceil($row_matematicas['final']); ?> </td>
</tr>
<!--naturales-->
<?php
$query_naturales = "SELECT nombre, apellido, seccion, 1ra, 2da, 3ra, 4ta, (1ra+2da+3ra+4ta)/4 as final FROM naturales WHERE id='". $id . "' and seccion ='". $seccion ."' ";
$result_naturales = mysqli_query($conn, $query_naturales);
$row_naturales = mysqli_fetch_array($result_naturales);
?>
<tr>
<td>Ciencias Naturales</td>
<td> <?php echo $row_naturales['1ra'] ?> </td>
<td> <?php echo $row_naturales['2da'] ?> </td>
<td> <?php echo $row_naturales['3ra'] ?> </td>
<td> <?php echo $row_naturales['4ta'] ?> </td>
<td> <?php echo ceil($row_naturales['final']); ?> </td>
</tr>
<!--sociales-->
<?php
$query_sociales = "SELECT nombre, apellido, seccion, 1ra, 2da, 3ra, 4ta, (1ra+2da+3ra+4ta)/4 as final FROM sociales WHERE id='". $id . "' and seccion ='". $seccion ."' ";
$result_sociales = mysqli_query($conn, $query_sociales);
$row_sociales = mysqli_fetch_array($result_sociales);
?>
<tr>
<td>Ciencias Sociales</td>
<td> <?php echo $row_sociales['1ra'] ?> </td>
<td> <?php echo $row_sociales['2da'] ?> </td>
<td> <?php echo $row_sociales['3ra'] ?> </td>
<td> <?php echo $row_sociales['4ta'] ?> </td>
<td> <?php echo ceil($row_sociales['final']); ?> </td>
</tr>
</tbody>
</table>
</div>
</div>
<?php include 'includes/footer.php'; ?>