当前位置: 首页>>代码示例>>PHP>>正文


PHP Contacts::get_contactsforol方法代码示例

本文整理汇总了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;
    }
}
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:24,代码来源:thunderbirdplugin.php

示例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;
}
开发者ID:hardikk,项目名称:HNH,代码行数:47,代码来源:vtigerolservice.php


注:本文中的Contacts::get_contactsforol方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。