|
|
|
@ -5,16 +5,17 @@ |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
require_once '../global.inc.php'; |
|
|
|
|
|
|
|
|
|
require_once api_get_path(SYS_CODE_PATH).'work/work.lib.php'; |
|
|
|
|
|
|
|
|
|
$action = isset($_REQUEST['a']) ? $_REQUEST['a'] : null; |
|
|
|
|
|
|
|
|
|
$is_allowed_to_edit = api_is_allowed_to_edit(); |
|
|
|
|
$isAllowedToEdit = api_is_allowed_to_edit(); |
|
|
|
|
|
|
|
|
|
switch ($action) { |
|
|
|
|
case 'delete_work': |
|
|
|
|
if ($is_allowed_to_edit) { |
|
|
|
|
if ($isAllowedToEdit) { |
|
|
|
|
if (empty($_REQUEST['id'])) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
$workList = explode(',', $_REQUEST['id']); |
|
|
|
|
foreach ($workList as $workId) { |
|
|
|
|
deleteDirWork($workId); |
|
|
|
@ -25,4 +26,4 @@ switch ($action) { |
|
|
|
|
echo ''; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
exit; |
|
|
|
|
exit; |
|
|
|
|