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


PHP get_select_options_array函数代码示例

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


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

示例1: getAssignedTo

function getAssignedTo($tabid)
{
    global $current_user, $noof_group_rows, $adb;
    $assigned_user_id = $current_user->id;
    require 'user_privileges/sharing_privileges_' . $current_user->id . '.php';
    require 'user_privileges/user_privileges_' . $current_user->id . '.php';
    if ($is_admin == false && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[$tabid] == 3 or $defaultOrgSharingPermission[$tabid] == 0)) {
        $result = get_current_user_access_groups('Calendar');
    } else {
        $result = get_group_options();
    }
    if ($result) {
        $nameArray = $adb->fetch_array($result);
    }
    if ($is_admin == false && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[$tabid] == 3 or $defaultOrgSharingPermission[$tabid] == 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) {
        do {
            $groupname = $nameArray["groupname"];
            $group_option[] = array($groupname => $selected);
        } while ($nameArray = $adb->fetch_array($result));
    }
    $fieldvalue[] = $users_combo;
    $fieldvalue[] = $group_option;
    return $fieldvalue;
}
开发者ID:mslokhat,项目名称:corebos,代码行数:29,代码来源:CalendarCommon.php

示例2: key

$enddate = key($value['due_date']);
$sttime = $value['date_start'][$stdate];
$endtime = $value['due_date'][$enddate];
$time_arr = getaddEventPopupTime($sttime, $endtime, $format);
$value['starthr'] = $time_arr['starthour'];
$value['startmin'] = $time_arr['startmin'];
$value['startfmt'] = $time_arr['startfmt'];
$value['endhr'] = $time_arr['endhour'];
$value['endmin'] = $time_arr['endmin'];
$value['endfmt'] = $time_arr['endfmt'];
$smarty->assign("STARTHOUR", getTimeCombo($format, 'start', $time_arr['starthour'], $time_arr['startmin'], $time_arr['startfmt'], $taskcheck));
$smarty->assign("ENDHOUR", getTimeCombo($format, 'end', $time_arr['endhour'], $time_arr['endmin'], $time_arr['endfmt']));
$smarty->assign("FOLLOWUP", getTimeCombo($format, 'followup_start', $time_arr['endhour'], $time_arr['endmin'], $time_arr['endfmt']));
if ($Calendar4You->view_all && $Calendar4You->edit_all) {
    $assigned_user_id = $focus->column_fields["assigned_user_id"];
    $value["assigned_user_id"] = get_select_options_array(get_user_array(FALSE, "Active", $assigned_user_id), $assigned_user_id);
}
$smarty->assign("ACTIVITYDATA", $value);
$smarty->assign("LABEL", $fldlabel);
$smarty->assign("secondvalue", $secondvalue);
$smarty->assign("thirdvalue", $thirdvalue);
$smarty->assign("fldlabel_combo", $fldlabel_combo);
$smarty->assign("fldlabel_sel", $fldlabel_sel);
$smarty->assign("OP_MODE", $disp_view);
$smarty->assign("ACTIVITY_MODE", $activity_mode);
$smarty->assign("HOURFORMAT", $format);
$smarty->assign("USERSLIST", $userDetails);
$smarty->assign("USEREMAILID", $to_email);
$smarty->assign("MODULE", $currentModule);
$smarty->assign("DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT']));
global $theme;
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:EventEditView.php

示例3: 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

示例4: getOutputHtml


//.........这里部分代码省略.........
                $chk_val = "selected";
                $found = true;
            } else {
                $chk_val = '';
            }
            $options[] = array($multiselect_combo => $chk_val);
        }
        $fieldvalue[] = $options;
    } elseif ($uitype == 19 || $uitype == 20) {
        if (isset($_REQUEST['body'])) {
            $value = $_REQUEST['body'];
        }
        $editview_label[] = $mod_strings[$fieldlabel];
        //$value = to_html($value);
        //$value = htmlspecialchars($value, ENT_QUOTES, "UTF-8");
        $fieldvalue[] = $value;
    } elseif ($uitype == 21 || $uitype == 24) {
        $editview_label[] = $mod_strings[$fieldlabel];
        $fieldvalue[] = $value;
    } elseif ($uitype == 22) {
        $editview_label[] = $mod_strings[$fieldlabel];
        $fieldvalue[] = $value;
    } elseif ($uitype == 52) {
        $editview_label[] = $mod_strings[$fieldlabel];
        global $current_user;
        if ($value != '') {
            $assigned_user_id = $value;
        } else {
            $assigned_user_id = $current_user->id;
        }
        $combo_lbl_name = 'assigned_user_id';
        if ($fieldlabel == 'Assigned To') {
            $user_array = get_user_array(FALSE, "Active", $assigned_user_id);
            $users_combo = get_select_options_array($user_array, $assigned_user_id);
        } else {
            $user_array = get_user_array(FALSE, "Active", $assigned_user_id);
            $users_combo = get_select_options_array($user_array, $assigned_user_id);
        }
        $fieldvalue[] = $users_combo;
    } elseif ($uitype == 77) {
        $editview_label[] = $mod_strings[$fieldlabel];
        global $current_user;
        if ($value != '') {
            $assigned_user_id = $value;
        } else {
            $assigned_user_id = $current_user->id;
        }
        $combo_lbl_name = 'assigned_user_id';
        $user_array = get_user_array(FALSE, "Active", $assigned_user_id);
        $users_combo = get_select_options_array($user_array, $assigned_user_id);
        $fieldvalue[] = $users_combo;
    } elseif ($uitype == 53) {
        $editview_label[] = $mod_strings[$fieldlabel];
        global $current_user;
        if ($value != '' && $value != 0) {
            $assigned_user_id = $value;
        } else {
            $assigned_user_id = $current_user->id;
        }
        if ($fieldlabel == 'Assigned To') {
            $user_array = get_user_array(FALSE, "Active", $assigned_user_id);
            $users_combo = get_select_options_array($user_array, $assigned_user_id);
        } else {
            $user_array = get_user_array(FALSE, "Active", $assigned_user_id);
            $users_combo = get_select_options_array($user_array, $assigned_user_id);
        }
开发者ID:Pengzw,项目名称:c3crm,代码行数:67,代码来源:EditViewUtils.php

示例5: getOutputHtml


//.........这里部分代码省略.........
                $value = $_REQUEST['body'];
            }
            if ($fieldname == 'terms_conditions') {
                //Assign the value from focus->column_fields (if we create Invoice from SO the SO's terms and conditions will be loaded to Invoice's terms and conditions, etc.,)
                $value = $col_fields['terms_conditions'];
                //if the value is empty then only we should get the default Terms and Conditions
                if ($value == '' && $mode != 'edit') {
                    $value = getTermsandConditions();
                }
            }
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            $fieldvalue[] = $value;
        } elseif ($uitype == 21 || $uitype == 24) {
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            $fieldvalue[] = $value;
        } elseif ($uitype == 22) {
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            $fieldvalue[] = $value;
        } elseif ($uitype == 52 || $uitype == 77) {
            $editview_label[] = getTranslatedString($fieldlabel, $module_name);
            global $current_user;
            if ($value != '') {
                $assigned_user_id = $value;
            } else {
                $assigned_user_id = $current_user->id;
            }
            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) {
开发者ID:kduqi,项目名称:corebos,代码行数:67,代码来源:EditViewUtils.php

示例6: getassignedtoValues

 static function getassignedtoValues($userObj, $assigned_user_id = '')
 {
     //get users info
     $recordprefix = self::getEntityModuleWSId('Users');
     if ($assigned_user_id == '') {
         $assigned_user_id = $recordprefix . 'x' . $userObj->id;
     }
     if ($userObj->is_admin == false) {
         $resultuser = get_user_array(FALSE, "Active", $assigned_user_id, 'private');
     } else {
         $resultuser = get_user_array(FALSE, "Active", $assigned_user_id);
     }
     //add prefix to key
     $data = array_flip($resultuser);
     foreach ($data as $key => &$val) {
         $val = $recordprefix . 'x' . $val;
     }
     $resultuser = array_flip($data);
     $users_combo = get_select_options_array($resultuser, $assigned_user_id);
     //handle groups
     $resultgroups = array();
     if ($userObj->is_admin == false) {
         $resultgroups = vtws_getUserAccessibleGroups($module, $userObj);
     } else {
         $resultgroups = vtws_getUserAccessibleGroups($module, $userObj);
     }
     //add prefix to key for groups
     $groups_combo = array();
     if (count($resultgroups) > 0) {
         $newgrouporder = array();
         foreach ($resultgroups as $key => &$val) {
             $newid = $recordprefix . 'x' . $val['id'];
             $newgrouporder[$newid] = $val['name'];
         }
         $groups_combo = get_select_options_array($newgrouporder, $assigned_user_id);
     }
     $fieldvalue = array();
     $fieldvalue[] = $users_combo;
     $fieldvalue[] = $groups_combo;
     return $fieldvalue;
 }
开发者ID:kduqi,项目名称:corebos,代码行数:41,代码来源:Utils.php

示例7: 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

示例8: getDetailViewOutputHtml


//.........这里部分代码省略.........
            if ($uitype == 20) {
                //Fix the issue #4680
                $col_fields[$fieldname] = $col_fields[$fieldname];
            } else {
                $col_fields[$fieldname] = nl2br($col_fields[$fieldname]);
            }
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            $label_fld[] = $col_fields[$fieldname];
        } elseif ($uitype == 51 || $uitype == 50 || $uitype == 73) {
            $account_id = $col_fields[$fieldname];
            if ($account_id != '') {
                $account_name = getAccountName($account_id);
            }
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            $label_fld[] = $account_name;
            $label_fld["secid"] = $account_id;
            $label_fld["link"] = "index.php?module=Accounts&action=DetailView&record=" . $account_id;
            //Account Name View
        } elseif ($uitype == 52 || $uitype == 77 || $uitype == 101) {
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            $user_id = $col_fields[$fieldname];
            $user_name = getOwnerName($user_id);
            if ($user_id != '') {
                $assigned_user_id = $user_id;
            } else {
                $assigned_user_id = $current_user->id;
            }
            if (is_admin($current_user)) {
                $label_fld[] = '<a href="index.php?module=Users&action=DetailView&record=' . $user_id . '">' . $user_name . '</a>';
            } else {
                $label_fld[] = $user_name;
            }
            if ($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", $assigned_user_id, 'private'), $assigned_user_id);
            } else {
                $users_combo = get_select_options_array(get_user_array(FALSE, "Active", $user_id), $assigned_user_id);
            }
            $label_fld["options"] = $users_combo;
        } elseif ($uitype == 11) {
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            $label_fld[] = $col_fields[$fieldname];
        } elseif ($uitype == 53) {
            global $noof_group_rows, $adb;
            $owner_id = $col_fields[$fieldname];
            $user = 'no';
            $result = $adb->pquery("SELECT count(*) as count from vtiger_users where id = ?", array($owner_id));
            if ($adb->query_result($result, 0, 'count') > 0) {
                $user = 'yes';
            }
            $owner_name = getOwnerName($owner_id);
            $label_fld[] = getTranslatedString($fieldlabel, $module);
            $label_fld[] = $owner_name;
            if (is_admin($current_user)) {
                $label_fld["secid"][] = $owner_id;
                if ($user == 'no') {
                    $label_fld["link"][] = "index.php?module=Settings&action=GroupDetailView&groupId=" . $owner_id;
                } else {
                    $label_fld["link"][] = "index.php?module=Users&action=DetailView&record=" . $owner_id;
                }
                //$label_fld["secid"][] = $groupid;
                //$label_fld["link"][] = "index.php?module=Settings&action=GroupDetailView&groupId=".$groupid;
            }
            //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 {
开发者ID:jaimeaga84,项目名称:corebos,代码行数:67,代码来源:DetailViewUtils.php


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