|
3 | 3 | include($_SERVER['DOCUMENT_ROOT']."/inc/main.php"); |
4 | 4 | $user = $_SESSION['user']; |
5 | 5 |
|
6 | | -// Check module activation |
7 | | -if (!$_SESSION['FILEMANAGER_KEY']) { |
8 | | - $_SESSION['request_uri'] = $_SERVER['REQUEST_URI']; |
9 | | - header("Location: /login/"); |
10 | | - exit; |
11 | | -} |
12 | | - |
13 | 6 | // Check login_as feature |
14 | 7 | if (($_SESSION['user'] == 'admin') && (!empty($_SESSION['look']))) { |
15 | 8 | $user=$_SESSION['look']; |
|
21 | 14 | <title>Edit file <?= htmlspecialchars($_REQUEST['path']) ?></title> |
22 | 15 | <meta charset="utf-8" /> |
23 | 16 |
|
24 | | -<link href="/css/file_manager_editor.css" type="text/css" rel="stylesheet"> |
25 | 17 | <script src="/js/cheef-editor/jquery/jquery-1.8.3.min.js"></script> |
26 | 18 | <script src="/js/cheef-editor/ace/ace.js"></script> |
27 | 19 | <script src="/js/cheef-editor/ace/theme-twilight.js"></script> |
|
95 | 87 | action: 'backup', |
96 | 88 | path: '<?= $path ?>' |
97 | 89 | }; |
98 | | - |
99 | | - $.ajax({url: "/file_manager/fm_api.php", |
100 | | - method: "POST", |
101 | | - data: params, |
102 | | - dataType: 'JSON', |
103 | | - success: function(reply) { |
104 | | - var fadeTimeout = 3000; |
105 | | - if (reply.result) { |
106 | | - $('#message').text('File backed up as ' + reply.filename); |
107 | | - clearTimeout(window.msg_tmt); |
108 | | - $('#message').show(); |
109 | | - window.msg_tmt = setTimeout(function() {$('#message').fadeOut();}, fadeTimeout); |
110 | | - } |
111 | | - else { |
112 | | - $('#error-message').text(reply.message); |
113 | | - clearTimeout(window.errmsg_tmt); |
114 | | - $('#error-message').show(); |
115 | | - window.errmsg_tmt = setTimeout(function() {$('#error-message').fadeOut();}, fadeTimeout); |
116 | | - } |
117 | | - } |
118 | | - }); |
119 | 90 | } |
120 | 91 |
|
121 | 92 | $('#do-backup').on('click', function(evt) { |
|
0 commit comments