예제 #1
0
     break;
 case 'get_node':
     $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
     $rslt = $fs->lst($node, isset($_GET['id']) && $_GET['id'] === '#');
     break;
 case "get_content":
     $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
     $rslt = $fs->data($node);
     break;
 case 'save_node':
     $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
     $rslt = $fs->save($node, isset($_GET['sdata']) ? $_GET['sdata'] : '');
     break;
 case 'temp_node':
     $ext = $_GET['ext'];
     $rslt = $fs->template($ext);
     break;
 case 'create_node':
     $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
     $rslt = $fs->create($node, isset($_GET['text']) ? $_GET['text'] : '', !isset($_GET['type']) || $_GET['type'] !== 'file');
     break;
 case 'rename_node':
     $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
     $rslt = $fs->rename($node, isset($_GET['text']) ? $_GET['text'] : '');
     break;
 case 'delete_node':
     $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
     $rslt = $fs->remove($node);
     break;
 case 'move_node':
     $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
예제 #2
0
 switch ($_GET['operation']) {
     case 'get_node':
         $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
         $rslt = $fs->lst($node, isset($_GET['id']) && $_GET['id'] === '#');
         break;
     case "get_content":
         $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
         $rslt = $fs->data($node);
         break;
     case 'save_node':
         $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
         $rslt = $fs->save($node, isset($_GET['sdata']) ? $_GET['sdata'] : '');
         break;
     case 'temp_node':
         $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
         $rslt = $fs->template($node);
         break;
     case 'create_node':
         $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
         $rslt = $fs->create($node, isset($_GET['text']) ? $_GET['text'] : '', !isset($_GET['type']) || $_GET['type'] !== 'file');
         break;
     case 'rename_node':
         $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
         $rslt = $fs->rename($node, isset($_GET['text']) ? $_GET['text'] : '');
         break;
     case 'delete_node':
         $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';
         $rslt = $fs->remove($node);
         break;
     case 'move_node':
         $node = isset($_GET['id']) && $_GET['id'] !== '#' ? $_GET['id'] : '/';