clockwerk-www – Diff between revs 1 and 61
?pathlinks?
Rev 1 | Rev 61 | |||
---|---|---|---|---|
Line 89... | Line 89... | |||
89 | return $request->send()->getBody(); |
89 | return $request->send()->getBody(); |
|
90 | } |
90 | } |
|
Line 91... | Line 91... | |||
91 | |
91 | |
|
92 | function admin_authenticate_user($firstname, $lastname, $password, $tokentime) { |
92 | function admin_authenticate_user($firstname, $lastname, $password, $tokentime) { |
|
93 | $request = new HTTP_Request2($this->url, HTTP_Request2::METHOD_POST); |
- | ||
94 | |
93 | $request = new HTTP_Request2($this->url, HTTP_Request2::METHOD_POST); |
|
95 | $serializer = new XML_Serializer($this->options); |
94 | $serializer = new XML_Serializer($this->options); |
|
96 | $xml = array( |
95 | $xml = array( |
|
97 | "methodName" => htmlspecialchars('admin_authenticate_user'), |
96 | "methodName" => htmlspecialchars('admin_authenticate_user'), |
|
98 | "params" => |
97 | "params" => |
|
Line 135... | Line 134... | |||
135 | return $request->send()->getBody(); |
134 | return $request->send()->getBody(); |
|
136 | } |
135 | } |
|
Line 137... | Line 136... | |||
137 | |
136 | |
|
138 | function admin_create_user($firstname, $lastname, $password, $region_x, $region_y) { |
137 | function admin_create_user($firstname, $lastname, $password, $region_x, $region_y) { |
|
139 | $request = new HTTP_Request2($this->url, HTTP_Request2::METHOD_POST); |
- | ||
140 | |
138 | $request = new HTTP_Request2($this->url, HTTP_Request2::METHOD_POST); |
|
141 | $serializer = new XML_Serializer($this->options); |
139 | $serializer = new XML_Serializer($this->options); |
|
142 | $xml = array( |
140 | $xml = array( |
|
143 | "methodName" => htmlspecialchars('admin_create_user'), |
141 | "methodName" => htmlspecialchars('admin_create_user'), |
|
144 | "params" => |
142 | "params" => |
|
Line 176... | Line 174... | |||
176 | ), |
174 | ), |
|
177 | ), |
175 | ), |
|
178 | ), |
176 | ), |
|
179 | ), |
177 | ), |
|
180 | ); |
178 | ); |
|
- | 179 | |
||
- | 180 | function admin_update_user($firstname, $lastname, $password, $region_x, $region_y) { |
||
- | 181 | $request = new HTTP_Request2($this->url, HTTP_Request2::METHOD_POST); |
||
- | 182 | $serializer = new XML_Serializer($this->options); |
||
- | 183 | $xml = array( |
||
- | 184 | "methodName" => htmlspecialchars('admin_update_user'), |
||
- | 185 | "params" => |
||
- | 186 | array( "param" => |
||
- | 187 | array( "value" => |
||
- | 188 | array("struct" => |
||
- | 189 | array( |
||
- | 190 | "member" => |
||
- | 191 | array( |
||
- | 192 | "name" => 'password', |
||
- | 193 | "value" => array( |
||
- | 194 | "string" => htmlspecialchars($this->raPassword) |
||
- | 195 | ), |
||
- | 196 | ), |
||
- | 197 | array( |
||
- | 198 | "name" => 'user_firstname', |
||
- | 199 | "value" => htmlspecialchars($firstname) |
||
- | 200 | ), |
||
- | 201 | array( |
||
- | 202 | "name" => 'user_lastname', |
||
- | 203 | "value" => htmlspecialchars($lastname) |
||
- | 204 | ), |
||
- | 205 | array( |
||
- | 206 | "name" => 'user_password', |
||
- | 207 | "value" => htmlspecialchars($password) |
||
- | 208 | ), |
||
- | 209 | array( |
||
- | 210 | "name" => 'start_region_x', |
||
- | 211 | "value" => htmlspecialchars($region_x) |
||
- | 212 | ), |
||
- | 213 | array( |
||
- | 214 | "name" => 'start_region_y', |
||
- | 215 | "value" => htmlspecialchars($region_y) |
||
- | 216 | ), |
||
- | 217 | ), |
||
- | 218 | ), |
||
- | 219 | ), |
||
- | 220 | ), |
||
- | 221 | ); |
||
Line 181... | Line 222... | |||
181 | |
222 | |
|
182 | $serializer->serialize($xml); |
223 | $serializer->serialize($xml); |
|
183 | $xml_load = $serializer->getSerializedData(); |
224 | $xml_load = $serializer->getSerializedData(); |
|
184 | $request->setBody($xml_load); |
225 | $request->setBody($xml_load); |
|
185 | return $request->send()->getBody(); |
226 | return $request->send()->getBody(); |
|
Line 186... | Line 227... | |||
186 | } |
227 | } |
|
187 | |
228 | |
|
188 | function admin_get_agents($region_name, $include_children) { |
- | ||
189 | $request = new HTTP_Request2($this->url, HTTP_Request2::METHOD_POST); |
229 | function admin_get_agents($region_name, $include_children) { |
|
190 | |
230 | $request = new HTTP_Request2($this->url, HTTP_Request2::METHOD_POST); |
|
191 | $serializer = new XML_Serializer($this->options); |
231 | $serializer = new XML_Serializer($this->options); |
|
192 | $xml = array( |
232 | $xml = array( |
|
193 | "methodName" => htmlspecialchars('admin_get_agents'), |
233 | "methodName" => htmlspecialchars('admin_get_agents'), |