-
Notifications
You must be signed in to change notification settings - Fork 0
/
pre_show_consultations.php
49 lines (46 loc) · 1.83 KB
/
pre_show_consultations.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
<?php
/*
* Preparation for show_consultations.php
*
* - used mainly for dividing kantor consultations into 'his created' and 'signed on'
*
*/
if (!isset($current_user))
$current_user = get_logged_user();
if (isset($_GET['kantor']))
$wanted_user = kon_db('SELECT * FROM kon_user WHERE login="' . urldecode($_GET['kantor']) . '"')->fetch_assoc();
else
$wanted_user = $current_user;
if (!$wanted_user) { ?>
<div id="plain_unlogged">
<div class="desc"><?php echo repl_str($GLOBALS['lang']->index->welcome, $GLOBALS['lang']->other->lector); ?></div>
<form action="" method="post">
<input type="hidden" name="nav_to_log">
<button type="submit"><?php echo $lang->login->loginBut . ' / ' . $lang->login->regBut; ?></button>
</form>
</div>
<?php } else if ($current_user && $current_user['login'] == $wanted_user['login'] && $current_user['level'] >= KANTOR_LEVEL) {
if ($current_user['stud_show'] > 0) { ?>
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#created"><?php echo $GLOBALS['lang']->consultation->created; ?></a></li>
<li><a data-toggle="tab" href="#signed"><?php echo $GLOBALS['lang']->consultation->signed; ?></a></li>
</ul>
<div class="tab-content">
<div id="created" class="tab-pane fade in active">
<?php } ?>
<div id="create_new">
<button type="button" class="btn_new_kon" data-toggle="modal" data-target="#new_kon_modal"><span class="glyphicon glyphicon-plus"></span> <?php echo $GLOBALS['lang']->consultation->newKon; ?></button>
</div>
<?php require 'show_consultations.php';
if ($current_user['stud_show'] > 0) { ?>
</div>
<div id="signed" class="tab-pane fade">
<?php $kantor_signed = true; require 'show_consultations.php'; ?>
</div>
</div>
<?php
}
} else {
require 'show_consultations.php';
}
?>