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

PHP getTabid函数代码示例

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

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



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

示例1: getListFiledOfRelatedModule

 function getListFiledOfRelatedModule($moduleName)
 {
     $db = PearDatabase::getInstance();
     $tabid = getTabid($moduleName);
     $sourceModule = $moduleName;
     $sql = "select vtiger_field.fieldid, fieldlabel, uitype, vtiger_fieldmodulerel.relmodule from vtiger_field \n\t\t\t\tleft JOIN vtiger_fieldmodulerel ON vtiger_fieldmodulerel.fieldid = vtiger_field.fieldid where tabid = ? AND (uitype = '10' OR uitype = '59' OR uitype = '53' OR uitype = '51')";
     $resultModuleList = $db->pquery($sql, array($tabid), true);
     $moduleList = array();
     for ($i = 0; $i < $db->num_rows($resultModuleList); $i++) {
         $uitype = $db->query_result($resultModuleList, $i, 'uitype');
         $fieldid = $db->query_result($resultModuleList, $i, 'fieldid');
         $fieldlabel = $db->query_result($resultModuleList, $i, 'fieldlabel');
         if ($uitype == 10) {
             $moduleList[] = array(Vtiger_Functions::getModuleId($db->query_result($resultModuleList, $i, 'relmodule')), $fieldlabel, $fieldid);
         } elseif ($uitype == 51) {
             $moduleList[] = array(Vtiger_Functions::getModuleId('Accounts'), $fieldlabel, $fieldid);
         } elseif ($uitype == 59) {
             $moduleList[] = array(Vtiger_Functions::getModuleId('Products'), $fieldlabel, $fieldid);
         } elseif ($uitype == 53) {
             $moduleList[] = array(Vtiger_Functions::getModuleId('Users'), $fieldlabel, $fieldid);
         }
     }
     $output = array();
     for ($i = 0; $i < count($moduleList); $i++) {
         $moduleInfoSql = "SELECT * FROM vtiger_tab WHERE tabid = ?";
         $moduleInfoResult = $db->pquery($moduleInfoSql, array($moduleList[$i][0]), true);
         $moduleName = $db->query_result($moduleInfoResult, 0, 'name');
         $moduleTrLabal = vtranslate($moduleList[$i][1], $sourceModule);
         $output[$moduleTrLabal] = array();
         $output[$moduleTrLabal] = $this->getListFiledOfModule($moduleName, $moduleList[$i][2]);
     }
     return $output;
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:33,代码来源:Module.php


示例2: getJoinSQLbyFieldRelation

 public function getJoinSQLbyFieldRelation(&$join_array, &$columns_array)
 {
     $related_focus = CRMEntity::getInstance($this->relModuleName);
     $params_fieldname = $this->params["fieldname"];
     // first join to vtiger module table
     $this->params["fieldname"] = $related_focus->tab_name_index[$this->params["tablename"]];
     $this->getStJoinSQL($join_array, $columns_array);
     $r_tabid = getTabid($this->relModuleName);
     $adb = PEARDatabase::getInstance();
     $uirel_row = $adb->fetchByAssoc($adb->pquery("SELECT *  FROM vtiger_field WHERE tabid = ? AND fieldname = ?", array($r_tabid, $params_fieldname)), 0);
     $related_table_name = $related_focus->table_name;
     $related_table_index = $related_focus->table_index;
     foreach ($related_focus->tab_name as $other_table) {
         $related_join_array[$other_table] = $related_focus->tab_name_index[$other_table];
     }
     $field_uitype = $uirel_row["uitype"];
     $fieldid = $this->params["fieldid"];
     $oth_as = "";
     if ($uirel_row["tablename"] == "vtiger_crmentity") {
         $oth_as = $this->oth_as;
         $related_table_name = $uirel_row["tablename"];
         $related_table_index = $uirel_row["columnname"];
     }
     $using_aliastablename = $related_table_name . $oth_as . $fieldid;
     $using_columnname = $related_table_index;
     $params = array('fieldid' => $uirel_row["fieldid"], 'fieldtabid' => $uirel_row["tabid"], 'field_uitype' => $field_uitype, 'fieldname' => $uirel_row["fieldname"], 'columnname' => $uirel_row["columnname"], 'tablename' => $uirel_row["tablename"], 'table_index' => $related_join_array, 'report_primary_table' => $this->params["report_primary_table"], 'primary_table_name' => $related_focus->table_name, 'primary_table_index' => $related_focus->table_index, 'primary_tableid' => $r_tabid, 'using_aliastablename' => $using_array["u_tablename"], 'using_columnname' => $using_array["u_tableindex"], 'old_oth_as' => $oth_as, 'old_oth_fieldid' => $fieldid, 'fld_string' => $this->params["fld_string"]);
     $using_array = getJoinInformation($params);
     $params["using_array"] = $using_array;
     $uifactory = new UIFactory($params);
     //show("<font color='green'>fielduitype".$field_uitype."_IN_P_".$field_uitype,$related_join_array,$params["using_array"],"</font>");
     $uifactory->getJoinSQL($field_uitype, $join_array, $columns_array);
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:32,代码来源:UITypes.php


示例3: getTabId

 public function getTabId()
 {
     if ($this->tabId == null) {
         $this->tabId = getTabid($this->objectName);
     }
     return $this->tabId;
 }
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:7,代码来源:VtigerCRMObjectMeta.php


示例4: getMappingSupportedFieldIdsList

    /**
     * Function to get mapping supported field ids list
     * @return <Array> list of field ids
     */
    public function getMappingSupportedFieldIdsList()
    {
        if (!$this->supportedFieldIdsList) {
            $selectedTabidsList[] = getTabid($this->getName());
            $presense = array(0, 2);
            $restrictedFieldNames = array('campaignrelstatus');
            $restrictedUitypes = array(4, 10, 51, 52, 53, 57, 58, 69, 70);
            $selectedGeneratedTypes = array(1, 2);
            $db = PearDatabase::getInstance();
            $query = 'SELECT fieldid FROM vtiger_field
						WHERE presence IN (' . generateQuestionMarks($presense) . ')
						AND tabid IN (' . generateQuestionMarks($selectedTabidsList) . ')
						AND uitype NOT IN (' . generateQuestionMarks($restrictedUitypes) . ')
						AND fieldname NOT IN (' . generateQuestionMarks($restrictedFieldNames) . ')
						AND generatedtype IN (' . generateQuestionMarks($selectedGeneratedTypes) . ')';
            $params = array_merge($presense, $selectedTabidsList, $restrictedUitypes, $restrictedFieldNames, $selectedGeneratedTypes);
            $result = $db->pquery($query, $params);
            $numOfRows = $db->num_rows($result);
            $fieldIdsList = array();
            for ($i = 0; $i < $numOfRows; $i++) {
                $fieldIdsList[] = $db->query_result($result, $i, 'fieldid');
            }
            $this->supportedFieldIdsList = $fieldIdsList;
        }
        return $this->supportedFieldIdsList;
    }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:30,代码来源:Module.php


示例5: getNameFields

 /**
  * Function to retrieve name fields of a module
  * @return <array> - array which contains fields which together construct name fields
  */
 public function getNameFields()
 {
     $nameFieldObject = Vtiger_Cache::get('EntityField', $this->getName());
     $moduleName = $this->getName();
     if ($nameFieldObject && $nameFieldObject->fieldname) {
         $this->nameFields = explode(',', $nameFieldObject->fieldname);
     } else {
         $adb = PearDatabase::getInstance();
         $query = "SELECT fieldname, tablename, entityidfield FROM vtiger_entityname WHERE tabid = ?";
         $result = $adb->pquery($query, array(getTabid('Calendar')));
         $this->nameFields = array();
         if ($result) {
             $rowCount = $adb->num_rows($result);
             if ($rowCount > 0) {
                 $fieldNames = $adb->query_result($result, 0, 'fieldname');
                 $this->nameFields = explode(',', $fieldNames);
             }
         }
         $entiyObj = new stdClass();
         $entiyObj->basetable = $adb->query_result($result, 0, 'tablename');
         $entiyObj->basetableid = $adb->query_result($result, 0, 'entityidfield');
         $entiyObj->fieldname = $fieldNames;
         Vtiger_Cache::set('EntityField', $this->getName(), $entiyObj);
     }
     return $this->nameFields;
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:30,代码来源:Module.php


示例6: beforeGetTaskform

 public function beforeGetTaskform($viewer)
 {
     $viewer->assign("ENABLE_PDFMAKER", false);
     $viewer->assign("pdfmaker_templates", array());
     if (getTabid('PDFMaker') && vtlib_isModuleActive('PDFMaker')) {
         require_once 'modules/PDFMaker/PDFMaker.php';
         if (class_exists("PDFMaker")) {
             $PDFMaker = $PDFMaker = new PDFMaker_PDFMaker_Model();
             if (method_exists($PDFMaker, "GetAvailableTemplates")) {
                 $viewer->assign("ENABLE_PDFMAKER", true);
                 $templates = $PDFMaker->GetAvailableTemplates($this->getModuleName());
                 foreach ($templates as $index => $value) {
                     $pdftemplates[$index] = $value["templatename"];
                 }
                 $viewer->assign("pdfmaker_templates", $pdftemplates);
                 $templateid = $this->get("template");
                 if (!empty($templateid) && $templateid != -1 && $this->get("attachments") == -1) {
                     $this->set("attachments", '{"pdfmaker#' . $templateid . '":"title"}');
                 } else {
                     if ($this->get("attachments") == -1) {
                         $this->set("attachments", '{}');
                     }
                 }
             }
         }
     }
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:27,代码来源:WfTaskRedirectUser.php


示例7: updateProgressMilestone

 public function updateProgressMilestone($id)
 {
     $adb = PearDatabase::getInstance();
     //TODO need to handle security
     if (!isRecordExists($id)) {
         return;
     }
     $focus = CRMEntity::getInstance($this->getName());
     $relatedListMileston = $focus->get_dependents_list($id, $this->getId(), getTabid('ProjectTask'));
     $resultMileston = $adb->query($relatedListMileston['query']);
     $num = $adb->num_rows($resultMileston);
     $estimatedWorkTime = 0;
     $progressInHours = 0;
     for ($i = 0; $i < $num; $i++) {
         $row = $adb->query_result_rowdata($resultMileston, $i);
         $estimatedWorkTime += $row['estimated_work_time'];
         $recordProgress = $row['estimated_work_time'] * (int) $row['projecttaskprogress'] / 100;
         $progressInHours += $recordProgress;
     }
     if (!$estimatedWorkTime) {
         return;
     }
     $projectMilestoneProgress = round(100 * $progressInHours / $estimatedWorkTime);
     $focus->retrieve_entity_info($id, $this->getName());
     $focus->column_fields['projectmilestone_progress'] = $projectMilestoneProgress . '%';
     $focus->column_fields['mode'] = 'edit';
     $focus->saveentity($this->getName(), $id);
 }
开发者ID:yozhi,项目名称:YetiForceCRM,代码行数:28,代码来源:Module.php


示例8: create_list_query

 /** Function to create list query
  * @param reference variable - where condition is passed when the query is executed
  * Returns Query.
  */
 function create_list_query($order_by, $where)
 {
     $log = vglobal('log');
     $current_user = vglobal('current_user');
     require 'user_privileges/user_privileges_' . $current_user->id . '.php';
     require 'user_privileges/sharing_privileges_' . $current_user->id . '.php';
     $tab_id = getTabid("Potentials");
     $log->debug("Entering create_list_query(" . $order_by . "," . $where . ") method ...");
     // Determine if the vtiger_account name is present in the where clause.
     $account_required = preg_match("/accounts\\.name/", $where);
     if ($account_required) {
         $query = "SELECT vtiger_potential.potentialid,  vtiger_potential.potentialname, vtiger_potential.dateclosed FROM vtiger_potential, vtiger_account ";
         $where_auto = "account.accountid = vtiger_potential.related_to AND vtiger_crmentity.deleted=0 ";
     } else {
         $query = 'SELECT vtiger_potential.potentialid, vtiger_potential.potentialname, vtiger_crmentity.smcreatorid, vtiger_potential.closingdate FROM vtiger_potential inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_potential.potentialid LEFT JOIN vtiger_groups on vtiger_groups.groupid = vtiger_crmentity.smownerid left join vtiger_users on vtiger_users.id = vtiger_crmentity.smownerid ';
         $where_auto = ' AND vtiger_crmentity.deleted=0';
     }
     $query .= $this->getNonAdminAccessControlQuery('Potentials', $current_user);
     if ($where != "") {
         $query .= " where {$where} " . $where_auto;
     } else {
         $query .= " where " . $where_auto;
     }
     if ($order_by != "") {
         $query .= " ORDER BY {$order_by}";
     }
     $log->debug("Exiting create_list_query method ...");
     return $query;
 }
开发者ID:yozhi,项目名称:YetiForceCRM,代码行数:33,代码来源:Potentials.php


示例9: detectRelatedModules

 /**
  * Detect the related modules based on the entity relation information for this instance.
  */
 function detectRelatedModules()
 {
     global $adb, $current_user;
     // Pick the distinct modulenames based on related records.
     $result = $adb->pquery("SELECT distinct setype FROM vtiger_crmentity WHERE crmid in (\n\t\t\tSELECT relcrmid FROM vtiger_crmentityrel INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_crmentityrel.crmid \n\t\t\tWHERE vtiger_crmentity.crmid = ? AND vtiger_crmentity.deleted=0)", array($this->id));
     $relatedModules = array();
     // Calculate the related module access (similar to getRelatedList API in DetailViewUtils.php)
     if ($result && $adb->num_rows($result)) {
         require 'user_privileges/user_privileges_' . $current_user->id . '.php';
         while ($resultrow = $adb->fetch_array($result)) {
             $accessCheck = false;
             $relatedTabId = getTabid($resultrow['setype']);
             if ($relatedTabId == 0) {
                 $accessCheck = true;
             } else {
                 if ($profileTabsPermission[$relatedTabId] == 0) {
                     if ($profileActionPermission[$relatedTabId][3] == 0) {
                         $accessCheck = true;
                     }
                 }
             }
             if ($accessCheck) {
                 $relatedModules[$relatedTabId] = $resultrow['setype'];
             }
         }
     }
     return $relatedModules;
 }
开发者ID:hardikk,项目名称:HNH,代码行数:31,代码来源:SMSNotifier.php


示例10: getCFListEntries

/**
 * Function to get customfield entries
 * @param string $module - Module name
 * return array  $cflist - customfield entries
 */
function getCFListEntries($module)
{
    $tabid = getTabid($module);
    global $adb;
    global $theme;
    global $mod_strings;
    global $app_strings;
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    //$dbQuery = "select fieldid,columnname,fieldlabel,uitype,displaytype from ec_field where tabid=".$tabid." and generatedtype=2 order by sequence";
    $dbQuery = "select multifieldid,multifieldname,totallevel from ec_multifield  where tabid=" . $tabid . " order by multifieldid";
    $result = $adb->getList($dbQuery);
    $count = 1;
    $cflist = array();
    foreach ($result as $row) {
        $cf_element = array();
        $cf_element['no'] = $count;
        $cf_element['label'] = $row["multifieldname"];
        $fld_type_name = $row["totallevel"];
        /*
        if(isset($mod_strings[$fld_type_name])) {
        	$fld_type_name = $mod_strings[$fld_type_name];
        }
        */
        $cf_element['type'] = $fld_type_name;
        $cf_element['tool'] = '<img src="' . $image_path . 'editfield.gif" border="0" style="cursor:pointer;" onClick="gotoEditCustomField(\'' . $module . '\',\'' . $row["multifieldid"] . '\',\'' . $tabid . '\',\'' . $row["uitype"] . '\')" alt="' . $app_strings['LBL_EDIT'] . '" title="' . $app_strings['LBL_EDIT'] . '"/>&nbsp;
                   |&nbsp;<img style="cursor:pointer;" onClick="deleteMultiCustomField(' . $row["multifieldid"] . ',\'' . $module . '\', \'' . $row["columnname"] . '\', \'' . $row["uitype"] . '\')" src="' . $image_path . 'delete.gif" border="0"  alt="' . $app_strings['LBL_DELETE'] . '" title="' . $app_strings['LBL_DELETE'] . '"/>
            ';
        $cflist[] = $cf_element;
        $count++;
    }
    return $cflist;
}
开发者ID:Pengzw,项目名称:c3crm,代码行数:38,代码来源:CustomMultiFieldList.php


示例11: vtlib_handler

 /**
  * Invoked when special actions are performed on the module.
  * @param String Module name
  * @param String Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
  */
 function vtlib_handler($modulename, $event_type)
 {
     $registerLink = false;
     $displayLabel = 'Time Control';
     global $adb, $log;
     if ($event_type == 'module.postinstall') {
         $tabid = getTabid($modulename);
         $adb->query("UPDATE `vtiger_field` SET `summaryfield` = '1' WHERE `tabid` = {$tabid} AND `columnname` IN ('name','osstimecontrol_no','osstimecontrol_status','smownerid','date_start','time_start','time_end','due_date','sum_time','platnosc');", true);
         $ModuleInstance = CRMEntity::getInstance($modulename);
         $ModuleInstance->setModuleSeqNumber("configure", $modulename, 'TC', '1');
         include_once 'vtlib/Vtiger/Module.php';
         $moduleInstance = Vtiger_Module::getInstance($modulename);
         $docelowy_Module = Vtiger_Module::getInstance('Accounts');
         $docelowy_Module->setRelatedList($moduleInstance, 'OSSTimeControl', array('add'), 'get_dependents_list');
         $docelowy_Module = Vtiger_Module::getInstance('HelpDesk');
         $docelowy_Module->setRelatedList($moduleInstance, 'OSSTimeControl', array('add'), 'get_dependents_list');
         $docelowy_Module = Vtiger_Module::getInstance('Project');
         $docelowy_Module->setRelatedList($moduleInstance, 'OSSTimeControl', array('add'), 'get_dependents_list');
         $docelowy_Module = Vtiger_Module::getInstance('ProjectTask');
         $docelowy_Module->setRelatedList($moduleInstance, 'OSSTimeControl', array('add'), 'get_dependents_list');
         $docelowy_Module = Vtiger_Module::getInstance('ServiceContracts');
         $docelowy_Module->setRelatedList($moduleInstance, 'OSSTimeControl', array('add'), 'get_dependents_list');
         $docelowy_Module = Vtiger_Module::getInstance('Assets');
         $docelowy_Module->setRelatedList($moduleInstance, 'OSSTimeControl', array('add'), 'get_dependents_list');
         $docelowy_Module = Vtiger_Module::getInstance('SalesOrder');
         $docelowy_Module->setRelatedList($moduleInstance, 'OSSTimeControl', array('add'), 'get_dependents_list');
         $docelowy_Module = Vtiger_Module::getInstance('Potentials');
         $docelowy_Module->setRelatedList($moduleInstance, 'OSSTimeControl', array('add'), 'get_dependents_list');
         $docelowy_Module = Vtiger_Module::getInstance('Quotes');
         $docelowy_Module->setRelatedList($moduleInstance, 'OSSTimeControl', array('add'), 'get_dependents_list');
         $docelowy_Module = Vtiger_Module::getInstance('Leads');
         $docelowy_Module->setRelatedList($moduleInstance, 'OSSTimeControl', array('add'), 'get_dependents_list');
         $modcommentsModuleInstance = Vtiger_Module::getInstance('ModComments');
         if ($modcommentsModuleInstance && file_exists('modules/ModComments/ModComments.php')) {
             include_once 'modules/ModComments/ModComments.php';
             if (class_exists('ModComments')) {
                 ModComments::addWidgetTo(array('OSSTimeControl'));
             }
         }
     } else {
         if ($event_type == 'module.disabled') {
             // TODO Handle actions when this module is disabled.
         } else {
             if ($event_type == 'module.enabled') {
                 // TODO Handle actions when this module is enabled.
             } else {
                 if ($event_type == 'module.preuninstall') {
                     // TODO Handle actions when this module is about to be deleted.
                 } else {
                     if ($event_type == 'module.preupdate') {
                         // TODO Handle actions before this module is updated.
                     } else {
                         if ($event_type == 'module.postupdate') {
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:65,代码来源:OSSTimeControl.php


示例12: getBlockListEntries

/**
 * Function to get customfield entries
 * @param string $module - Module name
 * return array  $cflist - customfield entries
 */
function getBlockListEntries($module)
{
    $tabid = getTabid($module);
    global $adb;
    global $theme;
    global $current_language;
    if ($module == "Events") {
        $module = "Calendar";
    }
    $cur_module_strings = return_specified_module_language($current_language, $module);
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    $dbQuery = "select blockid,blocklabel,sequence from ec_blocks where tabid={$tabid} and visible = 0 order by sequence";
    $result = $adb->query($dbQuery);
    $row = $adb->fetch_array($result);
    $count = 1;
    $cflist = array();
    if ($row != '') {
        do {
            $cf_element = array();
            $cf_element['no'] = $count;
            if (isset($cur_module_strings[$row["blocklabel"]])) {
                $cf_element['label'] = $cur_module_strings[$row["blocklabel"]];
            } else {
                $cf_element['label'] = $row["blocklabel"];
            }
            $cf_element['sequence'] = $row["sequence"];
            //getCreateCustomBlockForm(customModule,blockid,tabid,label,order)
            $cf_element['tool'] = '<img src="' . $image_path . 'editfield.gif" border="0" style="cursor:pointer;" onClick="fnvshobj(this,\'createblock\');getCreateCustomBlockForm(\'' . $module . '\',\'' . $row["blockid"] . '\',\'' . $tabid . '\',\'' . $cf_element['label'] . '\',\'' . $row["sequence"] . '\')" alt="Edit" title="Edit"/>&nbsp;|&nbsp;<img style="cursor:pointer;" onClick="deleteCustomBlock(' . $row["blockid"] . ',\'' . $module . '\', \'' . $row["columnname"] . '\', \'' . $row["uitype"] . '\')" src="' . $image_path . 'delete.gif" border="0"  alt="Delete" title="Delete"/></a>';
            $cflist[] = $cf_element;
            $count++;
        } while ($row = $adb->fetch_array($result));
    }
    return $cflist;
}
开发者ID:honj51,项目名称:taobaocrm,代码行数:40,代码来源:CustomBlockList.php


示例13: getUserFldArray

/**
 * Function to get picklist fields for the given module
 * @ param $fld_module
 * It gets the picklist details array for the given module in the given format
 * $fieldlist = Array(Array('fieldlabel'=>$fieldlabel,'generatedtype'=>$generatedtype,'columnname'=>$columnname,'fieldname'=>$fieldname,'value'=>picklistvalues))
 */
function getUserFldArray($fld_module, $roleid)
{
    $adb = PearDatabase::getInstance();
    $log = vglobal('log');
    $user_fld = array();
    $tabid = getTabid($fld_module);
    $query = "select vtiger_field.fieldlabel,vtiger_field.columnname,vtiger_field.fieldname, vtiger_field.uitype" . " FROM vtiger_field inner join vtiger_picklist on vtiger_field.fieldname = vtiger_picklist.name" . " where (displaytype=1 and vtiger_field.tabid=? and vtiger_field.uitype in ('15','55','33','16') " . " or (vtiger_field.tabid=? and fieldname='salutationtype' and fieldname !='vendortype')) " . " and vtiger_field.presence in (0,2) ORDER BY vtiger_picklist.picklistid ASC";
    $result = $adb->pquery($query, array($tabid, $tabid));
    $noofrows = $adb->num_rows($result);
    if ($noofrows > 0) {
        $fieldlist = array();
        for ($i = 0; $i < $noofrows; $i++) {
            $user_fld = array();
            $fld_name = $adb->query_result($result, $i, "fieldname");
            $user_fld['fieldlabel'] = $adb->query_result($result, $i, "fieldlabel");
            $user_fld['generatedtype'] = $adb->query_result($result, $i, "generatedtype");
            $user_fld['columnname'] = $adb->query_result($result, $i, "columnname");
            $user_fld['fieldname'] = $adb->query_result($result, $i, "fieldname");
            $user_fld['uitype'] = $adb->query_result($result, $i, "uitype");
            $user_fld['value'] = getAssignedPicklistValues($user_fld['fieldname'], $roleid, $adb);
            $fieldlist[] = $user_fld;
        }
    }
    return $fieldlist;
}
开发者ID:yozhi,项目名称:YetiForceCRM,代码行数:31,代码来源:PickListUtils.php


示例14: vtEditExpressions

function vtEditExpressions($adb, $appStrings, $current_language, $theme, $formodule = '')
{
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    $smarty = new vtigerCRM_Smarty();
    $smarty->assign('APP', $appStrings);
    $mod = array_merge(return_module_language($current_language, 'FieldFormulas'), return_module_language($current_language, 'Settings'));
    $jsStrings = array('NEED_TO_ADD_A' => $mod['NEED_TO_ADD_A'], 'CUSTOM_FIELD' => $mod['LBL_CUSTOM_FIELD'], 'LBL_USE_FUNCTION_DASHDASH' => $mod['LBL_USE_FUNCTION_DASHDASH'], 'LBL_USE_FIELD_VALUE_DASHDASH' => $mod['LBL_USE_FIELD_VALUE_DASHDASH'], 'LBL_DELETE_EXPRESSION_CONFIRM' => $mod['LBL_DELETE_EXPRESSION_CONFIRM']);
    $smarty->assign("JS_STRINGS", Zend_Json::encode($jsStrings));
    $smarty->assign("MOD", $mod);
    $smarty->assign("THEME", $theme);
    $smarty->assign("IMAGE_PATH", $image_path);
    $smarty->assign("MODULE_NAME", 'FieldFormulas');
    $smarty->assign("PAGE_NAME", 'LBL_FIELDFORMULAS');
    $smarty->assign("PAGE_TITLE", 'LBL_FIELDFORMULAS');
    $smarty->assign("PAGE_DESC", 'LBL_FIELDFORMULAS_DESCRIPTION');
    $smarty->assign("FORMODULE", $formodule);
    if (file_exists("modules/{$formodule}/{$formodule}.php")) {
        $focus = CRMEntity::getInstance($formodule);
        $validationArray = split_validationdataArray(getDBValidationData($focus->tab_name, getTabid($formodule)));
        $smarty->assign('VALIDATION_DATA_FIELDNAME', $validationArray['fieldname']);
        $smarty->assign('VALIDATION_DATA_FIELDDATATYPE', $validationArray['datatype']);
        $smarty->assign('VALIDATION_DATA_FIELDLABEL', $validationArray['fieldlabel']);
    }
    $smarty->display(vtlib_getModuleTemplate('FieldFormulas', 'EditExpressions.tpl'));
}
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:26,代码来源:editexpressions.php


示例15: beforeGetTaskform

 public function beforeGetTaskform($viewer)
 {
     global $adb;
     if (!\Workflow\VtUtils::existTable("vtiger_wf_customnumbering")) {
         echo "Create table vtiger_wf_confirmation_user ... ok<br>";
         $adb->query("CREATE TABLE IF NOT EXISTS `vtiger_wf_customnumbering` (\r\n              `serie` varchar(24) NOT NULL,\r\n              `prefix` varchar(16) NOT NULL,\r\n              `current` int(10) unsigned NOT NULL,\r\n              `length` tinyint(4) NOT NULL,\r\n              PRIMARY KEY (`serie`)\r\n            ) ENGINE=InnoDB;");
     }
     $crmidColObj = CRMEntity::getInstance($this->getModuleName());
     $viewer->assign('crmidCol', $crmidColObj->table_index);
     $moduleName = $this->getModuleName();
     $fields = VtUtils::getFieldsWithBlocksForModule($moduleName, false);
     $selectedId = $this->get('field');
     if ($selectedId === -1 || empty($selectedId)) {
         $sql = 'SELECT * FROM vtiger_field WHERE uitype = 4 AND tabid = ' . getTabid($moduleName);
         $result = $adb->query($sql);
         $selectedId = $adb->query_result($result, 0, 'fieldname');
         $this->set('field', $selectedId);
     }
     $sql = 'SELECT * FROM vtiger_wf_customnumbering';
     $result = $adb->query($sql);
     $series = array();
     while ($row = $adb->fetchByAssoc($result)) {
         $series[$row['serie']] = $row;
     }
     if (isset($series[$this->get('serie')])) {
         $viewer->assign('lockFields', true);
     }
     $viewer->assign('series', $series);
     $viewer->assign('fields', $fields);
     /* Insert here source code to create custom configurations pages */
 }
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:31,代码来源:WfTaskCustomNumbers.php


示例16: getCFListEntries

/**
 * Function to get customfield entries
 * @param string $module - Module name
 * return array  $cflist - customfield entries
 */
function getCFListEntries($module)
{
    $tabid = getTabid($module);
    global $adb;
    global $theme;
    global $mod_strings;
    global $app_strings;
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    $dbQuery = "select fieldid,columnname,fieldlabel,uitype,displaytype from ec_field where tabid=" . $tabid . " and generatedtype=2 and uitype not in('1021','1022','1023') order by sequence";
    $result = $adb->query($dbQuery);
    $row = $adb->fetch_array($result);
    $count = 1;
    $cflist = array();
    if ($row != '') {
        do {
            $cf_element = array();
            $cf_element['no'] = $count;
            $cf_element['label'] = $row["fieldlabel"];
            $fld_type_name = getCustomFieldTypeName($row["uitype"]);
            if (isset($mod_strings[$fld_type_name])) {
                $fld_type_name = $mod_strings[$fld_type_name];
            }
            $cf_element['type'] = $fld_type_name;
            $cf_element['tool'] = '<img src="' . $image_path . 'editfield.gif" border="0" style="cursor:pointer;" onClick="fnvshobj(this,\'createcf\');getCreateCustomFieldForm(\'' . $module . '\',\'' . $row["fieldid"] . '\',\'' . $tabid . '\',\'' . $row["uitype"] . '\')" alt="' . $app_strings['LBL_EDIT'] . '" title="' . $app_strings['LBL_EDIT'] . '"/>&nbsp;|&nbsp;<img style="cursor:pointer;" onClick="deleteCustomField(' . $row["fieldid"] . ',\'' . $module . '\', \'' . $row["columnname"] . '\', \'' . $row["uitype"] . '\')" src="' . $image_path . 'delete.gif" border="0"  alt="' . $app_strings['LBL_DELETE'] . '" title="' . $app_strings['LBL_DELETE'] . '"/></a>';
            $cflist[] = $cf_element;
            $count++;
        } while ($row = $adb->fetch_array($result));
    }
    return $cflist;
}
开发者ID:ruckfull,项目名称:taobaocrm,代码行数:36,代码来源:CustomFieldList.php


示例17: getSharingUserName

/**
 * To get userid and username of vtiger_users in hierarchy level
 * @param $id -- The user id :: Type integer
 * @returns $user_details -- Array in the following format:
 * $user_details=Array($userid1=>$username, $userid2=>$username,............,$useridn=>$username);
 */
function getSharingUserName($id)
{
    global $adb, $current_user;
    $user_details = array();
    $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[getTabid('Calendar')] == 3 or $defaultOrgSharingPermission[getTabid('Calendar')] == 0)) {
        $role_seq = implode($parent_roles, "::");
        $query = "select id as id,user_name as user_name from vtiger_users where id=? and status='Active' union select vtiger_user2role.userid as id,vtiger_users.user_name as user_name from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like ? and status='Active' union select shareduserid as id,vtiger_users.user_name as user_name from vtiger_tmp_write_user_sharing_per inner join vtiger_users on vtiger_users.id=vtiger_tmp_write_user_sharing_per.shareduserid where status='Active' and vtiger_tmp_write_user_sharing_per.userid=? and vtiger_tmp_write_user_sharing_per.tabid=9";
        $params = array($current_user->id, $role_seq . "::%", $current_user->id);
        if (!empty($assigned_user_id)) {
            $query .= " OR id=?";
            array_push($params, $assigned_user_id);
        }
        $query .= " order by user_name ASC";
        $result = $adb->pquery($query, $params, true, "Error filling in user array: ");
        while ($row = $adb->fetchByAssoc($result)) {
            $temp_result[$row['id']] = $row['user_name'];
        }
        $user_details =& $temp_result;
        unset($user_details[$id]);
    } else {
        $user_details = get_user_array(FALSE, "Active", $id);
        unset($user_details[$id]);
    }
    return $user_details;
}
开发者ID:mslokhat,项目名称:corebos,代码行数:34,代码来源:CalendarCommon.php


示例18: getFieldInfo

 function getFieldInfo($fieldName, $moduleName, $column)
 {
     $moduleTabId = getTabid($moduleName);
     $db = PearDatabase::getInstance();
     $sql = "SELECT * FROM vtiger_field WHERE tabid = {$moduleTabId} AND fieldname = '{$fieldName}'";
     $result = $db->query($sql, true);
     return $db->query_result($result, 0, $column);
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:8,代码来源:Base.php


示例19: addRelationModue

 private function addRelationModue()
 {
     global $adb;
     $id = $adb->getUniqueID('vtiger_relatedlists');
     $projectTabId = getTabid('Project');
     $potentialsTabId = getTabid('Potentials');
     $adb->query("INSERT INTO vtiger_relatedlists VALUES ({$id}, {$potentialsTabId}, {$projectTabId}, 'get_related_list', 16, 'Projects', 0, 'ADD,SELECT')", true);
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:8,代码来源:OSSProjectTemplates.php


示例20: getBlocksForQuickEdit

/**
 * This function returns the ec_blocks and its related information for given module.
 * Input Parameter are $module - module name, $disp_view = display view (edit,detail or create),$mode - edit, $col_fields - * column ec_fields/
 * This function returns an array
 */
function getBlocksForQuickEdit($module, $disp_view, $mode, $col_fields = '', $display_type_check)
{
    global $log;
    $log->debug("Entering getBlocksForQuickEdit() method ...");
    global $adb, $current_user;
    global $mod_strings;
    $tabid = getTabid($module);
    $block_detail = array();
    $getBlockinfo = "";
    $prev_header = "";
    $query = "select blockid,blocklabel,show_title from ec_blocks where tabid={$tabid} and {$disp_view}=0 and visible = 0 order by sequence";
    $result = $adb->query($query);
    $noofrows = $adb->num_rows($result);
    $blockid_list = '(';
    for ($i = 0; $i < $noofrows; $i++) {
        $blockid = $adb->query_result($result, $i, "blockid");
        if ($i != 0) {
            $blockid_list .= ', ';
        }
        $blockid_list .= $blockid;
        $block_label[$blockid] = $adb->query_result($result, $i, "blocklabel");
    }
    $blockid_list .= ')';
    //retreive the ec_profileList from database
    require 'user_privileges/user_privileges_' . $current_user->id . '.php';
    if ($is_admin == true) {
        $sql = "SELECT ec_field.* FROM ec_field INNER JOIN ec_def_org_field ON ec_def_org_field.fieldid=ec_field.fieldid AND ec_def_org_field.visible=0 WHERE ec_field.tabid=" . $tabid . " AND ec_field.block IN " . $blockid_list . " AND " . $display_type_check . " ORDER BY block,sequence";
    } else {
        $profileList = getCurrentUserProfileList();
        $sql = "SELECT ec_field.*,ec_profile2field.readonly as profile_readonly FROM ec_field INNER JOIN ec_profile2field ON ec_profile2field.fieldid=ec_field.fieldid INNER JOIN ec_def_org_field ON ec_def_org_field.fieldid=ec_field.fieldid  WHERE ec_field.tabid=" . $tabid . " AND ec_field.block IN " . $blockid_list . " AND " . $display_type_check . " AND ec_def_org_field.visible=0 AND ec_profile2field.visible=0 AND ec_profile2field.profileid IN " . $profileList . " ORDER BY block,sequence";
    }
    $result = $adb->query($sql);
    $getBlockInfo = getBlockInformation($module, $result, $col_fields, $tabid, $block_label, $mode);
    $index_count = 1;
    $max_index = 0;
    if (!isset($getBlockInfo)) {
        $getBlockInfo = array();
    }
    foreach ($getBlockInfo as $label => $contents) {
        $no_rows = count($contents);
        $index_count = $max_index + 1;
        foreach ($contents as $block_row => $elements) {
            $max_index = $no_rows + $index_count;
            for ($i = 0; $i < count($elements); $i++) {
                if (isset($getBlockInfo[$label][$block_row][$i]) && sizeof($getBlockInfo[$label][$block_row][$i]) != 0) {
                    if ($i == 0) {
                        $getBlockInfo[$lab 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getTable函数代码示例发布时间:2022-05-15
下一篇:
PHP getTabModuleName函数代码示例发布时间: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