Teknik is a suite of services with attractive and functional interfaces. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

delete_podcast_file.php 706B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. require_once('../includes/config.php');
  3. if (isset($_POST['file']))
  4. {
  5. if ($logged_in && $user->admin)
  6. {
  7. $files = explode(',', rawurldecode($_POST['file']));
  8. foreach ($files as $file)
  9. {
  10. if (file_exists($CONF['podcast_dir'].$file))
  11. {
  12. $result = unlink($CONF['podcast_dir'].$file);
  13. }
  14. }
  15. if ($result)
  16. {
  17. echo json_encode(array("result" => True));
  18. }
  19. else
  20. {
  21. echo json_encode(array("error" => $CONF['errors']['InvFile']));
  22. }
  23. }
  24. else
  25. {
  26. echo json_encode(array("error" => $CONF['errors']['NoAuth']));
  27. }
  28. }
  29. else
  30. {
  31. echo json_encode(array("error" => $CONF['errors']['NoFile']));
  32. }
  33. ?>