-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproposalpengabdian.php
208 lines (174 loc) · 9.03 KB
/
proposalpengabdian.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
207
208
<?php
include 'connectDb.php';
session_start();
if (!isset($_SESSION['login'])) {
header("Location: loginDosen.php");
}
if(isset($_POST['submit'])){
$nama=$_POST['nama'];
$email=$_POST['email'];
$judul=$_POST['judul'];
$kategori=$_POST['kategori'];
$tanggal = $_POST['tanggal'];
$lokasi = $_POST['lokasi'];
$file = $_FILES['file']['name'];
$file_tmp = $_FILES['file']['tmp_name'];
$file_type=$_FILES['file']['type'];
if ($file_type="application/pdf"){
move_uploaded_file($file_tmp, 'fileproposal/'.$file);
$sql="insert into `proposalpengabdian` (nama,email,judul,kategori,tanggal,lokasi,file) values ('$nama','$email','$judul','$kategori','$tanggal','$lokasi','$file')";
$result=mysqli_query($conn,$sql);
echo'<script>alert("Success")</script>';
}else{
echo'gagal';
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Proposal Pengabdian</title>
<!-- Custom fonts for this template-->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">
<!-- Custom styles for this template-->
<link rel="stylesheet" href="css/dashAuthor.css">
<link href="css/dashboard.min.css" rel="stylesheet">
</head>
<body id="page-top">
<!-- Page Wrapper -->
<div id="wrapper">
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
<!-- Sidebar Toggle (Topbar) -->
<div style='padding-left:2rem;'>
<div>
<button type="button" class="btn btn-outline-success"><a
style="text-decoration:none; color:green;"
href="dashDosen.php">Dashboard</a></button>
</div>
</div>
<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">
<!-- Nav Item - User Information -->
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button
class='btn btn-outline-info'><?php echo "Hallo ".$_SESSION['username']?></button>
</a>
<!-- Dropdown - User Information -->
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="userDropdown">
<a class="dropdown-item" href="logout.php">
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
Logout
</a>
</div>
</li>
</ul>
</nav>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="text-center" style='margin-top:1rem;'>
Ayo unggah proposal pengabdianmu
</div>
<form method="POST" class="formProposal" enctype="multipart/form-data">
<div class="inputProposal">
<label for="exampleFormControlInput1" class="form-label">Username</label>
<input type="text" class="form-control" id="exampleFormControlInput1"
value="<?php echo $_SESSION ['username']?>" name="nama"
style='background-color:whitesmoke;'>
</div>
<div class="inputProposal">
<label for="exampleFormControlInput1" class="form-label">Alamat Email</label>
<input type="text" class="form-control" id="exampleFormControlInput1"
style='background-color:whitesmoke;' name="email">
</div>
<div class="mb-3">
<label for="exampleFormControlTextarea1" class="form-label">Judul Proposal</label>
<input type="text" class="form-control" id="exampleFormControlInput1" name="judul">
</div>
<div class="mb-3">
<label for="exampleFormControlTextarea1" class="form-label">Kategori</label>
<input type="text" class="form-control" id="exampleFormControlInput1" value="Pengabdian"
name="kategori" style='background-color:whitesmoke;'>
</div>
<div class="mb-3">
<label for="exampleFormControlTextarea1" class="form-label">Tanggal Upload</label>
<input type="date" class="form-control" id="exampleFormControlInput1" name="tanggal">
</div>
<div class="mb-3">
<label for="exampleFormControlTextarea1" class="form-label">Lokasi Pengabdian</label>
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3"
name="lokasi"></textarea>
</div>
<div class="mb-3">
<label for="formFile" class="form-label">Unggah Proposal</label>
<input class="form-control" type="file" id="formFile" name="file">
</div>
<div>
<button type="submit" class="btn btn-outline-primary" name="submit"><i
class='fa fa-paper-plane'></i></button>
</div>
</form>
</div>
<!-- End of Main Content -->
<section id='content-wrapper' style='margin-top:4.7rem;'>
<footer class="bg-light py-5">
<div class="container px-4 px-lg-5">
<div class="small text-center text-muted">Copyright © 2022 - <b>SIPPkM</b> STMIK
Horizon Karawang</div>
</div>
</footer>
</section>
<!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>
<!-- Logout Modal-->
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">Select "Logout" below if you are ready to end your current session.
</div>
<div class="modal-footer">
<button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
<a class="btn btn-primary" href="login.html">Logout</a>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin-2.min.js"></script>
<!-- Page level plugins -->
<script src="vendor/chart.js/Chart.min.js"></script>
<!-- Page level custom scripts -->
<script src="js/demo/chart-area-demo.js"></script>
<script src="js/demo/chart-pie-demo.js"></script>
</body>
</html>