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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
<?php
//----------------------------------// // Copyright by Matthias Speer // //----------------------------------//
include('./config.inc.php');
include('./auth.php');
$action=isset($_GET['action'])?$_GET['action']:''; $option=(isset($_GET['option']))?$_GET['option']:''; $path=isset($_GET['path'])?$_GET['path']:''; $file=isset($_GET['file'])?$_GET['file']:'';
$frmset=Array(); $frmrows='40,50%,*';
$dirmodus = Array ( 'win|PHP', 'win|PHPsys', 'linux|PHP', 'linux|PHPsys', 'linux|Python', 'linux|PerlCGI', 'linux|Perl_htaccess', 'linux|SSI', );
$status=in_array($PMS['os'].'|'.$PMS['modus'], $dirmodus);
switch ($action) { case 'd': // download $frmset[0] = "dirtools.php?action=v&path=$path&file=$file&option=$option"; $frmset[1] = "directory.php?action=v&path=$path&option=$option"; $frmset[2] = "download.php?action=d&path=$path&file=$file&option=$option"; break; case 's': // show sourcecode $frmset[0] = "dirtools.php?action=s&path=$path&file=$file&option=$option"; $frmset[1] = "directory.php?action=s&path=$path&option=$option"; $frmset[2] = "view.php?action=s&path=$path&file=$file&option=$option"; break; case 'v': // view $frmset[0] = "dirtools.php?action=v&path=$path&file=$file&option=$option"; $frmset[1] = "directory.php?action=v&path=$path&option=$option"; $frmset[2] = "view.php?action=v&path=$path&file=$file&option=$option"; $frmrows = "40,25%,*"; break; case 'u': // upload $frmset[0] = "dirtools.php?action=u&path=$path&file=$file&option=$option"; $frmset[1] = "directory.php?action=u&path=$path&option=$option"; $frmset[2] = "upload.php?action=u&path=$path&file=$file&option=$option"; break; case 'ug': // upload/wget $frmset[0] = "dirtools.php?action=ug&path=$path&file=$file&option=$option"; $frmset[1] = "directory.php?action=ug&path=$path&option=$option"; $frmset[2] = "wget.php?action=ug&path=$path&file=$file&option=$option"; break;
case 'df': // delete file $frmset[0] = "dirtools.php?action=df&path=$path&file=$file&option=$option"; $frmset[1] = "directory.php?action=df&path=$path&option=$option"; $frmset[2] = "deletefile.php?action=df&path=$path&file=$file&option=$option"; break; case 'dd': // delete directory $frmset[0] = "dirtools.php?action=dd&path=$path&option=$option"; $frmset[1] = "directory.php?action=dd&path=$path&option=$option"; $frmset[2] = "deletedir.php?action=dd&path=$path&option=$option"; break;
case 'nf': // new directory $frmset[0] = "dirtools.php?action=nf&path=$path&option=$option"; $frmset[1] = "directory.php?action=nf&path=$path&option=$option"; $frmset[2] = "newdir.php?action=nf&path=$path&option=$option"; break; case 'cf': // new file $frmset[0] = "dirtools.php?action=cf&path=$path&option=$option"; $frmset[1] = "directory.php?action=cf&path=$path&option=$option"; $frmset[2] = "newfile.php?action=cf&path=$path&option=$option"; break;
case 'pf': // file perms $frmset[0] = "dirtools.php?action=pf&path=$path&file=$file&option=$option"; $frmset[1] = "directory.php?action=pf&path=$path&option=$option"; $frmset[2] = "fileperm.php?action=pf&path=$path&file=$file&option=$option"; break;
case 'pd': // directory perms $frmset[0] = "dirtools.php?action=pd&path=$path&option=$option"; $frmset[1] = "directory.php?action=pd&path=$path&option=$option"; $frmset[2] = "dirperm.php?action=pd&path=$path&option=$option"; break; case 'ed': // eile edit $frmset[0] = "dirtools.php?action=ed&path=$path&file=$file&option=$option"; $frmset[1] = "directory.php?action=ed&path=$path&option=$option"; $frmset[2] = "edit.php?action=ed&path=$path&file=$file&option=$option"; $frmrows = "40,25%,*"; break; default: $frmset[0] = "dirtools.php?action=v&path=$path&file=$file&option=$option"; $frmset[1] = "directory.php?action=o&path=$path&option=$option"; break; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <HTML> <HEAD> <TITLE>Directory</TITLE> <META http-equiv="Content-Type" content="text/html; charset=<?php echo GetLocText('charset', false); ?>"> <?php if (!$status) echo '<LINK href="style/global.css" rel="stylesheet" type="text/css">'; ?> <SCRIPT language="JavaScript" src="./script/frames.js" type="text/JavaScript"></SCRIPT> </HEAD> <?php
if ($status) { switch (count($frmset)) { case 3: echo '<FRAMESET rows="'.$frmrows.'" framespacing="3" frameborder="yes" border="1" bordercolor="#78A0B4">'; echo '<FRAME src="'.$frmset[0].'" name="frm_dir_tool" frameborder="no" scrolling="no" noresize id="frm_dir_tool">'; echo '<FRAME src="'.$frmset[1].'" name="frm_dir_main" frameborder="no" scrolling="auto" id="frm_dir_main">'; echo '<FRAME src="'.$frmset[2].'" name="frm_dir_opt" frameborder="no" scrolling="auto" id="frm_dir_opt">'; echo '</FRAMESET>'; break; default: echo '<FRAMESET rows="40,*" framespacing="3" frameborder="yes" border="1" bordercolor="#78A0B4">'; echo '<FRAME src="'.$frmset[0].'" name="frm_dir_navi" frameborder="no" scrolling="no" noresize id="frm_dir_navi">'; echo '<FRAME src="'.$frmset[1].'" name="frm_dir_main" frameborder="no" scrolling="auto" id="frm_dir_main">'; echo '</FRAMESET>'; break; } echo '<NOFRAMES><BODY> </BODY></NOFRAMES>'; } else { echo '<BODY>'; DisplayMessage(GetLocText('msg_func_na')); echo '</BODY>'; } ?> </HTML>
|