選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

download.php 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use SCF\Core\DI;
  3. use SCF\Additionals\Tracking;
  4. use SCF\Additionals\Download;
  5. /**
  6. * Download page for Downloads
  7. */
  8. /**
  9. * Tracking Settings set for Database logging of Downloads
  10. * Please Remind that this only counts Click on DL Button, User can Cancel the Download
  11. * and the system will still think it was a finished download
  12. */
  13. $tracking = new Tracking(DI::getInstance()->get('db'));
  14. $tracking->setCurrentUserIp($_SERVER['REMOTE_ADDR']);
  15. $tracking->setCurrentUserAgent($_SERVER['HTTP_USER_AGENT']);
  16. /**
  17. * Check if controllerFile is NOT the EuropeanFontPatch for DownloadTracking
  18. */
  19. if ($match['params']['controllerFile'] != 'EuropeanFontPatch') {
  20. $tracking->saveTrackingInDb('download', $settings->getValue('sks_download_version'));
  21. $dlFile = $settings->getValue('sks_download_file');
  22. } else {
  23. $dlFile = $settings->getValue('sks_eufont_file');
  24. }
  25. /**
  26. * Set Needed Variables for the Download Class
  27. */
  28. $dl = new Download();
  29. $dl->setAbsolutePath($settings->getValue('sks_download_path'));
  30. $dl->setFileName($dlFile);
  31. $dl->startDownloadFile();
  32. $tpl->display('index.tpl');