-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlast_urlo.php
84 lines (78 loc) · 2.01 KB
/
last_urlo.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
<?
/*
+--------------------------------------------------------------------------
| 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
|
+--------------------------------------------------------------------------
*/
$limit = $this->config['urlo_block'];
if (!$limit) {
$limit = 5;
}
$content = "";
$link_user = $mklib_board->forum_link("profile");
$DB->query( "SELECT id, idaut, name, message FROM mkp_urlobox ORDER BY `id` DESC LIMIT $limit");
while( $urlo = $DB->fetch_row() ) {
$idu = $urlo['id'];
$umes = "";
$message = str_replace("<br />", " ", $urlo['message']);
$message = str_replace("<br>", " ", $message);
$message = $this->decode_bb($message);
$message = str_replace("\n", " ", $message);
$message = strip_tags($message);
$message = explode(" ", $message);
foreach ($message as $value) {
if (strlen($value) > 20 && !strpos($value, "\'http") && !strpos($value, "\"http") && !strpos($value, "emo")) {
$value = substr($value, 0, 20);
}
$umes .= $value." ";
}
$umes = $this->decode_bb($umes);
$content.= "
<tr>
<td class=\"tdblock\">{$this->lang['from']}: <a href=\"$link_user={$urlo['idaut']}\" class=\"uno\">{$urlo['name']}</a>
</td>
</tr>
";
$content .= "
<tr>
<td class=\"tdglobal\">$umes
</td>
</tr>
";
}
if($idu == NULL) {
$content = "
<tr>
<td class=\"tdblock\" align=\"center\">
{$this->lang['urlo_not']}
</td>
</tr>
";
}
if(!$mkportals->member['g_access_cp'] && !$this->member['g_access_urlobox']) {
$content = "
<tr>
<td class=\"tdblock\" align=\"center\">
{$this->lang['urlo_unauth']}
</td>
</tr>
";
}
unset($link_user);
unset($urlo);
unset($umes);
unset($message);
?>