about summary refs log tree commit diff stats
path: root/central/trunk/xmlrpc.php
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2008-09-28 15:39:55 +0000
committerKelly Rauchenberger <fefferburbia@gmail.com>2008-09-28 15:39:55 +0000
commitff65e9ee2f7145265dc9c3daacfc2d5fd0756d3f (patch)
tree3416983de2c7a93f98e576068c7af8e91176527a /central/trunk/xmlrpc.php
parent0bed7609d62da9132801ff2dee9311e2edb9f934 (diff)
downloadinstadisc-ff65e9ee2f7145265dc9c3daacfc2d5fd0756d3f.tar.gz
instadisc-ff65e9ee2f7145265dc9c3daacfc2d5fd0756d3f.tar.bz2
instadisc-ff65e9ee2f7145265dc9c3daacfc2d5fd0756d3f.zip
Central: Completed step 9
Refs #69
Diffstat (limited to 'central/trunk/xmlrpc.php')
-rw-r--r--central/trunk/xmlrpc.php27
1 files changed, 26 insertions, 1 deletions
diff --git a/central/trunk/xmlrpc.php b/central/trunk/xmlrpc.php index 466cae3..2e3aa62 100644 --- a/central/trunk/xmlrpc.php +++ b/central/trunk/xmlrpc.php
@@ -153,6 +153,29 @@ function setDownloadItemMode($username, $verification, $verificationID, $mode)
153 return new xmlrpcresp(new xmlrpcval('1', 'int')); 153 return new xmlrpcresp(new xmlrpcval('1', 'int'));
154} 154}
155 155
156function initalizePort($username, $verification, $verificationID)
157{
158 if (instaDisc_checkVerification($username, $verification, $verificationID, 'users', 'username', 'password'))
159 {
160 return new xmlrpcresp(new xmlrpcval(instaDisc_initalizePort($username), 'int'));
161 }
162
163 return new xmlrpcresp(new xmlrpcval('0', 'int'));
164}
165
166function deinitalizePort($username, $verification, $verificationID)
167{
168 if (instaDisc_checkVerification($username, $verification, $verificationID, 'users', 'username', 'password'))
169 {
170 $setuser = "UPDATE users SET port = 0 WHERE username = \"" . mysql_real_escape_string($username) . "\"";
171 $setuser2 = mysql_query($setuser);
172
173 return new xmlrpcresp(new xmlrpcval('0', 'int'));
174 }
175
176 return new xmlrpcresp(new xmlrpcval('1', 'int'));
177}
178
156$s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function" => "checkRegistration"), 179$s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function" => "checkRegistration"),
157 "InstaDisc.deleteItem" => array("function" => "deleteItem"), 180 "InstaDisc.deleteItem" => array("function" => "deleteItem"),
158 "InstaDisc.resendItem" => array("function" => "resendItem"), 181 "InstaDisc.resendItem" => array("function" => "resendItem"),
@@ -161,7 +184,9 @@ $s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function"
161 "InstaDisc.deleteSubscription" => array("function" => "deleteSubscription"), 184 "InstaDisc.deleteSubscription" => array("function" => "deleteSubscription"),
162 "InstaDisc.addSubscription" => array("function" => "addSubscription"), 185 "InstaDisc.addSubscription" => array("function" => "addSubscription"),
163 "InstaDisc.downloadItemModeTest" => array("function" => "downloadItemModeTest"), 186 "InstaDisc.downloadItemModeTest" => array("function" => "downloadItemModeTest"),
164 "InstaDisc.setDownloadItemMode" => array("function" => "setDownloadItemMode") 187 "InstaDisc.setDownloadItemMode" => array("function" => "setDownloadItemMode"),
188 "InstaDisc.initalizePort" => array("function" => "initalizePort"),
189 "InstaDisc.deinitalizePort" => array("function" => "deinitalizePort")
165 ),0); 190 ),0);
166$s->functions_parameters_type = 'phpvals'; 191$s->functions_parameters_type = 'phpvals';
167$s->service(); 192$s->service();