Changeset 708
- Timestamp:
- Jan 27, 2015 11:57:20 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/services/controllers/sendmessage.php
r695 r708 212 212 } 213 213 214 public function collaborator () 215 { 214 public function collaborator () 215 { 216 216 217 error_reporting(E_ALL); 217 218 … … 222 223 // get total page 223 224 $totalpage = 1; 224 225 225 226 $default = $this->Services_model->getCollaborator(2,1,1); 226 227 $data = mb_convert_encoding($default, 'UTF-8'); 228 229 if($default){ 227 $data = mb_convert_encoding($default, 'UTF-8', 'ISO-8859-1'); 228 229 if($data){ 230 230 $xml = simplexml_load_string($data); 231 231 $xml->registerXPathNamespace("S", "http://schemas.xmlsoap.org/soap/envelope/"); 232 $xml = $xml->xpath('//S:Body')[0]; 232 233 $xml = $xml->xpath('//S:Body'); 234 $xml = $xml[0]; 235 233 236 $xml->registerXPathNamespace("ns2", "http://process.wsim.viettel.com/"); 234 $totalpage = (int)$xml->xpath('//return//totalpage')[0]; 235 } 236 237 var_dump($totalpage); 238 239 /*$result = $this->Services_model->getCollaborator(2,1,$totalpage); 240 if ($result){ 241 $xml = simplexml_load_string($result); 237 238 $totalpage = $xml->xpath('//return//totalpage'); 239 $totalpage = (int)$totalpage[0]; 240 } 241 242 243 $result = $this->Services_model->getCollaborator(2,1,$totalpage); 244 //var_dump($result); 245 $data = mb_convert_encoding($result, 'UTF-8', 'ISO-8859-1'); 246 247 248 if ($data && $data != -1){ 249 $xml = simplexml_load_string($data); 242 250 $xml->registerXPathNamespace("S", "http://schemas.xmlsoap.org/soap/envelope/"); 243 $xml = $xml->xpath('//S:Body')[0]; 251 $xml = $xml->xpath('//S:Body'); 252 $xml = $xml[0]; 244 253 $xml->registerXPathNamespace("ns2", "http://process.wsim.viettel.com/"); 245 254 $lst = $xml->xpath('//return//lst'); … … 265 274 $logMsg = date('Y-m-d H:i:s') . " Result is null \n"; 266 275 write_file('./log/sync_collaborator.log', $logMsg, FOPEN_WRITE_CREATE); 267 } */276 } 268 277 } 269 278 }
Note: See TracChangeset
for help on using the changeset viewer.