Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
group-emalm
emalm-main
Commits
9cccff42
Commit
9cccff42
authored
Nov 20, 2020
by
carboncrafters
Browse files
test
parent
fb40ed48
Pipeline
#3
canceled with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
menu.html
View file @
9cccff42
<script>
function
getCookie
(
name
)
{
const
value
=
`;
${
document
.
cookie
}
`
;
const
parts
=
value
.
split
(
`;
${
name
}
=`
);
if
(
parts
.
length
===
2
)
return
parts
.
pop
().
split
(
'
;
'
).
shift
();
}
var
xmlhttp
=
new
XMLHttpRequest
();
xmlhttp
.
onreadystatechange
=
function
()
{
if
(
this
.
readyState
==
4
&&
this
.
status
==
200
)
{
var
myObj
=
JSON
.
parse
(
this
.
responseText
);
document
.
getElementById
(
"
upl
"
).
innerHTML
=
myObj
.
upl
+
"
<span class=
\"
caret
\"
></span>
"
;
document
.
getElementById
(
"
img
"
).
innerHTML
=
myObj
.
img
;
document
.
getElementById
(
"
vid
"
).
innerHTML
=
myObj
.
vid
;
document
.
getElementById
(
"
img2
"
).
innerHTML
=
myObj
.
img
;
document
.
getElementById
(
"
vid2
"
).
innerHTML
=
myObj
.
vid
;
document
.
getElementById
(
"
randompw
"
).
innerHTML
=
myObj
.
randompw
;
document
.
getElementById
(
"
infinite
"
).
innerHTML
=
myObj
.
infinite
;
document
.
getElementById
(
"
search
"
).
innerHTML
=
myObj
.
search
;
document
.
getElementById
(
"
login
"
).
innerHTML
=
"
<span class=
\"
glyphicon glyphicon-log-in
\"
></span>
"
+
myObj
.
login
;
//document.getElementById("reg").innerHTML = myObj.reg;
document
.
getElementById
(
"
about
"
).
innerHTML
=
myObj
.
about
;
document
.
getElementById
(
"
lng
"
).
innerHTML
=
myObj
.
lng
;
}
};
xmlhttp
.
open
(
"
GET
"
,
"
https://emalm.com/api/?get=menu&language=
"
+
getCookie
(
"
language
"
),
true
);
xmlhttp
.
send
();
</script>
<nav
class=
"navbar navbar-inverse navbar-top"
>
<div
class=
"container-fluid"
>
<div
class=
"navbar-header"
>
...
...
side.html
0 → 100644
View file @
9cccff42
vid/index.php
View file @
9cccff42
...
...
@@ -44,11 +44,11 @@ function file_get_contents_curl($url) {
<title>
Emalm - Videos
</title>
</head>
<body>
<
?php
include
$_SERVER
[
"DOCUMENT_ROOT"
]
.
'
/menu.html
'
;
?
>
<
div
include
=
"
/menu.html
"
></div
>
<aside
class=
"rside"
>
<h3>
<a
href=
"/?upl=v"
class=
"yl"
>
video Upload
</a></h3><hr/>
<?php
include
$_SERVER
[
"DOCUMENT_ROOT"
]
.
'/ad.php'
;
?
>
<div
include=
"/ad.php"
></div
>
</aside
>
<section
class=
"left"
>
<form
action=
""
method=
"get"
>
...
...
@@ -61,9 +61,6 @@ function file_get_contents_curl($url) {
<?php
require
$_SERVER
[
"DOCUMENT_ROOT"
]
.
'/conn.php'
;
if
(
!
empty
(
$_GET
[
"search"
]))
{
if
(
is_numeric
(
$_GET
[
"vid"
]))
{
$link
=
"http://127.0.0.1:81/api/?get=list&public=1&type=video&search="
.
$_GET
[
"search"
]
.
"&offset="
.
$_GET
[
"vid"
];
...
...
@@ -77,7 +74,6 @@ if (!empty($_GET["search"])) {
$link
=
"http://127.0.0.1:81/api/?get=list&public=1&type=video&offset=0"
;
}
}
//$json = file_get_contents_curl("https://emalm.com/api/?get=basic&id=$browlin[0]");
$json
=
json_decode
(
file_get_contents_curl
(
$link
),
true
);
if
(
"true"
==
$json
[
"error"
]){
echo
$json
[
"description"
];
...
...
@@ -161,8 +157,28 @@ if("true"==$json["error"]){
<hr>
</section>
</body>
<?php
include
$_SERVER
[
"DOCUMENT_ROOT"
]
.
'footer.html'
;
?>
</html>
\ No newline at end of file
<div
include=
"/footer.html"
></div>
<script>
includeHTML
();
var
xmlhttp
=
new
XMLHttpRequest
();
xmlhttp
.
onreadystatechange
=
function
()
{
if
(
this
.
readyState
==
4
&&
this
.
status
==
200
)
{
var
myObj
=
JSON
.
parse
(
this
.
responseText
);
document
.
getElementById
(
"
upl
"
).
innerHTML
=
myObj
.
upl
+
"
<span class=
\"
caret
\"
></span>
"
;
document
.
getElementById
(
"
img
"
).
innerHTML
=
myObj
.
img
;
document
.
getElementById
(
"
vid
"
).
innerHTML
=
myObj
.
vid
;
document
.
getElementById
(
"
img2
"
).
innerHTML
=
myObj
.
img
;
document
.
getElementById
(
"
vid2
"
).
innerHTML
=
myObj
.
vid
;
document
.
getElementById
(
"
randompw
"
).
innerHTML
=
myObj
.
randompw
;
document
.
getElementById
(
"
infinite
"
).
innerHTML
=
myObj
.
infinite
;
document
.
getElementById
(
"
search
"
).
innerHTML
=
myObj
.
search
;
document
.
getElementById
(
"
login
"
).
innerHTML
=
"
<span class=
\"
glyphicon glyphicon-log-in
\"
></span>
"
+
myObj
.
login
;
//document.getElementById("reg").innerHTML = myObj.reg;
document
.
getElementById
(
"
about
"
).
innerHTML
=
myObj
.
about
;
document
.
getElementById
(
"
lng
"
).
innerHTML
=
myObj
.
lng
;
}
};
xmlhttp
.
open
(
"
GET
"
,
"
https://emalm.com/api/?get=menu&language=
"
+
getCookie
(
"
language
"
),
true
);
xmlhttp
.
send
();
</script>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment