forked from victorbueno8/Placar-Brasil-Online
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplacar.php
100 lines (85 loc) · 3.52 KB
/
placar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Placar Brasil Online</title>
<script src="jquary.js"></script>
<script>
var IN = 0;
var OUT = 0;
var diaDeJogo = new Date();
$(document).ready(function() {
$("#dia").text( diaDeJogo.getDate()+"/"+diaDeJogo.getMonth()+"/"+diaDeJogo.getFullYear());
$("#golsCasa").text(IN);
$("#golsFora").text(OUT);
$("#local").prop("disabled",true);
$("#juiz").prop("disabled",true);
$("#timeCasa").prop("disabled",true);
$("#timeFora").prop("disabled",true);
$("#buttonStart").show();
$("#buttonGolCasa").prop("disabled",true);
$("#buttonGolFora").prop("disabled",true);
$("#buttonFin").prop("disabled",true);
$("#buttonStart").click(function() {
$("#buttonGolCasa").prop("disabled",false);
$("#buttonGolFora").prop("disabled",false);
$("#buttonFin").prop("disabled",false);
$("#buttonStart").hide();
});
$("#buttonGolCasa").click(function() {
IN++;
$("#golsCasa").text(IN);
});
$("#buttonGolFora").click(function() {
OUT++;
$("#golsFora").text(OUT);
});
$("#buttonFin").click(function() {
resultadosFinais();
});
});
function resultadosFinais(){
var URL = "resultadoJogo.php?";
URL += "dia=" + document.getElementById("dia").innerHTML;
URL += "&local=" + document.getElementById("local").value;
URL += "&juiz=" + document.getElementById("juiz").value;
URL += "&local=" + document.getElementById("local").value;
URL += "&casa=" + document.getElementById("timeCasa").value;
URL += "&golscasa=" + document.getElementById("golsCasa").innerHTML;
URL += "&fora=" + document.getElementById("timeFora").value;
URL += "&golsfora=" + document.getElementById("golsFora").innerHTML;
window.location.href = URL;
}
</script>
<style type="text/css">
body{ color:darkgreen; font-family:Arial; background-image:url("campo_futebol_placar.jpg"); background-repeat: no-repeat; background-attachment: fixed; background-size: 100% 100%; }
div#info{ font-size:10pt; color:white; position:absolute; top:20%; left:37%}
div#placar{ background-color:limegreen; position:absolute; top:25%; left:6%; border-style:solid; padding:100px;}
label.x{ font-size:20pt;}
.button{ font-size:20pt;}
.timeNome{ font-size:20pt;}
#buttonFin{ top:80%; left:46%; position:absolute;}
#buttonExit{ top:80%; left:46%; position:absolute;}
#buttonStart{ width:250px; height:100px; top:40%; left:40%; position:absolute;}
.golsCount{ font-size:70pt; border-style:solid; padding:10px;}
</style>
</head>
<body>
<div id="info">
<label id="dia"></label> Local: <input type="text" id="local" value="<?php echo $_GET["estadio"];?>"> Juiz: <input type="text" id="juiz" value="<?php echo $_GET["juiz"];?>"><br>
</div>
<div id="placar">
<input type="button" id="buttonStart" class="button" value="Começar Jogo" >
<label class="x">Casa</label>
<input type="text" id="timeCasa" class="timeNome" value="<?php echo $_GET["timeCasa"];?>">
<label id="golsCasa" class="golsCount"></label>
<input type="button" id="buttonGolCasa" class="button" value="GOL">
<label class="x">X</label>
<input type="button" id="buttonGolFora" class="button" value="GOL">
<label id="golsFora" class="golsCount"></label>
<input type="text" id="timeFora" class="timeNome" value="<?php echo $_GET["timeFora"];?>">
<label class="x">Fora</label>
</div>
<input type="button" id="buttonFin" class="button" value="Finalizar">
</body>
</html>