-
Notifications
You must be signed in to change notification settings - Fork 3
/
public.php
executable file
·65 lines (56 loc) · 1.75 KB
/
public.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
<?php
/**
# Project: PHPDISK File Storage Solution
# This is NOT a freeware, use is subject to license terms.
#
# Site: http://www.google.com
#
# $Id: public.php 121 2014-03-04 12:38:05Z along $
#
# Copyright (C) 2008-2014 PHPDisk Team. All Rights Reserved.
#
*/
include "includes/commons.inc.php";
!$auth[is_fms] && exit(msg::umsg('Not_FMS',__('zcore_no_power')));
$in_front = true;
$cate_id = (int)gpc('cate_id','G',0);
if($cate_id){
$cate_name = $db->result_first("select cate_name from {$tpf}categories where cate_id='$cate_id'");
}
$nav_title = $cate_name ? $cate_name.'' : '';
$nav_title = $nav_title;
$title = $nav_title.' - '.$settings['site_title'];
$file_keywords = $nav_title.',';
$C[cate_hot_file] = get_cate_file($cate_id,'file_downs');
if($auth[pd_a]){
$seo = get_seo('public',$cate_id);
if($seo[title]){
eval("\$title = \"$seo[title]\";");
}
eval("\$keywords = \"$seo[keywords]\";");
eval("\$description = \"$seo[description]\";");
}
include PHPDISK_ROOT."./includes/header.inc.php";
if($cate_id){
//面包屑
$cur_cate = $cate_obj->getNodeById($cate_id);
$breadcrumb = array();
get_cate_breakcrumb($cur_cate, $breadcrumb);
//分类数据
$C[cate_list] = get_all_relate_cate_from_cateid($cate_id);
//课程数据
$course_array = get_course_from_cate($cate_id,'',$perpage);
$course_data = $course_array['data'];
//分页
$page_nav = multi($course_array['total_num'], $perpage, $pg, "public.php?cate_id=".$cate_id);
}else{
$q = $db->query("select * from {$tpf}categories where share_index=1 order by show_order asc,cate_id asc");
$cate_list = array();
while ($rs = $db->fetch_array($q)) {
$cate_list[] = $rs;
}
$db->free($q);
unset($rs);
}
require_once template_echo('pd_public',$user_tpl_dir);
include PHPDISK_ROOT."./includes/footer.inc.php";