60 $this->SapeCommonApi =
get_package(
'sape::sape_common_api' ,
'last' , __FILE__ );
61 $this->SapeUtilities =
get_package(
'sape::sape_utilities' ,
'last' , __FILE__ );
62 $this->Security =
get_package(
'security' ,
'last' , __FILE__ );
92 $Response = $this->SapeUtilities->call_method(
93 $this->SapeCommonApi->Client ,
'sape.get_sites' , array() ,
'Can\'t get sites'
96 return( php_xmlrpc_decode( $Response->value() ) );
130 private function get_site_money_stats_parameters( $SiteId , $Year , $Month , $Day )
134 $SiteId = $this->Security->get( $SiteId ,
'integer' );
136 $Parameters = array(
new xmlrpcval( $SiteId ,
'int' ) );
137 if( $Year !==
false )
139 $Parameters [] =
new xmlrpcval( $this->Security->get( $Year ,
'integer' ) ,
'int' );
140 if( $Month !==
false )
142 $Parameters [] =
new xmlrpcval( $this->Security->get( $Month ,
'integer' ) ,
'int' );
145 $Parameters [] =
new xmlrpcval( $this->Security->get( $Day ,
'integer' ) ,
'int' );
150 return( $Parameters );
152 catch( Exception $e )
196 $Parameters = $this->get_site_money_stats_parameters( $SiteId , $Year , $Month , $Day );
198 $Method =
'sape.get_site_money_stats';
199 $Response = $this->SapeUtilities->call_method(
200 $this->SapeCommonApi->Client , $Method , $Parameters ,
'Can\'t get site money stats'
203 return( php_xmlrpc_decode( $Response->value() ) );
205 catch( Exception $e )
237 $SiteId = $this->Security->get( $SiteId ,
'integer' );
239 $Parameters = array(
new xmlrpcval( $SiteId ,
'int' ) );
241 $Response = $this->SapeUtilities->call_method(
242 $this->SapeCommonApi->Client ,
'sape.get_site_pages' , $Parameters ,
'Can\'t get site pages'
245 return( php_xmlrpc_decode( $Response->value() ) );
247 catch( Exception $e )
283 $SiteId = $this->Security->get( $SiteId ,
'string' );
284 $Parameters = array(
new xmlrpcval( $SiteId ,
'int' ) );
286 if( $Status !==
false )
288 $Status = $this->Security->get( $Status ,
'command' );
289 $Parameters [] =
new xmlrpcval( $Status ,
'string' );
292 $Response = $this->SapeUtilities->call_method(
293 $this->SapeCommonApi->Client ,
'sape.get_site_links' , $Parameters ,
'Can\'t get site links'
296 return( php_xmlrpc_decode( $Response->value() ) );
298 catch( Exception $e )