Exemplo n.º 1
0
 } else {
     if (strcmp($request['cmd'], 'unpublishProject') == 0) {
         if (array_key_exists('serverpath', $request)) {
             $data = $projects->unpublishLocal($request['data'], $request['serverpath']);
         } else {
             $data = $projects->unpublishViaFTP($request['data']);
         }
         if (is_array($data)) {
             header("HTTP/1.1 200 OK");
             header("Content-Type: text/html");
             echo json_encode($data);
             exit;
         }
     } else {
         if (strcmp($request['cmd'], 'loadProject') == 0) {
             $data = $projects->loadProject($request['projectid'], $request['distributeslides']);
             if (is_array($data)) {
                 header("HTTP/1.1 200 OK");
                 header("Content-Type: text/html");
                 echo json_encode($data);
                 exit;
             }
         } else {
             if (strcmp($request['cmd'], 'deleteImages') == 0) {
                 $data = $projects->deleteImages($request['images']);
                 if (is_array($data)) {
                     header("HTTP/1.1 200 OK");
                     header("Content-Type: text/html");
                     echo json_encode($data);
                     exit;
                 }