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
|
<?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']:''; $encfile=(isset($_GET['file']))?$_GET['file']:''; $path=($encpath=='')?'':DecodeGET($encpath); $file=($encfile=='')?'':DecodeGET($encfile); $fullpath=GetPath($path, $file); $confirm=(isset($_GET['confirm'])&&($_GET['confirm']=='yes'))?true:false;
?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE>DeleteFile</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 (!$confirm) { ?> <TABLE width="500" border="0" align="center" cellpadding="0" cellspacing="2" class="frmframe"> <TR> <TD class="frmcaption"><?php printf(GetLocText('del_file_caption'), $file); ?></TD> </TR> <TR> <TD class="frmbody"> <TABLE width="500" border="0" cellpadding="5" cellspacing="10"> <TR> <TD colspan="2" class="frmmsg" align="center"><?php echo GetLocText('del_file_sure'); ?></TD> </TR> <TR> <TD width="50%" align="center" class="frmbtn"><?php echo '<A href=./deletefile.php?action=df&path='.$encpath.'&file='.$encfile.'&option='.$option.'&confirm=yes class=frmbtnlink>JA</A>'; ?></TD> <TD width="50%" align="center" class="frmbtn"><?php echo '<A href=./directory_fs.php?action=o&path='.$encpath.'&option='.$option.' target=frm_main class=frmbtnlink>NEIN</A>'; ?></TD> </TR> </TABLE></TD> </TR> </TABLE> <BR><DIV align=center class=message><?php echo GetLocTExt('msg_perm'); ?></DIV> <?php } else { switch ($PMS['os'].'|'.$PMS['modus']) { case 'linux|PHPsys': case 'linux|Python': case 'linux|Perl_htaccess': $mod=new PMSMod(); if ($mod->Execute("rm -v $fullpath")) { echo '<PRE>'; $mod->Output2Stdout(); echo '</PRE>'; } $mod->Destructor(); break; case 'win|PHPsys': $mod=new PMSMod(); if ($mod->Execute("del /Q $fullpath")) { echo '<PRE>'; $mod->FormatOutput2Stdout(); echo '</PRE>'; } $mod->Destructor(); break; default: if (@unlink($fullpath)) { DisplayMessage(GetLocText('del_file_ok')); } else { DisplayError(GetLocText('err_delfile'), $file); } } 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>'; } ?> </BODY> </HTML>
|