From 9d3c8c0e6e1a7ba43bf3dc19350d1dca68b657a3 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sun, 10 Feb 2019 11:16:07 +0800 Subject: Initial commit. --- libs/music/player.d/plistcreator.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 libs/music/player.d/plistcreator.php (limited to 'libs/music/player.d/plistcreator.php') diff --git a/libs/music/player.d/plistcreator.php b/libs/music/player.d/plistcreator.php new file mode 100644 index 0000000..b4f12c7 --- /dev/null +++ b/libs/music/player.d/plistcreator.php @@ -0,0 +1,20 @@ +
+=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;$iPlay it now!";
+?>
+
-- cgit v1.2.3