summaryrefslogtreecommitdiff
path: root/libs/music/player.d/plistcreator.php
diff options
context:
space:
mode:
Diffstat (limited to 'libs/music/player.d/plistcreator.php')
-rw-r--r--libs/music/player.d/plistcreator.php20
1 files changed, 0 insertions, 20 deletions
diff --git a/libs/music/player.d/plistcreator.php b/libs/music/player.d/plistcreator.php
deleted file mode 100644
index b4f12c7..0000000
--- a/libs/music/player.d/plistcreator.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<pre>
-<?php
- if(!isset($_POST["plistid"])){echo "E: invalid plistid.";exit();}
- if(intval($_POST["plistid"])<0||intval($_POST["plistid"])>=100)
- {echo "E: invalid plistid.";exit();}
- if(intval($_POST["plistid"])<16&&strcmp($_SERVER["REMOTE_ADDR"],"127.0.0.1")!=0&&strcmp($_SERVER["REMOTE_ADDR"],"::1")!=0&&strpos($_SERVER["REMOTE_ADDR"],"192.168")!==0&&strpos($_SERVER["REMOTE_ADDR"],"10.42")!==0)
- {echo "W: Protected play list. Doing nothing. " . $_SERVER["REMOTE_ADDR"];exit();}
- $fn=sprintf("/var/www/html/libs/music/player.d/playlists/%s",$_POST["plistid"]);
- $file=fopen($fn,"w");
- fwrite($file,$_POST["plistname"]);fwrite($file,"\n");
- for($i=0;$i<count($_POST["plist"]);++$i)
- {
- fwrite($file,$_POST["plist"][$i]);
- if(ord($_POST["plist"][$i][strlen($_POST["plist"][$i])-1])!=10)
- fwrite($file,"\n");
- }
- fclose($file);
- echo "I: Playlist created successfully. <a href=\"../player/",$_POST["plistid"],"\">Play it now!</a>";
-?>
-</pre>