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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
<?php
//----------------------------------// // Copyright by Matthias Speer // //----------------------------------//
include('./config.inc.php');
include('./auth.php');
$action=(isset($_GET['action']))?$_GET['action']:''; $option=(isset($_GET['option']))?$_GET['option']:''; $encpath=(isset($_GET['path']))?$_GET['path']:''; $path=($encpath=='')?'':DecodeGET($encpath); $fullpath=GetPath($path, '');
$status=0; if ($fullpath !== false) { if (!empty($_POST['dirname'])) { $dirname=AddSlash($fullpath).HandlePost($_POST['dirname']); $exists=DirExists($dirname); $mode=GetPermCode(); if (!$exists) { switch ($PMS['os'].'|'.$PMS['modus']) { case 'linux|PHPsys': case 'linux|Python': case 'linux|PerlCGI': case 'linux|Perl_htaccess': case 'linux|SSI': $mod=new PMSMod(); if ($mod->Execute("mkdir -v --mode=$mode $dirname")) { echo '<PRE>'; $mod->Output2Stdout(); echo '</PRE>'; } $mod->Destructor(); $status=1; break;
case 'linux|PHP': eval("\$rs=@mkdir('$dirname',$mode);"); $status=($rs)?2:3; break; case 'win|PHPsys': $mod=new PMSMod(); if ($mod->Execute("mkdir $dirname")) { echo '<PRE>'; $mod->FormatOutput2Stdout(); echo '</PRE>'; } $mod->Destructor(); $status=(DirExists($dirname))?2:3; break; case 'win|PHP': $rs=@mkdir($dirname); $status=($rs)?2:3; } } else { $status=4; } } } else { $status = -1; }
?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE>New Folder</TITLE> <META http-equiv="Content-Type" content="text/html; charset=<?php echo GetLocText('charset', false); ?>"> <LINK href="style/global.css" rel="stylesheet" type="text/css"> <LINK href="style/form.css" rel="stylesheet" type="text/css"> <SCRIPT language="JavaScript" src="./script/frames.js" type="text/JavaScript"></SCRIPT> </HEAD> <BODY class=body_form> <?php if ($status==0) { ?> <FORM action="./newdir.php?action=nf&path=<?php echo EncodeGET(AddSlash($path)).'&option='.$option; ?>" method="post" enctype="application/x-www-form-urlencoded" name="frm"> <TABLE width="500" border="0" align="center" cellpadding="0" cellspacing="2" class="frmframe"> <TR> <TD class="frmcaption"><?php echo GetLocText('dir_dir_nf'); ?></TD> </TR> <TR> <TD class="frmbody"> <TABLE width="500" border="0" cellpadding="0" cellspacing="5"> <TR> <TD class="frmmsg"><?php echo GetLocText('dir_nf_name'); ?>: </TD> <TD class="frmmsg"><INPUT name=dirname type=text class="inp100"></TD> </TR> <TR> <TD class="frmmsg"><?php echo GetLocText('dir_perm_dir'); ?>:</TD> <TD class="frmpanel"><TABLE width="100%" border="0" cellpadding="0" cellspacing="0" class="text1"> <TR> <TD width="25%" class="text1b"> <?php echo GetLocText('dir_perm_own'); ?></TD> <TD width="25%"><INPUT type="checkbox" name="ur" value="1"<?php echo GetPerm('ur',1); ?>><?php echo GetLocText('dir_perm_r'); ?></TD> <TD width="25%"><INPUT type="checkbox" name="uw" value="1"<?php echo GetPerm('uw',1); ?>><?php echo GetLocText('dir_perm_w'); ?></TD> <TD width="25%"><INPUT type="checkbox" name="ue" value="1"<?php echo GetPerm('ue',1); ?>><?php echo GetLocText('dir_perm_e'); ?></TD> </TR> <TR> <TD colspan="4" class="clr3"><IMG src="./img/1.gif" width="1" height="1"></TD> </TR> <TR> <TD class="text1b"> <?php echo GetLocText('dir_perm_grp'); ?></TD> <TD width="25%"><INPUT type="checkbox" name="gr" value="1"<?php echo GetPerm('gr',1); ?>><?php echo GetLocText('dir_perm_r'); ?></TD> <TD width="25%"><INPUT type="checkbox" name="gw" value="1"<?php echo GetPerm('gw',1); ?>><?php echo GetLocText('dir_perm_w'); ?></TD> <TD width="25%"><INPUT type="checkbox" name="ge" value="1"<?php echo GetPerm('ge',1); ?>><?php echo GetLocText('dir_perm_e'); ?></TD> </TR> <TR> <TD colspan="4" class="clr3"><IMG src="./img/1.gif" width="1" height="1"></TD> </TR> <TR> <TD class="text1b"> <?php echo GetLocText('dir_perm_oth'); ?></TD> <TD width="25%"><INPUT type="checkbox" name="or" value="1"<?php echo GetPerm('or',1); ?>><?php echo GetLocText('dir_perm_r'); ?></TD> <TD width="25%"><INPUT type="checkbox" name="ow" value="1"<?php echo GetPerm('ow',1); ?>><?php echo GetLocText('dir_perm_w'); ?></TD> <TD width="25%"><INPUT type="checkbox" name="oe" value="1"<?php echo GetPerm('oe',1); ?>><?php echo GetLocText('dir_perm_e'); ?></TD> </TR> <?php if ($PMS['modus']!='PHP') { ?> <TR> <TD colspan="4" class="clr3"><IMG src="./img/1.gif" width="1" height="1"></TD> </TR> <TR class="clr1"> <TD class="text1b"> <?php echo GetLocText('dir_perm_ext'); ?></TD> <TD width="25%"><INPUT type="checkbox" name="su" value="1"<?php echo GetPerm('su',1); ?>><?php echo GetLocText('dir_perm_su'); ?></TD> <TD width="25%"><INPUT type="checkbox" name="sg" value="1"<?php echo GetPerm('sg',1); ?>><?php echo GetLocText('dir_perm_sg'); ?></TD> <TD width="25%"><INPUT type="checkbox" name="st" value="1"<?php echo GetPerm('st',1); ?>><?php echo GetLocText('dir_perm_st'); ?></TD> </TR> <?php } ?> </TABLE> </TD> </TR> <TR> <TD colspan="2" align="center"><INPUT name=Submit type=submit class="btn" value=<?php echo GetLocText('dir_nf_create'); ?>></TD> </TR> </TABLE></TD> </TR> </TABLE> <BR><DIV align=center class=message><?php echo GetLocTExt('msg_perm'); ?></DIV> <?php } else { switch ($status) { case 2: DisplayMessage(GetLocText('dir_nf_ok')); break; case 3: DisplayError(GetLocText('err_newfld')); break; case 4: DisplayMessage(GetLocText('dir_nf_ex' )); break;
} echo "<SCRIPT language=\"JavaScript\">\n<!--\nparent.frm_dir_main.location.href='./directory.php?action=o&path=$encpath&option=$option';\n//-->\n</SCRIPT>"; echo '<NOSCRIPT><BR><HR size=1 noshade><A href=./directory_fs.php?action=o&path='.$encpath.'&option='.$option.' class=text1 target=frm_main><IMG src=./img/refresh.gif width=20 height=20 border=0 align=absmiddle>'.GetLocText('dir_refresh').'</A></NOSCRIPT>'; } ?> </FORM> </BODY> </HTML>
|