forked from adi0311/ApplicationTracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathleave_stud.php
More file actions
123 lines (121 loc) · 3.54 KB
/
leave_stud.php
File metadata and controls
123 lines (121 loc) · 3.54 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
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
<?php
session_start();
if(isset($_SESSION['IS_AUTHENTICATED']) && $_SESSION['IS_AUTHENTICATED'] == 1){
$link = mysqli_connect('localhost', 'root', '');
if(!$link){
die('Failed to connect to server: ' . mysqli_error($link));
}
$db = mysqli_select_db($link,'file tracking');
if(!$db){
die("Unable to select database");
}
$user_id = $_SESSION['USER_ID'];
$qry = "SELECT name FROM student WHERE roll_no = $user_id";
//Execute query
$result = mysqli_query($link,$qry);
//Check whether the query was successful or not
$count = mysqli_num_rows($result);
if($count==1){
$info=mysqli_fetch_array($result);
$name=$info["name"];
}
echo'<html>
<head>
<link rel="stylesheet" type="text/css" href="semantic.min.css">
<link rel="stylesheet" type="text/css" href="semantic.css">
<link rel="stylesheet" type="text/css" href="semantic.min.js">
<link rel="stylesheet" type="text/css" href="semantic.js">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<meta charset="utf-8">
</head>
<body>
<div class="ui secondary inverted segment">
<div class="ui inverted secondary menu">
<a class="active item">
Home
</a>
<a class=" right aligned item" href="/ApplicationTracker/logout.php">
Logout
</a>
</div>
</div>
<div class="ui stackable four column grid">
<div class="two wide column">
</div>
<div class="column">
<div class="ui segment">
<div class="ui small image" style="display:block;">
<svg width="150" height="200">
<image xlink:href="14.jpg" x="0" y="0" width="100%" height="100%"></image>
</svg>
<br>
<div>
<h4>'.$name.'</h4>
</div>
</div>
</div>
<div class="ui vertical steps" style="display:block;">
<a href="/ApplicationTracker/show_stat_stud.php"><div class="ui step">
Leave Status
</div></a>
<a href="/ApplicationTracker/leave_stud.php"><div class="ui active step">
Create Leave
</div></a>
</div>
</div>
<div class="eight wide column ui padded segment">
<div class="column">
<form class="ui form" action="/ApplicationTracker/create_app.php" method="post">
<h4 class="ui dividing header">Leave Application</h4>
<br>
<div class="field">
<div class="two fields">
<div class="field">
<label>From</label>
<div class="ui icon input">
<i class="calendar alternate icon"></i>
<input type="date" name="strdate" placeholder="Click to enter date">
</div>
<div class="ui pointing label">
Enter your leaving date
</div>
</div>
<div class="field">
<label>To</label>
<div class="ui icon input">
<i class="calendar alternate icon"></i>
<input type="date" name="endate" placeholder="Click to enter date">
</div>
<div class="ui pointing label">
Enter your arriving date
</div>
</div>
</div>
</div>
<br>
<div class="field">
<label>Leave type</label>
<select class="ui fluid dropdown" name="type">
<option value="casual">Casual</option>
<option value="medical">Medical</option>
</select>
</div>
<br>
<div class="field">
<label>Purpose</label>
<input type="text" name="purpose" placeholder="Purpose of your leave">
</div>
<br>
<div class="field">
<input class="ui primary button" type="submit" value="Submit" name="submit">
</div>
</form>
</div>
</div>
<div class="two wide column">
</div>
</div>
</body>
</html>';
}
?>