-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathportal2.php
158 lines (115 loc) · 5.14 KB
/
portal2.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
<?php require_once('conexion.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Portal</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_6.jpg')">
<div class="container">
<div class="row align-items-end">
<div class="col-lg-7">
<h2 class="mb-0">Asignaturas</h2>
<p>Visualiza sus asignaturas</p>
</div>
</div>
</div>
</div>
<div></div>
<div class="custom-breadcrumns border-bottom">
<div class="container">
<span class="mx-3 icon-keyboard_arrow_right"></span>
<span class="current">Asignaturas</span>
</div>
</div>
<form action="escribirRegistro.php" method="POST">
<div class="site-section">
<div class="container">
<div class="row mb-5 justify-content-center text-center">
<h2 class="section-title-underline mb-5">
<span>Sus asignaturas</span>
</h2>
</div>
<div class="row justify-content-center">
<div class="col-md-5">
<div class="row">
<input type="hidden" name="ubica" value="definitiva.php">
<div class="col-md-12 form-group">
<label for="username"> Seleccione </label>
<select name="idCurso" id="genero" class="form-control form-control-lg" required>
<?php
$ci= $_SESSION['sessionCI'];
if($_SESSION['sessionRango']=="estudiante"){
$consulta = "SELECT * FROM alumno_has_clases WHERE ci='$ci'" or die("Error en la consulta" . mysqli_error($link));
}
if($_SESSION['sessionRango']=="profesor"){
$consulta = "SELECT * FROM profesor_has_clases WHERE ci='$ci'" or die("Error en la consulta" . mysqli_error($link));
}
$resultado = mysqli_query($conection,$consulta) or die ("Hay algo mal en la tabla");
while ($columna = mysqli_fetch_array($resultado)){
$idclase=$columna['idClase'];
$consulta2= "SELECT asignatura FROM clases WHERE idClase='$idclase' " or die("Error en la consulta" . mysqli_error($link));
$resultado2 = $conection ->query ($consulta2);
$datos2 = $resultado2 ->fetch_assoc();
?>
<ol class="ul-check primary list-unstyled">
<li>
<?php
$valores = $datos2['asignatura'];
$identificador = $columna['idClase'];
echo "<option value='$identificador'>$valores (ID $idclase)</option>"
?>
</li>
<?php
}
?>
</select>
</div>
</div>
<div class="row mb-5 justify-content-center text-center">
<div class="row">
<div class="col-12">
<input name="portal" type="submit" value="Entrar" class="btn btn-primary btn-lg px-5">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
<?php
include 'cabeceraInfe.php';
?>
</body>
</html>