-
Notifications
You must be signed in to change notification settings - Fork 0
/
success-stories.php
206 lines (188 loc) · 9.16 KB
/
success-stories.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<?php
session_start();?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Arid Alumni | Update Profile</title>
<?php include "include/link.php"; ?>
</head>
<body>
<?php include "include/navbar.php"; ?>
<?php
include('include/connection.php');
if(isset($_REQUEST['btn']))
{
$department= $_REQUEST['department'];
$name= $_REQUEST['name'];
$grad_year= $_REQUEST['grad_year'];
$img = $_FILES['img'];
$des = mysqli_real_escape_string($conn, $_REQUEST['des']);
$uploadDirectory = 'files/';
$uploadedFile = $uploadDirectory . uniqid() . "_" . $img['name'];
move_uploaded_file($img['tmp_name'], $uploadedFile);
$sql="INSERT INTO `story`(`name`, `grad_year`, `department`, `des`,`img`) VALUES ('$name','$grad_year','$department','$des','$uploadedFile')";
mysqli_query($conn, $sql);
echo "<script>
toastr.success('Thanks for sharing your success story with us!');
</script>";
}
?>
<!-- Page Header Start -->
<div class="page-header mb-0">
<div class="container">
<div class="row">
<div class="col-12" data-aos="fade-down">
<h2>Success Stories</h2>
</div>
<div class="col-12" data-aos="fade-right">
<a href="">Home</a>
<a href="">Success Stories</a>
</div>
</div>
</div>
</div>
<!-- Page Header End -->
<!-- Stories Start -->
<?php if (isset($_SESSION["id"])) { ?>
<div class="booking">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-7">
<div class="booking-content">
<div class="section-header" data-aos="fade-right">
<h2>Hi ! Alumni Share Your Success Stories With Us</h2>
</div>
<div class="about-text" data-aos="fade-right">
<p>
The Arid University Barani Institute acknowledges alumni as
invaluable assets and endeavors to establish an alumni
database through its Career Services and Corporate Linkages
department. This initiative aims to gather comprehensive
information on Arid graduates, encompassing personal details,
education, training, and employment history.
</p>
<p>
This data will be stored in a repository, facilitating the
generation of insightful reports on in-demand jobs, urgent
hiring needs, and industry preferences for
barani-institute-of-sciences-sahiwal graduates. The
implementation of the alumni database fosters strong
connections, encouraging alumni participation in university
affairs, promoting the institution's reputation globally, and
enhancing engagement in events like homecomings and other
university activities.
</p>
</div>
</div>
</div>
<div class="col-lg-5">
<div class="booking-form">
<form method="POST" enctype="multipart/form-data">
<div class="control-group" data-aos="fade-right">
<div class="input-group">
<input type="text" name="name" class="form-control" placeholder="Name"
required="required" />
<div class="input-group-append">
<div class="input-group-text">
<i class="far fa-user"></i>
</div>
</div>
</div>
</div>
<div class="control-group" data-aos="fade-right">
<div class="input-group">
<input type="text" class="form-control" name="grad_year"
placeholder="Graduation Year" required="required" />
<div class="input-group-append">
<div class="input-group-text">
<i class="far fa-calendar"></i>
</div>
</div>
</div>
</div>
<div class="control-group" data-aos="fade-right">
<div class="input-group">
<input type="text" class="form-control" name="department" placeholder="Department"
required="required" />
<div class="input-group-append">
<div class="input-group-text">
<i class="fa fa-user-graduate"></i>
</div>
</div>
</div>
</div>
<div class="control-group" data-aos="fade-right">
<div class="input-group time" id="time" data-target-input="nearest">
<textarea id="success-description" name="des"
placeholder="Write some description about your success..." rows="2"></textarea>
<div class="input-group-append" data-target="#time" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="far fa-edit"></i>
</div>
</div>
</div>
</div>
<div class="control-group" data-aos="fade-right">
<div class="input-group date" id="date" data-target-input="nearest">
<div id="upload-container">
<input type="file" id="file-input" name="img" accept="image/*"
onchange="displayImage()" />
<label for="file-input" id="custom-label">Upload Your Picture</label>
<img id="selected-image" alt="" />
</div>
<div class="input-group-append" data-target="#date" data-toggle="datetimepicker">
<div class="input-group-text">
<i style="margin-top: 0.4rem" class="fas fa-image"></i>
</div>
</div>
</div>
</div>
<div data-aos="fade-up">
<button class="btn custom-btn" name="btn" type="submit">Share</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Stories End -->
<?php } ?>
<!-- Success Stories -->
<br><br>
<div class="container">
<div class="row align-items-center">
<div class="col-lg-7">
<div class="booking-content">
<div class="section-header" data-aos="fade-down">
<h2>Latest Alumni Stories</h2>
</div>
</div>
</div>
</div>
</div>
<section>
<?php
include("include/connection.php");
$qry = "SELECT * FROM story where status=0 ";
$res = mysqli_query($conn, $qry);
while ($a = mysqli_fetch_array($res)) { ?>
<div class="alumni-card">
<div class="alumni-info">
<img src="<?php echo $a['img'] ?>" alt="Alumni 1" data-aos="flip-left" />
<h2 data-aos="flip-left"><?php echo $a['name'] ?></h2>
<p data-aos="flip-left">Graduation : <?php echo $a['grad_year'] ?></p>
<p data-aos="flip-left">Department : <?php echo $a['department'] ?></p>
<p class="alumni-success-description" data-aos="fade-up">
<?php echo $a['des'] ?>
</p>
</div>
</div>
<?php } ?>
</section>
<!-- Success Stories End -->
<!-- Footer Start -->
<?php include "include/footer.php"; ?>
<?php include "include/script.php"; ?>
</body>
</html>