本文整理汇总了PHP中Contacts::get_contactsforol方法的典型用法代码示例。如果您正苦于以下问题:PHP Contacts::get_contactsforol方法的具体用法?PHP Contacts::get_contactsforol怎么用?PHP Contacts::get_contactsforol使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contacts
的用法示例。
在下文中一共展示了Contacts::get_contactsforol方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetContacts
function GetContacts($username, $password)
{
if (authentication($username, $password)) {
global $adb;
global $log;
require_once 'modules/Contacts/Contacts.php';
$seed_contact = new Contacts();
$output_list = array();
$query = $seed_contact->get_contactsforol($username);
$result = $adb->pquery($query, array());
while ($contact = $adb->fetch_array($result)) {
if ($contact["birthdate"] == "0000-00-00") {
$contact["birthdate"] = "";
}
if ($contact["salutation"] == "--None--") {
$contact["salutation"] = "";
}
$output_list[] = array("id" => decode_html($contact["id"]), "title" => decode_html($contact["salutation"]), "firstname" => decode_html($contact["firstname"]), "middlename" => decode_html(trim($middlename)), "lastname" => decode_html(trim($contact["lastname"])), "birthdate" => $contact["birthday"], "emailaddress" => decode_html($contact["email"]), "jobtitle" => decode_html($contact["title"]), "department" => decode_html($contact["department"]), "accountname" => decode_html($contact["accountname"]), "officephone" => decode_html($contact["phone"]), "homephone" => decode_html($contact["homephone"]), "otherphone" => decode_html($contact["otherphone"]), "fax" => decode_html($contact["fax"]), "mobile" => decode_html($contact["mobile"]), "asstname" => decode_html($contact["assistant"]), "asstphone" => decode_html($contact["assistantphone"]), "reportsto" => decode_html($contact["reports_to_name"]), "mailingstreet" => decode_html($contact["mailingstreet"]), "mailingcity" => decode_html($contact["mailingcity"]), "mailingstate" => decode_html($contact["mailingstate"]), "mailingzip" => decode_html($contact["mailingzip"]), "mailingcountry" => decode_html($contact["mailingcountry"]), "otherstreet" => decode_html($contact["otherstreet"]), "othercity" => decode_html($contact["othercity"]), "otherstate" => decode_html($contact["otherstate"]), "otherzip" => decode_html($contact["otherzip"]), "othercountry" => decode_html($contact["othercountry"]), "description" => "", "category" => "");
}
//to remove an erroneous compiler warning
$seed_contact = $seed_contact;
return $output_list;
}
}
示例2: GetContacts
function GetContacts($username, $session)
{
if (!validateSession($username, $session)) {
return null;
}
global $adb;
require_once 'modules/Contacts/Contacts.php';
$seed_contact = new Contacts();
$output_list = array();
$query = $seed_contact->get_contactsforol($username);
$result = $adb->query($query);
$outputcount = 0;
$outputxml = '';
/** we are directly returning XML */
$returnAsXML = true;
while ($contact = $adb->fetch_array($result)) {
if ($contact["birthdate"] == "0000-00-00") {
$contact["birthdate"] = "";
}
if ($contact["salutation"] == "--None--") {
$contact["salutation"] = "";
}
$namelist = explode(" ", $contact["lastname"]);
$middlename = "";
if (isset($namelist)) {
if (count($namelist) >= 2) {
$contact["lastname"] = $namelist[count($namelist) - 1];
for ($i = 0; $i < count($namelist) - 2; $i++) {
if ($namelist[$i] != '') {
$middlename[] = $namelist[$i];
}
}
if (isset($middlename)) {
$middlename = implode(" ", $middlename);
}
}
}
$outputxml .= __GetContactSOAPNode($contact);
$outputcount++;
}
//to remove an erroneous compiler warning
$seed_contact = $seed_contact;
global $server;
$server->methodreturnisliteralxml = true;
$output = "<return xsi:type='SOAP-ENC:Array' SOAP-ENC:arrayType='tns:contactdetail[{$outputcount}]'>{$outputxml}</return>";
return $output;
}