forked from WWBN/AVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodePlayLink.php
105 lines (96 loc) · 3.78 KB
/
modePlayLink.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
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
?>
<!DOCTYPE html>
<html lang="<?php echo $config->getLanguage(); ?>">
<head>
<?php
echo getHTMLTitle(array('Categories'));
include $global['systemRootPath'] . 'view/include/head.php';
?><style>
#custom-search-input{
padding: 3px;
border: solid 1px #E4E4E4;
border-radius: 6px;
background-color: #fff;
}
#custom-search-input input{
border: 0;
box-shadow: none;
}
#custom-search-input button{
margin: 2px 0 0 0;
background: none;
box-shadow: none;
border: 0;
color: #666666;
padding: 0 8px 0 10px;
border-left: solid 1px #ccc;
}
#custom-search-input button:hover{
border: 0;
box-shadow: none;
border-left: solid 1px #ccc;
}
#custom-search-input .glyphicon-search{
font-size: 23px;
}
</style>
</head>
<body class="<?php echo $global['bodyClass']; ?>">
<br>
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container">
<div class="row">
<div class="input-group col-md-12">
<div class="panel">
<div class="panel-body" id="linkPanel">
<form id="play-form" name="play-form" method="get">
<div id="custom-search-input">
<div class="input-group col-md-12">
<input type="search" name="urlToPlay" class="form-control input-lg" placeholder="<?php echo __("Place a Link to play"); ?>" value="<?php
echo @str_replace(array('(', ')'), array('', ''), xss_esc($_GET['urlToPlay']));
?>" id="playFormInput" />
<span class="input-group-btn">
<button class="btn btn-info btn-lg" type="submit">
<i class="fas fa-play-circle"></i>
</button>
</span>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div><!--/.container-->
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
<script>
$(document).ready(function () {
$('#play-form').submit(function (event) {
if (seachFormIsRunning) {
event.preventDefault();
return false;
}
seachFormIsRunning = 1;
var str = $('#playFormInput').val();
if (isMediaSiteURL(str)) {
event.preventDefault();
console.log("playForm is URL " + str);
seachFormPlayURL(str);
return false;
} else {
avideoToast('<?php echo __('This is not a valid URL'); ?>');
}
});
});
</script>
</body>
</html>