update for new theme system updates

This commit is contained in:
zefie
2024-06-01 12:39:46 -04:00
parent 8c7a6369fa
commit 2d07c1f180
7 changed files with 99 additions and 82 deletions

View File

@@ -1,17 +1,23 @@
String.prototype.replace=function(o,n){return this.split(o).join(n)} if(!String.prototype.replace){String.prototype.replace=function(o,n){return this.split(o).join(n)}}
if(!String.prototype.repeat){String.prototype.repeat=function(c){o='';for(i=0;i<c;i++){o+=this;}return o;}}
d=document d=document
rom='file://rom/' rom='file://rom/'
htm=rom+'HTMLs/' htm=rom+'HTMLs/'
cch='/ROMCache/' cch=rom+'Cache/'
thm=cch+'Themes/'
rch='/ROMCache/'
thm=rch+'Themes/'
thi=thm+'Images/' thi=thm+'Images/'
thb=thm+'Borders/' thb=thm+'Borders/'
th=0
function clientvers(){d.write('<form name=z2><input type=hidden name=v value=&wtv-appvers;></form>');return parseInt(d.z2.v.value)} function clientvers(){d.write('<form name=z2><input type=hidden name=v value=&wtv-appvers;></form>');return parseInt(d.z2.v.value)}
function go(u){d.open('text/url');d.write(u);d.close();location=u} function go(u){location.href=u;d.open('text/url');d.write(u);d.close();}
function dial(){go('client:redialphone');go('client:logoshown')} function dial(){go('client:redialphone');go('client:logoshown')}
function nbsp(c){nout='';for(i=0;i<c;i++){nout+=' &nbsp;'}return nout} function nbsp(c){nout='';for(i=0;i<c;i++){nout+=' &nbsp;'}return nout}
function gTC(th,type){ function gTC(type,itm){
//light //light
bgclr='4c5a67' bgclr='4c5a67'
bgimg='Pattern.gif' bgimg='Pattern.gif'
@@ -22,11 +28,12 @@ function gTC(th,type){
tclr='cbcbcb' tclr='cbcbcb'
vclr='dddddd' vclr='dddddd'
lclr='dddddd' lclr='dddddd'
switch(th){ if(!itm){itm=th}
switch(itm){
case 1://dark case 1://dark
bgclr='191919' bgclr='191919'
tclr='42bd52' tclr='42bd52'
bbif=rom+'Borders/ButtonBorder2' bbif=rom+'ButtonBorder2'
break break
case 2://red case 2://red
bgclr='6e0005' bgclr='6e0005'
@@ -34,10 +41,12 @@ function gTC(th,type){
bclr='f0f0f0' bclr='f0f0f0'
bbif=thb+'ButtonBorder2' bbif=thb+'ButtonBorder2'
break break
case 3://orange case 3://basic
bgclr='c06000' bgclr='cccccc'
tclr='f0f0f0' tclr='000000'
bbif=thb+'ButtonBorder3' lclr='2a2aae'
vclr='962ab5'
bbif=''
break break
case 4://tan case 4://tan
bgclr='ece9d8' bgclr='ece9d8'
@@ -89,6 +98,7 @@ function gTC(th,type){
vclr='002244' vclr='002244'
bclr='000000' bclr='000000'
bbif=thb+'ButtonBorder10' bbif=thb+'ButtonBorder10'
break
case 11://halloween case 11://halloween
bgclr='080808' bgclr='080808'
tclr='c06000' tclr='c06000'
@@ -106,8 +116,8 @@ function gTC(th,type){
case 'v':return vclr case 'v':return vclr
} }
} }
function headr(msg,fs,bgm,lp,nl){
function headr(th,msg,fs,bgm,lp,nl){ th=gV(0)
out='' out=''
switch(fs){ switch(fs){
case 'small':fsn=7 case 'small':fsn=7
@@ -118,24 +128,25 @@ function headr(th,msg,fs,bgm,lp,nl){
fsn=5 fsn=5
break break
} }
bgimg=gTC(th,'bgimg') bgimg=gTC('bgimg')
shimg=gTC(th,'shimg') shimg=gTC('shimg')
bgclr=gTC(th,'bg') bgclr=gTC('bg')
gclr=gTC(th,'g') gclr=gTC('g')
tclr=gTC(th,'t') tclr=gTC('t')
vclr=gTC(th,'v') vclr=gTC('v')
lclr=gTC(th,'l') lclr=gTC('l')
if(msg){out+='<title>'+msg+'</title>'} if(msg){out+='<title>'+msg+'</title>'}
out+='<body background='+thi+bgimg+' text='+tclr+' bgcolor='+bgclr+' vlink='+vclr+' link='+lclr+' hspace=0 vspace=0 fontsize='+fs+'>' out+='<body background='+thi+bgimg+' text='+tclr+' bgcolor='+bgclr+' vlink='+vclr+' link='+lclr+' hspace=0 vspace=0 fontsize='+fs+'>'
if(bgm){ if(bgm){
if(bgm.indexOf('.')<0){bgm += '.mid'} if(bgm.indexOf('.')<0){bgm += '.mid'}
if(bgm.indexOf('/')<0){bgm = cch+'Music/' + bgm} if(bgm.indexOf('/')<0){bgm = cch+'Music/' + bgm}
out+='<bgsound name=bgm src="'+bgm+'" autostart=true' out+='<embed name=ebgm src="'+bgm+'" autostart=true'
if(!lp){out+='>'} if(!lp){out+='>'}
else{ else{
if(lp==-1){lp=9999;} if(lp==-1){lp=9999}
out+=' loop='+lp+'>' out+=(' loop='+lp+'>')
} }
d.write('</embed>')
} }
if(!msg){msg=''} if(!msg){msg=''}
out+='<table cellspacing=0 cellpadding=0 abswidth=560 absheight=69' out+='<table cellspacing=0 cellpadding=0 abswidth=560 absheight=69'
@@ -152,10 +163,10 @@ function headr(th,msg,fs,bgm,lp,nl){
return out; return out;
} }
function tab(msg){ function tab(msg){
bgimg=gTC(th,'bgimg') bgimg=gTC('bgimg')
shimg=gTC(th,'shimg') shimg=gTC('shimg')
bgclr=gTC(th,'bg') bgclr=gTC('bg')
gclr=gTC(th,'g') gclr=gTC('g')
if(msg){ if(msg){
msg=msg.replace(' ','&nbsp;') msg=msg.replace(' ','&nbsp;')
if(!shimg && bgimg=='Pattern.gif'){msg += nbsp(5)} if(!shimg && bgimg=='Pattern.gif'){msg += nbsp(5)}
@@ -163,7 +174,7 @@ function tab(msg){
if(shimg){tout+=' background='+thi+shimg+' novtilebg'} if(shimg){tout+=' background='+thi+shimg+' novtilebg'}
tout+='><td abswidth=460 height=69 valign=top' tout+='><td abswidth=460 height=69 valign=top'
if(shimg){tout+=' background='+thi+shimg+' novtilebg'} if(shimg){tout+=' background='+thi+shimg+' novtilebg'}
tout+=' align=right><spacer height=32 type=block><b><shadow><blackface><font color=cbcbcb>'+msg+' &nbsp; </font></blackface></shadow></b>' tout+=' align=right><spacer height=32 type=block><strong><shadow><font color=cbcbcb size=+1>'+msg+' &nbsp; </font></shadow></strong>'
}else{ }else{
tout='<td width=100% height=69 valign=top align=left' tout='<td width=100% height=69 valign=top align=left'
if(shimg){tout+=' background='+thi+shimg} if(shimg){tout+=' background='+thi+shimg}
@@ -172,20 +183,20 @@ function tab(msg){
} }
return tout return tout
} }
function ta(th,r,s,n,b,c,x,u){ function ta(r,s,n,b,c,x,u){
bgclr=gTC(th,'bg') bgclr=gTC('bg')
tclr=gTC(th,'t') tclr=gTC('t')
if(u){x+=' usestyle';d.write('<font color='+tclr+'>')} if(u){x+=' usestyle';d.write('<font color='+tclr+'>')}
d.write('<textarea rows='+r+' size='+s+' id='+n+' name='+n+' border='+b+' text='+tclr+' bgcolor='+bgclr+' '+x+'>'+c+'</textarea>'); d.write('<textarea rows='+r+' size='+s+' id='+n+' name='+n+' border='+b+' text='+tclr+' bgcolor='+bgclr+' '+x+'>'+c+'</textarea>');
if(u){d.write('</font>')} if(u){d.write('</font>')}
} }
function as(th,bg,h,w,g,b,lc,rc,lo,ro,s){ function as(bg,h,w,g,b,lc,rc,lo,ro,s){
if(s){ if(s){
if(!lc){lc=gTC(th,'t')} if(!lc){lc=gTC('t')}
if(!rc){rc=gTC(th,'bg')} if(!rc){rc=gTC('bg')}
}else{ }else{
if(!lc){lc=gTC(th,'bg')} if(!lc){lc=gTC('bg')}
if(!rc){rc=gTC(th,'t')} if(!rc){rc=gTC('t')}
} }
if(th==1){bgclr='333333'} if(th==1){bgclr='333333'}
if(!bg){bg='191919'} if(!bg){bg='191919'}
@@ -197,10 +208,10 @@ function as(th,bg,h,w,g,b,lc,rc,lo,ro,s){
if(!b){b=1} if(!b){b=1}
d.write('<audioscope bgcolor='+bg+' height='+h+' width='+w+' gain='+g+' leftcolor='+tclr+' rightcolor='+bgclr+' leftoffset='+lo+' rightoffset='+ro+' border='+b+'>') d.write('<audioscope bgcolor='+bg+' height='+h+' width='+w+' gain='+g+' leftcolor='+tclr+' rightcolor='+bgclr+' leftoffset='+lo+' rightoffset='+ro+' border='+b+'>')
} }
function butt(th,v,n,w,t,x){ function butt(v,n,w,t,x){
if(th>0&&th!=4&&th!=7&&th!=10){sh=true} if(th>0&&th!=4&&th!=7&&th!=10){sh=true}
bclr=gTC(th,'b') bclr=gTC('b')
bbif=gTC(th,'bbif') bbif=gTC('bbif')
if(sh){d.write('<shadow>')} if(sh){d.write('<shadow>')}
d.write('<font color='+bclr+'>') d.write('<font color='+bclr+'>')
if(!t)t='submit' if(!t)t='submit'
@@ -212,7 +223,7 @@ function butt(th,v,n,w,t,x){
d.write('></font>') d.write('></font>')
if(sh){d.write('</shadow>')} if(sh){d.write('</shadow>')}
} }
function sa(m,i,b1t,b1a,b2t,b2a) { function csa(m,i,b1t,b1a,b2t,b2a) {
u='client:showalert?message='+escape(m); u='client:showalert?message='+escape(m);
if(i)u+='&image='+escape(i); if(i)u+='&image='+escape(i);
if(b1t)u+='&buttonlabel1='+escape(b1t); if(b1t)u+='&buttonlabel1='+escape(b1t);
@@ -230,6 +241,7 @@ function redir(){
} }
function goHTV(){return go(htm+'HackTV.html')} function goHTV(){return go(htm+'HackTV.html')}
function gsa(m,i,b1t,b1a,b2t,b2a){go(sa(m,i,b1t,b1a,b2t,b2a))} function gsa(m,i,b1t,b1a,b2t,b2a){go(csa(m,i,b1t,b1a,b2t,b2a))}
function head(th,msg,fs,bgm,lp,nl){d.write(headr(th,msg,fs,bgm,lp,nl))} function head(msg,fs,bgm,lp,nl){d.write(headr(msg,fs,bgm,lp,nl))}
function vhead(th){d.write(headr(th,'VFat Hax'))} function dhh(tit) {if(tit==1){head('Partition Map','','','',true)}}
function vh(){d.write(headr('VFat Hax'))}

View File

@@ -1,50 +1,55 @@
z_nv=null; z_nv=null;
z_th=new Array() z_th=new Array()
z_th[0]='HackTV Light' z_th[0]='HackTV Light'
z_th[1]='WebTV Dark' z_th[1]='WebTV Dark'
z_th[2]='Avegee Red' z_th[2]='Avegee Red'
z_th[3]='Pumpkin Orange' z_th[3]='Basic Web'
z_th[4]='WinXP Tan' z_th[4]='WinXP Tan'
z_th[5]='Ryder Green' z_th[5]='Ryder Green'
z_th[6]='SKCro Blue' z_th[6]='SKCro Blue'
z_th[7]='Win95 Teal' z_th[7]='Win95 Teal'
z_th[8]='zefie Purple' z_th[8]='zefie Purple'
z_th[9]='MattMan Brown' z_th[9]='MattMan Brown'
z_th[10]='Paper White' z_th[10]='Paper White'
z_th[11]='Halloween Black' z_th[11]='Halloween Black'
z_def=new Array() z_def=new Array()
z_def[0]=0//theme z_def[0]=0//theme
chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@-"//64 possible different values chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@-"//64 possible different values
function gTN(th){return z_th[parseInt(th)]} function gTN(th){return z_th[parseInt(th)]}
function gB(nv,off){ function pp(){d.write('<form name=z><input type=hidden name=h value=&pname;></form>');z_nv=d.z.h.value}
b=nv.charAt(off) function gB(off){
if(!z_nv){pp()}
b=z_nv.charAt(parseInt(off))
if(b){return chars.indexOf(b)} if(b){return chars.indexOf(b)}
else{return -1} else{return -1}
} }
function sB(nv,off,dat){ function sB(off,dat,raw){
if(!z_nv){pp()}
off=parseInt(off)
prefix='' prefix=''
if(off > 0){prefix=nv.substring(0,off)} if(off>0){prefix=z_nv.substring(0,off)}
if(off>prefix.length){while(off!=prefix.length){prefix+='.'}} if(off>prefix.length){while(off!=prefix.length){prefix+='.'}}
dat=chars.charAt(parseInt(dat)); if(!raw){dat=chars.charAt(parseInt(dat));}
z_url='client:ConfirmBYOISPSetup?BYOISPProviderName='+prefix+dat+nv.substring(off+1) z_url='client:ConfirmBYOISPSetup?BYOISPProviderName='+prefix+dat+z_nv.substring(off+1)
go(z_url) go(z_url)
} }
function gV(nv,off){ function eB(off){
sB(off,'.',true)
}
function eAll(){
z_url='client:ConfirmBYOISPSetup?BYOISPProviderName='
go(z_url)
}
function gV(off){
off=parseInt(off)
z_len=0 z_len=0
switch(off){ switch(off){
case 0:z_len=z_th.length case 0:z_len=z_th.length
break break
case 1:z_len=z_bgm.length
break
} }
z_val=gB(nv,off) z_val=gB(off)
if(z_val<0||z_val>=z_len){return parseInt(z_def[off])} if(z_val<0||z_val>=z_len){return z_def[off]}
return parseInt(z_val) return z_val
}
function pp(){
d.write('<form name=z><input type=hidden name=h value=&pname;></form>')
z_nv=d.z.h.value
return parseInt(gV(z_nv,0))//theme
} }

View File

@@ -67,7 +67,7 @@ correct an item, press <b>Back</b>.<p><table><tr>
var form_data = ''; var form_data = '';
if (hasJS) { if (hasJS) {
form_data += `<script>butt(th,'Sign Up','Sign Up',110)</script>`; form_data += `<script>butt('Sign Up','Sign Up',110)</script>`;
} }
else { else {
form_data += `<shadow><input selected Value="Sign Up" name="Sign Up" width="110" type=submit borderimage="file://ROM/Borders/ButtonBorder2.bif"></shadow>`; form_data += `<shadow><input selected Value="Sign Up" name="Sign Up" width="110" type=submit borderimage="file://ROM/Borders/ButtonBorder2.bif"></shadow>`;

View File

@@ -57,7 +57,7 @@ AutoCaps selected>
</td></tr></table>`; </td></tr></table>`;
var form_data = `` var form_data = ``
if (hasJS) { if (hasJS) {
form_data += `<script>butt(th,'Continue','Continue',110)</script>`; form_data += `<script>butt('Continue','Continue',110)</script>`;
} else { } else {
form_data += `<shadow><input type=submit Value=Continue name="Continue" borderimage="file://ROM/Borders/ButtonBorder2.bif" width=110></shadow>`; form_data += `<shadow><input type=submit Value=Continue name="Continue" borderimage="file://ROM/Borders/ButtonBorder2.bif" width=110></shadow>`;
} }

View File

@@ -71,7 +71,7 @@ connect to the Internet by choosing
var form_data = ''; var form_data = '';
if (hasJS) { if (hasJS) {
form_data += `<script>butt(th,'Continue','Continue',110)</script>`; form_data += `<script>butt('Continue','Continue',110)</script>`;
} }
else { else {
form_data += `<shadow><input selected Value="Continue" name="Continue" width="110" type=submit borderimage="file://ROM/Borders/ButtonBorder2.bif"></shadow>`; form_data += `<shadow><input selected Value="Continue" name="Continue" width="110" type=submit borderimage="file://ROM/Borders/ButtonBorder2.bif"></shadow>`;

View File

@@ -10,8 +10,8 @@ var nickname = (minisrv_config.config.service_name + '_' + namerand)
var human_name = nickname; var human_name = nickname;
var hasJS = session_data.hasCap("client-can-do-javascript"); var hasJS = session_data.hasCap("client-can-do-javascript");
if (hasJS) { if (hasJS) {
var form_data = `<script>butt(th,'Quick Reg','speedyreg',130,'button','action="ValidateAgreement?registering=true&subscriber_name=${human_name}&subscriber_username=${nickname}"');`; var form_data = `<script>butt('Quick Reg','speedyreg',130,'button','action="ValidateAgreement?registering=true&subscriber_name=${human_name}&subscriber_username=${nickname}"');`;
if (minisrv_config.config.allow_guests) form_data += `butt(th, 'Sign in as Guest', 'noreg', 170, 'button', 'action="BeMyGuest"')`; if (minisrv_config.config.allow_guests) form_data += `butt('Sign in as Guest', 'noreg', 170, 'button', 'action="BeMyGuest"')`;
form_data += '</script>'; form_data += '</script>';
} else { } else {
var form_data = `<input type=button action="ValidateAgreement?registering=true&subscriber_name=${human_name}&subscriber_username=${nickname}" text="e7ce4a" Value="Quick Reg" name="speedyreg" borderimage="file://ROM/Borders/ButtonBorder2.bif" width=130>`; var form_data = `<input type=button action="ValidateAgreement?registering=true&subscriber_name=${human_name}&subscriber_username=${nickname}" text="e7ce4a" Value="Quick Reg" name="speedyreg" borderimage="file://ROM/Borders/ButtonBorder2.bif" width=130>`;
@@ -23,7 +23,7 @@ ENCTYPE="x-www-form-encoded" METHOD="POST">
Welcome to the ${minisrv_config.config.service_name} Mini Service, operated by ${minisrv_config.config.service_owner}. Welcome to the ${minisrv_config.config.service_name} Mini Service, operated by ${minisrv_config.config.service_owner}.
The next screens will lead you through a quick setup process for using this service.<p> Press the "Continue" button below to begin setup.<p>`; The next screens will lead you through a quick setup process for using this service.<p> Press the "Continue" button below to begin setup.<p>`;
if (hasJS) { if (hasJS) {
form_data += `<script>butt(th,'Continue','Continue',110)</script>`; form_data += `<script>butt('Continue','Continue',110)</script>`;
} else { } else {
form_data += `<input type=submit Value=Continue name="Continue" text="#e7ce4a" borderimage="file://ROM/Borders/ButtonBorder2.bif" width=110 selected>`; form_data += `<input type=submit Value=Continue name="Continue" text="#e7ce4a" borderimage="file://ROM/Borders/ButtonBorder2.bif" width=110 selected>`;
} }

View File

@@ -79,7 +79,7 @@ class WTVRegister {
var data; var data;
data = `<html><head>`; data = `<html><head>`;
if (hasJS) { if (hasJS) {
data += `<script src=/ROMCache/h.js></script><script src=/ROMCache/n.js></script></head><script>th=pp(); head(th,'${title}','','','',1)</script>` data += `<script src=/ROMCache/h.js></script><script src=/ROMCache/n.js></script></head><script>head('${title}','','','',1)</script>`
} else { } else {
data += `<body background=/ROMCache/Themes/Images/Pattern.gif text=42bd52 bgcolor=191919 vlink=dddddd link=dddddd hspace=0 vspace=0 fontsize=medium> data += `<body background=/ROMCache/Themes/Images/Pattern.gif text=42bd52 bgcolor=191919 vlink=dddddd link=dddddd hspace=0 vspace=0 fontsize=medium>
<table cellspacing=0 cellpadding=0> <table cellspacing=0 cellpadding=0>