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


PHP constructList函数代码示例

本文整理汇总了PHP中constructList函数的典型用法代码示例。如果您正苦于以下问题:PHP constructList函数的具体用法?PHP constructList怎么用?PHP constructList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了constructList函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getWriteSharingGroupsList

function getWriteSharingGroupsList($module)
{
    $log = vglobal('log');
    $log->debug("Entering getWriteSharingGroupsList(" . $module . ") method ...");
    $adb = PearDatabase::getInstance();
    $current_user = vglobal('current_user');
    $grp_array = array();
    $tabid = getTabid($module);
    $query = "select sharedgroupid from vtiger_tmp_write_group_sharing_per where userid=? and tabid=?";
    $result = $adb->pquery($query, array($current_user->id, $tabid));
    $num_rows = $adb->num_rows($result);
    for ($i = 0; $i < $num_rows; $i++) {
        $grp_id = $adb->query_result($result, $i, 'sharedgroupid');
        $grp_array[] = $grp_id;
    }
    $shareGrpList = constructList($grp_array, 'INTEGER');
    $log->debug("Exiting getWriteSharingGroupsList method ...");
    return $shareGrpList;
}
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:19,代码来源:UserInfoUtil.php

示例2: getRelCheckquery

function getRelCheckquery($currentmodule, $returnmodule, $recordid)
{
    global $log;
    $log->debug("Entering getRelCheckquery() method ...");
    global $adb;
    $skip_id = array();
    $where_relquery = "";
    $reltable = "";
    if ($reltable != null) {
        $query = "SELECT " . $selectfield . " FROM " . $reltable . " " . $condition;
    }
    if ($query != '') {
        $result = $adb->query($query);
        if ($adb->num_rows($result) != 0) {
            for ($k = 0; $k < $adb->num_rows($result); $k++) {
                $skip_id[] = $adb->query_result($result, $k, $selectfield);
            }
            $skipids = constructList($skip_id, 'INTEGER');
            $where_relquery = "and " . $table . "." . $field . " not in " . $skipids;
        }
    }
    $log->debug("Exiting getRelCheckquery method ...");
    return $where_relquery;
}
开发者ID:honj51,项目名称:taobaocrm,代码行数:24,代码来源:ListViewUtils.php

示例3: getRelCheckquery


