Пример #1
0
 case 'properties':
     if (isset($_POST['name'])) {
         $name = trim($_POST['name']);
         if ($name[0] == '.') {
             $feedback = '<p class="Error">' . $name_width_dot_at_begin . '</p>';
         } else {
             if (validate_input($name)) {
                 if (isset($_POST['share_folder']) && !$fs->get_share($path)) {
                     $fs->add_share($GO_SECURITY->user_id, $path);
                 } else {
                     if (!isset($_POST['share_folder'])) {
                         $fs->delete_share($path);
                     }
                 }
                 if ($GO_SECURITY->has_admin_permission($GO_SECURITY->user_id) && $fs->is_common_folder($path)) {
                     if (isset($_POST['system_folder']) && !$fs->is_system_folder($path)) {
                         if (!$fs->add_system_folder($path, $msg)) {
                             $feedback = '<p class="Error">' . $msg . '</p>';
                         }
                     } else {
                         if (!isset($_POST['system_folder']) && $fs->is_system_folder($path)) {
                             if (!$fs->delete_system_folder($path, $msg)) {
                                 $feedback = '<p class="Error">' . $msg . '</p>';
                             }
                         }
                     }
                 }
                 if (!$fs->has_write_permission($GO_SECURITY->user_id, $path)) {
                     $feedback = '<p class="Error">' . $strAccessDenied . '</p>';
                 } elseif ($name == '') {
                     $feedback = '<p class="Error">' . $error_missing_field . '</p>';