-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli-session.php
More file actions
78 lines (64 loc) · 2.37 KB
/
cli-session.php
File metadata and controls
78 lines (64 loc) · 2.37 KB
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
<?php
//get user information
session_start();
include('connection.php');
$userid=$_SESSION['id']; //for client id
// $camp_id = $_SESSION['campid']; // for campus director id
// $head_id = $_SESSION['head'];//for heads
//search client accounts
$query=mysqli_query($conn,"select *from `people` where user_id=$userid");
while($row=mysqli_fetch_array($query))
{
$id=$row['idc'];
$fullname=$row['fullname'];
$profile=$row['profile'];
$office = $row['office'];
}
[$first, $middle, $last] = explode(' ', $fullname);
$firstname = $first;
//user account
$qry=mysqli_query($conn,"select *from `user` where id =$userid");
while($roww = mysqli_fetch_array($qry))
{
$userole = $roww['userole'];
$username = $roww['username'];
$password = $roww['password'];
$position=$roww['position'];
}
/*
//find campus director
$qy=mysqli_query($conn,"select *from `clients` where id=$camp_id");
while($rw=mysqli_fetch_array($qy))
{
$dir_name =$rw['fullname'];
$director = $rw['designation'];
$dir_img = $rw['profile'];
}
//find department head account
$depart = mysqli_query($conn,"select *from `clients` where id = $head_id");
while($line = mysqli_fetch_array($depart))
{
$h_id = $line['id'];
$dept_head = $line['fullname'];
$head_img = $line['profile'];
$head = $line['designation'];
$head_office = $line['office'];
}
*/
//date and time format to be used
date_default_timezone_set('Asia/Manila');//correct
$datte = date("M d, Y");//correct
$time = date("h:i A ");//correct
//University details
$iduniv = "1";
$school = mysqli_query($conn, "select *from `university` where iduniv = $iduniv");
while($rrw = mysqli_fetch_array($school))
{
$univ_logo = $rrw['univ_logo'];
$university = $rrw['univ_name'];
$univ_add = $rrw['univ_add'];
$univ_con = $rrw['univ_con'];
$univ_dir = $rrw['univ_dir'];
$univ_dean = $rrw['univ_dean'];
}
?>