//.........这里部分代码省略.........
        $condition = 'WHERE campaignid = ?';
        array_push($params, $recordid);
        $field = $selectfield = 'contactid';
        $table = 'vtiger_contactdetails';
    } elseif ($currentmodule == "Contacts" && $returnmodule == "Calendar") {
        $reltable = 'vtiger_cntactivityrel';
        $condition = 'WHERE activityid = ?';
        array_push($params, $recordid);
        $field = $selectfield = 'contactid';
        $table = 'vtiger_contactdetails';
    } elseif ($currentmodule == "Leads" && $returnmodule == "Campaigns") {
        $reltable = 'vtiger_campaignleadrel';
        $condition = 'WHERE campaignid = ?';
        array_push($params, $recordid);
        $field = $selectfield = 'leadid';
        $table = 'vtiger_leaddetails';
    } elseif ($currentmodule == "Users" && $returnmodule == "Calendar") {
        $reltable = 'vtiger_salesmanactivityrel';
        $condition = 'WHERE activityid = ?';
        array_push($params, $recordid);
        $selectfield = 'smid';
        $field = 'id';
        $table = 'vtiger_users';
    } elseif ($currentmodule == "Campaigns" && $returnmodule == "Leads") {
        $reltable = 'vtiger_campaignleadrel';
        $condition = 'WHERE leadid = ?';
        array_push($params, $recordid);
        $field = $selectfield = 'campaignid';
        $table = 'vtiger_campaign';
    } elseif ($currentmodule == "Campaigns" && $returnmodule == "Contacts") {
        $reltable = 'vtiger_campaigncontrel';
        $condition = 'WHERE contactid = ?';
        array_push($params, $recordid);
        $field = $selectfield = 'campaignid';
        $table = 'vtiger_campaign';
    } elseif ($currentmodule == "Products" && ($returnmodule == "Potentials" || $returnmodule == "Accounts" || $returnmodule == "Contacts" || $returnmodule == "Leads")) {
        $reltable = 'vtiger_seproductsrel';
        $condition = 'WHERE crmid = ? and setype = ?';
        array_push($params, $recordid, $returnmodule);
        $field = $selectfield = 'productid';
        $table = 'vtiger_products';
    } elseif (($currentmodule == "Leads" || $currentmodule == "Accounts" || $currentmodule == "Potentials" || $currentmodule == "Contacts") && $returnmodule == "Products") {
        $reltable = 'vtiger_seproductsrel';
        $condition = 'WHERE productid = ? and setype = ?';
        array_push($params, $recordid, $currentmodule);
        $selectfield = 'crmid';
        if ($currentmodule == "Leads") {
            $field = 'leadid';
            $table = 'vtiger_leaddetails';
        } elseif ($currentmodule == "Accounts") {
            $field = 'accountid';
            $table = 'vtiger_account';
        } elseif ($currentmodule == "Contacts") {
            $field = 'contactid';
            $table = 'vtiger_contactdetails';
        } elseif ($currentmodule == "Potentials") {
            $field = 'potentialid';
            $table = 'vtiger_potential';
        }
    } elseif ($currentmodule == "Products" && $returnmodule == "Vendors") {
        $reltable = 'vtiger_products';
        $condition = 'WHERE vendor_id = ?';
        array_push($params, $recordid);
        $field = $selectfield = 'productid';
        $table = 'vtiger_products';
    } elseif ($currentmodule == "Documents") {
        $reltable = "vtiger_senotesrel";
        $selectfield = "notesid";
        $condition = "where crmid = ?";
        array_push($params, $recordid);
        $table = "vtiger_notes";
        $field = "notesid";
    }
    //end
    if ($reltable != null) {
        $query = "SELECT " . $selectfield . " FROM " . $reltable . " " . $condition;
    } elseif ($currentmodule != $returnmodule && $returnmodule != "") {
        // If none of the above relation matches, then the relation is assumed to be stored in vtiger_crmentityrel
        $query = "SELECT relcrmid AS relatedid FROM vtiger_crmentityrel WHERE  crmid = ? and module = ? and relmodule = ?\n\t\t\t\t\tUNION SELECT crmid AS relatedid FROM vtiger_crmentityrel WHERE relcrmid = ? and relmodule = ? and module = ?";
        array_push($params, $recordid, $returnmodule, $currentmodule, $recordid, $returnmodule, $currentmodule);
        $focus_obj = CRMEntity::getInstance($currentmodule);
        $field = $focus_obj->table_index;
        $table = $focus_obj->table_name;
        $selectfield = 'relatedid';
    }
    if ($query != '') {
        $result = $adb->pquery($query, $params);
        if ($adb->num_rows($result) != 0) {
            for ($k = 0; $k < $adb->num_rows($result); $k++) {
                $skip_id[] = $adb->query_result($result, $k, $selectfield);
            }
            $skipids = implode(",", constructList($skip_id, 'INTEGER'));
            if (count($skipids) > 0) {
                $where_relquery = "and " . $table . "." . $field . " not in (" . $skipids . ")";
            }
        }
    }
    $log->debug("Exiting getRelCheckquery method ...");
    return $where_relquery;
}
开发者ID:latechdirect,项目名称:vtiger,代码行数:101,代码来源:ListViewUtils.php

示例4: vtlib_purify

global $current_user;
//set the return module and return action and set the return id based on return module and record
$returnmodule = vtlib_purify($_REQUEST['return_module']);
$returnaction = vtlib_purify($_REQUEST['return_action']);
if (($returnmodule != 'Emails' || $returnmodule == 'Emails' && $_REQUEST['record'] == '') && $_REQUEST['return_id'] != '') {
    $returnid = vtlib_purify($_REQUEST['return_id']);
} else {
    $returnid = $focus->id;
    //$_REQUEST['record'];
}
$adb->println("\n\nMail Sending Process has been started.");
//This function call is used to send mail to the assigned to user. In this mail CC and BCC addresses will be added.
if ($_REQUEST['assigntype' == 'T'] && $_REQUEST['assigned_group_id'] != '') {
    $grp_obj = new GetGroupUsers();
    $grp_obj->getAllUsersInGroup($_REQUEST['assigned_group_id']);
    $users_list = constructList($grp_obj->group_users, 'INTEGER');
    if (count($users_list) > 0) {
        $sql = "select first_name, last_name, email1, email2, yahoo_id from vtiger_users where id in (" . generateQuestionMarks($users_list) . ")";
        $params = array($users_list);
    } else {
        $sql = "select first_name, last_name, email1, email2, yahoo_id from vtiger_users";
        $params = array();
    }
    $res = $adb->pquery($sql, $params);
    $user_email = '';
    while ($user_info = $adb->fetch_array($res)) {
        $email = $user_info['email1'];
        if ($email == '' || $email == 'NULL') {
            $email = $user_info['email2'];
            if ($email == '' || $email == 'NULL') {
                $email = $user_info['yahoo_id'];
开发者ID:hardikk,项目名称:HNH,代码行数:31,代码来源:mailsend.php


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