C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\heimam\phpmyserver\deletedir.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?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'');
$confirm=(isset($_GET['confirm'])&&($_GET['confirm']=='yes'))?true:false;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>DeleteDir</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_dir_caption'), GetDirName(realpath($path))); ?></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_dir_sure').(($PMS['modus']=='php')?'':'<BR>'.GetLocText('del_dir_all')); ?></TD>
        </TR>
        <TR> 
          <TD width="50%" align="center" class="frmbtn"><?php echo '<A href=./deletedir.php?action=dd&path='.$encpath.'&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|PerlCGI':     
        case 
'linux|Perl_htaccess'
        case 
'linux|SSI':             $mod=new PMSMod();
                                    if (
$mod->Execute("rm -rfv $fullpath"))
                                    {
                                        echo 
'<PRE>';
                                        
$mod->Output2Stdout();
                                        echo 
'</PRE>';
                                    }
                                    
$mod->Destructor();    
                                    break;
                                    
        case 
'win|PHPsys':             $mod=new PMSMod();
                                    if (
$mod->Execute("rd /Q /S $fullpath"))
                                    {    
                                        echo 
'<PRE>';
                                        
$mod->FormatOutput2Stdout();
                                        echo 
'</PRE>';
                                    }
                                    
$mod->Destructor();    
                                    break;
                                        
        default:                    if (@
rmdir($fullpath))
                                    {
                                        
DisplayMessage(GetLocText('del_dir_ok'));
                                    } else
                                    {
                                        
DisplayError(GetLocText('err_deldir'), GetDirName(realpath($path)));
                                    }
    }    
    
$newencpath=EncodeGET(GetParPath($fullpath));
    echo 
"<SCRIPT language=\"JavaScript\">\n<!--\n";
    echo 
"parent.frm_dir_tool.location.href='./dirtools.php?action=o&path=$newencpath&option=$option';\n";
    echo 
"parent.frm_dir_main.location.href='./directory.php?action=o&path=$newencpath&option=$option';\n";
    echo 
"//-->\n</SCRIPT>";
    echo 
'<NOSCRIPT><BR><HR size=1 noshade><A href=./directory_fs.php?action=o&path='.$newencpath.'&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>