-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclass_time_public_en.php
167 lines (122 loc) · 7.29 KB
/
class_time_public_en.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
<?php
# Libreria de funciones
require("modules/common/lib/cam_general.inc.php");
$Query = "SELECT fl_periodo from c_configuracion WHERE cl_configuracion=171 ";
$row = RecuperaValor($Query);
$fl_periodo = str_texto($row[0]);
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous" />
<title>Vanas</title>
</head>
<body>
<br /><br />
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10">
<div class="table-responsive">
<table class="table table-bordered" width="100%">
<thead>
<tr>
<th scope="col" style="background-color:#0162c9;color: #fff;">#</th>
<th scope="col" style="background-color:#0162c9;color: #fff;">Program Name</th>
<th scope="col" style="background-color:#0162c9;color: #fff;">Start Date</th>
<th scope="col" style="background-color:#0162c9;color: #fff;">Term</th>
<th scope="col" style="background-color:#0162c9;color: #fff;">Class Time</th>
<th scope="col" style="background-color:#0162c9;color: #fff;">Time Zone</th>
</tr>
</thead>
<tbody>
<?php
#Muestra resultados de la busqueda.
$Query = "SELECT fl_periodo, nb_periodo ,fe_inicio, ";
$Query .= "(SELECT COUNT(1) FROM k_term b JOIN c_programa p ON p.fl_programa=b.fl_programa WHERE b.fl_periodo=a.fl_periodo AND p.fg_archive='0' )AS no_cursos , ";
$Query .= "CASE WHEN fg_activo='1' THEN 'SI' ELSE 'NO' END fg_activo ";
$Query .= "FROM c_periodo a WHERE a.fl_periodo=$fl_periodo ";
$Query .= "ORDER BY fe_inicio ASC ";
$rs = EjecutaQuery($Query);
for ($i = 1; $row = RecuperaRegistro($rs); $i++) {
$fl_periodo = $row['fl_periodo'];
$nb_periodo = $row['nb_periodo'];
$fe_inicio = $row['fe_inicio'];
$no_cursos = $row['no_cursos'];
$fg_activo = $row['fg_activo'];
$fe_inici = $row['fe_inicio'];
$Query = "SELECT a.fl_programa, nb_programa,no_grado ";
$Query .= "FROM c_programa a, k_term b ";
$Query .= "WHERE a.fl_programa=b.fl_programa ";
$Query .= "AND b.fl_periodo=$fl_periodo AND a.fg_archive='0' AND b.no_grado=1 ";
$Query .= "ORDER BY no_orden, no_grado ";
$rs1 = EjecutaQuery($Query);
$no_programs = CuentaRegistros($rs1);
$nb_programa = "";
$nb_program = "";
$cont_pro = 0;
for ($ii = 1; $roww = RecuperaRegistro($rs1); $ii++) {
$fl_programa = $roww[0];
$nb_programa = str_texto($roww[1]);
$no_grado = $roww['no_grado'];
$cont_pro++
?>
<tr>
<td><?php echo $cont_pro;?></td>
<td><b><?php echo $nb_programa;?></b></td>
<td><?php echo $nb_periodo;?></td>
<td><?php echo $no_grado;?></td>
<td>
<?php
$que = "SELECT fl_class_time,fl_programa FROM k_class_time WHERE fl_programa=$fl_programa AND fl_periodo=$fl_periodo ";
$rs2 = EjecutaQuery($que);
for ($iii = 1; $rowww = RecuperaRegistro($rs2); $iii++) {
$fl_class_time = $rowww['fl_class_time'];
$fl_programa_class = $rowww[1];
$Wqe = "SELECT CASE WHEN cl_dia='1' THEN '" . ObtenEtiqueta(2390) . "'
WHEN cl_dia='2' THEN '" . ObtenEtiqueta(2391) . "'
WHEN cl_dia='3' THEN '" . ObtenEtiqueta(2392) . "'
WHEN cl_dia='4' THEN '" . ObtenEtiqueta(2393) . "'
WHEN cl_dia='5' THEN '" . ObtenEtiqueta(2394) . "'
WHEN cl_dia='6' THEN '" . ObtenEtiqueta(2395) . "'
WHEN cl_dia='7' THEN 'Sunday'
ELSE '" . ObtenEtiqueta(2396) . "' END dia ,no_hora,ds_tiempo
FROM k_class_time_programa WHERE fl_class_time=$fl_class_time
";
$rs3 = EjecutaQuery($Wqe);
$totclass = CuentaRegistros($rs3);
for ($mi = 1; $romi = RecuperaRegistro($rs3); $mi++) {
$nb_di = $romi[0];
$nd_hora = $romi[1];
$ampm = $romi[2];
echo $nb_di . " " . $nd_hora . " " . $ampm;
if ($mi <= ($totclass - 1))
echo", ";
else
echo"";
}
}
?>
</td>
<td>Pacific Time</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
<div class="col-md-1"></div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>