diff options
Diffstat (limited to 'central/trunk/xmlrpc.php')
-rw-r--r-- | central/trunk/xmlrpc.php | 27 |
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 | ||
156 | function 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 | |||
166 | function 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(); |