31 if (!defined(
'XOOPS_ROOT_PATH')) {
32 die(
"XOOPS root path not defined");
34 require_once XOOPS_ROOT_PATH.
'/class/xml/rpc/xmlrpcapi.php';
49 if (!$this->
_checkUser($this->params[2], $this->params[3])) {
57 foreach (
$fields as $tag => $detail) {
59 $data = $this->
_getTagCdata($this->params[4], $maptag,
true);
60 if (trim($data) ==
''){
61 if ($detail[
'required']) {
68 if (count($missing) > 0) {
70 foreach ($missing as $m) {
77 $newparams[0] = $this->params[1];
78 $newparams[1] = $this->params[2];
79 $newparams[2] = $this->params[3];
80 foreach ($post as $key => $value) {
81 $newparams[3][$key] =& $value;
84 $newparams[3][
'xoops_text'] =& $this->params[4];
85 $newparams[4] = $this->params[5];
87 $xoopsapi->_setUser($this->user, $this->isadmin);
96 if (!$this->
_checkUser($this->params[2], $this->params[3])) {
103 foreach (
$fields as $tag => $detail) {
104 $data = $this->
_getTagCdata($this->params[4], $tag,
true);
105 if (trim($data) ==
''){
106 if ($detail[
'required']) {
113 if (count($missing) > 0) {
115 foreach ($missing as $m) {
120 $newparams = array();
122 $newparams[0] = $this->params[1];
123 $newparams[1] = $this->params[2];
124 $newparams[2] = $this->params[3];
125 foreach ($post as $key => $value) {
126 $newparams[3][$key] =& $value;
129 $newparams[3][
'xoops_text'] =& $this->params[4];
130 $newparams[4] = $this->params[5];
132 $xoopsapi->_setUser($this->user, $this->isadmin);
133 $xoopsapi->editPost();
141 if (!$this->
_checkUser($this->params[2], $this->params[3])) {
145 array_shift($this->params);
147 $xoopsapi->_setUser($this->user, $this->isadmin);
148 $xoopsapi->deletePost();
154 if (!$this->
_checkUser($this->params[2], $this->params[3])) {
158 array_shift($this->params);
160 $xoopsapi->_setUser($this->user, $this->isadmin);
161 $ret =& $xoopsapi->getPost(
false);
162 if (is_array(
$ret)) {
165 foreach (
$ret as $key => $value) {
178 $content .=
'<'.$key.
'>'.trim($value).
'</'.$key.
'>';
183 $this->response->add($struct);
192 if (!$this->
_checkUser($this->params[2], $this->params[3])) {
196 array_shift($this->params);
198 $xoopsapi->_setUser($this->user, $this->isadmin);
199 $ret =& $xoopsapi->getRecentPosts(
false);
200 if (is_array(
$ret)) {
202 $count = count(
$ret);
206 for (
$i = 0;
$i < $count;
$i++) {
209 foreach(
$ret[
$i] as $key => $value) {
222 $content .=
'<'.$key.
'>'.trim($value).
'</'.$key.
'>';
230 $this->response->add($arr);
240 if (!$this->
_checkUser($this->params[1], $this->params[2])) {
245 $struct->add(
'url',
new XoopsXmlRpcString(XOOPS_URL.
'/modules/'.$this->module->getVar(
'dirname').
'/'));
249 $this->response->add($arr);
255 if (!$this->
_checkUser($this->params[1], $this->params[2])) {
265 $this->response->add($struct);
271 if (!$this->
_checkUser($this->params[2], $this->params[3])) {
274 switch ($this->params[5]) {
290 if (!$this->
_checkUser($this->params[2], $this->params[3])) {