-
Notifications
You must be signed in to change notification settings - Fork 3
/
mydisk.php
executable file
·74 lines (64 loc) · 1.98 KB
/
mydisk.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
67
68
69
70
71
72
<?php
/**
# Project: PHPDISK File Storage Solution
# This is NOT a freeware, use is subject to license terms.
#
# Site: http://www.google.com
#
# $Id: mydisk.php 121 2014-03-04 12:38:05Z along $
#
# Copyright (C) 2008-2014 PHPDisk Team. All Rights Reserved.
#
*/
include "includes/commons.inc.php";
phpdisk_core::user_login();
define('IN_MYDISK' ,true);
$item = $item ? $item : 'profile';
if($item=='files' && in_array($action,array('modify_file','post_report','post_comment'))){
$inner_box = true;
}
if($item=='folders' && in_array($action,array('add_folder','modify_folder','folder_delete'))){
$inner_box = true;
}
if($item=='course' && in_array($action,array('add_course','modify_course','course_delete','add_chapter_section',
'chapter_section_delete','modify_chapter_section', 'add_file_cs_relation',
'file_cs_relation_delete', 'course_review', 'course_review_cancel'))){
$inner_box = true;
}
if($item=='profile' && in_array($action,array('conv_income','guest'))){
$inner_box = true;
}
if($item=='upload'){
$inner_box = true;
}
if($inner_box){
if($item){
require_once template_echo('my_header',$user_tpl_dir);
require_once PHPDISK_ROOT.'modules/'.$item.'.inc.php';
require_once template_echo('my_footer',$user_tpl_dir);
}else{
echo "Error operation, system halt,inner_box!";
}
}else{
$in_front = true;
$num = @$db->result_first("select count(*) from {$tpf}users where userid='$pd_uid' and is_locked=1 limit 1");
if($num){
include PHPDISK_ROOT."./includes/header.inc.php";
require_once template_echo("pd_mydisk_locked",$user_tpl_dir);
}else{
if($item){
include PHPDISK_ROOT."./includes/header.inc.php";
$items = array('files','profile');
if(in_array($item,$items)){
$action_module = PHPDISK_ROOT.'modules/'.$item.'.inc.php';
}else{
echo "Error operation, system halt!";
}
require_once template_echo("mydisk",$user_tpl_dir);
}else{
echo "Error operation, system halt!";
}
}
}
include PHPDISK_ROOT."./includes/footer.inc.php";
?>