Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F12661769
me.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
me.html
View Options
<
html
>
<
head
>
<
meta
charset
=
"utf-8"
>
<
title
>
Zalogowany jako...
</
title
>
<
script
src
=
"/jquery.js"
></
script
>
<
script
src
=
"/authorization.js"
></
script
>
<
link
rel
=
"stylesheet"
href
=
"/style.css"
>
</
head
>
<
body
>
<
a
href
=
"/"
>
Menu główne
</
a
>
<
h2
>
jesteś zalogowany jako użytkownik:
<
span
class
=
"insert-user-name"
></
span
>
</
h2
>
<
input
type
=
"text"
placeholder
=
"Zmień status"
id
=
"status"
>
<
button
id
=
"confirm"
onclick
=
"changeUserStatus()"
>
zapisz
</
button
>
</
body
>
<
script
>
console
.
log
(
"getting"
);
$
.
get
(
"/api/v1/users/me"
,
function
(
response
){
console
.
log
(
response
);
$
(
".insert-user-name"
).
html
(
response
.
username
);
})
function
changeUserStatus
(){
var
status
=
$
(
"#status"
).
val
();
$
.
ajax
({
url
:
'/api/v1/users/me'
,
data
:
{
status
:
status
},
type
:
'PUT'
,
success
:
function
(
result
){
checkData
();
//co to jest? to jest chyba ten get
window
.
location
.
href
=
"/administrator.html"
;
//ocb z tym
}
});
}
//user.html jest chyba niedokończony
function
viewUserStatus
(){
//co by się stało, jakby tego nie bylo i czemu Get nic nie zmienia
$
(
"#dane"
).
html
(
""
);
$
.
get
(
'/api/v1/users/me'
,
function
(
data
)
{
$
(
"#status"
).
val
(
data
.
status
)
});
}
viewUserStatus
();
</
script
>
</
html
>
File Metadata
Details
Attached
Mime Type
text/html
Expires
Fri, Nov 28, 15:48 (14 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1086193
Default Alt Text
me.html (1 KB)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment