• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_group_array函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: vtJsonOwnersList

function vtJsonOwnersList($adb)
{
    $ownersList = array();
    $activeUsersList = get_user_array(false);
    $allGroupsList = get_group_array(false);
    foreach ($activeUsersList as $userId => $userName) {
        $ownersList[] = array('label' => $userName, 'value' => getUserName($userId));
    }
    foreach ($allGroupsList as $groupId => $groupName) {
        $ownersList[] = array('label' => $groupName, 'value' => $groupName);
    }
    echo Zend_Json::encode($ownersList);
}
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:13,代码来源:WorkflowComponents.php


示例2: getAccessibleGroups

 /**
  * Function to get all the accessible groups
  * @return <Array>
  */
 public function getAccessibleGroups($private = "", $module = false)
 {
     //TODO:Remove dependence on $_REQUEST for the module name in the below API
     $accessibleGroups = Vtiger_Cache::get('vtiger-' . $private, 'accessiblegroups');
     if (!$accessibleGroups) {
         $accessibleGroups = get_group_array(false, "ACTIVE", "", $private, $module);
         Vtiger_Cache::set('vtiger-' . $private, 'accessiblegroups', $accessibleGroups);
     }
     return get_group_array(false, "ACTIVE", "", $private);
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:14,代码来源:Record.php


示例3: getAssignedToGroupList

 public static function getAssignedToGroupList($module)
 {
     $cache = Vtiger_Cache::getInstance();
     if ($cache->getGroupList($module, $current_user->id)) {
         return $cache->getGroupList($module, $current_user->id);
     } else {
         $groupList = get_group_array(FALSE, "Active", $current_user->id);
         $cache->setGroupList($module, $groupList, $current_user->id);
         return $groupList;
     }
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:11,代码来源:Utils.php


示例4: vtTaskEdit

function vtTaskEdit($adb, $request, $current_language, $app_strings)
{
    global $theme;
    $util = new VTWorkflowUtils();
    $request = vtlib_purify($request);
    // this cleans all values of the array
    $image_path = "themes/{$theme}/images/";
    $module = new VTWorkflowApplication('edittask');
    $mod = return_module_language($current_language, $module->name);
    if (!$util->checkAdminAccess()) {
        $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']);
        $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']);
        return;
    }
    $smarty = new vtigerCRM_Smarty();
    $tm = new VTTaskManager($adb);
    $smarty->assign('edit', isset($request["task_id"]));
    if (isset($request["task_id"])) {
        $task = $tm->retrieveTask($request["task_id"]);
        $taskClass = get_class($task);
        $workflowId = $task->workflowId;
    } else {
        $workflowId = $request["workflow_id"];
        $taskClass = vtlib_purifyForSql($request["task_type"]);
        $task = $tm->createTask($taskClass, $workflowId);
    }
    if ($task == null) {
        $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NO_TASK']);
        $util->redirectTo($errorUrl, $mod['LBL_ERROR_NO_TASK']);
        return;
    }
    $wm = new VTWorkflowManager($adb);
    $workflow = $wm->retrieve($workflowId);
    if ($workflow == null) {
        $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NO_WORKFLOW']);
        $util->redirectTo($errorUrl, $mod['LBL_ERROR_NO_WORKFLOW']);
        return;
    }
    $smarty->assign("workflow", $workflow);
    $smarty->assign("returnUrl", $request["return_url"]);
    $smarty->assign("task", $task);
    $smarty->assign("taskType", $taskClass);
    $smarty->assign("saveType", $request['save_type']);
    $taskTypeInstance = VTTaskType::getInstanceFromTaskType($taskClass);
    $taskTemplateClass = $tm->retrieveTemplatePath($module->name, $taskTypeInstance);
    $smarty->assign("taskTemplate", $taskTemplateClass);
    $et = VTWSEntityType::usingGlobalCurrentUser($workflow->moduleName);
    $smarty->assign("entityType", $et);
    $smarty->assign('entityName', $workflow->moduleName);
    $smarty->assign("fieldNames", $et->getFieldNames());
    $repeat_date = $task->calendar_repeat_limit_date;
    if (!empty($repeat_date)) {
        $repeat_date = DateTimeField::convertToUserFormat($repeat_date);
    }
    $smarty->assign('REPEAT_DATE', $repeat_date);
    $dateFields = array();
    $fieldTypes = $et->getFieldTypes();
    $fieldLabels = $et->getFieldLabels();
    foreach ($fieldTypes as $name => $type) {
        if ($type->type == 'Date' || $type->type == 'DateTime') {
            $dateFields[$name] = $fieldLabels[$name];
        }
    }
    $smarty->assign('dateFields', $dateFields);
    if ($task->trigger != null) {
        $trigger = $task->trigger;
        $days = $trigger['days'];
        if ($days < 0) {
            $days *= -1;
            $direction = 'before';
        } else {
            $direction = 'after';
        }
        $smarty->assign('trigger', array('days' => $days, 'direction' => $direction, 'field' => $trigger['field']));
    }
    $metaVariables = $task->getMetaVariables();
    $date = new DateTimeField(null);
    $time = substr($date->getDisplayTime(), 0, 5);
    $smarty->assign("META_VARIABLES", $metaVariables);
    $smarty->assign("SYSTEM_TIMEZONE", $db_timezone);
    $smarty->assign("USER_TIME", $task->formatTimeForTimePicker($time));
    $smarty->assign("USER_DATE", $date->getDisplayDate());
    $smarty->assign("MOD", array_merge(return_module_language($current_language, 'Settings'), return_module_language($current_language, 'Calendar'), return_module_language($current_language, $module->name)));
    $smarty->assign("APP", $app_strings);
    $smarty->assign("dateFormat", parse_calendardate($app_strings['NTC_DATE_FORMAT']));
    $smarty->assign("IMAGE_PATH", $image_path);
    $smarty->assign("THEME", $theme);
    $smarty->assign("MODULE_NAME", $module->label);
    $smarty->assign("PAGE_NAME", $mod['LBL_EDIT_TASK']);
    $smarty->assign("PAGE_TITLE", $mod['LBL_EDIT_TASK_TITLE']);
    $users = $group = array();
    $users['user'] = get_user_array();
    $users['group'] = get_group_array();
    $smarty->assign('ASSIGNED_TO', $users);
    $smarty->assign("module", $module);
    $smarty->display("{$module->name}/EditTask.tpl");
}
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:97,代码来源:edittask.php


示例5: getGroupslist

function getGroupslist()
{
    global $log, $adb, $module, $current_user;
    $log->debug("Entering getGroupslist() method ...");
    require 'user_privileges/user_privileges_' . $current_user->id . '.php';
    require 'user_privileges/sharing_privileges_' . $current_user->id . '.php';
    //Commented to avoid security check for groups
    if ($is_admin == false && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[getTabid($module)] == 3 or $defaultOrgSharingPermission[getTabid($module)] == 0)) {
        $result = get_current_user_access_groups($module);
    } else {
        $result = get_group_options();
    }
    if ($result) {
        $nameArray = $adb->fetch_array($result);
    }
    if (!empty($nameArray)) {
        if ($is_admin == false && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[getTabid($module)] == 3 or $defaultOrgSharingPermission[getTabid($module)] == 0)) {
            $groups_combo = get_select_options_array(get_group_array(FALSE, "Active", $current_user->id, 'private'), $current_user->id);
        } else {
            $groups_combo = get_select_options_array(get_group_array(FALSE, "Active", $current_user->id), $current_user->id);
        }
    }
    if (count($groups_combo) > 0) {
        foreach ($groups_combo as $groupid => $value) {
            foreach ($value as $groupname => $selected) {
                $change_groups_owner .= "<option value={$groupid} {$selected} >" . $groupname . "</option>";
            }
        }
    }
    $log->debug("Exiting getGroupslist method ...");
    return $change_groups_owner;
}
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:32,代码来源:CommonUtils.php


示例6: get_select_options_with_id

	<tr>
		<td class=small >
			<table border=0 celspacing=0 cellpadding=5 width=100% align=center bgcolor=white>
				<tr>
						<td colspan="2" class="detailedViewHeader"><b>' . $mod_strings['LBL_CONVERT_LEAD_INFORMATION'] . '</b></td>
				</tr>
                <tr>
						<td align="right" class="dvtCellLabel" width="50%">' . $app_strings['LBL_ASSIGNED_TO'] . '</td>
                       	<td class="dvtCellInfo" width="50%">
						<input type="radio" name="assigntype" value="U" onclick="toggleAssignType(this.value)" ' . $userselected . ' />&nbsp;' . $app_strings['LBL_USER'] . '
						<input type="radio" name="assigntype" value="T" onclick="toggleAssignType(this.value)" ' . $groupselected . ' />&nbsp;' . $app_strings['LBL_GROUP'] . '
						<span id="assign_user" style="display:' . $userdisplay . '">
                       		<select name="assigned_user_id" class="detailedViewTextBox">' . get_select_options_with_id(get_user_array(false, "Active", $userid, $private), $userid) . '</select>
						</span>
						<span id="assign_team" style="display:' . $groupdisplay . '">
                       		<select name="assigned_group_id" class="detailedViewTextBox">' . get_select_options_with_id(get_group_array(false, "Active", $userid, $private), $userid) . '</select>
						</span>
						</td>
				</tr>';
if (vtlib_isModuleActive('Accounts') && isPermitted('Accounts', 'EditView') == 'yes') {
    $convertlead .= '<tr>
									<td align="right" class="dvtCellLabel">' . $mod_strings['LBL_ACCOUNT_NAME'] . '</td>
									<td class="dvtCellInfo"><input type="text" name="account_name" class="detailedViewTextBox" value="' . $company . '" readonly="readonly"></td>
								</tr>';
}
if (vtlib_isModuleActive('Potentials') && isPermitted('Potentials', 'EditView') == 'yes') {
    // An array which as module => fields mapping, to check for field permissions
    $fields_list = array('Potentials' => array('potentialname', 'closingdate', 'amount', 'sales_stage'));
    $fields_permission = array();
    foreach ($fields_list as $mod => $fields) {
        foreach ($fields as $key => $field) {
开发者ID:hardikk,项目名称:HNH,代码行数:31,代码来源:ConvertLead.php


示例7: getOutputHtml


//.........这里部分代码省略.........
            }
            if ($uitype == 52) {
                $combo_lbl_name = 'assigned_user_id';
            } elseif ($uitype == 77) {
                $combo_lbl_name = 'assigned_user_id1';
            }
            //Control will come here only for Products - Handler and Quotes - Inventory Manager
            if ($is_admin == false && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[getTabid($module_name)] == 3 or $defaultOrgSharingPermission[getTabid($module_name)] == 0)) {
                $users_combo = get_select_options_array(get_user_array(FALSE, "Active", $assigned_user_id, 'private'), $assigned_user_id);
            } else {
                $users_combo = get_select_options_array(get_user_array(FALSE, "Active", $assigned_user_id), $assigned_user_id);
            }
            $fieldvalue[] = $users_combo;
        } elseif ($uitype == 53) {
            global $noof_group_rows;
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            //Security Checks
            if ($fieldname == 'assigned_user_id' && $is_admin == false && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[getTabid($module_name)] == 3 or $defaultOrgSharingPermission[getTabid($module_name)] == 0)) {
                $result = get_current_user_access_groups($module_name);
            } else {
                $result = get_group_options();
            }
            if ($result) {
                $nameArray = $adb->fetch_array($result);
            }
            $assigned_user_id = empty($value) ? $current_user->id : $value;
            if ($fieldname == 'assigned_user_id' && $is_admin == false && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[getTabid($module_name)] == 3 or $defaultOrgSharingPermission[getTabid($module_name)] == 0)) {
                $users_combo = get_select_options_array(get_user_array(FALSE, "Active", $assigned_user_id, 'private'), $assigned_user_id);
            } else {
                $users_combo = get_select_options_array(get_user_array(FALSE, "Active", $assigned_user_id), $assigned_user_id);
            }
            if ($noof_group_rows != 0) {
                if ($fieldname == 'assigned_user_id' && $is_admin == false && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[getTabid($module_name)] == 3 or $defaultOrgSharingPermission[getTabid($module_name)] == 0)) {
                    $groups_combo = get_select_options_array(get_group_array(FALSE, "Active", $assigned_user_id, 'private'), $assigned_user_id);
                } else {
                    $groups_combo = get_select_options_array(get_group_array(FALSE, "Active", $assigned_user_id), $assigned_user_id);
                }
            }
            $fieldvalue[] = $users_combo;
            $fieldvalue[] = $groups_combo;
        } elseif ($uitype == 51 || $uitype == 50 || $uitype == 73) {
            if (!isset($_REQUEST['convertmode']) || $_REQUEST['convertmode'] != 'update_quote_val' && $_REQUEST['convertmode'] != 'update_so_val') {
                if (isset($_REQUEST['account_id']) && $_REQUEST['account_id'] != '') {
                    $value = vtlib_purify($_REQUEST['account_id']);
                }
            }
            if ($value != '') {
                $account_name = getAccountName($value);
            }
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            $fieldvalue[] = $account_name;
            $fieldvalue[] = $value;
        } elseif ($uitype == 54) {
            $options = array();
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            $pick_query = "select * from vtiger_groups";
            $pickListResult = $adb->pquery($pick_query, array());
            $noofpickrows = $adb->num_rows($pickListResult);
            for ($j = 0; $j < $noofpickrows; $j++) {
                $pickListValue = $adb->query_result($pickListResult, $j, "name");
                if ($value == $pickListValue) {
                    $chk_val = "selected";
                } else {
                    $chk_val = '';
                }
                $options[] = array($pickListValue => $chk_val);
开发者ID:kduqi,项目名称:corebos,代码行数:67,代码来源:EditViewUtils.php


示例8: getOwnerList

 function getOwnerList($type)
 {
     $private = self::checkOwnership($this->current_user);
     if ($type === 'user') {
         $owner = get_user_array(false, "Active", $this->row["smownerid"], $private);
     } else {
         $owner = get_group_array(false, "Active", $this->row["smownerid"], $private);
     }
     $owner_list = array();
     foreach ($owner as $id => $name) {
         if ($id == $this->row['smownerid']) {
             $owner_list[] = array($type . 'id' => $id, $type . 'name' => $name, 'selected' => true);
         } else {
             $owner_list[] = array($type . 'id' => $id, $type . 'name' => $name, 'selected' => false);
         }
     }
     return $owner_list;
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:18,代码来源:ConvertLeadUI.php


示例9: count

/**	function used to save the records into database
 *	@param array $rows - array of total rows of the csv file
 *	@param array $rows1 - rows to be saved
 *	@param object $focus - object of the corresponding import module
 *	@param int $ret_field_count - total number of fields(columns) available in the csv file
 *	@param int $col_pos_to_field - field position in the mapped array
 *	@param int $start - starting row count value to import
 *	@param int $recordcount - count of records to be import ie., number of records to import
 *	@param string $module - import module
 *	@param int $totalnoofrows - total number of rows available
 *	@param int $skip_required_count - number of records skipped
 This function will redirect to the ImportStep3 if the available records is greater than the record count (ie., number of records import in a single loop) otherwise (total records less than 500) then it will be redirected to import step last
 */
function InsertImportRecords($rows, $rows1, $focus, $ret_field_count, $col_pos_to_field, $start, $recordcount, $module, $totalnoofrows, $skip_required_count)
{
    global $current_user;
    global $adb;
    global $mod_strings;
    global $dup_ow_count;
    global $process_fields;
    // MWC ** Getting vtiger_users
    $temp = get_user_array(FALSE);
    foreach ($temp as $key => $data) {
        $users_groups_list[$data] = $key;
    }
    $temp = get_group_array(FALSE);
    foreach ($temp as $key => $data) {
        $users_groups_list[$data] = $key;
    }
    p(print_r(users_groups_list, 1));
    $adb->println("Users List : ");
    $adb->println($users_groups_list);
    $dup_count = 0;
    $count = 0;
    $dup_ow_count = 0;
    $process_fields = 'false';
    if ($start == 0) {
        $_SESSION['totalrows'] = $rows;
        $_SESSION['return_field_count'] = $ret_field_count;
        $_SESSION['column_position_to_field'] = $col_pos_to_field;
    }
    $ii = $start;
    // go thru each row, process and save()
    foreach ($rows1 as $row) {
        $adb->println("Going to Save the row " . $ii . " =====> ");
        $adb->println($row);
        global $mod_strings;
        $do_save = 1;
        //MWC
        $my_userid = $current_user->id;
        //If we want to set default values for some fields for each entity then we have to set here
        if ($module == 'Products' || $module == 'Services') {
            //discontinued is not null. if we unmap active, NULL will be inserted and query will fail
            $focus->column_fields['discontinued'] = 'on';
        }
        for ($field_count = 0; $field_count < $ret_field_count; $field_count++) {
            p("col_pos[" . $field_count . "]=" . $col_pos_to_field[$field_count]);
            if (isset($col_pos_to_field[$field_count])) {
                p("set =" . $field_count);
                if (!isset($row[$field_count])) {
                    continue;
                }
                p("setting");
                // TODO: add check for user input
                // addslashes, striptags, etc..
                $field = $col_pos_to_field[$field_count];
                //picklist function is added to avoid duplicate picklist entries
                $pick_orginal_val = getPicklist($field, $row[$field_count]);
                if ($pick_orginal_val != null) {
                    $focus->column_fields[$field] = $pick_orginal_val;
                } elseif ($field == "assignedto" || $field == "assigned_user_id") {
                    //Here we are assigning the user id in column fields, so in function assign_user (ImportLead.php and ImportProduct.php files) we should use the id instead of user name when query the user
                    //or we can use $focus->column_fields['smownerid'] = $users_groups_list[$row[$field_count]];
                    $focus->column_fields[$field] = $users_groups_list[trim($row[$field_count])];
                    p("setting my_userid={$my_userid} for user=" . $row[$field_count]);
                } else {
                    //$focus->$field = $row[$field_count];
                    $focus->column_fields[$field] = $row[$field_count];
                    p("Setting " . $field . "=" . $row[$field_count]);
                }
            }
        }
        if ($focus->column_fields['notify_owner'] == '') {
            $focus->column_fields['notify_owner'] = '0';
        }
        if ($focus->column_fields['reference'] == '') {
            $focus->column_fields['reference'] = '0';
        }
        if ($focus->column_fields['emailoptout'] == '') {
            $focus->column_fields['emailoptout'] = '0';
        }
        if ($focus->column_fields['donotcall'] == '') {
            $focus->column_fields['donotcall'] = '0';
        }
        if ($focus->column_fields['discontinued'] == '') {
            $focus->column_fields['discontinued'] = '0';
        }
        if ($focus->column_fields['active'] == '') {
            $focus->column_fields['active'] = '0';
        }
//.........这里部分代码省略.........
开发者ID:hardikk,项目名称:HNH,代码行数:101,代码来源:ImportSave.php


示例10: getFilterColHtml

 function getFilterColHtml(Vtiger_Request $request)
 {
     require_once 'modules/ITS4YouReports/ITS4YouReports.php';
     $return_html = "";
     $n_c = 3;
     $n_r = 5;
     $n = $n_c * $n_r;
     $sfield_name = $request->get("sfield_name");
     $r_sel_fields = $request->get("r_sel_fields");
     $adb = PearDatabase::getInstance();
     global $current_user;
     //$roleid = $current_user->roleid;
     //$sub = getSubordinateRoleAndUsers($roleid);
     $roleid = $current_user->roleid;
     $sub = getRoleSubordinates($roleid);
     $picklistGroupValues = array();
     $currField = $request->get("currField");
     $currField_arr = explode(":", $currField);
     // list($s_tablename,$columnname,$s_module_field_label_str,$fieldname) = explode(":",$currField);
     $s_tablename = $currField_arr[0];
     $columnname = $currField_arr[1];
     $s_module_field_label_str = $currField_arr[2];
     $fieldname = $currField_arr[3];
     $last_key = count($currField_arr) - 1;
     $s_tablename_clear = $s_tablename;
     if (is_numeric($currField_arr[$last_key]) || in_array($currField_arr[$last_key], array("INV", "MIF"))) {
         $s_tablename_clear = trim($s_tablename, "_" . $currField_arr[$last_key]);
     }
     $s_module_field_arr = explode("_", $s_module_field_label_str);
     $moduleName = $s_module_field_arr[0];
     $moduleTabId = getTabid($moduleName);
     $uitypeSql = "SELECT uitype FROM vtiger_field WHERE tabid=? AND tablename=? AND columnname=?";
     //$adb->setDebug(true);
     $uitypeParams = array($moduleTabId, $s_tablename_clear, $columnname);
     $uitypeResult = $adb->pquery($uitypeSql, $uitypeParams);
     $num_rowuitype = $adb->num_rows($uitypeResult);
     if ($num_rowuitype > 0) {
         $uitype_row = $adb->fetchByAssoc($uitypeResult);
     } elseif ($moduleName == "Leads" && $fieldname == "converted") {
         $uitype_row = array("uitype" => "56");
     } else {
         $uitype_row = array("uitype" => "1");
     }
     if (!empty($uitype_row) && in_array($uitype_row["uitype"], ITS4YouReports::$s_users_uitypes)) {
         $picklistValues = get_user_array(false);
         $groups = get_group_array(false);
         if (!empty($groups)) {
             foreach ($groups as $g_key => $g_name) {
                 $picklistGroupValues[$g_key] = $g_name;
             }
         }
         $valueArr = explode("|##|", $value);
     } elseif (!empty($uitype_row) && $uitype_row['uitype'] == '56') {
         $picklistValues = array("0" => "LBL_NO", "1" => "LBL_YES");
         //$valueArr = explode("|##|", $r_sel_fields);
         $valueArr = explode(",", $r_sel_fields);
     } elseif (!empty($uitype_row) && $uitype_row['uitype'] == '26') {
         $sql = "select foldername,folderid from vtiger_attachmentsfolder order by foldername asc ";
         $res = $adb->pquery($sql, array());
         for ($i = 0; $i < $adb->num_rows($res); $i++) {
             $fid = $adb->query_result($res, $i, "folderid");
             $picklistValues[$fid] = $adb->query_result($res, $i, "foldername");
         }
         $valueArr = explode(",", $r_sel_fields);
     } elseif (!empty($uitype_row) && $uitype_row['uitype'] == '27') {
         $picklistValues = array("I" => "LBL_INTERNAL", "E" => "LBL_EXTERNAL");
         $valueArr = explode(",", $r_sel_fields);
     } else {
         require_once 'modules/PickList/PickListUtils.php';
         if ($uitype_row["uitype"] == "16") {
             $picklistValues = Vtiger_Util_Helper::getPickListValues($columnname);
         } else {
             $picklistValues = getAssignedPicklistValues($fieldname, $roleid, $adb);
             $valueArr = explode("|##|", $value);
         }
     }
     $pickcount = 0;
     $sel_fields = array();
     $field_uitype = $uitype_row["uitype"];
     if (!empty($picklistValues)) {
         foreach ($picklistValues as $order => $pickListValue) {
             $pickListValue = trim($pickListValue);
             if ($uitype_row['uitype'] == '56') {
                 $check_val = $pickListValue == "LBL_YES" ? "yes" : "no";
                 if (in_array(trim($order), array_map("trim", $valueArr)) || in_array($check_val, $valueArr)) {
                     $chk_val = "selected";
                 } else {
                     $chk_val = "";
                 }
                 $pickcount++;
             } elseif (in_array(trim($pickListValue), array_map("trim", $valueArr))) {
                 $chk_val = "selected";
                 $pickcount++;
             } else {
                 $chk_val = '';
             }
             if ($uitype_row['uitype'] == '56') {
                 $sel_fields[] = array(vtranslate($pickListValue, $s_module_field_arr[0]), $order, $chk_val);
             } else {
                 $sel_fields[] = array(vtranslate($pickListValue, $s_module_field_arr[0]), $pickListValue, $chk_val);
//.........这里部分代码省略.........
开发者ID:cin-system,项目名称:cinrepo,代码行数:101,代码来源:IndexAjax.php


示例11: vtigerCRM_Smarty

$smarty = new vtigerCRM_Smarty();
$webform = false;
if ($isCreate) {
    $webform = new Webforms_Model();
    $smarty->assign('usr_selected', 1);
} else {
    $webform = Webforms_Model::retrieveWithId(vtlib_purify($_REQUEST['id']));
    getUserFullName($userid);
    $rscnt = $adb->pquery('select count(*) as cnt from vtiger_users where id =?', array($webform->getOwnerId()));
    $cnt = $adb->query_result($rscnt, 0, 0);
    $smarty->assign('usr_selected', $cnt);
}
$category = getParentTab();
$targetModules = array('Leads');
$usersList = get_user_array(false);
$groupsList = get_group_array(false);
$smarty->assign('WEBFORM', $webform);
$smarty->assign('USERS', $usersList);
$smarty->assign('GROUPS', $groupsList);
$smarty->assign('WEBFORMMODULES', $targetModules);
$smarty->assign('THEME', $theme);
$smarty->assign('MOD', $mod_strings);
$smarty->assign('APP', $app_strings);
$smarty->assign('MODULE', $currentModule);
$smarty->assign('CATEGORY', $category);
$smarty->assign('IMAGE_PATH', "themes/{$theme}/images/");
$smarty->assign('CALENDAR_LANG', 'en');
$smarty->assign('LANGUAGE', $current_language);
$smarty->assign('DATE_FORMAT', $current_user->date_format);
$smarty->assign('CAL_DATE_FORMAT', parse_calendardate($app_strings['NTC_DATE_FORMAT']));
if ($webform->hasId()) {
开发者ID:kduqi,项目名称:corebos,代码行数:31,代码来源:WebformsEditView.php


示例12: getOptions

 public function getOptions()
 {
     return array('User' => get_user_array(), 'Group' => get_group_array());
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:4,代码来源:Owner.php


示例13: getAssignedToGroupList

 public static function getAssignedToGroupList($module)
 {
     global $current_user;
     require 'user_privileges/user_privileges_' . $current_user->id . '.php';
     require 'user_privileges/sharing_privileges_' . $current_user->id . '.php';
     $tabId = getTabid($module);
     if (!is_admin($current_user) && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[$tabId] == 3 or $defaultOrgSharingPermission[$tabId] == 0)) {
         return get_group_array(FALSE, "Active", $current_user->id, 'private');
     } else {
         return get_group_array(FALSE, "Active", $current_user->id);
     }
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:12,代码来源:Utils.php


示例14: vtigerCRM_Smarty

 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
 *
 ********************************************************************************/
require_once 'modules/Settings/MailScanner/core/MailScannerInfo.php';
require_once 'modules/Settings/MailScanner/core/MailScannerRule.php';
require_once 'Smarty_setup.php';
global $app_strings, $mod_strings, $currentModule, $theme, $current_language;
$smarty = new vtigerCRM_Smarty();
$smarty->assign("MOD", return_module_language($current_language, 'Settings'));
$smarty->assign("CMOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", "themes/{$theme}/images/");
$scannername = vtlib_purify($_REQUEST['scannername']);
$scannerruleid = vtlib_purify($_REQUEST['ruleid']);
$scannerinfo = new Vtiger_MailScannerInfo($scannername);
$scannerrule = new Vtiger_MailScannerRule($scannerruleid);
$smarty->assign("SCANNERINFO", $scannerinfo->getAsMap());
$smarty->assign("SCANNERRULE", $scannerrule);
//Set Assigned To
$result = get_group_options();
if ($result) {
    $nameArray = $adb->fetch_array($result);
}
$assigned_user_id = empty($value) ? $current_user->id : $value;
$users_combo = get_select_options_array(get_user_array(FALSE, "Active", $assigned_user_id), $assigned_user_id);
$groups_combo = get_select_options_array(get_group_array(FALSE, "Active", $assigned_user_id), $assigned_user_id);
$smarty->assign('fldvalue', $users_combo);
$smarty->assign('secondvalue', $groups_combo);
$smarty->display('MailScanner/MailScannerRuleEdit.tpl');
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:MailScannerRuleEdit.php


示例15: count

/**	function used to save the records into database
 *	@param array $rows - array of total rows of the csv file
 *	@param array $rows1 - rows to be saved
 *	@param object $focus - object of the corresponding import module
 *	@param int $ret_field_count - total number of fields(columns) available in the csv file
 *	@param int $col_pos_to_field - field position in the mapped array
 *	@param int $start - starting row count value to import
 *	@param int $recordcount - count of records to be import ie., number of records to import
 *	@param string $module - import module
 *	@param int $totalnoofrows - total number of rows available
 *	@param int $skip_required_count - number of records skipped
 This function will redirect to the ImportStep3 if the available records is greater than the record count (ie., number of records import in a single loop) otherwise (total records less than 500) then it will be redirected to import step last
 */
function InsertImportRecords($rows, $rows1, $focus, $ret_field_count, $col_pos_to_field, $start, $recordcount, $module, $totalnoofrows, $skip_required_count)
{
    global $current_user;
    global $adb;
    global $mod_strings;
    global $dup_ow_count;
    global $process_fields;
    $acc_config = Accounting::loadConfigParams();
    // MWC ** Getting vtiger_users
    $temp = get_user_array(FALSE);
    foreach ($temp as $key => $data) {
        $users_groups_list[$data] = $key;
    }
    $temp = get_group_array(FALSE);
    foreach ($temp as $key => $data) {
        $users_groups_list[$data] = $key;
    }
    p(print_r(users_groups_list, 1));
    $adb->println("Users List : ");
    $adb->println($users_groups_list);
    $dup_count = 0;
    $count = 0;
    $dup_ow_count = 0;
    $process_fields = 'false';
    if ($start == 0) {
        $_SESSION['totalrows'] = $rows;
        $_SESSION['return_field_count'] = $ret_field_count;
        $_SESSION['column_position_to_field'] = $col_pos_to_field;
    }
    $ii = $start;
    // go thru each row, process and save()
    $lastacc = "";
    $bMultiple = false;
    $rows2 = array();
    $payments = array();
    $sub = 0;
    $ref_idx = "";
    foreach ($col_pos_to_field as $idx => $fld) {
        if ($fld == "accounting_id") {
            $ref_idx = $idx;
            break;
        }
    }
    $ref_idx = 0;
    foreach ($rows1 as $row) {
        if (array_key_exists($row[0], $payments) == false) {
            $bMultiple = false;
        } else {
            $bMultiple = true;
        }
        /*
        		if ($row[0] == $lastacc) {
        			$bMultiple = true;
        		} else {
        			$bMultiple = false;
        		}
        
        		$lastacc = $row[0];
        */
        if ($bMultiple == false) {
            array_push($rows2, $row);
            $payments[$row[0]] = array();
        } else {
            $sub++;
        }
        $idx = 1;
        $paid = $row[$ret_field_count - $idx++];
        if ($acc_config["associnvoice"] == "true") {
            $associnv = $row[$ret_field_count - $idx++];
        }
        $paymentmethod = $row[$ret_field_count - $idx++];
        if ($acc_config["showvat"] == "true") {
            $tax = $row[$ret_field_count - $idx++];
        }
        $amount = $row[$ret_field_count - $idx++];
        $paymentdate = $row[$ret_field_count - $idx++];
        $paymentduedate = $row[$ret_field_count - $idx++];
        $ref = $row[$ret_field_count - $idx++];
        $invid = '';
        $assocmodule = '';
        $assocdisplay = '';
        if ($associnv != "") {
            //check the module of the field
            $arr = array();
            $arr = explode("::::", $associnv);
            $assocmodule = $arr[0];
            $assocdisplay = $arr[1];
//.........这里部分代码省略.........
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:101,代码来源:ImportSave.php


示例16: getDetailViewOutputHtml


//.........这里部分代码省略.........
            if ($owner_id != '') {
                if ($user == 'yes') {
                    $label_fld["options"][] = 'User';
                    $assigned_user_id = $owner_id;
                    $user_checked = "checked";
                    $team_checked = '';
                    $user_style = 'display:block';
                    $team_style = 'display:none';
                } else {
                    //$record = $col_fields["record_id"];
                    //$module = $col_fields["record_module"];
                    $label_fld["options"][] = 'Group';
                    $assigned_group_id = $owner_id;
                    $user_checked = '';
                    $team_checked = 'checked';
                    $user_style = 'display:none';
                    $team_style = 'display:block';
                }
            } else {
                $label_fld["options"][] = 'User';
                $assigned_user_id = $current_user->id;
                $user_checked = "checked";
                $team_checked = '';
                $user_style = 'display:block';
                $team_style = 'display:none';
            }
            if ($fieldname == 'assigned_user_id' && $is_admin == false && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[getTabid($module)] == 3 or $defaultOrgSharingPermission[getTabid($module)] == 0)) {
                $users_combo = get_select_options_array(get_user_array(FALSE, "Active", $current_user->id, 'private'), $assigned_user_id);
            } else {
                $users_combo = get_select_options_array(get_user_array(FALSE, "Active", $current_user->id), $assigned_user_id);
            }
            if ($noof_group_rows != 0) {
                if ($fieldname == 'assigned_user_id' && $is_admin == false && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[getTabid($module)] == 3 or $defaultOrgSharingPermission[getTabid($module)] == 0)) {
                    $groups_combo = get_select_options_array(get_group_array(FALSE, "Active", $current_user->id, 'private'), $current_user->id);
                } else {
                    $groups_combo = get_select_options_array(get_group_array(FALSE, "Active", $current_user->id), $current_user->id);
                }
            }
            $label_fld["options"][] = $users_combo;
            $label_fld["options"][] = $groups_combo;
        } elseif ($uitype == 55 || $uitype == 255) {
            if ($tabid == 4) {
                $query = "select vtiger_contactdetails.imagename from vtiger_contactdetails where contactid=?";
                $result = $adb->pquery($query, array($col_fields['record_id']));
                $imagename = $adb->query_result($result, 0, 'imagename');
                if ($imagename != '') {
                    $imgpath = "test/contact/" . $imagename;
                    $label_fld[] = getTranslatedString($fieldlabel, $module);
                } else {
                    $label_fld[] = getTranslatedString($fieldlabel, $module);
                }
            } else {
                $label_fld[] = getTranslatedString($fieldlabel, $module);
            }
            $value = $col_fields[$fieldname];
            if ($uitype == 255) {
                global $currentModule;
                $fieldpermission = getFieldVisibilityPermission($currentModule, $current_user->id, 'firstname');
            }
            if ($uitype == 255 && $fieldpermission == 0 && $fieldpermission != '') {
                $fieldvalue[] = '';
            } else {
                $roleid = $current_user->roleid;
                $subrole = getRoleSubordinates($roleid);
                if (count($subrole) > 0) {
                    $roleids = implode("','", $subrole);
开发者ID:jaimeaga84,项目名称:corebos,代码行数:67,代码来源:DetailViewUtils.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_group_goods函数代码示例发布时间:2022-05-15
下一篇:
PHP get_group函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap