beste cp
ik heb een zoek functie er op zetten das voor ander leden te zoeken het is een maffia spel
maar als je een naam er in zet en dan zoek drukt opent hij een ander tabblad dat moet niet waar moet je dat zoeken in die stukje script
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
|
<?php
include 'includes/config.php';
logincheck();
include 'functies.php';
mysql_query("UPDATE `[users]` SET `online`=NOW() WHERE `login`='".$data['login']."'");
?>
<html>
<head>
<title><?=$titel;?></title>
<link rel="stylesheet" type="text/css" href="style/play.css">
</head>
<body>
<?=cHeader();?>
<form action="zoekspeler.php" method="post">
<table width="35%" cellpadding="2" cellspacing="1" align="center">
<tr><td class="subTitle" colspan="2" align="center">Lid Zoeken</TD></tr>
<?php
if($_SERVER['REQUEST_METHOD'] == "POST")
{
echo '<tr><td class="mainTxt" colspan="2">';
if(empty($_POST['naam']))
{
$u2 = false;
echo 'Je bent vergeten een naam in te voeren';
}
else
{
$u2 = mysql_real_escape_string(trim($_POST['naam']));
}
}
?>
<tr>
</tr>
</table>
<?php
$r = "1";
if($u2)
{
?>
<br>
<table width="264" align="center" cellpadding="2" cellspacing="1">
<tr>
<td width="121" class="subTitle" align="center">Naam</td>
<td width="137" class="subTitle" align="center">Power</td>
</tr>
<?php
$count = 0;
$result = mysql_query("SELECT * FROM `[users]` WHERE login LIKE '$u2%' ");
while ($info = mysql_fetch_assoc($result)) {
$count++;
$power = number_format(round(($info['attack'] + $info['defence'])),0,",",".");
if($info['admin'] > 0) {
$image = '<img src="images/game/admin.gif" border="0" alt="admin">';
}
if($info['vipdagen'] > 0 && $info['admin'] != 1) {
$login2 = '<strong><font color="yellow">'.$info['login'].'</font></strong>
<img src="images/game/vip.gif" border="0" alt="Vip">';
}
else
{
$login2 = $info['login'];
}
if(strtotime("NOW") - strtotime($info['online']) < 300)
{
$online = '<img src="images/game/online.gif" border="0" alt="Online">';
}
else
{
$online = "";
}
?>
<tr>
<td class="mainTxt"><a href="profile.php?x=<?=$info['login'];?>" width="200"><?=landImage($info['land']);?> <?=$login2;?> <?=$online;?></a></td>
<td align="left" class="mainTxt" width="137"><?=number_format(round(($info['attack'] + $info['defence'])));?></td>
</tr>
<?php
}
if($count == "0")
{
echo '<tr><td class="mainTxt" colspan="2">Geen resultaten gevonden</td></tr>';
}
}
?>
</table>
</form>
</body>
</html>
|
|
|
16-07-2011 01:58
Dit topic is 426 keer bekeken door 49 verschillende leden
Reacties op: "zoek functie"
1 |
2
Reageer op: "zoek functie"
1 |
2