-
Notifications
You must be signed in to change notification settings - Fork 0
/
multi.php
230 lines (190 loc) · 6.1 KB
/
multi.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<?php
include_once 'header.php';
if(!isset($_SESSION['uname'])) {
?>
<script>
alert('You need to be logged in to play multiplayer.');
window.location.href = 'index.php';
</script>
<?php
}
?>
<style>
.two {
width: 300px;
height: 300px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
position: absolute;
}
.two table {
width: 300px;
height: 300px;
text-align: center;
background: url(img/bg5.jpg);
-webkit-transition: all 1s ease-in-out;
padding: 0px;
table-layout: fixed;
}
.two table td {
height: 100px;
width: 100px;
padding: 0px;
}
.two table td label {
cursor: pointer;
width: 100px;
height: 100px;
display: inline-block;
padding: 0px;
margin: 0px;
}
.x {
background: url(img/x.png) no-repeat center center;
}
.o {
background: url(img/o.png) no-repeat center center;
}
.player {
width: 99%;
height: -webkit-fill-available;
position: fixed;
float: left;
}
.play {
float: left;
width: 50%;
height: -webkit-fill-available;
transform: translate(0, 45%);
}
.play label {
padding: 15px;
font-family: Comic Sans MS;
font-size: 25px;
font-weight: bold;
color: #000000;
}
.play .active {
-webkit-transition: all 0.30s ease-in-out;
text-shadow: 0 0 5px rgb(76, 2, 255);
}
</style>
<div class="twoDiv" ng-controller="multiCtrl">
<div class="pre-loader" ng-show="wait" style="background-color: rgba(255, 255, 255, 0.3);">
<div class="pre-ele fontDec">
<div class="pre-text">
{{ msg }}
</div>
</div>
</div>
<div class="loginDiv" ng-show="D1">
<div class="container">
<div class="close">
</div>
<div style="background-color:white; padding:5px; border-radius:2px;">
<div class="nav">
<input class="navEle left center" type="radio" name="tabs" id="tab3" ng-click="enterS()" checked>
<label class="navEle left center" for="tab3" style="width: 50%"> Enter </label>
<input class="navEle right center" type="radio" name="tabs" id="tab4" ng-click="createS()">
<label class="navEle right center" for="tab4" style="width: 50%"> Create </label>
</div>
<hr>
<br>
<div ng-show="enterD">
<form>
<input class="inp" type="text" ng-model="rid" placeholder="Room id" required>
<br ng-show="ridV"><span style="color: red;" ng-show="ridV">Room id Not Found.</span>
<br ng-show="ridF"><span style="color: red;" ng-show="ridF">Room is Full.</span>
<br><br>
<input class="inp" type="password" ng-model="pwd" placeholder="Password" required>
<br ng-show="pwdV"><span style="color: red;" ng-show="pwdV">Password does not match.</span>
<br><br>
<input class="btn" style="background-color: #D83F3B;" type="submit" ng-click="enter()" value="Enter">
<br><br>
</form>
</div>
<div ng-show="createD">
<form method="POST">
<span style="color: red;">Room id will be given.</span>
<br><br>
<input class="inp" type="password" ng-model="pwd" placeholder="Password" required>
<br><br>
<input class="btn" style="background-color: #D83F3B;" type="submit" ng-click="create()" value="Create">
<br><br>
</form>
</div>
</div>
</div>
</div>
<div ng-show="D2">
<div class="player center">
<div class="play">
<label ng-show="p2"> {{ uname }} </label>
<label ng-show="!p2" class="active"> {{ uname }} </label>
<br>
<label style="font-size: 45px;"> {{ w1 }} </label>
</div>
<div class="play">
<label ng-show="p2" class="active"> {{ opuname }} </label>
<label ng-show="!p2"> {{ opuname }} </label>
<br>
<label style="font-size: 45px;"> {{ w2 }} </label>
</div>
</div>
<div class="two">
<table cellpadding="0" cellspacing="0" ng-disabled="true">
<colgroup>
<col width="100px">
<col width="100px">
<col width="100px">
</colgroup>
<tr>
<td ng-show="board[1][1]==0"> <label ng-click="change(11)"> </label> </td>
<td class="x" ng-show="board[1][1]==1"></td>
<td class="o" ng-show="board[1][1]==2"></td>
<td ng-show="board[1][2]==0"> <label ng-click="change(12)"> </label> </td>
<td class="x" ng-show="board[1][2]==1"> </td>
<td class="o" ng-show="board[1][2]==2"> </td>
<td ng-show="board[1][3]==0"> <label ng-click="change(13)"> </label> </td>
<td class="x" ng-show="board[1][3]==1"> </td>
<td class="o" ng-show="board[1][3]==2"> </td>
</tr>
<tr>
<td ng-show="board[2][1]==0"> <label ng-click="change(21)"> </label> </td>
<td class="x" ng-show="board[2][1]==1"></td>
<td class="o" ng-show="board[2][1]==2"></td>
<td ng-show="board[2][2]==0"> <label ng-click="change(22)"> </label> </td>
<td class="x" ng-show="board[2][2]==1"> </td>
<td class="o" ng-show="board[2][2]==2"> </td>
<td ng-show="board[2][3]==0"> <label ng-click="change(23)"> </label> </td>
<td class="x" ng-show="board[2][3]==1"> </td>
<td class="o" ng-show="board[2][3]==2"> </td>
</tr>
<tr>
<td ng-show="board[3][1]==0"> <label ng-click="change(31)"> </label> </td>
<td class="x" ng-show="board[3][1]==1"></td>
<td class="o" ng-show="board[3][1]==2"></td>
<td ng-show="board[3][2]==0"> <label ng-click="change(32)"> </label> </td>
<td class="x" ng-show="board[3][2]==1"> </td>
<td class="o" ng-show="board[3][2]==2"> </td>
<td ng-show="board[3][3]==0"> <label ng-click="change(33)"> </label> </td>
<td class="x" ng-show="board[3][3]==1"> </td>
<td class="o" ng-show="board[3][3]==2"> </td>
</tr>
</table>
<div class="center" style="padding:15px; font-family:Comic Sans MS; font-size:25px; font-weight:bold; color: #000000;">
<label> Draw </label>
<br>
<label style="font-size: 45px;"> {{ dw }} </label>
</div>
</div>
<div class="two" ng-show="p2">
</div>
</div>
</div>
<script>
</script>
<?php
include_once 'footer.php';
?>