/** * search and return a list of persons corresponding to different optional search parameters * @param string $format * @param string $username * @param string $country * @param string $city * @param string $description * @param string $pc * @param string $software * @param string $longitude * @param string $latitude * @param string $distance * @param string $attributeapp * @param string $attributekey * @param string $attributevalue * @param string $page * @param string $pagesize * @return string xml/json */ private function personsearch($format, $username, $country, $city, $description, $pc, $software, $longitude, $latitude, $distance, $attributeapp, $attributekey, $attributevalue, $page, $pagesize) { $user = $this->checkpassword(false); $this->checktrafficlimit($user); $pl = new OCSPersonLister(); $xml = $pl->ocs_person_search($username, $page, $pagesize); $plcount = count($xml); $txt = $this->generatexml($format, 'ok', 100, '', $xml, 'person', 'summary', 2, $plcount, $pagesize); echo $txt; }
public function personsearch($format, $username, $country, $city, $description, $pc, $software, $longitude, $latitude, $distance, $attributeapp, $attributekey, $attributevalue, $page, $pagesize) { $pl = new OCSPersonLister(); $xml = $pl->ocs_person_search($username, $page, $pagesize); for ($i = 0; $i < count($xml); $i++) { $xml[$i]['personid'] = $xml[$i]['login']; //unset($xml[$i]['login']); } $plcount = count($xml); $txt = OCSXML::generatexml(EConfig::$data["ocsserver"]["format"], 'ok', 100, '', $xml, 'person', 'summary', 2, $plcount, $pagesize); echo $txt; }