From c3b736f341ae87b48341c2b5fb18983b3dbfbbb0 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 28 Sep 2008 14:36:51 +0000 Subject: Central: Completed step 7 Refs #69 --- central/trunk/xmlrpc.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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() } } +function setDownloadItemMode($username, $verification, $verificationID, $mode) +{ + if (instaDisc_checkVerification($username, $verification, $verificationID, 'users', 'username', 'password')) + { + $setuser = "UPDATE users SET downloadItemMode = \"" . mysql_real_escape_string($mode) . "\" WHERE username = \"" . mysql_real_escape_string($username) . "\""; + $setuser2 = mysql_query($setuser); + + return new xmlrpcresp(new xmlrpcval('0', 'int')); + } + + return new xmlrpcresp(new xmlrpcval('1', 'int')); +} + $s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function" => "checkRegistration"), "InstaDisc.deleteItem" => array("function" => "deleteItem"), "InstaDisc.resendItem" => array("function" => "resendItem"), @@ -147,7 +160,8 @@ $s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function" "InstaDisc.sendFromUpdate" => array("function" => "sendFromUpdate"), "InstaDisc.deleteSubscription" => array("function" => "deleteSubscription"), "InstaDisc.addSubscription" => array("function" => "addSubscription"), - "InstaDisc.downloadItemModeTest" => array("function" => "downloadItemModeTest") + "InstaDisc.downloadItemModeTest" => array("function" => "downloadItemModeTest"), + "InstaDisc.setDownloadItemMode" => array("function" => "setDownloadItemMode") ),0); $s->functions_parameters_type = 'phpvals'; $s->service(); -- cgit 1.4.1