Plaatje bij profiel
ik heb een user bestand, daar heeft iedereen een profiel.. maar daarbij kun je alleen invullen van± hey ik ben ik enzo.. zo´n groot textvak alleen.. maar daarbij wil ik ook nog een invul stuk hebben waar iemand een link van zijn plaatje kan invullen, zodat die bij zn profiel verschijnt.. kan iemand mij zo´n code geven.. of misschien mij daarmee helpen, voeg me anders even toe op msn, thx
Rens Proos
Is dit alles= het moet ook invulbaar zijn zodat iedereen zijn eigen plaatje kan nemen, en dat het daarna in hun profiel verschijnt, dat zijn toch 2 codes
Gewijzigd op 28/11/2004 21:40:00 door Steff an
Quote:
maar daarbij wil ik ook nog een invul stuk hebben waar iemand een link van zijn plaatje kan invullen,
Hier leid ik uit af dat ie de afbeeldingen extern wil laden, dus een uploadscript is niet nodig he Greedy :)
Hehe, en dan lkkr een 5 MP afbeelding ;)
Quote:
Hehe, en dan lkkr een 5 MP afbeelding ;)
MB bedoel je zeker, maar 5 mb gaat wel problemen oplopen ja.
Hoogtens zijn layout wat verneuken, maar kan je toch oplossen met getimagesize? :)
Het gaat wel voor zijn datalimiet werken toch ???
Mja niet he... Als je extern afbeeldingen laadt, steel je andermans bandbreedte.... Waarom denk je dat mensen hier htaccess bestanden voor maken? :)
Gelijk layout weg >:)
<body style="background: #660000; margin: 0px;">
<table width=100%>
<tr><td class="subTitle"><b>Profile</b></td>
Code (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
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
<?php /* ------------------------- */
print " <tr><td class=\"mainTxt\"><a href=\"profile.php?x={$data->login}\">Look at your Profile</a></td></tr>\n";
if(isset($_POST['profile'])) {
$data->url = preg_replace('/\</','<',$_POST['website']);
$data->info = preg_replace('/\</','<',substr($_POST['info'],0,500));
mysql_query("UPDATE `[users]` SET `url`='{$data->url}',`info`='{$data->info}' WHERE `login`='{$data->login}'");
print " <tr><td class=\"mainTxt\">Your profile has been changed</td></tr>\n";
}
else if(isset($_POST['password'])) {
if($_POST['pass'] != "" && $_POST['pass'] == $_POST['confirm']) {
mysql_query("UPDATE `[users]` SET `pass`=MD5('{$_POST['pass']}') WHERE `login`='{$data->login}'");
print " <tr><td class=\"mainTxt\">Your password has been changed</td></tr>\n";
}
else
print " <tr><td class=\"mainTxt\">passwords did not match</td></tr>\n";
}
$data->url = stripslashes($data->url);
$data->info = stripslashes($data->info);
print <<<ENDHTML
<tr><td class="mainTxt">
<form method="post"><table align="center">
<tr><td width=100>E-Mail:</td> <td>{$data->email}</td></tr>
<tr><td width=100>Website:</td> <td><input type="text" name="website" value="{$data->url}"></td></tr>
<tr><td width=100 valign="top">Info:</td>
<td><textarea name="info" cols=30 rows=10>{$data->info}</textarea></td></tr>
<tr><td></td> <td align="right"><input type="submit" name="profile" value="Verander"></td></tr>
</table></form>
</td></tr>
<tr><td><br></td></tr>
<tr><td class="subTitle"><b>Password</b></td></tr>
<tr><td class="mainTxt">
<form method="post"><table align="center">
<tr><td width=100>New:</td> <td><input type="password" name="pass" maxlength=16></td></tr>
<tr><td width=100>Again:</td> <td><input type="password" name="confirm" maxlength=16></td></tr>
<tr><td></td> <td align="right"><input type="submit" name="password" value="Verander"></td></tr>
</table></form>
</td></tr>
ENDHTML;
/* ------------------------- */ ?>
print " <tr><td class=\"mainTxt\"><a href=\"profile.php?x={$data->login}\">Look at your Profile</a></td></tr>\n";
if(isset($_POST['profile'])) {
$data->url = preg_replace('/\</','<',$_POST['website']);
$data->info = preg_replace('/\</','<',substr($_POST['info'],0,500));
mysql_query("UPDATE `[users]` SET `url`='{$data->url}',`info`='{$data->info}' WHERE `login`='{$data->login}'");
print " <tr><td class=\"mainTxt\">Your profile has been changed</td></tr>\n";
}
else if(isset($_POST['password'])) {
if($_POST['pass'] != "" && $_POST['pass'] == $_POST['confirm']) {
mysql_query("UPDATE `[users]` SET `pass`=MD5('{$_POST['pass']}') WHERE `login`='{$data->login}'");
print " <tr><td class=\"mainTxt\">Your password has been changed</td></tr>\n";
}
else
print " <tr><td class=\"mainTxt\">passwords did not match</td></tr>\n";
}
$data->url = stripslashes($data->url);
$data->info = stripslashes($data->info);
print <<<ENDHTML
<tr><td class="mainTxt">
<form method="post"><table align="center">
<tr><td width=100>E-Mail:</td> <td>{$data->email}</td></tr>
<tr><td width=100>Website:</td> <td><input type="text" name="website" value="{$data->url}"></td></tr>
<tr><td width=100 valign="top">Info:</td>
<td><textarea name="info" cols=30 rows=10>{$data->info}</textarea></td></tr>
<tr><td></td> <td align="right"><input type="submit" name="profile" value="Verander"></td></tr>
</table></form>
</td></tr>
<tr><td><br></td></tr>
<tr><td class="subTitle"><b>Password</b></td></tr>
<tr><td class="mainTxt">
<form method="post"><table align="center">
<tr><td width=100>New:</td> <td><input type="password" name="pass" maxlength=16></td></tr>
<tr><td width=100>Again:</td> <td><input type="password" name="confirm" maxlength=16></td></tr>
<tr><td></td> <td align="right"><input type="submit" name="password" value="Verander"></td></tr>
</table></form>
</td></tr>
ENDHTML;
/* ------------------------- */ ?>
</table>
en dit is de code waar het profiel weergeven word.. daar moet dus de code in waardoor het plaatje word weergeven:
<body style="background: #660000; margin: 0px;">
<table width=100%>
<tr><td class="subTitle" ID="title"><b>Profile</b></td></tr>
Code (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
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
<?php /* ------------------------- */
if(isset($_GET['x'])) {
$dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`online`) AS `time`,DATE_FORMAT(`online`,'%d-%m-%Y %H:%i') AS `online` FROM `[users]` WHERE `login`='{$_GET['x']}' AND `activated`=1");
if($data = mysql_fetch_object($dbres)) {
$online = ($data->time+60*5 > time()) ? "<b>Now</b>" : $data->online;
$type = Array("","Demons","Magicians","Knights");
$type = $type[$data->type];
$criminals = Array("","Offspring","slaves","soldiers");
$criminals = $criminals[$data->type];
$power = round(($data->attack+$data->defence)/2+$data->clicks*5);
$totalattacks = $data->attwins + $data->attlosses;
$totaldefends = $data->defwins + $data->deflosses;
$clan_name = preg_replace('/-\[recruit\]/',"",$data->clan);
$data->info = preg_replace('/\n/',"<br>\n",$data->info);
print <<<ENDHTML
<tr><td class="mainTxt"><i>
{$data->info}
</i></td></tr>
<tr><td class="mainTxt">
<table align="center">
<?
$picture = $data->picture;
if ($picture == "") {
echo '<img src="No picture.PNG">';
}
else {
echo '<img src="$picture">';
}
?>
<tr><td width=125>Nick:</td> <td align="right">{$data->login}</td></tr>
<tr><td width=125>Guild:</td> <td align="right"><a href="clan.php?x=$clan_name">{$data->clan}</a></td></tr>
<tr><td width=125>Cash:</td> <td align="right">\${$data->cash}</td></tr>
<tr><td width=125>Bank:</td> <td align="right">\${$data->bank}</td></tr>
<tr><td width=125>$criminals:</td> <td align="right">{$data->clicks}</td></tr>
<tr><td width=125>Power:</td> <td align="right">{$power}</td></tr>
<tr><td><br></td></tr>
<tr><td width=125>Last time online:</td> <td align="right">$online</td></tr>
</table>
</td></tr>
<tr><td class="mainTxt">
<table align="center">
<tr><td width=100></td> <td width=100 align="center"><b>Won</b></td> <td width=100 align="center"><b>Lost</b></td> <td width=100 align="center"><b>Totaal</b></td></tr>
<tr><td width=100><b>Attack</b></td> <td width=100 align="center">{$data->attwins}</td> <td width=100 align="center">{$data->attlosses}</td> <td width=100 align="center">{$totalattacks}</td></tr>
<tr><td width=100><b>Defence</b></td> <td width=100 align="center">{$data->defwins}</td> <td width=100 align="center">{$data->deflosses}</td> <td width=100 align="center">{$totaldefends}</td></tr>
</table>
</td></tr>
<tr><td align="right"><table cellpadding=0 cellspacing=0>
<tr>
ENDHTML;
if($data->MailPigeon == 1)
print "<td class=\"mainTxt\" align=\"center\" width=100><a href=\"message.php?p=new&to={$data->login}\">Message</a></td>\n <td width=5> </td>\n";
print <<<ENDHTML
<td class="mainTxt" align="center" width=100><a href="click.php?x={$data->login}">Click</a></td>
<td width=5> </td>
<td class="mainTxt" align="center" width=100><a href="attack.php?x={$data->login}">Attack</a></td></tr>
</table></td></tr>
<tr><td><br></td></tr>
ENDHTML;
$dbres = mysql_query("SELECT `name`,`area`,`url` FROM `[weapons]` WHERE ((`area` >= 1 AND `area` <= 4) OR `area`=4+{$data->type}) ORDER BY `area`,`costs`");
$lastarea = 1;
while($weapon = mysql_fetch_object($dbres)) {
if($lastarea != $weapon->area)
print " <tr><td><hr color=\"#8C1E1E\"></td></tr>\n";
$num = $data->{$weapon->name}+0;
print " <tr><td class=\"mainTxt\"><table cellpadding=0 cellspacing=0><tr><td width=200 align=\"center\">$name<br><img src=\"images/{$weapon->url}.gif\" height=75 width=100></td> <td>$num</td></tr></table></td></tr>\n";
$lastarea = $weapon->area;
}
}
}
/* ------------------------- */ ?>
if(isset($_GET['x'])) {
$dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`online`) AS `time`,DATE_FORMAT(`online`,'%d-%m-%Y %H:%i') AS `online` FROM `[users]` WHERE `login`='{$_GET['x']}' AND `activated`=1");
if($data = mysql_fetch_object($dbres)) {
$online = ($data->time+60*5 > time()) ? "<b>Now</b>" : $data->online;
$type = Array("","Demons","Magicians","Knights");
$type = $type[$data->type];
$criminals = Array("","Offspring","slaves","soldiers");
$criminals = $criminals[$data->type];
$power = round(($data->attack+$data->defence)/2+$data->clicks*5);
$totalattacks = $data->attwins + $data->attlosses;
$totaldefends = $data->defwins + $data->deflosses;
$clan_name = preg_replace('/-\[recruit\]/',"",$data->clan);
$data->info = preg_replace('/\n/',"<br>\n",$data->info);
print <<<ENDHTML
<tr><td class="mainTxt"><i>
{$data->info}
</i></td></tr>
<tr><td class="mainTxt">
<table align="center">
<?
$picture = $data->picture;
if ($picture == "") {
echo '<img src="No picture.PNG">';
}
else {
echo '<img src="$picture">';
}
?>
<tr><td width=125>Nick:</td> <td align="right">{$data->login}</td></tr>
<tr><td width=125>Guild:</td> <td align="right"><a href="clan.php?x=$clan_name">{$data->clan}</a></td></tr>
<tr><td width=125>Cash:</td> <td align="right">\${$data->cash}</td></tr>
<tr><td width=125>Bank:</td> <td align="right">\${$data->bank}</td></tr>
<tr><td width=125>$criminals:</td> <td align="right">{$data->clicks}</td></tr>
<tr><td width=125>Power:</td> <td align="right">{$power}</td></tr>
<tr><td><br></td></tr>
<tr><td width=125>Last time online:</td> <td align="right">$online</td></tr>
</table>
</td></tr>
<tr><td class="mainTxt">
<table align="center">
<tr><td width=100></td> <td width=100 align="center"><b>Won</b></td> <td width=100 align="center"><b>Lost</b></td> <td width=100 align="center"><b>Totaal</b></td></tr>
<tr><td width=100><b>Attack</b></td> <td width=100 align="center">{$data->attwins}</td> <td width=100 align="center">{$data->attlosses}</td> <td width=100 align="center">{$totalattacks}</td></tr>
<tr><td width=100><b>Defence</b></td> <td width=100 align="center">{$data->defwins}</td> <td width=100 align="center">{$data->deflosses}</td> <td width=100 align="center">{$totaldefends}</td></tr>
</table>
</td></tr>
<tr><td align="right"><table cellpadding=0 cellspacing=0>
<tr>
ENDHTML;
if($data->MailPigeon == 1)
print "<td class=\"mainTxt\" align=\"center\" width=100><a href=\"message.php?p=new&to={$data->login}\">Message</a></td>\n <td width=5> </td>\n";
print <<<ENDHTML
<td class="mainTxt" align="center" width=100><a href="click.php?x={$data->login}">Click</a></td>
<td width=5> </td>
<td class="mainTxt" align="center" width=100><a href="attack.php?x={$data->login}">Attack</a></td></tr>
</table></td></tr>
<tr><td><br></td></tr>
ENDHTML;
$dbres = mysql_query("SELECT `name`,`area`,`url` FROM `[weapons]` WHERE ((`area` >= 1 AND `area` <= 4) OR `area`=4+{$data->type}) ORDER BY `area`,`costs`");
$lastarea = 1;
while($weapon = mysql_fetch_object($dbres)) {
if($lastarea != $weapon->area)
print " <tr><td><hr color=\"#8C1E1E\"></td></tr>\n";
$num = $data->{$weapon->name}+0;
print " <tr><td class=\"mainTxt\"><table cellpadding=0 cellspacing=0><tr><td width=200 align=\"center\">$name<br><img src=\"images/{$weapon->url}.gif\" height=75 width=100></td> <td>$num</td></tr></table></td></tr>\n";
$lastarea = $weapon->area;
}
}
}
/* ------------------------- */ ?>
</table>
ik zou alleen niet weten waar ik die code van jullie moet plaatsen, sry hiervoor
Rens
Mitch:
Hehe, en dan lkkr een 5 MP afbeelding ;)
Mitch:
Nee ik bedoel MP als in MegaPixel :)
Gelijk layout weg >:)
Gelijk layout weg >:)
met een upload filesize-limit is dat verholpen lijkt me... :)
zou iemand die codes even willen invullen please? ik kom er echt niet uit =]
John:
met een upload filesize-limit is dat verholpen lijkt me... :)
Het ging niet om upload plaatjes, en jah dan kan het nog gechecked worden maar je wil niet weten hoevaak ik een giga plaatje kan gebruiken ;)
vaak? :P
Mensen uit me MSN die stoer doen met een site ofsow.
Quote:
Beveiliging? Wat is dat? Is het nodig?
dit is de code waar de members hun profiel moeten kunnen veranderen (daar moet dus de invul code tussen)
<body style="background: #660000; margin: 0px;">
<table width=100%>
<tr><td class="subTitle"><b>Profile</b></td>
Code (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
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
<?php /* ------------------------- */
print " <tr><td class=\"mainTxt\"><a href=\"profile.php?x={$data->login}\">Look at your Profile</a></td></tr>\n";
if(isset($_POST['profile'])) {
$data->url = preg_replace('/\</','<',$_POST['website']);
$data->info = preg_replace('/\</','<',substr($_POST['info'],0,500));
mysql_query("UPDATE `[users]` SET `url`='{$data->url}',`info`='{$data->info}' WHERE `login`='{$data->login}'");
print " <tr><td class=\"mainTxt\">Your profile has been changed</td></tr>\n";
}
else if(isset($_POST['password'])) {
if($_POST['pass'] != "" && $_POST['pass'] == $_POST['confirm']) {
mysql_query("UPDATE `[users]` SET `pass`=MD5('{$_POST['pass']}') WHERE `login`='{$data->login}'");
print " <tr><td class=\"mainTxt\">Your password has been changed</td></tr>\n";
}
else
print " <tr><td class=\"mainTxt\">passwords did not match</td></tr>\n";
}
$data->url = stripslashes($data->url);
$data->info = stripslashes($data->info);
print <<<ENDHTML
<tr><td class="mainTxt">
<form method="post"><table align="center">
<tr><td width=100>E-Mail:</td> <td>{$data->email}</td></tr>
<tr><td width=100>Website:</td> <td><input type="text" name="website" value="{$data->url}"></td></tr>
<tr><td width=100 valign="top">Info:</td>
<td><textarea name="info" cols=30 rows=10>{$data->info}</textarea></td></tr>
<tr><td></td> <td align="right"><input type="submit" name="profile" value="Verander"></td></tr>
</table></form>
</td></tr>
<tr><td><br></td></tr>
<tr><td class="subTitle"><b>Password</b></td></tr>
<tr><td class="mainTxt">
<form method="post"><table align="center">
<tr><td width=100>New:</td> <td><input type="password" name="pass" maxlength=16></td></tr>
<tr><td width=100>Again:</td> <td><input type="password" name="confirm" maxlength=16></td></tr>
<tr><td></td> <td align="right"><input type="submit" name="password" value="Verander"></td></tr>
</table></form>
</td></tr>
ENDHTML;
/* ------------------------- */ ?>
print " <tr><td class=\"mainTxt\"><a href=\"profile.php?x={$data->login}\">Look at your Profile</a></td></tr>\n";
if(isset($_POST['profile'])) {
$data->url = preg_replace('/\</','<',$_POST['website']);
$data->info = preg_replace('/\</','<',substr($_POST['info'],0,500));
mysql_query("UPDATE `[users]` SET `url`='{$data->url}',`info`='{$data->info}' WHERE `login`='{$data->login}'");
print " <tr><td class=\"mainTxt\">Your profile has been changed</td></tr>\n";
}
else if(isset($_POST['password'])) {
if($_POST['pass'] != "" && $_POST['pass'] == $_POST['confirm']) {
mysql_query("UPDATE `[users]` SET `pass`=MD5('{$_POST['pass']}') WHERE `login`='{$data->login}'");
print " <tr><td class=\"mainTxt\">Your password has been changed</td></tr>\n";
}
else
print " <tr><td class=\"mainTxt\">passwords did not match</td></tr>\n";
}
$data->url = stripslashes($data->url);
$data->info = stripslashes($data->info);
print <<<ENDHTML
<tr><td class="mainTxt">
<form method="post"><table align="center">
<tr><td width=100>E-Mail:</td> <td>{$data->email}</td></tr>
<tr><td width=100>Website:</td> <td><input type="text" name="website" value="{$data->url}"></td></tr>
<tr><td width=100 valign="top">Info:</td>
<td><textarea name="info" cols=30 rows=10>{$data->info}</textarea></td></tr>
<tr><td></td> <td align="right"><input type="submit" name="profile" value="Verander"></td></tr>
</table></form>
</td></tr>
<tr><td><br></td></tr>
<tr><td class="subTitle"><b>Password</b></td></tr>
<tr><td class="mainTxt">
<form method="post"><table align="center">
<tr><td width=100>New:</td> <td><input type="password" name="pass" maxlength=16></td></tr>
<tr><td width=100>Again:</td> <td><input type="password" name="confirm" maxlength=16></td></tr>
<tr><td></td> <td align="right"><input type="submit" name="password" value="Verander"></td></tr>
</table></form>
</td></tr>
ENDHTML;
/* ------------------------- */ ?>
</table>
en dit is de code waar het profiel weergeven word.. daar moet dus de code in waardoor het plaatje word weergeven:
<body style="background: #660000; margin: 0px;">
<table width=100%>
<tr><td class="subTitle" ID="title"><b>Profile</b></td></tr>
Code (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
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
<?php /* ------------------------- */
if(isset($_GET['x'])) {
$dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`online`) AS `time`,DATE_FORMAT(`online`,'%d-%m-%Y %H:%i') AS `online` FROM `[users]` WHERE `login`='{$_GET['x']}' AND `activated`=1");
if($data = mysql_fetch_object($dbres)) {
$online = ($data->time+60*5 > time()) ? "<b>Now</b>" : $data->online;
$type = Array("","Demons","Magicians","Knights");
$type = $type[$data->type];
$criminals = Array("","Offspring","slaves","soldiers");
$criminals = $criminals[$data->type];
$power = round(($data->attack+$data->defence)/2+$data->clicks*5);
$totalattacks = $data->attwins + $data->attlosses;
$totaldefends = $data->defwins + $data->deflosses;
$clan_name = preg_replace('/-\[recruit\]/',"",$data->clan);
$data->info = preg_replace('/\n/',"<br>\n",$data->info);
print <<<ENDHTML
<tr><td class="mainTxt"><i>
{$data->info}
</i></td></tr>
<tr><td class="mainTxt">
<table align="center">
[code]<?
$picture = $data->picture;
if ($picture == "") {
echo '<img src="No picture.PNG">';
}
else {
echo '<img src="$picture">';
}
?>
<tr><td width=125>Nick:</td> <td align="right">{$data->login}</td></tr>
<tr><td width=125>Guild:</td> <td align="right"><a href="clan.php?x=$clan_name">{$data->clan}</a></td></tr>
<tr><td width=125>Cash:</td> <td align="right">\${$data->cash}</td></tr>
<tr><td width=125>Bank:</td> <td align="right">\${$data->bank}</td></tr>
<tr><td width=125>$criminals:</td> <td align="right">{$data->clicks}</td></tr>
<tr><td width=125>Power:</td> <td align="right">{$power}</td></tr>
<tr><td><br></td></tr>
<tr><td width=125>Last time online:</td> <td align="right">$online</td></tr>
</table>
</td></tr>
<tr><td class="mainTxt">
<table align="center">
<tr><td width=100></td> <td width=100 align="center"><b>Won</b></td> <td width=100 align="center"><b>Lost</b></td> <td width=100 align="center"><b>Totaal</b></td></tr>
<tr><td width=100><b>Attack</b></td> <td width=100 align="center">{$data->attwins}</td> <td width=100 align="center">{$data->attlosses}</td> <td width=100 align="center">{$totalattacks}</td></tr>
<tr><td width=100><b>Defence</b></td> <td width=100 align="center">{$data->defwins}</td> <td width=100 align="center">{$data->deflosses}</td> <td width=100 align="center">{$totaldefends}</td></tr>
</table>
</td></tr>
<tr><td align="right"><table cellpadding=0 cellspacing=0>
<tr>
ENDHTML;
if($data->MailPigeon == 1)
print "<td class=\"mainTxt\" align=\"center\" width=100><a href=\"message.php?p=new&to={$data->login}\">Message</a></td>\n <td width=5> </td>\n";
print <<<ENDHTML
<td class="mainTxt" align="center" width=100><a href="click.php?x={$data->login}">Click</a></td>
<td width=5> </td>
<td class="mainTxt" align="center" width=100><a href="attack.php?x={$data->login}">Attack</a></td></tr>
</table></td></tr>
<tr><td><br></td></tr>
ENDHTML;
$dbres = mysql_query("SELECT `name`,`area`,`url` FROM `[weapons]` WHERE ((`area` >= 1 AND `area` <= 4) OR `area`=4+{$data->type}) ORDER BY `area`,`costs`");
$lastarea = 1;
while($weapon = mysql_fetch_object($dbres)) {
if($lastarea != $weapon->area)
print " <tr><td><hr color=\"#8C1E1E\"></td></tr>\n";
$num = $data->{$weapon->name}+0;
print " <tr><td class=\"mainTxt\"><table cellpadding=0 cellspacing=0><tr><td width=200 align=\"center\">$name<br><img src=\"images/{$weapon->url}.gif\" height=75 width=100></td> <td>$num</td></tr></table></td></tr>\n";
$lastarea = $weapon->area;
}
}
}
/* ------------------------- */ ?>
if(isset($_GET['x'])) {
$dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`online`) AS `time`,DATE_FORMAT(`online`,'%d-%m-%Y %H:%i') AS `online` FROM `[users]` WHERE `login`='{$_GET['x']}' AND `activated`=1");
if($data = mysql_fetch_object($dbres)) {
$online = ($data->time+60*5 > time()) ? "<b>Now</b>" : $data->online;
$type = Array("","Demons","Magicians","Knights");
$type = $type[$data->type];
$criminals = Array("","Offspring","slaves","soldiers");
$criminals = $criminals[$data->type];
$power = round(($data->attack+$data->defence)/2+$data->clicks*5);
$totalattacks = $data->attwins + $data->attlosses;
$totaldefends = $data->defwins + $data->deflosses;
$clan_name = preg_replace('/-\[recruit\]/',"",$data->clan);
$data->info = preg_replace('/\n/',"<br>\n",$data->info);
print <<<ENDHTML
<tr><td class="mainTxt"><i>
{$data->info}
</i></td></tr>
<tr><td class="mainTxt">
<table align="center">
[code]<?
$picture = $data->picture;
if ($picture == "") {
echo '<img src="No picture.PNG">';
}
else {
echo '<img src="$picture">';
}
?>
<tr><td width=125>Nick:</td> <td align="right">{$data->login}</td></tr>
<tr><td width=125>Guild:</td> <td align="right"><a href="clan.php?x=$clan_name">{$data->clan}</a></td></tr>
<tr><td width=125>Cash:</td> <td align="right">\${$data->cash}</td></tr>
<tr><td width=125>Bank:</td> <td align="right">\${$data->bank}</td></tr>
<tr><td width=125>$criminals:</td> <td align="right">{$data->clicks}</td></tr>
<tr><td width=125>Power:</td> <td align="right">{$power}</td></tr>
<tr><td><br></td></tr>
<tr><td width=125>Last time online:</td> <td align="right">$online</td></tr>
</table>
</td></tr>
<tr><td class="mainTxt">
<table align="center">
<tr><td width=100></td> <td width=100 align="center"><b>Won</b></td> <td width=100 align="center"><b>Lost</b></td> <td width=100 align="center"><b>Totaal</b></td></tr>
<tr><td width=100><b>Attack</b></td> <td width=100 align="center">{$data->attwins}</td> <td width=100 align="center">{$data->attlosses}</td> <td width=100 align="center">{$totalattacks}</td></tr>
<tr><td width=100><b>Defence</b></td> <td width=100 align="center">{$data->defwins}</td> <td width=100 align="center">{$data->deflosses}</td> <td width=100 align="center">{$totaldefends}</td></tr>
</table>
</td></tr>
<tr><td align="right"><table cellpadding=0 cellspacing=0>
<tr>
ENDHTML;
if($data->MailPigeon == 1)
print "<td class=\"mainTxt\" align=\"center\" width=100><a href=\"message.php?p=new&to={$data->login}\">Message</a></td>\n <td width=5> </td>\n";
print <<<ENDHTML
<td class="mainTxt" align="center" width=100><a href="click.php?x={$data->login}">Click</a></td>
<td width=5> </td>
<td class="mainTxt" align="center" width=100><a href="attack.php?x={$data->login}">Attack</a></td></tr>
</table></td></tr>
<tr><td><br></td></tr>
ENDHTML;
$dbres = mysql_query("SELECT `name`,`area`,`url` FROM `[weapons]` WHERE ((`area` >= 1 AND `area` <= 4) OR `area`=4+{$data->type}) ORDER BY `area`,`costs`");
$lastarea = 1;
while($weapon = mysql_fetch_object($dbres)) {
if($lastarea != $weapon->area)
print " <tr><td><hr color=\"#8C1E1E\"></td></tr>\n";
$num = $data->{$weapon->name}+0;
print " <tr><td class=\"mainTxt\"><table cellpadding=0 cellspacing=0><tr><td width=200 align=\"center\">$name<br><img src=\"images/{$weapon->url}.gif\" height=75 width=100></td> <td>$num</td></tr></table></td></tr>\n";
$lastarea = $weapon->area;
}
}
}
/* ------------------------- */ ?>
</table>
En wat werkt er nou niet?
Misschien moet je bij het laatste bestand um nog niet laten stoppen door ?>, aangezien er nog php code daarna komt.
Rens Proos