-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlast_downloads.php
78 lines (69 loc) · 1.71 KB
/
last_downloads.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
<?
/*
+--------------------------------------------------------------------------
| 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 = 5;
$cut = 60;
$content = "";
$query = $DB->query( "SELECT id, name, description FROM mkp_download WHERE validate = '1' ORDER BY `id` DESC LIMIT $limit");
while( $row = $DB->fetch_row() ) {
$idu = $row['id'];
$umes = "";
$message = substr($row['description'], 0, $cut);
$message = str_replace("<br>", " ", $message);
$message = explode(" ", $message);
foreach ($message as $value) {
if (strlen($value) > 20) {
$value = substr($value, 0, 22);
}
$umes .= $value." ";
}
$content.= "
<tr>
<td class=\"tdblock\"><a href=\"$this->siteurl/index.php?ind=downloads&op=entry_view&iden=$idu\" class=\"uno\">{$row['name']}</a>
</td>
</tr>";
$content .= "
<tr>
<td class=\"tdglobal\">$umes ...
</td>
</tr>";
}
if($idu == NULL) {
$content = "
<tr>
<td class=\"tdblock\" align=\"center\">
{$this->lang['down_not']}
</td>
</tr>
";
}
if(!$mkportals->member['g_access_cp'] && !$this->member['g_access_download']) {
$content = "
<tr>
<td class=\"tdblock\" align=\"center\">
{$this->lang['down_noallow']}
</td>
</tr>
";
}
unset($row);
unset($umes);
unset($message);
unset($idu);
?>