Langste bericht top 25 in phpBB
Auteur: LuckyLuke - 04 september 2004 - 16:01 - Gekeurd door: Dennisvb - Hits: 2574 - Aantal punten: 3.67 (3 stemmen)
Nog een klein scriptje dat de langste berichten uit de DB haalt en sorteert
|
Code: |
<HTML>
<HEAD>
<title>Langste bericht top 25</title>
<style type="text/css">
body {
font: 12px verdana, tahoma, arial, sans-serif;
scrollbar-face-color: {T_TR_COLOR2};
scrollbar-highlight-color: {T_TD_COLOR2};
scrollbar-shadow-color: {T_TR_COLOR2};
scrollbar-3dlight-color: {T_TR_COLOR3};
scrollbar-arrow-color: {T_BODY_LINK};
scrollbar-track-color: {T_TR_COLOR1};
scrollbar-darkshadow-color: {T_TH_COLOR1};
}
.10px {
font-size: 12px;
font-face: verdana;
}
</style>
</HEAD>
<BODY>
<font size="5">Langste bericht top 25</font>
<font class="10px">
<br>
<br>
<?php
//(c) 2004 by Lucas van Dijk
include("config.php");
mysql_connect($dbhost, $dbuser, $dbpasswd);
mysql_select_db($dbname);
echo "<table class='10px'>
<tr class='10px'>
<td width=\"20\" class='10px'> </td>
<td width=\"500\" class='10px'><b>Topic</b></td>
<td width=\"300\" class='10px'><b>Lengte van het bericht</b></td>
</tr></table><hr>";
$plaats = 1;
$sql2 = mysql_query("SELECT * FROM phpbb_posts_text ORDER BY CHAR_LENGTH(post_text) DESC LIMIT 25");
echo "<table class='10px'>";
while($row = mysql_fetch_object($sql2)) {
$sql = mysql_query("SELECT * FROM phpbb_posts WHERE post_id='".$row->post_id."'");
$list = mysql_fetch_object($sql);
$lengtebericht = strlen($row->post_text);
$sql3 = mysql_query("SELECT * FROM phpbb_topics WHERE topic_id='".$list->topic_id."'");
$show = mysql_fetch_object($sql3);
echo "<tr class='10px'>";
echo "<td width=\"20\" class='10px'>".$plaats."</td><td width=\"500\" class='10px'><a href=\"viewtopic.php?p=".$row->post_id."#".$row->post_id."\">".$show->topic_title."</a></td><td width=\"300\" class='10px'>".$lengtebericht."</td></tr>";
$plaats++;
}
?>
</table><br><font size="2"><center>© 2004 Lucas van Dijk</center></font>
</font></BODY></HTML>
<HTML> <HEAD> <title>Langste bericht top 25</title> <style type="text/css"> body { font: 12px verdana, tahoma, arial, sans-serif; scrollbar-face-color: {T_TR_COLOR2}; scrollbar-highlight-color: {T_TD_COLOR2}; scrollbar-shadow-color: {T_TR_COLOR2}; scrollbar-3dlight-color: {T_TR_COLOR3}; scrollbar-arrow-color: {T_BODY_LINK}; scrollbar-track-color: {T_TR_COLOR1}; scrollbar-darkshadow-color: {T_TH_COLOR1}; } .10px { font-size: 12px; font-face: verdana; } </style> </HEAD> <BODY> <font size="5">Langste bericht top 25</font> <font class="10px"> <br> <br> <?php //(c) 2004 by Lucas van Dijk include("config.php"); echo "<table class='10px'> <tr class='10px'> <td width=\"20\" class='10px'> </td> <td width=\"500\" class='10px'><b>Topic</b></td> <td width=\"300\" class='10px'><b>Lengte van het bericht</b></td> </tr></table><hr>"; $plaats = 1; $sql2 = mysql_query("SELECT * FROM phpbb_posts_text ORDER BY CHAR_LENGTH(post_text) DESC LIMIT 25"); echo "<table class='10px'>"; $sql = mysql_query("SELECT * FROM phpbb_posts WHERE post_id='".$row->post_id."'"); $lengtebericht = strlen($row->post_text); $sql3 = mysql_query("SELECT * FROM phpbb_topics WHERE topic_id='".$list->topic_id."'"); echo "<tr class='10px'>"; echo "<td width=\"20\" class='10px'>".$plaats."</td><td width=\"500\" class='10px'><a href=\"viewtopic.php?p=".$row->post_id."#".$row->post_id."\">".$show->topic_title."</a></td><td width=\"300\" class='10px'>".$lengtebericht."</td></tr>"; $plaats++; } ?> </table><br><font size="2"><center>© 2004 Lucas van Dijk</center></font> </font></BODY></HTML>
Download code (.txt)
|
|
|
Stemmen |
Niet ingelogd. |
|