-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathimages.php
More file actions
33 lines (28 loc) · 985 Bytes
/
images.php
File metadata and controls
33 lines (28 loc) · 985 Bytes
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
<?php
/*
+ ----------------------------------------------------------------------------+
| PHPDirector.
| $License: GPL General Public License
| $Website: phpdirector.co.uk
| $Author: Ben Swanson
| $Contributors - Dennis Berko and Monte Ohrt (Monte Ohrt)
+----------------------------------------------------------------------------+
*/
require("header.php");
$query = "SELECT * FROM pp_files WHERE approved='1' AND reject='0' ORDER BY RAND()";
$query_count = mysql_query($query);
$totalrows = mysql_num_rows($query_count);
$result = mysql_query($query);
if (!$result)die(mysql_error()); //If no results end
if($totalrows == 0){ //if no videos display error.
$smarty->assign('error', 'There Does Not Seem to be any images to show....');
$smarty->display('error.tpl');
exit;
}
while ($row = mysql_fetch_assoc($result)){
$images[] = $row;
}
$smarty->assign('images', $images);
$smarty->display('images.tpl');
mysql_close($mysql_link);
?>