Example #1
0
         }
     }
 } else {
     die('Failed to create output folder');
 }
 $limit = 'annotated';
 if (isset($_REQUEST['limit'])) {
     $limit = $_REQUEST['limit'];
 }
 $sql = "";
 switch ($limit) {
     case 'annotated':
         $sql = $QUERIES->getExportAnnotatedFramesPath();
         break;
     case 'all':
         $sql = $QUERIES->getExportFramesPath();
         break;
 }
 //Copying frames to tmp folder
 $result = mysql_query($sql);
 while ($row = mysql_fetch_array($result)) {
     $path = "../frames/" . $row[0];
     $filename = $row[0];
     if (file_exists($path)) {
         if (!copy($path, $tmpdir . $filename)) {
             die('Error copying files');
         }
     } else {
         die('Error retrieving frames');
     }
 }