-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.php
More file actions
50 lines (38 loc) · 1.17 KB
/
content.php
File metadata and controls
50 lines (38 loc) · 1.17 KB
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
<?php
define('INCLUDE_PATH', 'include/');
require(INCLUDE_PATH.'vitals.inc.php');
require(INCLUDE_PATH.'header.inc.php'); ?>
<?php
$top_pages = get_top_pages();
if (!empty($top_pages)) {
echo '<div id="block-container">';
foreach ($top_pages as $row) {
$title = get_title('page', $row['page_id']);
?>
<div class="cat">
<div class="title">
<div style="height:150px;">
<?php echo $title; ?>
</div>
<a href="page_view.php?c=<?php echo $row['page_id']; ?>" class="goto">
<img src="images/hand.png" style="border:0px;padding:0px;" />
</a>
</div>
<div style="float:right; padding-right:3px;">
<?php
//get sub pages
$sql = "SELECT page_id FROM pages WHERE parent_id=".$row['page_id'];
$result2 = mysql_query($sql, $db);
$sub_pages = intval(@mysql_num_rows($result2));
echo "<span style='font-size: smaller;'> $sub_pages <img src='images/pictures.png' alt='Sub-pages' title='Sub-pages' /></span>";
echo '</div>';
echo '</div>';
} ?>
<br style="clear:both" />
</div>
<?php
} else {
echo "No content found.";
}
require(INCLUDE_PATH.'footer.inc.php');
?>