-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
136 lines (108 loc) · 5.07 KB
/
Copy pathindex.php
File metadata and controls
136 lines (108 loc) · 5.07 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
require "production.php"; // Refer to production.template for information on setting this file up.
require "php/backend.php";
require "php/URL.php";
global $dbc;
global $config;
$backend = new Backend($config, $dbc);
$URL = new URL($backend);
// Handle error
foreach($_GET as $key => $val){
$resp = $URL->find($key);
header("Location: redirect.php?id=".$key);
break;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>v0.lt</title>
<meta name="description" content="v0.lt super charges your URLs.">
<!-- Materialize resources -->
<link rel="stylesheet" href="css/materialize.min.css">
<script src="js/jquery.min.js"></script>
<script src="js/materialize.min.js"></script>
<script src="js/clipboard.min.js"></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- app resources -->
<link rel="stylesheet" href="css/v0.lt.css">
</head>
<body class="container">
<h3><i class="material-icons left" style="font-size: 48px;">flash_on</i> v0.lt</h3>
<div class="inputbox z-depth-2">
<h5><i class="material-icons left" style="font-size: 24px;">content_cut</i> SHORTEN</h5>
<div style="display: none;" id="shorten-loader" class="center-align">
<div class="preloader-wrapper active">
<div class="spinner-layer spinner-blue">
<div class="circle-clipper left">
<div class="circle"></div>
</div><div class="gap-patch">
<div class="circle"></div>
</div><div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
<div class="spinner-layer spinner-red">
<div class="circle-clipper left">
<div class="circle"></div>
</div><div class="gap-patch">
<div class="circle"></div>
</div><div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
<div class="spinner-layer spinner-yellow">
<div class="circle-clipper left">
<div class="circle"></div>
</div><div class="gap-patch">
<div class="circle"></div>
</div><div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
<div class="spinner-layer spinner-green">
<div class="circle-clipper left">
<div class="circle"></div>
</div><div class="gap-patch">
<div class="circle"></div>
</div><div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
</div>
</div>
<div class="input-field" id="shorten-prompt">
<form action="javascript:shorten();" method="GET">
<input type="text" id="shortenlink"></input>
<label for="shortenlink">Link to shorten</label>
<button type="submit" class="btn-flat waves-effect waves-light white-text">Shorten!</button>
</form>
</div>
<div style="display: none;" id="shorten-finished">
<p>Your shortened link is ready at <code>https://$app["url"]/$data["id"]</code>.</p>
<input type="text" id="shorten-url" value="" readonly style="color: white;"></input>
<a href="#" onclick="resetShorten();" class="btn-flat waves-effect waves-light white-text">Shorten another</a>
<a href="#" class="btn-flat waves-effect waves-light white-text" id="clipboardcopy" data-clipboard-target="#shorten-url">Copy link</a>
</div>
</div>
<br />
<div class="center-align">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- v0lt -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-7198469814084348"
data-ad-slot="1764476319"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<br />
<div class="center-align">
<a href="https://github.com/v0lture/v0.lt" class="btn-flat waves-effect waves-light">Source</a>
<a href="https://v0lture.com/contact.php" class="btn-flat waves-effect waves-light">Contact</a>
</div>
<script src="js/v0.lt.js"></script>
</body>
</html>