clean up file structure
This commit is contained in:
302
zefie_wtvp_minisrv/includes/ServiceVault/wtv-home/home.js
Normal file
302
zefie_wtvp_minisrv/includes/ServiceVault/wtv-home/home.js
Normal file
@@ -0,0 +1,302 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
headers =`200 OK
|
||||
Connection: Keep-Alive
|
||||
wtv-expire-all: wtv-home:/splash
|
||||
Content-type: text/html`
|
||||
|
||||
var cryptstatus = (wtv_encrypted ? "Encrypted" : "Not Encrypted")
|
||||
var comp_type = wtvmime.shouldWeCompress(socket.ssid,'text/html');
|
||||
var compstatus = "uncompressed";
|
||||
switch (comp_type) {
|
||||
case 1:
|
||||
compstatus = "wtv-lzpf";
|
||||
break;
|
||||
case 2:
|
||||
compstatus = "gzip (level 9)";
|
||||
break;
|
||||
}
|
||||
|
||||
var wtv_system_sysconfig = session_data.get("wtv-system-sysconfig");
|
||||
var wtv_client_bootrom_version = session_data.get("wtv-client-bootrom-version");
|
||||
var wtv_system_chipversion_str = session_data.get("wtv-system-chipversion");
|
||||
|
||||
var notImplementedAlert = new clientShowAlert({
|
||||
'image': minisrv_config.config.service_logo,
|
||||
'message': "This feature is not available.",
|
||||
'buttonlabel1': "Okay",
|
||||
'buttonaction1': "client:donothing",
|
||||
'noback': true,
|
||||
}).getURL();
|
||||
|
||||
var notAdminAlert = new clientShowAlert({
|
||||
'image': minisrv_config.config.service_logo,
|
||||
'message': "Sorry, you are not configured as an admin on this server.<br><br>If you are the server operator, please<br> see <strong>user_config.example.json</strong><br> for an example on how to configure yourself as an administrator.",
|
||||
'buttonlabel1': "Ugh, fine.",
|
||||
'buttonaction1': "client:donothing",
|
||||
'noback': true,
|
||||
}).getURL();
|
||||
|
||||
var ownMinisrv = new clientShowAlert({
|
||||
'image': minisrv_config.config.service_logo,
|
||||
'message': "To run your own minisrv, please visit the following link on your PC:<br><br><strong>https://zef.pw/minisrv</strong>",
|
||||
'buttonlabel1': "Okay",
|
||||
'buttonaction1': "client:donothing",
|
||||
'noback': true,
|
||||
}).getURL();
|
||||
|
||||
var supportZefieAlert = new clientShowAlert({
|
||||
'image': minisrv_config.config.service_logo,
|
||||
'message': "If you would like to support zefie or minisrv, please visit the following link on your PC:<br><br><font size=-1><strong>https://zef.pw/helpminisrv</strong></font>",
|
||||
'buttonlabel1': "Okay",
|
||||
'buttonaction1': "client:donothing",
|
||||
'noback': true,
|
||||
}).getURL();
|
||||
|
||||
data =`\0<html>
|
||||
<head>
|
||||
<display hspace=0 vspace=0 fontsize=small noscroll showwhencomplete>
|
||||
<title>
|
||||
Home for ${session_data.getSessionData("subscriber_username") || "minisrv"}
|
||||
</title>
|
||||
</head>
|
||||
<body bgcolor="#3C2F47" link=#BBAEC8 text="ffffff" vlink=AA9DB7>
|
||||
<table border=0 cellspacing=0 cellpadding=0 width="100%" height="60" >
|
||||
<tr>
|
||||
<td>
|
||||
<td align="left"><img src="images/proto3/HomeTopLeftEdge.gif"></td>
|
||||
<td valign="top">
|
||||
<table border=0 cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td colspan=4 valign="top"><img src="images/proto3/HomeTopEdge.gif">
|
||||
</tr>
|
||||
<tr><td height=5 colspan=4>
|
||||
</tr>
|
||||
<tr><td></TD>
|
||||
</tr>
|
||||
<tr><td height=3 colspan=4>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td align="left">
|
||||
<font color=#EEEEEE> <b>WebTV URL, FILE, and CLIENT Access:</b></font>
|
||||
<table border=0 cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td width="380">
|
||||
<form name="urlaccess">
|
||||
<input type="text" name="visitsite" value="wtv-" border="1" bgcolor="#BBAEC8" text="#423852" cursor="#423852" align="center" width="314" executeurl autoactivate>
|
||||
<input type="submit" value="Go" width=20>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<td>
|
||||
<td width=5>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table background="images/proto3/HomeTaskBar.gif" bgcolor="#9486A1" border=0 width="" height="25">
|
||||
<tr>
|
||||
<td abswidth=1><spacer type=block height=3 width=1>
|
||||
<td abswidth=50 bgcolor="#3C2F47" href="wtv-mail:/listmail" align="center"><spacer type=block height=3 width=100%><font color="#EEEEEE"><b>Mail</b></font>
|
||||
<td abswidth=2><img src="images/proto3/HomeTaskBarDividers.gif">
|
||||
<td abswidth=86 bgcolor="#3C2F47" href="wtv-favorite:/favorite" align="center"><spacer type=block height=3 width=100%><font color="#EEEEEE"><b>Favorites</b></font>
|
||||
<td abswidth=2><img src="images/proto3/HomeTaskBarDividers.gif">
|
||||
<td abswidth=70 bgcolor="#3C2F47" href="wtv-setup:/sound" align="center"><spacer type=block height=3 width=100%><font color="#EEEEEE"><b>Music</b></font>
|
||||
<td abswidth=2><img src="images/proto3/HomeTaskBarDividers.gif">
|
||||
<td abswidth=74 bgcolor="#3C2F47" href="http://frogfind.com" align="center"><spacer type=block height=3 width=100%><font color="#EEEEEE"><b>Search</b></font>
|
||||
<td abswidth=2><img src="images/proto3/HomeTaskBarDividers.gif">
|
||||
<td abswidth=60 bgcolor="#3C2F47" href="wtv-flashrom:/willie" align="center"><spacer type=block height=3 width=100%><font color="#EEEEEE"><b>ROMs</b></font>
|
||||
<td abswidth=2><img src="images/proto3/HomeTaskBarDividers.gif">
|
||||
<td abswidth=86 bgcolor="#3C2F47" href="wtv-setup:/setup" align="center"><spacer type=block height=3 width=100%><font color="#EEEEEE"><b>Settings</b></font>
|
||||
<td abswidth=2><img src="images/proto3/HomeTaskBarDividers.gif">
|
||||
<td abswidth=50 bgcolor="#3C2F47" href="wtv-guide:/help?topic=Index&subtopic=Glossary" align="center"><spacer type=block height=3 width=100%><font color="#EEEEEE"><b>Help</b></font>
|
||||
</table>
|
||||
|
||||
<table border=0 bgcolor="#3C2F47">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table border=0>
|
||||
<tr>
|
||||
<td colspan=3>
|
||||
<table bgcolor="#BBAEC8" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td background="images/proto3/HomeColumn3Header.gif" abswidth="6">
|
||||
<td abswidth=125 colspan=2 background="images/proto3/HomeColumn3Header.gif" valign="middle" absheight="26"><font size=2 color="#EEEEEE"><b>» Community «</b></font>
|
||||
<tr>
|
||||
<td colspan=3 height=7>
|
||||
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
<td href="wtv-chat:/home" height="18" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">Chat</font>
|
||||
<tr>
|
||||
<td absheight="3">
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
<td href="wtv-news:/lobby" height="18" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">Discuss</font>
|
||||
<td abswidth="15">
|
||||
<tr>
|
||||
<td absheight="3">
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
<td href="wtv-setup:/messenger" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">Messenger</font>
|
||||
<td abswidth="15">
|
||||
<tr>
|
||||
<td absheight="5">
|
||||
</table>
|
||||
<tr>
|
||||
<td valign="top" colspan=3>
|
||||
<table bgcolor="#BBAEC8" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td background="images/proto3/HomeColumn3Header.gif" abswidth="6">
|
||||
<td abswidth=125 colspan=2 background="images/proto3/HomeColumn3Header.gif" valign="middle" absheight="26" valign="top"><font size=2 color="#EEEEEE"><b>» Account «</b></font>
|
||||
<tr>
|
||||
<td colspan=3 height=7>
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
<td href="client:relogin" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">Relogin</font>
|
||||
<td abswidth="6">
|
||||
<tr>
|
||||
<td absheight="3">
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
<td href="wtv-setup:/serve-billing-overview" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">Configure</font>
|
||||
<td abswidth="6">
|
||||
<tr>
|
||||
<td absheight="3">
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
<td href="wtv-setup:/edit-password" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">Password</font>
|
||||
<td abswidth="6">
|
||||
<tr>
|
||||
<td absheight="3">
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
<td href="wtv-setup:/accounts" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">Add User</font>
|
||||
<td abswidth="6">
|
||||
<tr>
|
||||
<td absheight="3">
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
`;
|
||||
if (session_data.getSessionData("registered")) data += `<td href="wtv-tricks:/unregister" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">Unregister</font>`;
|
||||
else data += `<td href="wtv-tricks:/register" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">Register</font>`
|
||||
data += `
|
||||
<td abswidth="6">
|
||||
<tr>
|
||||
<td absheight="3">
|
||||
|
||||
</table>
|
||||
</table>
|
||||
<td valign="top">
|
||||
<table border=0 width=100%>
|
||||
|
||||
|
||||
<tr>
|
||||
<td align="left" colspan=4>
|
||||
<table border=0 cellspacing=0 cellpadding=0 width="100%">
|
||||
<tr>
|
||||
<td background="images/proto3/HomeColumn3Header.gif" abswidth="6">
|
||||
<td colspan=2 background="images/proto3/HomeColumn3Header.gif" valign="middle" absheight="24"><font color="#EEEEEE"><spacer type=block height=3 width=100%><b> € Welcome to zefie's minisrv ${minisrv_version_string.split(" ")[3]}</b></font>
|
||||
<tr>
|
||||
<td absheight="6">
|
||||
<tr>
|
||||
<td valign="top" colspan=3 absheight=63>
|
||||
This server is operated by ${minisrv_config.config.service_owner}.
|
||||
</table>
|
||||
|
||||
<tr>
|
||||
<td align="left" colspan=4>
|
||||
<table border=0 cellspacing=0 cellpadding=0 width="100%">
|
||||
<tr>
|
||||
<td height=6> <tr>
|
||||
<td background="images/proto3/HomeColumn3Header.gif" abswidth="6">
|
||||
<td colspan=2 background="images/proto3/HomeColumn3Header.gif" valign="middle" absheight="24"><font color="#EEEEEE"><spacer type=block height=3 width=100%><b> € minisrv Latest Updates</b></font>
|
||||
<tr>
|
||||
<td absheight="6">
|
||||
<tr>
|
||||
<td valign="top" colspan=4 absheight=80 >
|
||||
• Added a <a href="wtv-tricks:/charmap">WebTV Character Map</a><br>
|
||||
• Redesigned homepage based on MattMan69's HackTV<br>
|
||||
• Added a new minisrv logo<br>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<td valign="top">
|
||||
|
||||
|
||||
<table border=0 width=160>
|
||||
<tr>
|
||||
<td valign="top" colspan=3>
|
||||
|
||||
|
||||
<table bgcolor="#BBAEC8" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
|
||||
<td background="images/proto3/HomeColumn3Header.gif" abswidth="6">
|
||||
|
||||
<td abswidth=125 colspan=2 background="images/proto3/HomeColumn3Header.gif" valign="middle" absheight="24" valign="top"><font size=2 color="#EEEEEE"><b>» Tools «</b></font>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
<td href="wtv-tricks:/tricks" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">WTV Tricks</font>
|
||||
<td abswidth="6">
|
||||
<tr>
|
||||
<td absheight="3">
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
<td href="${(wtvshared.isAdmin(session_data)) ? "wtv-admin:/admin" : notAdminAlert}" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">WTV Admin</font>
|
||||
<td abswidth="6">
|
||||
<tr>
|
||||
<td absheight="3">
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
<td href="wtv-tricks:/blastbacklist?return_to=wtv-home:/home" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">Clear Cache</font>
|
||||
<td abswidth="6">
|
||||
<tr>
|
||||
<td absheight="3">
|
||||
</table>
|
||||
<tr>
|
||||
<td valign="top" colspan=3>
|
||||
<table bgcolor="#BBAEC8" border=0 cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td background="images/proto3/HomeColumn3Header.gif" abswidth="6">
|
||||
|
||||
<td abswidth=125 colspan=2 background="images/proto3/HomeColumn3Header.gif" valign="middle" absheight="24" valign="top"><font size=2 color="#EEEEEE"><b>» More Stuff «</b></font>
|
||||
<tr>
|
||||
<td colspan=3 height=7>
|
||||
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
<td href="wtv-tricks:/cSetup" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">Switch<br> server</font>
|
||||
<td abswidth="6">
|
||||
<tr>
|
||||
<td absheight="5">
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
<td href="${ownMinisrv}" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">Run your<br> own server</font>
|
||||
<td abswidth="6">
|
||||
<tr>
|
||||
<td absheight="5">
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
<td href="http://archive.midnightchannel.net/zefie/media/" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">Midnight<br> Archives</font>
|
||||
<td abswidth="15">
|
||||
<tr>
|
||||
<td absheight="4">
|
||||
<tr>
|
||||
<td abswidth="6">
|
||||
<td href="${supportZefieAlert}" height="21" valign="middle" bgcolor="#BBAEC8"><font color="#454C73">€ </font><font color="#000000">Help zefie</font>
|
||||
<td abswidth="15">
|
||||
<tr>
|
||||
<td absheight="3">
|
||||
</table>
|
||||
</table>
|
||||
</table>
|
||||
`
|
||||
data += "</body>\n</html>";
|
||||
Reference in New Issue
Block a user