예제 #1
0
파일: project.php 프로젝트: Jayriq/mmslides
         header("HTTP/1.1 200 OK");
         header("Content-Type: application/json");
         $datastring = json_encode($data);
         header("Content-Length: " . strlen($datastring));
         print $datastring;
         exit;
     }
 } else {
     if (strcmp($request['cmd'], 'renameProject') == 0 && strlen($request['project'])) {
         if ($projects->projectExists($request['project'])) {
             header("HTTP/1.1 403 Forbidden");
             header("Content-Type: text/html");
             print "Project exists\r\n";
             exit;
         } else {
             $data = $projects->renameProject($request['project'], $request['id']);
             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'], 'copyProject') == 0 && strlen($request['project'])) {
             if ($projects->projectExists($request['project'])) {
                 header("HTTP/1.1 403 Forbidden");
                 header("Content-Type: text/html");
                 print "Project exists\r\n";
                 exit;
             } else {