clean up file structure
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
// Allow URL access outside our trusted minisrv
|
||||
|
||||
if (request_headers.query.url) var url = request_headers.query.url;
|
||||
else var url = "client:showalert?message=Please%20provide%20a%20%3Furl%3D%20with%20the%20url%20you%20would%20like%20to%20access.&buttonlabel1=Okay&buttonacction1=client:donothing"
|
||||
|
||||
headers = `300 OK
|
||||
wtv-visit: ${url}
|
||||
Location: ${url}
|
||||
Content-type: text/html`
|
||||
|
||||
|
||||
data = '';
|
||||
@@ -0,0 +1,25 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
headers = `200 OK
|
||||
wtv-expire-all: wtv-
|
||||
wtv-expire-all: http
|
||||
Content-type: text/html`
|
||||
|
||||
var visit_url = null;
|
||||
|
||||
if (request_headers.Referer) visit_url = request_headers.Referer;
|
||||
else if (request_headers.query.return_to) visit_url = request_headers.query.return_to;
|
||||
else visit_url = "client:goback";
|
||||
|
||||
data = `<html>
|
||||
<head>
|
||||
<meta
|
||||
http-equiv=refresh
|
||||
content="1; url=`+ visit_url +`"
|
||||
>
|
||||
<body bgcolor="black" text="gold" link="gold" vlink="gold" alink="gold">
|
||||
Successfully expired service URL cache<br>
|
||||
Any previously cached pages should be reloaded from the network.<br><br>
|
||||
<a href="`+visit_url+`">Not loading? Click here.</a>
|
||||
</body>
|
||||
</html>`;
|
||||
211
zefie_wtvp_minisrv/includes/ServiceVault/wtv-tricks/cSetup.js
Normal file
211
zefie_wtvp_minisrv/includes/ServiceVault/wtv-tricks/cSetup.js
Normal file
@@ -0,0 +1,211 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
if (request_headers.query.machine && request_headers.query.port) {
|
||||
headers = `200 OK
|
||||
Content-Type: text/html
|
||||
Connection: close
|
||||
wtv-connection-close: true
|
||||
wtv-service: reset
|
||||
wtv-service: name=wtv-1800 host=${request_headers.query.machine} port=${request_headers.query.port} flags=0x00000004 connections=1
|
||||
wtv-boot-url: wtv-1800:/preregister
|
||||
`
|
||||
data = `<html>
|
||||
<head>
|
||||
<title>Connect Setup v2.2-minisrv</title>
|
||||
<DISPLAY noscroll allowoffline notvaudio nooptions switchtowebmode noreconnectalert>
|
||||
</head>
|
||||
<body bgcolor="#3C2F47" text="#cbcbcb" link="#aaaaaa"
|
||||
hspace="0" vspace="0" fontsize="large" noscroll hideoptions onload="load()">
|
||||
<h2>Connecting...</h2>
|
||||
Please wait while we connect you to ${request_headers.query.machine}:${request_headers.query.port} ...
|
||||
<script>
|
||||
function activ() {
|
||||
location.href = "client:activ";
|
||||
}
|
||||
|
||||
function load() {
|
||||
location.href = "client:hangup";
|
||||
setTimeout(activ, 1000);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
|
||||
} else {
|
||||
|
||||
headers = `200 OK
|
||||
Content-Type: text/html`
|
||||
|
||||
data = `<html>
|
||||
<head>
|
||||
<title>Connect Setup v2.2-minisrv</title>
|
||||
<DISPLAY noscroll notvaudio switchtowebmode>
|
||||
</head>
|
||||
<body bgcolor="#3C2F47" text="#cbcbcb" link="#aaaaaa"
|
||||
hspace="0" vspace="0" fontsize="large" noscroll>
|
||||
|
||||
<table cellspacing="0" cellpadding="0" cellborder="0">
|
||||
<tr>
|
||||
<td width="104" height="80" valign="top" align="left"><spacer type="block" WIDTH="11" HEIGHT="11"><br>
|
||||
<spacer type="block" WIDTH="10" HEIGHT="1"> <a href="wtv-home:/home"><img src="${minisrv_config.config.service_logo}" width="87"
|
||||
height="67"></a>
|
||||
</td>
|
||||
<td width="456" height="80" valign="middle" align="center">
|
||||
<br><h2>
|
||||
Connection Setup v2.2-minisrv
|
||||
</h2>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan=4><hr>
|
||||
<tr><td absheight=6>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
function doConnect() {
|
||||
if (document.connect.machine.value == "${minisrv_config.services['wtv-1800'].host}" && document.connect.port.value == "${minisrv_config.services['wtv-1800'].port}") {
|
||||
alert("You are already here!");
|
||||
} else {
|
||||
document.connect.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function setOther() {
|
||||
count = document.connect.preset.length;
|
||||
document.connect.preset.selectedIndex = count - 1;
|
||||
setTimeout(updateService,10);
|
||||
}
|
||||
function updateService() {
|
||||
srv = document.connect.preset[document.connect.preset.selectedIndex].value;
|
||||
switch (srv) {
|
||||
case "mattman69":
|
||||
document.connect.machine.value="74.76.120.18"
|
||||
document.connect.port.value="1615"
|
||||
document.message.msg.value="This is MattMan69's Public HackTV minisrv, all are welcome to connect and enjoy the wonders of WebTV. Offers a custom experience."
|
||||
break;
|
||||
case "zefie":
|
||||
document.connect.machine.value="51.222.164.146"
|
||||
document.connect.port.value="1615"
|
||||
document.message.msg.value="This is zefie's public minisrv, for those who want the vanilla minisrv experience."
|
||||
break;
|
||||
case "local":
|
||||
document.connect.machine.value="127.0.0.1"
|
||||
document.connect.port.value="1615"
|
||||
document.message.msg.value='Connect to your server via localhost. This option is for users running their own server, and connecting with the Viewer.'
|
||||
break;
|
||||
case "wni-prod":
|
||||
document.connect.machine.value="10.0.0.1"
|
||||
document.connect.port.value="1615"
|
||||
document.message.msg.value='Default WebTV Production IP/Port. Can be used to check your routing setup.'
|
||||
break;
|
||||
case "wni-int":
|
||||
document.connect.machine.value="10.0.128.1"
|
||||
document.connect.port.value="1615"
|
||||
document.message.msg.value='Default WebTV Internal IP/Port. Can be used to check your routing setup.'
|
||||
break;
|
||||
case "jarhead":
|
||||
document.message.msg.value="Jarhead\'s public minisrv, offers the most production-like WebTV service, to simulate how it was like back then."
|
||||
alert("Coming soon!")
|
||||
document.connect.preset.selectedIndex = document.connect.preset.selectedIndex - 1;
|
||||
setTimeout(updateService,10);
|
||||
case "other":
|
||||
document.message.msg.value="Your custom service."
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<form name="connect" action="wtv-tricks:/cSetup">
|
||||
<table width=100% cellspacing=1 cellpadding=0>
|
||||
<tr>
|
||||
<td colspan=3>
|
||||
<font color=#4489a8>Presets:</font>
|
||||
</td>
|
||||
<td><spacer W=24 type=block>
|
||||
<select width="440" name="preset" onchange="updateService()" selected>
|
||||
<option value="mattman69" selected>MattMan69's HackTV minisrv</option>
|
||||
<option value="zefie">zefie's minisrv</option>
|
||||
<option value="jarhead">JarHead's WebTV Recreation Server</option>
|
||||
<option value="local">Your local minisrv</option>
|
||||
<option value="wni-prod">WebTV Production Default</option>
|
||||
<option value="wni-int">WebTV Internal Default</option>
|
||||
<option value="other">Other</option>
|
||||
</select>
|
||||
<tr><td absheight=6>
|
||||
</table>
|
||||
<hr>
|
||||
<table width=100% cellspacing=1 cellpadding=0>
|
||||
<tr>
|
||||
<td height=6>
|
||||
<tr>
|
||||
<td colspan=3>
|
||||
<font color=#4489a8>Service:</font>
|
||||
<tr>
|
||||
<td width=15></td>
|
||||
<td height=2>
|
||||
<tr>
|
||||
<td height=2>
|
||||
<tr>
|
||||
<td>
|
||||
<td>
|
||||
<input name=serviceType type=radio bgcolor=#444444 value=custom checked>
|
||||
<td>
|
||||
Custom:
|
||||
<td>
|
||||
Address:
|
||||
<input size=16 ASCIIONLY name=machine bgcolor=#444444 text=#cbcbcb cursor=#cc9933 value="74.76.120.18" onkeypress="setOther()">
|
||||
Port:
|
||||
<input size=5 ASCIIONLY NUMBERS name=port bgcolor=#444444 text=#cbcbcb cursor=#cc9933 value="1615" onkeypress="setOther()">
|
||||
</table>
|
||||
|
||||
<spacer type=block height="8">
|
||||
<hr>
|
||||
<table cellspacing=1 cellpadding=0>
|
||||
<tr>
|
||||
<td height=8>
|
||||
<tr>
|
||||
<td colspan=3>
|
||||
<font color=#4489a8>Description:</font><br><br>
|
||||
<tr>
|
||||
<td width=20>
|
||||
<td width=390 align=left valign=top>
|
||||
<form name=message>
|
||||
<textarea rows=4 size=46 text=#cbcbcb id=msg name=msg border="0" bgcolor=#3C2F47 value='This is the public HackTV minisrv, all are welcome to connect and enjoy the wonders of WebTV. Custom experience!' nohighlight noselect>
|
||||
</textarea>
|
||||
</form>
|
||||
<td>
|
||||
<td width=100% align=right valign=top>
|
||||
<form action="client:GoToPhoneSetup">
|
||||
<font color="#E7CE4A" size=-2><shadow>
|
||||
<input
|
||||
type=submit
|
||||
borderimage="file://ROM/tvimages/TVButtonBorder.bif"
|
||||
value="Phone Settings"
|
||||
name="Phone Settings"
|
||||
usestyle
|
||||
width=170>
|
||||
</shadow></font>
|
||||
</form>
|
||||
<spacer type=block height="60">
|
||||
<font color="#E7CE4A" size=-2><shadow>
|
||||
<input type=hidden name=useEncryption value=true checked>
|
||||
<input
|
||||
type=button
|
||||
borderimage="file://ROM/tvimages/TVButtonBorder.bif"
|
||||
value="Connect"
|
||||
name="Connect"
|
||||
onclick="doConnect()"
|
||||
usestyle
|
||||
width=170>
|
||||
</shadow></font>
|
||||
|
||||
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>`;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 132 B |
Binary file not shown.
|
After Width: | Height: | Size: 84 B |
@@ -0,0 +1,49 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
var num_per_line = 4
|
||||
var legend_every = 6;
|
||||
|
||||
function getLegend() {
|
||||
d = "<tr>\n";
|
||||
for (var i = 0; i < num_per_line; i++) {
|
||||
d += "<td><b><font color=44cc55>Code</font></b>\n<td><b><font color=44cc55>Char</font></b>\n";
|
||||
}
|
||||
d += "<tr>\n";
|
||||
return d;
|
||||
}
|
||||
|
||||
|
||||
headers = `200 OK
|
||||
Content-Type: text/html`;
|
||||
|
||||
data = `<html>
|
||||
<body>
|
||||
<display nosave nosend>
|
||||
<title>WebTV Character Map</title>
|
||||
<sidebar width=20%>
|
||||
<img src="wtv-tricks:/images/Favorites_bg2.jpg">
|
||||
</sidebar>
|
||||
<body bgcolor="#191919" text="#33bb44" link="36d5ff" vlink="36d5ff" vspace=0>
|
||||
<br>
|
||||
<br>
|
||||
<font color=44cc55><h1>WebTV Character Map</h1></font>
|
||||
<br>
|
||||
<table border=1>`;
|
||||
|
||||
|
||||
for (var i = 0; i <= 255; i++) {
|
||||
if (i % num_per_line === 0) {
|
||||
if (i % (num_per_line * legend_every) === 0) {
|
||||
data += getLegend();
|
||||
} else {
|
||||
data += "<tr>"
|
||||
}
|
||||
}
|
||||
data += "<td>&#" + i + ";\n";
|
||||
data += "<td>&#" + i + ";\n";
|
||||
}
|
||||
|
||||
data += `</table>
|
||||
</body>
|
||||
</html>
|
||||
`
|
||||
@@ -0,0 +1,44 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
headers = `200 OK
|
||||
wtv-noback-all: wtv-
|
||||
wtv-expire-all: wtv-
|
||||
Content-type: text/html
|
||||
wtv-service: reset
|
||||
`+getServiceString('wtv-1800');
|
||||
|
||||
|
||||
// HackTV Homepage is default
|
||||
var url="file://Disk/Browser/Games/Games.html";
|
||||
|
||||
if (request_headers.query.url) {
|
||||
url = request_headers.query.url;
|
||||
}
|
||||
|
||||
data = `<html>
|
||||
<head>
|
||||
<title>Going offline...</title>
|
||||
<DISPLAY notvaudio allowoffline hideoptions switchtowebmode>
|
||||
<body bgcolor="black" text="gold" onload="onLoad">
|
||||
<script type="text/javascript">
|
||||
function disconnect() {
|
||||
location.href = "client:HangUpPhone?allow-reconnect=no";
|
||||
}
|
||||
function go(url) {
|
||||
location.href = url;
|
||||
}
|
||||
|
||||
if (window.location) {
|
||||
setTimeout('disconnect()',100);
|
||||
setTimeout('go("`+url+`")',200);
|
||||
}
|
||||
</script>
|
||||
<br><br>
|
||||
`
|
||||
if (request_headers.query.title) {
|
||||
data += "Going offline and loading " + decodeURI(request_headers.query.title)+", please wait!";
|
||||
} else {
|
||||
data += "Please wait a moment.";
|
||||
}
|
||||
|
||||
data += "</body>\n</html>";
|
||||
@@ -0,0 +1,9 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
headers = `300 OK
|
||||
wtv-visit: wtv-home:/home
|
||||
Location: wtv-home:/home
|
||||
Content-type: text/html`
|
||||
|
||||
|
||||
data = '';
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
174
zefie_wtvp_minisrv/includes/ServiceVault/wtv-tricks/info.js
Normal file
174
zefie_wtvp_minisrv/includes/ServiceVault/wtv-tricks/info.js
Normal file
@@ -0,0 +1,174 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
var client_caps = null;
|
||||
|
||||
if (socket.ssid != null) {
|
||||
if (session_data.capabilities) {
|
||||
client_caps = session_data.capabilities;
|
||||
}
|
||||
}
|
||||
if (client_caps) {
|
||||
headers = `200 OK
|
||||
Content-Type: text/html`
|
||||
|
||||
var service_ip = minisrv_config.config.service_ip
|
||||
var client_label = "TODO";
|
||||
var boot_client_label = "TODO";
|
||||
var wtv_system_sysconfig_str = "TODO";
|
||||
|
||||
|
||||
var wtv_system_version = session_data.get("wtv-system-version");
|
||||
var wtv_client_bootrom_version = session_data.get("wtv-client-bootrom-version");
|
||||
var wtv_client_serial_number = wtvshared.filterSSID(session_data.get("wtv-client-serial-number"));
|
||||
var wtv_client_rom_type = session_data.get("wtv-client-rom-type");
|
||||
var wtv_system_chipversion_str = session_data.get("wtv-system-chipversion");
|
||||
var wtv_system_sysconfig_hex = parseInt(session_data.get("wtv-system-sysconfig")).toString(16);
|
||||
|
||||
var capabilities_table = new WTVClientCapabilities().capabilities_table;
|
||||
|
||||
|
||||
|
||||
data = `<html>
|
||||
<!--- *=* Copyright 1996, 1997 WebTV Networks, Inc. All rights reserved. --->
|
||||
<display nosave nosend skipback>
|
||||
<title>${minisrv_config.config.service_name} Info</title>
|
||||
|
||||
<sidebar width=20%>
|
||||
<img src="wtv-tricks:/images/About_bg.jpg">
|
||||
</sidebar>
|
||||
|
||||
<body bgcolor="#191919" text="#44cc55" link="36d5ff" vlink="36d5ff" vspace=0>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<h1>${minisrv_config.config.service_name} Info</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td height=20>
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Connected to:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>Mini Service
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Host/Port:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>${service_ip}/${minisrv_config.services[service_name].port}
|
||||
<tr>
|
||||
<td valign=top align=right width=150><shadow>Service:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>${minisrv_version_string}
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Client:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>&vers; (Build ${wtv_system_version} [${client_label}])
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Boot:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>&wtv-bootvers; (Build ${wtv_client_bootrom_version} [${boot_client_label}])
|
||||
<tr>
|
||||
<td height=20)
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Silicon serial ID:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>${wtv_client_serial_number}
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Connected at:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>&rate;
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Client IP number:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>${socket.remoteAddress}
|
||||
`;
|
||||
if (session_data.getSessionData("registered")) {
|
||||
data += `<tr>
|
||||
<td valign=top align=right><shadow>Subscriber Name:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>${session_data.getSessionData("subscriber_name")}
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Subscriber Username:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>${session_data.getSessionData("subscriber_username")}
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Subscriber Contact:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>${session_data.getSessionData("subscriber_contact")} (${session_data.getSessionData("subscriber_contact_method")})`;
|
||||
} else {
|
||||
data += `<tr>
|
||||
<td valign=top align=right><shadow>Unregistered Guest:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>Yes`;
|
||||
}
|
||||
|
||||
data += `<tr>
|
||||
<td height=20>
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>ROM type:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>${wtv_client_rom_type}
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Modem f/w (when available):</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>&modem;
|
||||
`;
|
||||
if (session_data.get("wtv-need-upgrade")) {
|
||||
data += `<tr>
|
||||
<td valign=top align=right><shadow>Mini-browser:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>Yes
|
||||
`;
|
||||
}
|
||||
data += `
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>Chip version:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>${wtv_system_chipversion_str} (TODO)
|
||||
<tr>
|
||||
<td valign=top align=right><shadow>SysConfig:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>0x${wtv_system_sysconfig_hex}
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td height=20>
|
||||
<tr>
|
||||
<td valign=top align=right width=175><shadow>Client capabilities:</shadow>
|
||||
<td width=10>
|
||||
<td valign=top>
|
||||
</table>
|
||||
<table>
|
||||
`;
|
||||
|
||||
|
||||
// start loop
|
||||
|
||||
Object.keys(capabilities_table).forEach(function (k) {
|
||||
data += `<tr>
|
||||
<td valign=top align=right>${capabilities_table[k][1]}
|
||||
<td width=10>
|
||||
`;
|
||||
if (client_caps[capabilities_table[k][0]]) data += "<td valign=top>True\n";
|
||||
else data += "<td valign=top>False\n";
|
||||
});
|
||||
|
||||
// end loop
|
||||
|
||||
data += `
|
||||
</table>
|
||||
|
||||
<pre>
|
||||
|
||||
|
||||
${wtv_system_sysconfig_str}
|
||||
</pre>
|
||||
<br>
|
||||
|
||||
</body> </html>`;
|
||||
} else {
|
||||
var errpage = wtvshared.doErrorPage(400);
|
||||
headers = errpage[0];
|
||||
data = errpage[1];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
// null is the new demo/flash
|
||||
|
||||
if (session_data) {
|
||||
if (session_data.data_store.wtvsec_login) {
|
||||
if (session_data.data_store.wtvsec_login.ticket_store) {
|
||||
if (session_data.data_store.wtvsec_login.ticket_store.user_id != null) {
|
||||
if (session_data.data_store.wtvsec_login.ticket_store.user_id >= 0)
|
||||
session_data.switchUserID(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
headers = "400 You are now nullified.";
|
||||
@@ -0,0 +1,41 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
headers = `200 OK
|
||||
Content-Type: text/html`;
|
||||
|
||||
if (session_data.getSessionData("registered")) {
|
||||
var redirect = [10, "client:goback?"];
|
||||
var message = "Error: Your box is already registered. If you would like to re-register, you must first unregister.";
|
||||
} else if (request_headers.query.confirm_register) {
|
||||
headers += `
|
||||
wtv-noback-all: wtv-
|
||||
wtv-expire-all: wtv-
|
||||
wtv-relogin-url: wtv-1800:/preregister?relogin=true
|
||||
wtv-reconnect-url: wtv-1800:/preregister?reconnect=true
|
||||
wtv-boot-url: wtv-1800:/preregister?relogin=true`;
|
||||
var redirect = [3, "client:relog?"];
|
||||
var message = "You will now be be redirected to registration.<br><br>";
|
||||
message += `<a href="${redirect[1]}">Click here if you are not automatically redirected.</a>`;
|
||||
} else {
|
||||
message = `Are you ready to register your box with ${minisrv_config.config.service_name}?
|
||||
<br><br>
|
||||
<form action="register" method="POST" ENCTYPE="x-www-form-encoded">
|
||||
<input type="button" action="client:goback" value="Nah, I like being a Guest" borderimage="file://ROM/Borders/ButtonBorder2.bif" text="#dadada" >
|
||||
<input type="submit" name="confirm_register" value="Yes, I'm ready to register!" borderimage="file://ROM/Borders/ButtonBorder2.bif" text="#dadada" selected>
|
||||
</form>`;
|
||||
}
|
||||
|
||||
data = `<html>
|
||||
<head>
|
||||
<display fontsize=medium>
|
||||
<title>Comfy Zone!</title>
|
||||
`;
|
||||
if (redirect) data += `<meta http-equiv=Refresh content="${redirect[0]}; url=${redirect[1]}">`;
|
||||
|
||||
data += `</head>
|
||||
<body bgcolor="#202020" text="#dadada" link="#dadada" alink="#dadada" vlink="#dadada">
|
||||
<br><br>
|
||||
${message}
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
@@ -0,0 +1,77 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
headers = `200 OK
|
||||
Content-Type: text/html`
|
||||
|
||||
|
||||
data = `<html>
|
||||
<body>
|
||||
<display nosave nosend>
|
||||
<title>${minisrv_config.config.service_name} Tricks</title>
|
||||
<sidebar width=20%>
|
||||
<img src="wtv-tricks:/images/Favorites_bg.jpg">
|
||||
</sidebar>
|
||||
<body bgcolor="#191919" text="#44cc55" link="36d5ff" vlink="36d5ff" vspace=0>
|
||||
<br>
|
||||
<br>
|
||||
<h1>${minisrv_config.config.service_name} Tricks</h1>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><a href="wtv-tricks:/info">Info</a>
|
||||
<td width = 25>
|
||||
<td><a href="wtv-cookie:list">List Cookies</a>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><a href="wtv-flashrom:/willie">Visit Ultra Willie's!</a>
|
||||
<td width = 25>
|
||||
<td><a href="wtv-cookie:reset">Clear Cookies</a>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><a href="wtv-tricks:/blastbacklist?return_to=wtv-tricks%3A%2Ftricks">Blast Backlist</a>
|
||||
<td width = 25>
|
||||
<td><a href="client:ResetNVAndPowerOff">Blast NVRAM</a>
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><a href="client:showservices">Show Services</a>
|
||||
<td width = 25>
|
||||
`;
|
||||
if (session_data.getSessionData("registered")) data += `<td><a href="wtv-tricks:/unregister">Unregister This Box</a>`;
|
||||
else data += `<td><a href="wtv-tricks:/register">Register This Box</a>`
|
||||
|
||||
data += `
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><!-- TODO -->
|
||||
<td width = 25>
|
||||
<td><!-- TODO -->
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><!-- TODO -->
|
||||
<td width = 25>
|
||||
<td><!-- TODO -->
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><!-- TODO -->
|
||||
<td width = 25>
|
||||
<td><!-- TODO -->
|
||||
<tr>
|
||||
<td colspan=3 height=6>
|
||||
<tr>
|
||||
<td><!-- TODO -->
|
||||
<td width = 25>
|
||||
<td>
|
||||
<!-- TODO -->
|
||||
<td width = 25>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
@@ -0,0 +1,51 @@
|
||||
var minisrv_service_file = true;
|
||||
|
||||
headers = `200 OK
|
||||
Content-Type: text/html`;
|
||||
|
||||
if (!session_data.getSessionData("registered")) {
|
||||
headers += "\nwtv-noback-all: wtv-";
|
||||
headers += "\nwtv-expire-all: wtv-";
|
||||
var redirect = [5, "client:relogin?"];
|
||||
var message = "Error: Your box is not registered. You are accessing " + minisrv_config.config.service_name + " in Guest Mode. There is nothing to delete!";
|
||||
} else if (session_data.user_id !== 0) {
|
||||
headers += "\nwtv-noback-all: wtv-";
|
||||
headers += "\nwtv-expire-all: wtv-";
|
||||
var redirect = [5, "client:relogin?"];
|
||||
var message = "Error: You must be the primary user to unregister this box.";
|
||||
} else if (request_headers.query.confirm_unregister) {
|
||||
if (session_data.unregisterBox()) {
|
||||
headers += "\nwtv-noback-all: wtv-";
|
||||
headers += "\nwtv-expire-all: wtv-";
|
||||
var redirect = [3, "client:relog?"];
|
||||
var message = "Your account data has been successfully removed. You will now be be redirected to registration.<br><br>";
|
||||
message += `<a href="${redirect[1]}">Click here if you are not automatically redirected.</a>`;
|
||||
} else {
|
||||
var redirect = [10, "client:goback?"];
|
||||
var message = "There was an error deleting your account data. Please try again later. If the problem persists, please contact " + minisrv_config.config.service_owner + " to request manual deletion.";
|
||||
message += "SSID verifcation may be required to perform a manual deletion.<br><br>Returning from whence you came...<br><br>";
|
||||
message += `<a href="${redirect[1]}">Click here if you are not automatically redirected.</a>`;
|
||||
}
|
||||
} else {
|
||||
message = `Are you sure you wish to unregister your account? Session Data deleted by this tool is unrecoverable, even by ${minisrv_config.config.service_owner}.
|
||||
Please be absolutely sure this is what you want to do!<br><br>
|
||||
<form action="unregister" method="POST" ENCTYPE="x-www-form-encoded">
|
||||
<input type="button" action="client:goback" value="No, I changed my mind" borderimage="file://ROM/Borders/ButtonBorder2.bif" text="gold" selected>
|
||||
<input type="submit" name="confirm_unregister" value="Yes, delete my account" borderimage="file://ROM/Borders/ButtonBorder2.bif" text="gold">
|
||||
</form>`;
|
||||
}
|
||||
|
||||
data = `<html>
|
||||
<head>
|
||||
<display fontsize=medium>
|
||||
<title>Danger Zone!</title>
|
||||
`;
|
||||
if (redirect) data += `<meta http-equiv=Refresh content="${redirect[0]}; url=${redirect[1]}">`;
|
||||
|
||||
data += `</head>
|
||||
<body bgcolor="#000000" text="gold" link="gold" alink="gold" vlink="gold">
|
||||
<br><br>
|
||||
${message}
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
Reference in New Issue
Block a user