diff options
Diffstat (limited to 'central/trunk/xmlrpc.php')
-rw-r--r-- | central/trunk/xmlrpc.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/central/trunk/xmlrpc.php b/central/trunk/xmlrpc.php index 2713bfe..466cae3 100644 --- a/central/trunk/xmlrpc.php +++ b/central/trunk/xmlrpc.php | |||
@@ -140,6 +140,19 @@ function downloadItemModeTest() | |||
140 | } | 140 | } |
141 | } | 141 | } |
142 | 142 | ||
143 | function setDownloadItemMode($username, $verification, $verificationID, $mode) | ||
144 | { | ||
145 | if (instaDisc_checkVerification($username, $verification, $verificationID, 'users', 'username', 'password')) | ||
146 | { | ||
147 | $setuser = "UPDATE users SET downloadItemMode = \"" . mysql_real_escape_string($mode) . "\" WHERE username = \"" . mysql_real_escape_string($username) . "\""; | ||
148 | $setuser2 = mysql_query($setuser); | ||
149 | |||
150 | return new xmlrpcresp(new xmlrpcval('0', 'int')); | ||
151 | } | ||
152 | |||
153 | return new xmlrpcresp(new xmlrpcval('1', 'int')); | ||
154 | } | ||
155 | |||
143 | $s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function" => "checkRegistration"), | 156 | $s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function" => "checkRegistration"), |
144 | "InstaDisc.deleteItem" => array("function" => "deleteItem"), | 157 | "InstaDisc.deleteItem" => array("function" => "deleteItem"), |
145 | "InstaDisc.resendItem" => array("function" => "resendItem"), | 158 | "InstaDisc.resendItem" => array("function" => "resendItem"), |
@@ -147,7 +160,8 @@ $s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function" | |||
147 | "InstaDisc.sendFromUpdate" => array("function" => "sendFromUpdate"), | 160 | "InstaDisc.sendFromUpdate" => array("function" => "sendFromUpdate"), |
148 | "InstaDisc.deleteSubscription" => array("function" => "deleteSubscription"), | 161 | "InstaDisc.deleteSubscription" => array("function" => "deleteSubscription"), |
149 | "InstaDisc.addSubscription" => array("function" => "addSubscription"), | 162 | "InstaDisc.addSubscription" => array("function" => "addSubscription"), |
150 | "InstaDisc.downloadItemModeTest" => array("function" => "downloadItemModeTest") | 163 | "InstaDisc.downloadItemModeTest" => array("function" => "downloadItemModeTest"), |
164 | "InstaDisc.setDownloadItemMode" => array("function" => "setDownloadItemMode") | ||
151 | ),0); | 165 | ),0); |
152 | $s->functions_parameters_type = 'phpvals'; | 166 | $s->functions_parameters_type = 'phpvals'; |
153 | $s->service(); | 167 | $s->service(); |