diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/connection/boxcheck.html.js b/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/connection/boxcheck.html.js deleted file mode 100644 index b1c91681..00000000 --- a/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/connection/boxcheck.html.js +++ /dev/null @@ -1,317 +0,0 @@ -const minisrv_service_file = true; - -let BoxId = request_headers.query.BoxId; -if (Array.isArray(BoxId)) BoxId = BoxId[0]; -let clientIp = socket.remoteAddress; -let banned = false; -let sessionId = null; - -// Use the shared MSNTV2 helper injected by WTV-MSNTV2 VM context. -if (BoxId) { - if (!BoxId || BoxId.length != 20 || !/^\d+$/.test(BoxId)) - { - console.warn("Invalid BoxId format "+BoxId+" from "+clientIp); - banned = true; - } else { - sessionId = encodeSessionID(BoxId); - } -} else if (request_headers.cookie && request_headers.cookie.SessionID) { - BoxID = decodeSessionID(request_headers.cookie.SessionID); - sessionId = request_headers.cookie.SessionID; -} else { - console.warn("No BoxId provided by client "+clientIp); - banned = true; -} - -if (!sessionId && !banned) { - banned = true; -} - -if (!session_data && BoxId) { - console.log("Missing session_data for BoxId %s", BoxId); -} - -let registered = false; -let username = ''; -if (session_data) { - registered = session_data.isRegistered(); - if (registered) { - username = session_data.getSessionData("subscriber_username") || ''; - Profile_Picture = session_data.getSessionData('ProfilePicture') || ''; - - } -} - -// Current UTC time -const now = new Date(); - -// Time data object -const timeData = { - hh: now.getUTCHours(), - mm: now.getUTCMinutes(), - ss: now.getUTCSeconds(), - mo: now.getUTCMonth() + 1, // JS months are 0-based - dd: now.getUTCDate(), - yyyy: now.getUTCFullYear() -}; - -// Timezone mapping (C# tuple → JS array or object) -const timezoneMap = { - "UTC": { - standardName: "UTC", - standardOffset: 0, - daylightName: "UTC", - daylightOffset: 0 - } -}; - -// Destructure like the C# tuple deconstruction -const { - standardName, - standardOffset, - daylightName, - daylightOffset -} = timezoneMap["UTC"]; - -// Set session cookie on the client -if (sessionId) { - setCookie('SessionID', sessionId, { path: '/' }); -} - -headers = `200 OK -Content-type: text/html` - -data = ` - - - - - - - - - - -`; diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/connection/usercheck.aspx.js b/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/connection/usercheck.aspx.js deleted file mode 100644 index 067660d7..00000000 --- a/zefie_wtvp_minisrv/includes/ServiceVault/msntv2/sg1/connection/usercheck.aspx.js +++ /dev/null @@ -1,193 +0,0 @@ -const minisrv_service_file = true; - -headers = `Content-type: text/html`; - -data = ` - - - - - - - -`;