-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinks.php
66 lines (51 loc) · 1.85 KB
/
links.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
<?php
/*
Ceres Control Panel
This is a control pannel program for Athena and Freya
Copyright (C) 2005 by Beowulf and Nightroad
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
To contact any of the authors about special permissions send
an e-mail to [email protected]
*/
session_start();
include_once 'config.php'; // loads config variables
include_once 'query.php'; // imports queries
include_once 'functions.php';
$query = sprintf(GET_LINKS);
$result = execute_query($query, 'links.php', 1, 0);
caption($lang['LINKS_LINKS']);
echo '<table class="maintable">';
for ($i = 1; $i < 10; $i++) {
if (!($clinks = $result->fetch_row()))
break;
$name = htmlspecialchars(utf8_encode($clinks[0]));
$url = htmlspecialchars($clinks[1]);
$desc = nl2br(htmlspecialchars(utf8_encode($clinks[2])));
$size = $clinks[3];
if ($size==0) {
$size='';
$url=' <a href="'.$url.'" target="_blank">'.$name.'</a> '.$size;
}
else {
$size=' ('.$size.' Mb)';
$url=' <a href="'.$url.'">'.$name.'</a> '.$size;
}
echo '
<tr><td align="left"><b>'.$lang['LINKS_NAME'].'</b>:</td><td align="left">'.$url.'</td></tr>
<tr><td align="left"> </td><td align="left">'.$desc.'</td></tr>
<tr><td align="left"> </td></tr>
';
}
echo '</table>';
fim();
?>