-
Notifications
You must be signed in to change notification settings - Fork 1
/
upload.php
66 lines (63 loc) · 2.47 KB
/
upload.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
<?php
$servername = 'localhost';
$username = 'root';
$password = '';
$db='analyzerdb';
session_start();
$conn = mysqli_connect($servername,$username,$password,$db);
if (!$conn)
{
die("Connection failed: " . mysqli_connect_error());
}
if(!isset($_SESSION['admin-name']))
{
echo '<script type="text/javascript">alert("Log in to continue"); window.location="index.php";</script>';
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Analyzer</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body class="background">
<!--navigation bar-->
<header><div class="navbar">
<ul>
<li><img src="https://bucket.mlcdn.com/a/1192/1192164/images/c9b0cfe3970c4a7ab4c0b3ac6ce5f57a0b55117b.png" class="logo"></li>
<!--Continuous improvement-->
<li><a href="index.php?logged">Home</a></li>
<li><a href="admin.php">Dashboard</a></li>
<!--login-->
<li style="float: right;"><form action="login.php" method="post">
<input type="submit" name="logout" value="Logout" class="logout">
</form></li>
</ul>
</div></header>
<section class="mainPanel" style="width: 100%;">
<div class="top" style="display: inline; padding: 10px;">
<form action="uploadfile.php" enctype="multipart/form-data" method="POST">
</div>
<div class="regular-result" align="center" style="width: 80%; margin: auto; height: auto; padding-top: 2%;">
<div class="secHeading"><font class="text" style="color: #08aeea;">Upload Results</font></div>
<div class="secMain" style="padding: 2%; margin: auto;" align="center">
<div class="instruction">
<div class="tooltip"><i class="fa fa-info-circle" aria-hidden="true" style="color: #08aeea;"></i>
<span class="tooltiptext"> Save your excel files by clicking save as and choose the save as type to be CSV(Comma delimited)(*.csv)</span>
</div>
<font class="light">Please upload only .csv files.</font>
</div>
<div class="upload"><input class="files" type="file" name="fileup[]" multiple></div>
</div>
</div>
<input type="submit" name="submitfileup" value="Confirm" class="confirm-button" style="padding: 1%; margin-top: 2% ;width: 20% ">
<br>
</form>
</div>
</section>
<script src="indexpage.js" type="text/javascript"></script>
</body>
</html>