diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-28 19:18:26 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-28 19:18:26 +0000 |
commit | 9d6ed35e4faa192ea734bfc353a6be65b977a6e6 (patch) | |
tree | 141454dc3823bb7a189c78538db8f7a861e19b3b /central/trunk | |
parent | 65e7975414f6b6887fed9834bb6e1a3fa6d12863 (diff) | |
download | instadisc-9d6ed35e4faa192ea734bfc353a6be65b977a6e6.tar.gz instadisc-9d6ed35e4faa192ea734bfc353a6be65b977a6e6.tar.bz2 instadisc-9d6ed35e4faa192ea734bfc353a6be65b977a6e6.zip |
Central: Added countSubscribers()
Closes #67
Diffstat (limited to 'central/trunk')
-rw-r--r-- | central/trunk/xmlrpc.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/central/trunk/xmlrpc.php b/central/trunk/xmlrpc.php index 0e66940..ea77e3f 100644 --- a/central/trunk/xmlrpc.php +++ b/central/trunk/xmlrpc.php | |||
@@ -237,6 +237,15 @@ function deinitalizePort($username, $verification, $verificationID) | |||
237 | return new xmlrpcresp(new xmlrpcval('1', 'int')); | 237 | return new xmlrpcresp(new xmlrpcval('1', 'int')); |
238 | } | 238 | } |
239 | 239 | ||
240 | function countSubscribers($url) | ||
241 | { | ||
242 | $cntsub = "SELECT * FROM subscriptions WHERE url = \"" . mysql_real_escape_string($url) . "\""; | ||
243 | $cntsub2 = mysql_query($cntsub); | ||
244 | $cntsub3 = mysql_fetch_array($cntsub2); | ||
245 | |||
246 | return new xmlrpcresp(new xmlrpcval($cntsub3[0], 'int')); | ||
247 | } | ||
248 | |||
240 | $s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function" => "checkRegistration"), | 249 | $s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function" => "checkRegistration"), |
241 | "InstaDisc.deleteItem" => array("function" => "deleteItem"), | 250 | "InstaDisc.deleteItem" => array("function" => "deleteItem"), |
242 | "InstaDisc.resendItem" => array("function" => "resendItem"), | 251 | "InstaDisc.resendItem" => array("function" => "resendItem"), |
@@ -248,7 +257,8 @@ $s = new xmlrpc_server( array( "InstaDisc.checkRegistration" => array("function" | |||
248 | "InstaDisc.downloadItemModeTest" => array("function" => "downloadItemModeTest"), | 257 | "InstaDisc.downloadItemModeTest" => array("function" => "downloadItemModeTest"), |
249 | "InstaDisc.setDownloadItemMode" => array("function" => "setDownloadItemMode"), | 258 | "InstaDisc.setDownloadItemMode" => array("function" => "setDownloadItemMode"), |
250 | "InstaDisc.initalizePort" => array("function" => "initalizePort"), | 259 | "InstaDisc.initalizePort" => array("function" => "initalizePort"), |
251 | "InstaDisc.deinitalizePort" => array("function" => "deinitalizePort") | 260 | "InstaDisc.deinitalizePort" => array("function" => "deinitalizePort"), |
261 | "InstaDisc.countSubscribers" => array("function" => "countSubscribers") | ||
252 | ),0); | 262 | ),0); |
253 | $s->functions_parameters_type = 'phpvals'; | 263 | $s->functions_parameters_type = 'phpvals'; |
254 | $s->service(); | 264 | $s->service(); |