-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvyralycv.php
More file actions
115 lines (92 loc) · 3.52 KB
/
Copy pathvyralycv.php
File metadata and controls
115 lines (92 loc) · 3.52 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
<!DOCTYPE html>
<?php include("mylinks.php"); include('mysqlicon.php')?>
<html>
<head>
<title></title>
</head>
<style type="text/css">
.btn-file {
position: relative;
overflow: hidden;
}
.btn-file input[type=file] {
position: absolute;
top: 0;
right: 0;
min-width: 100%;
min-height: 100%;
font-size: 100px;
text-align: right;
filter: alpha(opacity=0);
opacity: 0;
outline: none;
background: white;
cursor: inherit;
display: block;
}
</style>
<body style="text-align: center; padding-top: 100px; ">
<div class="" style="font-family: magneto; padding-top: 0px; font-size: 80px;">Vyral<font color="gold">.CV</font></div>
<form method="post" enctype="multipart/form-data">
<div class="form-group">
<h1 align="left" style="color:gray;"> Skills:</h1>
<div class="form-row">
<div class="col-md-6" align="right"><input type="text" name="name" class="form-control" style="width: 80%;" placeholder="Enter your fullname please" required>
</div >
<div class="col-md-6"><input type="text" name="skill1" class="form-control" style="width: 80%;" placeholder="Enter a skill *required" required><div class="form-group"><span class="btn btn-warning btn-file text-light" ><h5>Attach Cert</h5><input type="file" name="addcert" id="addcert"></span></div></div>
</div>
</div>
<div class="form-group">
<div class="form-row">
<div class="col-md-6" align="right"><input type="text" name="skill2" class="form-control" style="width: 80%;" placeholder="Enter a skill *Optional"><div class="form-group"><span class="btn btn-warning btn-file text-light" ><h5>Attach Cert</h5><input type="file" name="addcert2"></span></div></div >
<div class="col-md-6"><input type="text" name="skill3" class="form-control" style="width: 80%;" placeholder="Enter a skill *Optional"><div class="form-group"><span class="btn btn-warning btn-file text-light" ><h5>Attach Cert</h5><input type="file" name="addcert3"></span></div></div>
</div>
</div>
<input type="submit" name="po" class="btn btn-dark" value="Go Vyral" style="border:2px solid gold;">
</div>
</form>
</body>
</html>
<?php
session_start();
if (isset($_POST['po'])) {
$fullname=$_POST['name'];
$skill1=$_POST['skill1'];
$skill2=$_POST['skill2'];
$skill3=$_POST['skill3'];
$userid=$_SESSION['id'];
$imgfolder="certs/";
$imagepath=$imgfolder.basename($_FILES['addcert']['name']);
$imgext=pathinfo($imagepath,PATHINFO_EXTENSION);
$imgsize=$_FILES['addcert']['size'];
$imgtmpname=$_FILES['addcert']['tmp_name'];
//cert2
$imgfolder2="certs/";
$imagepath2=$imgfolder2.basename($_FILES['addcert2']['name']);
$imgext2=pathinfo($imagepath2,PATHINFO_EXTENSION);
$imgsize2=$_FILES['addcert2']['size'];
$imgtmpname2=$_FILES['addcert2']['tmp_name'];
//cert3
$imgfolder3="certs/";
$imagepath3=$imgfolder3.basename($_FILES['addcert3']['name']);
$imgext3=pathinfo($imagepath3,PATHINFO_EXTENSION);
$imgsize3=$_FILES['addcert3']['size'];
$imgtmpname3=$_FILES['addcert3']['tmp_name'];
if ($imgext!="PNG" && $imgext!="JPG" && $imgext!="JPEG" && $imgext!="GIF") {
$ms="file type not supported";
}
elseif ($article='') {
$mss="article empty";
}
else{
$upload=move_uploaded_file($imgtmpname, $imagepath);
$upload2=move_uploaded_file($imgtmpname2, $imagepath2);
$upload3=move_uploaded_file($imgtmpname3, $imagepath3);
if ($upload) {
$c="insert into cv values('','$fullname','$skill1','$imagepath','$skill2','$imagepath2','$skill3','$imagepath3','$userid')";
$d=mysqli_query($con, $c);
header("location:cv.php?id=$userid");
}
}
}
?>