phpbb3-laatste-topics

Gesponsorde koppelingen

PHP script bestanden

  1. phpbb3-laatste-topics

« Lees de omschrijving en reacties

Code (php)
PHP script in nieuw venster Selecteer het PHP 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
<?php

############
## MySQL #####
############

$MySQL['server'] = "";
$MySQL['user'] = "";
$MySQL['passw'] = "";
$MySQL['db'] = "";

mysql_connect($MySQL['server'], $MySQL['user'], $MySQL['passw'])or die("<center><br><br><h1 style=\"font-size: 50px;\">MySQL Error</h><br><br><font style=\"font-family: Verdana; font-size: 10px;\">".mysql_error()."</font></center>");
mysql_select_db($MySQL['db'])or die("<center><br><br><h1 style=\"font-size: 50px;\">MySQL Error</h><br><br><font style=\"font-family: Verdana; font-size: 10px;\">".mysql_error()."</font></center>");

###############
## MySQL - Queries ##
###############

## Gegevens
# Tabelvoorvoegsel:

$PHPBB['pre'] = "bb3_";
# Aantal topics
$PHPBB['maxtopics'] = 20;

## Queries
# Query

$query = "SELECT * FROM ".$PHPBB['pre']."topics LIMIT 0,".$PHPBB['maxtopics']."";
# Result
$result = mysql_query($query);
# Affected
if ($result != NULL ) {
$num_rows = mysql_num_rows($result);
}
else {
$num_rows = 0;
}

# Forum domein:
$PHPBB['site_titel'] = "Wesdesignz Forum";
$PHPBB['domain'] = "http://forum.wesdesignz.nl";
$PHPBB['map'] = "/"; // (Note, als het op het domein zelf staat, of op een subdomein in de rootmap, laat hier / staan!!
$PHPBB['loc'] = $PHPBB['domain'].$PHPBB['map'];
## Hierna output maken
?>

<html>
<head>
<title>Laatste <?= $PHPBB['maxtopics'] ?> topics van <?= $PHPBB['site_titel'] ?></title>
<style type="text/css">
<!--
* {
margin: 0;
padding: 0;
}
body {
background-color: #232323;
}
#box {
border-style: solid;
border-width: 1px;
border-color: #000000;
background-color: #DDDDDD;
}
font.head {
font-family: Verdana;
font-size: 30px;
font-style: normal;
font-weight: bold;
color: #FFFFFF;
padding-top: 5px;
}
font.box-inhoud {
font-family: Verdana;
font-size: 10px;
font-style: normal;
font-weight: normal;
color: #000000;
}
a {
color: #000000;
text-decoration: none;
}
a:hover {
color: #AAAAAA;
text-decoration: underline;
}
-->
</style>
</head>
<body>
<center><font class="head">Laatste <?= $PHPBB['maxtopics'] ?> topics van <?= $PHPBB['site_titel'] ?></font><br>
<br>
<div id="box">
<?php
if ($num_rows >= 1) {
?>

<table border="0" style="font-family: Verdana; font-size: 10px;">
<tr style="font-weight: bold;">
<td style="width: 70px;">Topic id:</td>
<td style="width: 200px;">Topic:</td>
<td style="width: 175px;">Topicstarter:</td>
<td style="width: 250px;">Overige info:</td>
</tr>
<?php
while ($resultset=mysql_fetch_array($result)) {
?>

<tr style="font-weight: normal;">
<td><?= $resultset[topic_id] ?></td>
<td><a href="<?= $PHPBB['loc'] ?>viewforum.php?f=<?= $resultset[forum_id] ?>&t=<?= $resultset[topic_id] ?>"><?= $resultset[topic_title] ?></a></td>
<td><a href="<?= $PHPBB['loc'] ?>memberlist.php?mode=viewprofile&u=<?= $resultset[topic_poster] ?>">
<?php
if (isset($resultset[topic_first_poster_colour])) {
echo '<font style="font-weight: bold; color: '.$resultset[topic_first_poster_colour].'">'.$resultset[topic_first_poster_name].'</font>';
}
else {
echo '<font style="font-weight: normal; color: #000000;">'.$resultset[topic_first_poster_name].'</font>';
}

?>

</a></td>
<td>
<?php
if ($resultset[topic_replies] == 0) {
$nr_replies = "<i>Nog geen";
}
elseif ($resultset[topic_replies] == 1) {
$nr_replies = "1";
}
elseif ($resultset[topic_replies] >= 2) {
$nr_replies = $resultset[topic_replies];
}

?>

<?= $resultset[topic_views] ?> keer bekenen (<?= $nr_replies ?> reactie's</i>)
</td>
<td>
<a href="<?= $PHPBB['loc'] ?>posting.php?mode=reply&f=<?= $resultset[forum_id] ?>&t=<?= $resultset[topic_id] ?>">Reageer nu</a>
</td>
</tr>
<?php
}
}
else {
echo '<center><br><font style="font-family: Verdana; font-size: 10px; font-weight: bold; color: red;">Geen topics gevonden</font></center><br>';
}

?>

<center><a href=""><img src="redo.gif" alt="Refresh" border="0" style="width: 50px; height: 50px;" title="Refresh"></a>
</body>
</html>

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.