game/enter2.php

113 lines
1.7 KiB
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<html>
<head>
</head>
<body>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<br>
<br>
<img id="pass" onClick="" width="295" src="i/pin/e0.png" >
<br>
<br>
<img id="p1" onClick="" src="" >
<img id="p2" onClick="" src="" >
<img id="p3" onClick="" src="" >
<br>
<img id="p4" onClick="" src="" >
<img id="p5" onClick="" src="" >
<img id="p6" onClick="" src="" >
<br>
<img id="p7" onClick="" src="" >
<img id="p8" onClick="" src="" >
<img id="p9" onClick="" src="" >
<br>
<img onClick="keypush(12);" src="i/pin/12.png" >
<img id="p0" name="image" onClick="" src="" >
<img onClick="keypush(11);" src="i/pin/11.png" >
<br>
<div id="text"><div>
</body>
<script>
var dopass='';
var tdopass='';
var lenth=0;
randomp();
function randomp()
{
var ss = new Array();
var n=0;
while (n<10)
{
ss[n]=n;
n++;
}
var i=0;
var k=0;
var m=0;
var tmpp=0;
while (i<10)
{
k = getRandomInt(10);
m = getRandomInt(10);
if (k != m)
{
tmpp=ss[k];
ss[k]=ss[m];
ss[m]=tmpp;
i++;
}
}
n=10;
while (n>-1)
{
n=n-1;
document.getElementById('p'+n).setAttribute("src", "i/pin/"+ss[n]+".png");
document.getElementById('p'+n).setAttribute("onClick", "keypush("+ss[n]+");");
}
}
function getRandomInt(max) {
return Math.floor(Math.random() * Math.floor(max));
}
function keypush(n)
{
if (n==12 )
{
if (lenth>0)
{
dopass='';
lenth=0;
document.getElementById('pass').setAttribute("src", "i/pin/e"+lenth+".png");
}
}
else if (n==11)
{
//document.getElementById("text").innerHTML = ''+dopass;
println(dopass);
}
else
{
if (lenth<8)
{
dopass=dopass+''+n;
lenth++;
document.getElementById('pass').setAttribute("src", "i/pin/e"+lenth+".png");
}
}
}
</script>
</html>