Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F21588808
status.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
status.html
View Options
<
html
>
<
head
>
<
script
src
=
"/js/jquery.js"
></
script
>
<
meta
charset
=
"utf-8"
>
<
title
>
Status użytkownika
</
title
>
<
style
>
html
{
background-color
:
gray
;
}
body
{
padding
:
20
px
;
background-color
:
white
;
font-family
:
sans-serif
;
max-width
:
50
rem
;
margin
:
0
auto
;
}
.
email
{
color
:
gray
;
font-size
:
0.8
em
;
}
li
{
margin-bottom
:
3
px
;
}
</
style
>
</
head
>
<
body
>
<
center
><
h1
>
Zmień status użytkownika na:
</
h1
></
center
>
<
ul
id
=
"lista-uzytkownikow"
>
</
ul
>
<
hr
>
<
input
type
=
"text"
placeholder
=
"Zmień status"
id
=
"username"
>
</
body
>
<
script
>
function
readUserList
(){
$
(
"#lista-uzytkownikow"
).
html
(
""
);
$
.
get
(
"/api/v1/user"
,
function
(
data
)
{
console
.
log
(
data
);
for
(
var
i
in
data
)
{
var
entry
=
data
[
i
];
var
getVar
=
entry
.
username
;
var
node
=
$
(
"<li>"
+
entry
.
username
+
" </br>Hasło:"
+
entry
.
password
+
"</br> <a href='/user.html#"
+
getVar
+
"'> <button onclick='editUser("
+
getVar
+
")'>Edytuj</button></a> <button onclick='deleteUser(\""
+
getVar
+
"\")'>Usuń</button></li>"
);
$
(
"#lista-uzytkownikow"
).
append
(
node
);
}
});
}
function
addUser
(){
var
username
=
$
(
"#username"
).
val
();
var
password
=
$
(
"#password"
).
val
();
$
.
post
(
"/api/v1/user"
,
{
username
:
username
,
password
:
password
},
function
()
{
readUserList
();
});
}
function
deleteUser
(
user
){
//console.log(user);
$
.
ajax
({
url
:
'/api/v1/user'
,
data
:
{
username
:
user
},
method
:
'DELETE'
,
success
:
function
(
result
)
{
readUserList
();
}
});
}
readUserList
();
</
script
>
</
html
>
File Metadata
Details
Attached
Mime Type
text/html
Expires
Sat, Nov 7, 15:20 (15 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1181844
Default Alt Text
status.html (1 KB)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline