diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-28 14:36:51 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-28 14:36:51 +0000 |
commit | c3b736f341ae87b48341c2b5fb18983b3dbfbbb0 (patch) | |
tree | 3e6cea7ab1e32de78bcaf97238ac0df53ca063f8 /central/trunk | |
parent | 8b88608fc82ef022006f4190aa8b753cfc248338 (diff) | |
download | instadisc-c3b736f341ae87b48341c2b5fb18983b3dbfbbb0.tar.gz instadisc-c3b736f341ae87b48341c2b5fb18983b3dbfbbb0.tar.bz2 instadisc-c3b736f341ae87b48341c2b5fb18983b3dbfbbb0.zip |
Central: Completed step 7
Refs #69
Diffstat (limited to 'central/trunk')
-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(); |