Code.

August

Test
Ik was in webwereld met een code bezig, en als iemand daarop reageerde werd de pagina weer een halve kilometer langer, mijn suggestie:

Quote bij code, code verkleinen.

Voorbeeld:


Codeblok:



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

[COLOR= #0000BB]<?php

$sql[/COLOR] [COLOR= #007700]=[/COLOR] mysql_query[COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM alert WHERE member_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" AND gelezen=Nee"[/COLOR][COLOR= #007700]);[/COLOR]


if[COLOR= #007700]([/COLOR]mysql_num_rows[COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]) >=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
[COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] mysql_fetch_assoc[COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]
mysql_query[COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE alert SET gelezen=Ja WHERE alert_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]alert_id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
?>
<html>

<head>
<meta http-equiv="Content-Language" content="nl">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Let op! U heeft een alert ontvangen..</title>
</head>


<body background="images/bg.gif" style="background-attachment: fixed">

&nbsp;<div align="center">
<table cellSpacing="0" cellPadding="0" width="370">
<!-- MSTableType="nolayout" -->
<tr>
<td width="290" background="/boven.png" colSpan="3" height="20">
<font face="Verdana" size="1">
<br>
<br>
<br>
&nbsp;</font></td>
</tr>
<tr>
<td width="5" background="/links.png" height="13">&nbsp;</td>
<td width="355" bgColor="#ffffff" height="13">
<font class="logintekst"><font face="Verdana" size="1"><b>Deze alert
is alleen naar jou toe gestuurd:</b><i><br>
</i>
<br>
[COLOR= #0000BB]<?php[/COLOR] echo [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]reden[/COLOR][COLOR= #007700]];[/COLOR] ?><br>
<br>
<b>Dit bericht is door
[COLOR= #0000BB]<?php
$sql[/COLOR] [COLOR= #007700]=[/COLOR] mysql_query[COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT member_id FROM leden WHERE gebruikersnaam="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]door[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$row_id[/COLOR] [COLOR= #007700]=[/COLOR] mysql_fetch_assoc[COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]
?>
<a href="?p=profiel&mid=[COLOR= #0000BB]<?php[/COLOR] echo [COLOR= #0000BB]$row_id[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]member_id[/COLOR][COLOR= #007700]];[/COLOR] ?>">[COLOR= #0000BB]<?php[/COLOR] echo [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]door[/COLOR][COLOR= #007700]];[/COLOR] ?></a> gemaakt op [COLOR= #0000BB]<?php[/COLOR] echo [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datum[/COLOR][COLOR= #007700]];[/COLOR] ?>.</b></font></font><font face="Verdana"><b><font size="1">
</font></b></font></td><br />
<td width="10" background="rechts.png" height="13">&nbsp;</td>
</tr>
<tr>
<td width="370" background="/onder.png" colSpan="3" height="35">
<center><b><font color="#ffffff" face="Verdana" size="1"><a href="[COLOR= #0000BB]<?php[/COLOR] echo [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]];[/COLOR] ?>">[ Sluit
alert ]</a></font></b></center></td>
</tr>
</table>
</div>


</body>

</html>
[COLOR= #0000BB]<?php[/COLOR]
die[COLOR= #007700]();
}[/COLOR]
?>







August:
Code
 

Robbert

New member
De code kunnen uitklappen lijkt me dan een strakker plan, maar was dat niet al eens voorgesteld?
 
Bovenaan