blob: fceabcddfeca4c3d2e64dc8653030dd71f9bc673 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
$NetBSD: patch-ae,v 1.1.1.1 2009/12/15 16:17:44 abs Exp $
--- setup.php.orig 2002-04-07 08:04:39.000000000 +0000
+++ setup.php
@@ -3,22 +3,55 @@
require_once("functions.php");
session_start();
-session_register("USERNAME");
-session_register("PASSWORD");
-if (! isset($USERNAME)) $USERNAME = "";
-if (! isset($PASSWORD)) $PASSWORD = "";
-
-
-if ( isset($username) and isset($password) ) {
- $USERNAME = $username;
- $PASSWORD = $password;
+if ( isset($_SESSION["USERNAME"]))
+ $USERNAME = $_SESSION["USERNAME"];
+else
+ $USERNAME = "";
+
+if ( isset($_SESSION["PASSWORD"]))
+ $PASSWORD = $_SESSION["PASSWORD"];
+else
+ $PASSWORD = "";
+
+if ( isset($_REQUEST["username"]) and isset($_REQUEST["password"]) ) {
+ $USERNAME = $_REQUEST["username"];
+ $PASSWORD = $_REQUEST["password"];
}
+$_SESSION["USERNAME"] = $USERNAME;
+$_SESSION["PASSWORD"] = $PASSWORD;
+
if (! ($USERNAME and $PASSWORD)) {
require("login.html");
exit;
}
+if ( isset($_REQUEST["command"]))
+ $command = $_REQUEST["command"];
+else
+ $command = "";
+
+if ( isset($_REQUEST["track"]))
+ $track = $_REQUEST["track"];
+
+if ( isset($_REQUEST["volume"]))
+ $volume = $_REQUEST["volume"];
+
+if ( isset($_REQUEST["rate"]))
+ $rate = $_REQUEST["rate"];
+else
+ $rate = "";
+
+if ( isset($_REQUEST["mode"]))
+ $mode = $_REQUEST["mode"];
+
+if ( isset($_REQUEST["album"]))
+ $album = $_REQUEST["album"];
+else if ( isset($_SESSION["album"]))
+ $album = $_SESSION["album"];
+else
+ $album = "";
+
// Setup the mserv command for the current user.
$MSERVCMD = $mservcmd." -u ".escapeshellarg($USERNAME)." -p ".escapeshellarg($PASSWORD)." ";
|