140 lines
3.8 KiB
HTML
140 lines
3.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="hu">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Színnhaz</title>
|
|
<style>
|
|
body {
|
|
background-color: rgb(0, 255, 255);
|
|
}
|
|
|
|
div#szinhazterem {
|
|
max-width: 620px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
span.helyar {
|
|
display: inline-block;
|
|
float: right;
|
|
margin: 40px -24px 0 0;
|
|
width: 128px;
|
|
height: 60px;
|
|
line-height: 60px;
|
|
background-color: rgb(142, 240, 138);
|
|
text-align: center;
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
transform: rotate(-90deg);
|
|
}
|
|
|
|
span.sorszam {
|
|
display: inline-block;
|
|
width: 24px;
|
|
height: 14px;
|
|
margin-right: 8px;
|
|
text-align: right;
|
|
}
|
|
|
|
span.szek {
|
|
display: inline-block;
|
|
margin: 6px 2px;
|
|
width: 14px;
|
|
height: 14px;
|
|
border-radius: 2px;
|
|
text-align: center;
|
|
line-height: 14px;
|
|
font-size: 9px;
|
|
color: #333;
|
|
}
|
|
|
|
span.foglalt {
|
|
border: solid 1px #844;
|
|
background-color: #FAA;
|
|
color: #600;
|
|
}
|
|
|
|
span.szabad {
|
|
border: solid 1px #484;
|
|
background-color: #8D8;
|
|
color: #040;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id='szinhazterem'>
|
|
|
|
<script>
|
|
szabad = 0
|
|
foglalt = 0
|
|
sorok = 15
|
|
szekek = 24
|
|
elso=0;
|
|
masodik=0;
|
|
harmadik=0;
|
|
|
|
hely = new Array()
|
|
for (i = 1; i <= sorok; i++) {
|
|
if (i == 1) document.write("<span class='helyar'>7500.- Ft</span>")
|
|
if (i == 6) document.write("<span class='helyar'>5900.- Ft</span>")
|
|
if (i == 11) document.write("<span class='helyar'>4500.- Ft</span>")
|
|
|
|
hely[i] = new Array()
|
|
document.write("<span class='sorszam'>" + i + ".</span>")
|
|
for (j = 1; j <= szekek; j++) {
|
|
hely[i][j] = Math.floor((1 - Math.random() * Math.random()) * 2)
|
|
if (hely[i][j] == 1) {
|
|
document.write("<span class='szek foglalt' title='hely[" + i + "][" + j + "] = " + hely[i][j] + "'>" + j + "</span>")
|
|
foglalt = foglalt + 1
|
|
}
|
|
else {
|
|
document.write("<span class='szek szabad' title='hely[" + i + "][" + j + "] = " + hely[i][j] + "'>" + j + "</span>")
|
|
szabad=szabad+1
|
|
}
|
|
}
|
|
document.write("<br>")
|
|
if (i % 5 == 0)
|
|
{
|
|
document.write("<hr size=1 color=#880000>")
|
|
}
|
|
|
|
|
|
/*
|
|
helyek={I:elso, II=masodi, III=harmadik};
|
|
var max=0;
|
|
var maxhelyek="";
|
|
for(var key in maxhelyek){
|
|
|
|
var value=maxhelyek[key];
|
|
if(value>max){
|
|
|
|
max=value;
|
|
maxhelyek=key;
|
|
}
|
|
|
|
|
|
|
|
}
|
|
*/
|
|
|
|
}
|
|
keltel = foglalt / 360 * 100
|
|
|
|
document.write("<span> A jegyek </span><span>" + keltel + " %-a kelt el.</span>")
|
|
document.write("<br>")
|
|
document.write("<span> Megmaradt helyek száma: </span><span>" + szabad + " darab.</span>")
|
|
/* document.write("Bevétel: "+ ((elso*7500)+(masodik*5900)+(harmadik*4500))+ "dFT") */
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html> |