-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin_upload_videos.php
104 lines (86 loc) · 2.39 KB
/
admin_upload_videos.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
<?php
include 'connect.php';
if (isset($_POST['submit'])){
$created = $_SESSION['email'];
$link1=$_POST['link'];
$link2=$_POST['link'];
$urlnya = "https://www.youtube.com/embed/";
$query = "INSERT INTO content (original_name , path , isActive, createdAt, createdBy) VALUES (?,?,1,NOW(),?)";
$pasal = strtok($string, ':');
$link2 = strtok($link2,'&');
$link2 = substr($link2, strpos($link2, "=") + 1);
$link2 = $urlnya.$link2;
$statement= $pdo->prepare($query);
$statement->execute(array($link1, $link2, $created));
if($query)
{
header('Location: admin_home.php?stat=2');
}
}
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: Arial, Helvetica, sans-serif;
}
@import url('https://fonts.googleapis.com/css?family=Playfair+Display|Roboto');
#drop-area {
background:#f6f9ff;
border: 4px dashed lightblue;
border-radius: 30px;
width: 50%;
font-family: sans-serif;
margin: 5% auto;
padding: 0%;
}
#drop-area.highlight {
border-color: purple;
}
p {
margin-top: 0;
text-align: center;
font-size: 2em;
font-family: 'Playfair Display', serif;
}
.button {
display: inline-block;
padding: 10px;
margin: 0 22%;
background: pink;
cursor: pointer;
border-radius: 5px;
border: 1px solid pink;
font-family: 'Roboto', serif;
}
.button:hover {
background: aquamarine;
color: #aaa;
font-weight: bold;
}
#fileElem {
display: none;
}
.center {
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
}
</style>
</head>
<body>
<div id="drop-area">
<form method="POST">
<img src="Capture.png" alt="Upload" width="460" height="345" class="center">
<p>Edit your link here!</p>
<input type="text" name="link" value="" class="center" autofocus placeholder="Paste your video link here" onfocus="if(this.value && this.select){this.select()}" style="height:40px">
<p><p><p>
<input type='submit' value='Submit' name='submit' style="margin-left:45%" class="button-1"/>
</form>
</div>
</body>
</html>