Master Key Plus Web v1.1
![]()
| Highest Master | ||
| Progression | ||
| Small Pin | Detailed Pinning | |
| Long Pin | Display Style | |
| Macs | ||
| SF |
Keep checking back for new features!
<%Else If Request.Form("S_Type") = "1" Then 'Phase 1 Calculations 'Start Calculating Here! error_flg =0 np = Len(Request.Form("M1")) Dim mk(8) Dim seq(8) '********* 'Key must be either 5 or 6 pins j=0 if np<5 then j=1 end if if np>6 then j=1 end if if j=1 then TryAgain("Highest Master Key must be a 5 or 6 pin key!") end if '********* '********* 'Key Length and rotation order must be same length j=0 if (np <> Len(Request.Form("prog"))) then j=1 end if if j=1 then TryAgain("Master Key length & Progression length Differ!") if np>Len(Request.Form("prog")) then np=Len(Request.Form("prog")) End if End If '********* '********* 'Test for invalid data in Master Key or Progression test=Request.Form("M1") for i = 1 to np if mid(test,i,1) > "9" OR mid(test,i,1)<"0" then TryAgain("Invalid Data in Generation Master") Error_flg = 1 End If Next test=Request.Form("prog") for i = 1 to np if mid(test,i,1) > "9" OR mid(test,i,1)<"0" then TryAgain("Invalid Data in Progression Information") Error_flg = 1 End If Next if Error_flg = 0 then for i = 1 to np mk(i) = int(mid(Request.Form("M1"),i,1)) seq(i) = int(mid(Request.Form("prog"),i,1)) Next End If '********* 'Test for progression sequence errors tmp_tot=0 j=0 for i = 1 to np tmp_tot=tmp_tot+i j=j+seq(i) Next if tmp_tot <> j then TryAgain("Invalid Progression Sequence") Error_flg = 1 End If '********* '********* 'Test for bad LP & SP information test = Request.FOrm("LP") if test > "9" OR test < "0" then TryAgain("Invalid Data in Long Pin") Error_Flg=1 else ur = int(test) End If test = Request.Form("SP") if test > "9" OR test < "0" then TryAgain("Invalid Data in Short Pin") Error_Flg=1 else lr = int(test) End If '********* '********* 'Test MACS test = Request.Form("mac") if test > "9" OR test < "0" then TryAgain("Invalid Data in MACS") Error_Flg=1 else macs = int(test) End If '********* '********* 'Test Stepping Factor test = Request.Form("SF") if test > "9" OR test < "0" then TryAgain("Invalid Data in Stepping Factor") Error_Flg=1 else sf = int(test) End If '********* '********** 'Misc Stepping Factor Test for Error if Error_Flg = 0 then if (ur-lr < sf) then TryAgain("Invalid Stepping Factor & Small/Large Pin Relationship") Error_Flg = 1 End If End If if Error_Flg = 0 then if (sf > macs) then TryAgain("Invalid Stepping Factor / Macs Relationship") Error_Flg = 1 End If End If '********* '********* 'Error Checking Master Key for Long & Short Pin Lengths if Error_Flg = 0 then j = 0 For i = 1 to np if mk(i) > ur then j = 1 end If if mk(i) < lr then j = 1 end if Next if j=1 then TryAgain("Invalid Number's in Generation Master - Outside Specified Range") Error_Flg = 1 End If End If '********* if Error_Flg = 0 then if lr >= ur then TryAgain("Invalid small/large pin Information") Error_flg = 1 End If End if '************************* '* End Of Testing Input * '************************* 'If no errors then get on with it Dim nums(8,30) Dim Posble_nums(30) if Error_Flg <> 1 then For i = 1 to np num=0 temp=mk(i) nums(i,1)=temp Do While (temp>lr-1) temp = temp-sf if temp> lr-1 then num=num+1 nums(i,num)=temp end if Loop temp=mk(i) Do While(temp| <%Next%> |
Results
<% 'm1 m2 m3 m4 m5 'x11 x21 x31 x41 x51 'x12 x22 x32 x42 x52 'x13 x23 x33 x43 x53 'x14 x24 x34 x44 x54 '**** ' move the created nums(i,j) into x(i,j) 'why? because!!!! Dim x(8,30) for i=1 to np for j=1 to posble_nums(i) x(i,j) = nums(i,j) Next Next Dim key(6) Dim xx(6) temp = "" For q = 1 to np temp = temp & mk(q) key(q) = mk(q) Next if NOT good_key(key,np,macs) then temp = temp & "*" end If %>| <%
Response.Write("Highest Master "&temp) For q = 1 to np if seq(q)=1 then xx(seq(q)) = mk(q) End If if seq(q)=1 then xx(seq(q)) = mk(q) End If if seq(q)=1 then xx(seq(q)) = mk(q) End If if seq(q)=2 then xx(seq(q)) = mk(q) End If if seq(q)=3 then xx(seq(q)) = mk(q) End If if seq(q)=4 then xx(seq(q)) = mk(q) End If if seq(q)=5 then xx(seq(q)) = x(q,i2) End If if seq(q)=6 then xx(seq(q)) = x(q,i3) End If Next %> |
<%
temp=""
temp = GetMaxNums(5,np,seq,posble_nums) & " Page Master " For q = 1 to np temp= temp & xx(seq(q)) key(q) = xx(seq(q)) Next if NOT Good_Key(key,np,macs) then temp=temp & "*" end if Response.Write(temp) '** End of Page Masters %> |
| <%
For q = 1 to np
if seq(q)=1 then
xx(seq(q)) = mk(q)
End If
if seq(q)=1 then
xx(seq(q)) = mk(q)
End If
if seq(q)=1 then
xx(seq(q)) = mk(q)
End If
if seq(q)=2 then
xx(seq(q)) = mk(q)
End If
if seq(q)=3 then
xx(seq(q)) = mk(q)
End If
if seq(q)=4 then
xx(seq(q)) = x(q,i1)
End If
if seq(q)=5 then
xx(seq(q)) = x(q,i2)
End If
if seq(q)=6 then
xx(seq(q)) = x(q,i3)
End If
Next
temp=""
For q = 1 to np
temp= temp & xx(seq(q))
key(q) = xx(seq(q))
Next
if NOT Good_Key(key,np,macs) then
temp=temp & "*"
end if
Response.Write("Page Master " & temp) %> |
<%
if request.form("Style")="Matrix" then
'*****
'Column Masters Start
For k = 1 to GetMaxNums(3,np,seq,posble_nums)
For q = 1 to np
if seq(q)=1 then
xx(seq(q)) = mk(q)
End If
if seq(q)=1 then
xx(seq(q)) = mk(q)
End If
if seq(q)=1 then
xx(seq(q)) = x(q,k)
End If
if seq(q)=2 then
xx(seq(q)) = mk(q)
End If
if seq(q)=3 then
xx(seq(q)) = mk(q)
End If
if seq(q)=4 then
xx(seq(q)) = x(q,i1)
End If
if seq(q)=5 then
xx(seq(q)) = x(q,i2)
End If
if seq(q)=6 then
xx(seq(q)) = x(q,i3)
End If
Next
temp = "Column " & k & " Master<% Response.Write(temp) %> | <% Next 'k 'End Column Masters '*** end if ' test for style=matrix %>
| <% Response.Write("BM: " & temp) %> | <% '******* '** Block Column Master Setup For k = 1 to GetMaxNums(3,np,seq,Posble_Nums) For q = 1 to np if seq(q)=1 then xx(seq(q)) = mk(q) End If if seq(q)=2 then xx(seq(q)) = x(q,j) End If if seq(q)=3 then xx(seq(q)) = x(q,k) End If if seq(q)=4 then xx(seq(q)) = x(q,i1) End If if seq(q)=5 then xx(seq(q)) = x(q,i2) End If if seq(q)=6 then xx(seq(q)) = x(q,i3) End If Next ' q temp="" For q = 1 to np temp = temp & xx(seq(q)) key(q) = xx(seq(q)) Next if NOT Good_Key(key,np,macs) then temp = temp & "*" End If if request.form("Style") = "Matrix" then %><% Response.Write("BC"&k&"M: " & temp) %> | <% end if if request.form("Style") = "Standard" then %><%
if k=1 then
Response.Write("Bottom Pins") end if if k=2 then Response.Write("Master Pins") end if if k=3 then Response.Write("Description") end If %> |
<%x
end if
Next 'k
%>
|
| <% Response.Write("BR" & i & "M: " & temp) %> | <% End If For k = 1 to GetMaxNums(3,np,seq,Posble_Nums) For q = 1 to np if seq(q)=1 then xx(seq(q)) = x(q,i) End If if seq(q)=2 then xx(seq(q)) = x(q,j) End If if seq(q)=3 then xx(seq(q)) = x(q,k) End If if seq(q)=4 then xx(seq(q)) = x(q,i1) End If if seq(q)=5 then xx(seq(q)) = x(q,i2) End If if seq(q)=6 then xx(seq(q)) = x(q,i3) End If Next ' q '*** '* Start Change Key Routine '* '* Set up bottom pins & Master Pins '* Only if Details Needed Dim bp(8) Dim mp(8) For q = 1 to np key(q) = int(xx(seq(q))) if key(q) > int(mk(q)) then bp(q) = int(mk(q)) else bp(q) = int(key(q)) End If mp(q) = ABS(key(q)-int(mk(q))) Next if request.form("Style") = "Standard" then %>|||
| <%=temp%> | <% End If mpt="" For q = 1 to np mpt = mpt & mp(q) Next 'q bpt = "" For q = 1 to np bpt = bpt & bp(q) Next 'q if Request.Form("Style")="Standard" then %><%=bpt%> | <%=mpt%> | <% End if if Request.Form("Style")="Matrix" then if request.form("mkpdet") <> "" then temp = temp & "<%response.Write(temp) %> | <% End If if request.form("Style")="Standard" then %>