-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrandom_quote.php
66 lines (60 loc) · 1.78 KB
/
random_quote.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
<?
/*
+--------------------------------------------------------------------------
| MkPortal
| ========================================
| by Meo aka Luponero <Amedeo de longis>
|
| (c) 2004 mkportal.it
| http://www.mkportal.it
| Email: [email protected]
|
+---------------------------------------------------------------------------
|
| > MKPortal
| > Written By Amedeo de longis
| > Date started: 9.2.2004
|
+--------------------------------------------------------------------------
*/
$content = "";
$link_user = $mklib_board->forum_link("profile");
$query = $DB->query("SELECT id FROM mkp_quotes WHERE validate = '1'");
$count = $DB->get_num_rows ($query);
$start = rand(0, ($count -1));
$query = $DB->query("select id, author, member, member_id, quote, date_added from mkp_quotes WHERE validate = '1' LIMIT $start, 1");
list ($id, $author, $member, $member_id, $quote, $date_added) = mysql_fetch_row ($query);
$date_added = $this->create_date($date_added, "short");
$quote = strip_tags($quote);
$content = "
<tr>
<td class=\"tdblock\">
<img src=\"$this->images/frec.gif\" align=\"left\" alt=\"\" /> {$this->lang['quoted_by']} <i><a href=\"$link_user=$member_id\" class=\"uno\">$member</a></i>{$this->lang['urlo_time']} $date_added
</td>
</tr>
<tr>
<td class=\"tdglobal\" align=\"left\">
<i>$quote</i><br />(<b>$author</b>)
</td>
</tr>
";
if(!$id) {
$content = "
<tr>
<td class=\"tdblock\" align=\"center\">
{$this->lang['no_quote']}
</td>
</tr>
";
}
$link_user = $mklib_board->forum_link("profile");
unset($query);
unset($count);
unset($start);
unset($id);
unset($author);
unset($member);
unset($member_id);
unset($quote);
unset($date_added);
?>