コード例 #1
0
ファイル: Download.php プロジェクト: nikunjkacha/MPFree
    $lResult = $lDB->getResult();
    $lDB->disconnect();


    if (array_key_exists('ID', $lResult) && array_key_exists('DataContainer', $lResult))
    {
      $lID = $lResult['ID'];
      $lVideoID = $lResult['VideoID'];
      $lStatus = $lResult['Status'];
      $lStatusStr = Videos::$Status[$lStatus];
      $lDescr = $lResult['Description'];
      $lDataContainer = $lResult['DataContainer'];


      $lFile = new Files();
      $lFile->downloadFile($gUID, $lDataContainer);

      # Remove file and DB entry
      $lFile->removeFile($gUID, $lDataContainer);

      $lVideos = new Videos();
      $lVideos->removeVideo($lID);
    }
    else
    {
      Log::writeLog(1, $_SERVER["SCRIPT_NAME"], "User with ID $gUID can't download $gVID");
    }
  }

?>