-
Notifications
You must be signed in to change notification settings - Fork 0
/
all.php
53 lines (44 loc) · 958 Bytes
/
all.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
<?php include 'header.php';?>
<?php echo URLIST; ?>
<br />
<table width="100%">
<br />
<?php
/*
function clean_url($rows){
//return str_replace(array('http://','https://','www.'),'',$rows);
return str_replace(array('http://','https://'),'',$rows);
}
$sql = 'SELECT * FROM links ORDER BY id DESC';
$result=mysql_query($sql);
while ($link=mysql_fetch_array($result)){
echo '<tr>
<td><a href="http://'.htmlspecialchars(clean_url($link['detail'])).'" target="_blank">'.$link['detail'].'</a></td>
</tr>';
}
*/
?>
</table>
<?php
$sql = 'SELECT * FROM links ORDER BY id DESC';
$result=mysql_query($sql);
while($rows=mysql_fetch_array($result)){
?>
<?php
if ($rows)
{
?>
<a href="<?php echo $rows['id']; ?>"><?php echo htmlspecialchars($rows['detail']); ?></a> -
<small><?php echo $rows['view']; ?> <?php echo VIEWS; ?></small><br>
<?php
}
else
{
?>
<?php
}
}
?>
<?php
include 'footer.php';
?>