本文整理汇总了PHP中return_specified_module_language函数的典型用法代码示例。如果您正苦于以下问题:PHP return_specified_module_language函数的具体用法?PHP return_specified_module_language怎么用?PHP return_specified_module_language使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了return_specified_module_language函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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"/> | <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;
}
示例2: getLayoutListEntries
/**
* Function to get customfield entries
* @param string $module - Module name
* return array $cflist - customfield entries
*/
function getLayoutListEntries($module)
{
$tabid = getTabid($module);
global $adb;
global $theme;
global $current_language;
global $app_strings;
if ($module == "Events") {
$module = "Calendar";
}
$cur_module_strings = return_specified_module_language($current_language, $module);
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$query = "select * from ec_blocks where tabid='" . $tabid . "' order by sequence";
$block_result = $adb->query($query);
$blcoklist = array();
while ($block_row = $adb->fetch_array($block_result)) {
$blockid = $block_row['blockid'];
$blocklabel = $block_row['blocklabel'];
if (isset($cur_module_strings[$blocklabel])) {
$blocklabel = $cur_module_strings[$blocklabel];
}
$dbQuery = "select ec_field.fieldid,ec_field.fieldlabel,ec_field.block,ec_field.sequence,ec_field.typeofdata from ec_field inner join ec_def_org_field on ec_def_org_field.fieldid=ec_field.fieldid where ec_def_org_field.visible=0 and ec_field.tabid={$tabid} and displaytype in(1,2,4) and ec_field.block='" . $blockid . "' order by ec_field.block,ec_field.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["fieldlabel"]])) {
$cf_element['fieldlabel'] = $cur_module_strings[$row["fieldlabel"]];
} elseif (isset($app_strings[$row["fieldlabel"]])) {
$cf_element['fieldlabel'] = $app_strings[$row["fieldlabel"]];
} else {
$cf_element['fieldlabel'] = $row["fieldlabel"];
}
$cf_element['sequence'] = $row["sequence"];
$typeofdata = $row["typeofdata"];
if (strpos($typeofdata, "~M") > -1) {
$typeofdata = "true";
} else {
$typeofdata = "false";
}
$cf_element['typeofdata'] = $typeofdata;
//getCreateCustomBlockForm(customModule,blockid,tabid,label,order)
$cf_element['tool'] = '<img src="' . $image_path . 'editfield.gif" border="0" style="cursor:pointer;" onClick="fnvshobj(this,\'createLayout\');getFieldLayoutForm(\'' . $module . '\',\'' . $row["fieldid"] . '\',\'' . $tabid . '\',\'' . $cf_element['fieldlabel'] . '\',\'' . $blocklabel . '\',\'' . $row["sequence"] . '\',\'' . $row['block'] . '\',\'' . $typeofdata . '\')" alt="' . $app_strings['LNK_EDIT'] . '" title="' . $app_strings['LNK_EDIT'] . '"/>';
$cflist[] = $cf_element;
$count++;
} while ($row = $adb->fetch_array($result));
}
$blcoklist[$blocklabel] = $cflist;
}
return $blcoklist;
}
示例3: getCustomBlocks
function getCustomBlocks($module, $tabid)
{
//$tabid = getTabid($module);
global $adb;
global $theme;
global $current_language;
$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->getList($dbQuery);
$cflist = array();
foreach ($result as $row) {
if (isset($cur_module_strings[$row["blocklabel"]])) {
$cflist[$row['blockid']] = $cur_module_strings[$row["blocklabel"]];
} else {
$cflist[$row['blockid']] = $row["blocklabel"];
}
}
return $cflist;
}
示例4: getFenzuModuleInfo
function getFenzuModuleInfo($module)
{
global $adb;
global $current_language;
$current_mod_strings = return_specified_module_language($current_language, $module);
$block_info = array();
$tabid = getTabid($module);
$Sql = "select distinct block,ec_field.tabid,name,blocklabel from ec_field inner join ec_blocks on ec_blocks.blockid=ec_field.block inner join ec_tab on ec_tab.tabid=ec_field.tabid where ec_field.block not in(40,6,75,35,30,54,60,66,72) and ec_tab.tabid='{$tabid}' order by block";
$result = $adb->query($Sql);
while ($block_result = $adb->fetch_array($result)) {
$block_label = $block_result['blocklabel'];
if (trim($block_label) == '') {
$block_info[$pre_block_label] = $block_info[$pre_block_label] . "," . $block_result['block'];
} else {
if (isset($current_mod_strings[$block_label])) {
$lan_block_label = $current_mod_strings[$block_label];
} else {
$lan_block_label = $block_label;
}
$block_info[$lan_block_label] = $block_result['block'];
}
$pre_block_label = $lan_block_label;
}
$this->module_list[$module] = $block_info;
return $this->module_list;
}
示例5: return_specified_module_language
<?php
require_once "include/database/PearDatabase.php";
global $current_user;
global $adb;
$mod_strings = return_specified_module_language("zh_cn", "Settings");
$now = date("Y-m-d H:i:s");
$userid = $_REQUEST['userid'];
if (empty($userid)) {
die("CurrentUser->ID is null,Please Check it!");
}
$old_endtime = $_REQUEST['endtime'];
if (empty($old_endtime) || $old_endtime == '0000-00-00 00:00:00') {
$old_endtime = '';
}
//价格6元
$price = 6;
$newtcdate = $_REQUEST['newtcdate'];
if ($newtcdate == 'onemonth') {
if (!empty($old_endtime)) {
$endtime = date("Y-m-d H:i:s", strtotime("1 month", strtotime($old_endtime)));
} else {
$endtime = date("Y-m-d H:i:s", strtotime("1 month"));
}
$chargefee = $price * 1;
}
if ($newtcdate == 'threemonths') {
if (!empty($old_endtime)) {
$endtime = date("Y-m-d H:i:s", strtotime("3 months", strtotime($old_endtime)));
} else {
$endtime = date("Y-m-d H:i:s", strtotime("3 months"));
示例6: getTranslatedColumnFields
function getTranslatedColumnFields($module)
{
global $log;
global $current_language;
$import_mod_strings = return_specified_module_language($current_language, $module);
$log->debug("Entering getTranslatedColumnFields() method ...");
global $adb;
$column_fld = array();
$tabid = getTabid($module);
$sql = "select ec_field.* from ec_field inner join ec_def_org_field on ec_def_org_field.fieldid=ec_field.fieldid where ec_def_org_field.visible=0 and ec_field.tabid='" . $tabid . "' order by block,sequence";
$result = $adb->query($sql);
$noofrows = $adb->num_rows($result);
for ($i = 0; $i < $noofrows; $i++) {
$fieldname = $adb->query_result($result, $i, "fieldname");
$fieldlabel = $adb->query_result($result, $i, "fieldlabel");
if (isset($import_mod_strings[$fieldlabel])) {
$column_fld[$fieldname] = $import_mod_strings[$fieldlabel];
} else {
$column_fld[$fieldname] = $fieldlabel;
}
}
$log->debug("Exiting getTranslatedColumnFields method ...");
return $column_fld;
}
示例7: getTabid
<?php
$ModuleVar = $_REQUEST["ModuleVar"];
global $adb;
$tabid = getTabid($ModuleVar);
$printArray = array();
$query = "select ec_field.fieldlabel,columnname from ec_field where tabid='" . $tabid . "' and columnname=fieldname and uitype in(1,2,11,13,15,5,70,1021,1022,1023,21,19,87,86,85,88,71,17,7,9,56,33)";
$result = $adb->query($query);
global $current_language;
$cur_module_strings = return_specified_module_language($current_language, $ModuleVar);
//echo $query;
$num_rows = $adb->num_rows($result);
$optionsstr = "<option value=0 selected> " . $app_strings["LBL_NONE"] . " </option>";
$prefix = "var.";
if ($ModuleVar == "Accounts" || $ModuleVar == "Accounts" || $ModuleVar == "Accounts" || $ModuleVar == "Accounts" || $ModuleVar == "Accounts") {
}
switch ($ModuleVar) {
case "Accounts":
$prefix = "var.ACCOUNT_";
break;
case "Contacts":
$prefix = "var.CONTACT_";
break;
case "Vendors":
$prefix = "var.ACCOUNT_";
break;
case "Vcontacts":
$prefix = "var.CONTACT_";
break;
case "Products":
$prefix = "product.";
示例8: return_specified_module_language
<?php
$currentModule = $_REQUEST['relatedmodule'];
$mod_strings = return_specified_module_language($current_language, $currentModule);
include 'include/Ajax/UpdateCollectTotalInf.php';
示例9: addslashes
<?php
global $adb, $current_language;
$module = addslashes($_REQUEST["langmod"]);
$mod_lang = return_specified_module_language($current_language, $module);
$module_lang_labels = array_flip($mod_lang);
$module_lang_labels = array_flip($module_lang_labels);
asort($module_lang_labels);
$keys = implode('||', array_keys($module_lang_labels));
$values = implode('||', $module_lang_labels);
echo $keys . '|@|' . $values;
exit;
示例10: getCustomViewModuleInfo
function getCustomViewModuleInfo($module)
{
global $adb;
global $current_language;
$current_mod_strings = return_specified_module_language($current_language, $module);
$block_info = array();
$modules_list = explode(",", $module);
if ($module == "Calendar") {
$module = "Calendar','Events";
$modules_list = array('Calendar', 'Events');
}
// Tabid mapped to the list of block labels to be skipped for that tab.
$skipBlocksList = array(getTabid('Contacts') => array('LBL_IMAGE_INFORMATION'), getTabid('HelpDesk') => array('LBL_COMMENTS'), getTabid('Products') => array('LBL_IMAGE_INFORMATION'), getTabid('Faq') => array('LBL_COMMENT_INFORMATION'), getTabid('Quotes') => array('LBL_RELATED_PRODUCTS'), getTabid('PurchaseOrder') => array('LBL_RELATED_PRODUCTS'), getTabid('SalesOrder') => array('LBL_RELATED_PRODUCTS'), getTabid('Invoice') => array('LBL_RELATED_PRODUCTS'));
$Sql = "select distinct block,vtiger_field.tabid,name,blocklabel from vtiger_field inner join vtiger_blocks on vtiger_blocks.blockid=vtiger_field.block inner join vtiger_tab on vtiger_tab.tabid=vtiger_field.tabid where displaytype != 3 and vtiger_tab.name in (" . generateQuestionMarks($modules_list) . ") and vtiger_field.presence in (0,2) order by block";
$result = $adb->pquery($Sql, array($modules_list));
if ($module == "Calendar','Events") {
$module = "Calendar";
}
$pre_block_label = '';
while ($block_result = $adb->fetch_array($result)) {
$block_label = $block_result['blocklabel'];
$tabid = $block_result['tabid'];
// Skip certain blocks of certain modules
if (array_key_exists($tabid, $skipBlocksList) && in_array($block_label, $skipBlocksList[$tabid])) {
continue;
}
if (trim($block_label) == '') {
$block_info[$pre_block_label] = $block_info[$pre_block_label] . "," . $block_result['block'];
} else {
$lan_block_label = $current_mod_strings[$block_label];
if (isset($block_info[$lan_block_label]) && $block_info[$lan_block_label] != '') {
$block_info[$lan_block_label] = $block_info[$lan_block_label] . "," . $block_result['block'];
} else {
$block_info[$lan_block_label] = $block_result['block'];
}
}
$pre_block_label = $lan_block_label;
}
$this->module_list[$module] = $block_info;
return $this->module_list;
}
示例11: switch
global $adb, $current_language, $current_user, $mod_strings;
switch ($_REQUEST["handler"]) {
case "fill_lang":
$module = addslashes($_REQUEST["langmod"]);
$mod_lang = return_specified_module_language($current_language, $module);
$module_lang_labels = array_flip($mod_lang);
$module_lang_labels = array_flip($module_lang_labels);
asort($module_lang_labels);
$keys = implode('||', array_keys($module_lang_labels));
$values = implode('||', $module_lang_labels);
echo $keys . '|@|' . $values;
break;
case "confirm_portal":
$module = addslashes($_REQUEST["langmod"]);
$curr_templatename = $_REQUEST["curr_templatename"];
$mod_lang = return_specified_module_language($current_language, "XMLExport4You");
$sql = "SELECT filename\n FROM vtiger_xmlexport4you\n INNER JOIN vtiger_xmlexport4you_settings USING(templateid)\n WHERE is_portal=? AND module=?";
$params = array("1", $module);
$result = $adb->pquery($sql, $params);
$confirm = "";
if ($adb->num_rows($result) > 0) {
$templatename = $adb->query_result($result, 0, "filename");
$confirm = $mod_lang["LBL_XMLEXPORT4YOU_TEMPLATE"] . " '" . $templatename . "' " . $mod_lang["LBL_REPLACED_PORTAL_TEMPLATE"] . " '" . $curr_templatename . "' " . $mod_lang["LBL_AS_PORTAL_TEMPLATE"];
} else {
$confirm = $mod_lang["LBL_VTIGER_TEMPLATE"] . " " . $mod_lang["LBL_REPLACED_PORTAL_TEMPLATE"] . " '" . $curr_templatename . "' " . $mod_lang["LBL_AS_PORTAL_TEMPLATE"];
}
echo $confirm;
break;
case "templates_order":
$inStr = $_REQUEST["tmpl_order"];
$inStr = rtrim($inStr, "#");
示例12: export_all
function export_all($type)
{
global $log, $list_max_entries_per_page;
$log->debug("Entering export_all(" . $type . ") method ...");
global $adb;
$focus = 0;
$content = '';
if ($type != "") {
//changed by dingjianting on 2009-2-15 for supporting new module
require_once "modules/{$type}/{$type}.php";
$focus = new $type();
}
$log = LoggerManager::getLogger('export_' . $type);
$where = '';
/*
if ( isset($_REQUEST['all']) )
{
$where = '';
}
else
{
$where = $_SESSION['export_where'];
}
*/
if (!isset($_REQUEST['allids']) || $_REQUEST['allids'] == "") {
$where = "";
} else {
$allids = str_replace(";", ",", $_REQUEST['allids']);
$allids = substr($allids, 0, -1);
$where = $crmid . " in (" . $allids . ")";
}
$search_type = $_REQUEST['search_type'];
$export_data = $_REQUEST['export_data'];
$viewname = $_REQUEST['viewname'];
$entityArr = getEntityTable($type);
$ec_crmentity = $entityArr["tablename"];
$entityidfield = $entityArr["entityidfield"];
$crmid = $ec_crmentity . "." . $entityidfield;
$order_by = "";
$query = $focus->create_export_query($order_by, $where);
if (isset($_SESSION['export_where']) && $_SESSION['export_where'] != '' && $search_type == 'includesearch') {
$where = $_SESSION['export_where'];
$query .= ' and (' . $where . ') ';
}
if (($search_type == 'withoutsearch' || $search_type == 'includesearch') && $export_data == 'selecteddata') {
$idstring = str_replace(";", ",", $_REQUEST['idstring']);
$idstring = substr($idstring, 0, -1);
if ($idstring != "") {
$query .= ' and ' . $crmid . ' in (' . $idstring . ')';
}
}
if ($export_data == 'vieweddata' && $viewname != "" && $viewname != 0) {
$oCustomView = new CustomView($type);
if ($type == "SalesOrder" || $type == "PurchaseOrder") {
$query = $oCustomView->getExportModifiedCvListQuery($viewname, $query, $type, true);
//getModifiedCvListQuery
} else {
$query = $oCustomView->getExportModifiedCvListQuery($viewname, $query, $type, false);
//getModifiedCvListQuery
}
}
if (isset($_SESSION['nav_start']) && $_SESSION['nav_start'] != '' && $export_data == 'currentpage') {
$start_rec = $_SESSION['nav_start'];
$limit_start_rec = $start_rec == 0 ? 0 : $start_rec - 1;
$query_order_by = $crmid;
$sorder = "desc";
$result = $adb->limitQuery2($query, $limit_start_rec, $list_max_entries_per_page, $query_order_by, $sorder);
} else {
$query .= " order by " . $crmid . " desc";
$result = $adb->query($query, true, "Error exporting {$type}: " . "<BR>{$query}");
}
$numRows = $adb->num_rows($result);
$fields_array = $adb->getFieldsArray($result);
global $current_language;
$spec_mod_strings = return_specified_module_language($current_language, $type);
foreach ($fields_array as $key => $fieldlabel) {
if (isset($spec_mod_strings[$fieldlabel])) {
$fields_array[$key] = $spec_mod_strings[$fieldlabel];
}
}
$header = implode("\",\"", array_values($fields_array));
$header = "\"" . $header;
$header .= "\"\r\n";
$content .= $header;
$column_list = implode(",", array_values($fields_array));
while ($val = $adb->fetchByAssoc($result, -1, false)) {
$new_arr = array();
foreach ($val as $key => $value) {
if ($key == "description") {
$value = br2nl_vt($value);
}
array_push($new_arr, preg_replace("/\"/", "\"\"", $value));
}
$line = implode("\",\"", $new_arr);
$line = "\"" . $line;
$line .= "\"\r\n";
$content .= $line;
}
$log->debug("Exiting export_all method ...");
//.........这里部分代码省略.........
示例13: getSelectedValuesToSmarty
//.........这里部分代码省略.........
$userNameStr = "";
$m = 0;
foreach ($user_array as $userid => $username) {
if ($userid != $this->current_user->id) {
if ($m != 0) {
$userIdStr .= ",";
$userNameStr .= ",";
}
$userIdStr .= "'" . $userid . "'";
$userNameStr .= "'" . escape_single_quotes(decode_html($username)) . "'";
$m++;
}
}
require_once 'include/utils/GetUserGroups.php';
// ITS4YOU-UP SlOl 26. 4. 2013 9:47:59
$template_owners = get_user_array(false);
if (isset($this->reportinformations["owner"]) && $this->reportinformations["owner"] != "") {
$selected_owner = $this->reportinformations["owner"];
} else {
$selected_owner = $this->current_user->id;
}
$smarty_obj->assign("TEMPLATE_OWNERS", $template_owners);
$owner = isset($_REQUEST['template_owner']) && $_REQUEST['template_owner'] != '' ? $_REQUEST['template_owner'] : $selected_owner;
$smarty_obj->assign("TEMPLATE_OWNER", $owner);
$sharing_types = array("public" => vtranslate("PUBLIC_FILTER"), "private" => vtranslate("PRIVATE_FILTER"), "share" => vtranslate("SHARE_FILTER"));
$smarty_obj->assign("SHARINGTYPES", $sharing_types);
$sharingtype = "public";
if (isset($_REQUEST['sharing']) && $_REQUEST['sharing'] != '') {
$sharingtype = $_REQUEST['sharing'];
} elseif (isset($this->reportinformations["sharingtype"]) && $this->reportinformations["sharingtype"] != "") {
$sharingtype = $this->reportinformations["sharingtype"];
}
$smarty_obj->assign("SHARINGTYPE", $sharingtype);
$cmod = return_specified_module_language($current_language, "Settings");
$smarty_obj->assign("CMOD", $cmod);
$sharingMemberArray = array();
if (isset($_REQUEST['sharingSelectedColumns']) && $_REQUEST['sharingSelectedColumns'] != '') {
$sharingMemberArray = explode("|", trim($_REQUEST['sharingSelectedColumns'], "|"));
} elseif (isset($this->reportinformations["members_array"]) && !empty($this->reportinformations["members_array"])) {
$sharingMemberArray = $this->reportinformations["members_array"];
}
$sharingMemberArray = array_unique($sharingMemberArray);
if (count($sharingMemberArray) > 0) {
$outputMemberArr = array();
foreach ($sharingMemberArray as $setype => $shareIdArr) {
$shareIdArr = explode("::", $shareIdArr);
$shareIdArray = array();
$shareIdArray[$shareIdArr[0]] = $shareIdArr[1];
foreach ($shareIdArray as $shareType => $shareId) {
switch ($shareType) {
case "groups":
$memberName = fetchGroupName($shareId);
$memberDisplay = "Group::";
break;
case "roles":
$memberName = getRoleName($shareId);
$memberDisplay = "Roles::";
break;
case "rs":
$memberName = getRoleName($shareId);
$memberDisplay = "RoleAndSubordinates::";
break;
case "users":
$memberName = getUserFullName($shareId);
$memberDisplay = "User::";
break;
示例14: x21
private function x21($efocus)
{
global $x0b, $x0c, $x0d, $x0e, $x0f, $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17, $x18, $x19, $x1a, $x1b, $x1c, $x1d, $x1e, $x1f, $x20, $x21, $x22, $x23, $x24, $x25, $x26;
$commentlist = "";
$prefix = "";
if ($efocus->column_fields["record_module"] == "HelpDesk") {
$prefix = "ticket";
} elseif ($efocus->column_fields["record_module"] == "Faq") {
$prefix = "faq";
}
if ($prefix != "") {
$mod_lang = return_specified_module_language($this->language, $efocus->column_fields["record_module"]);
$sql = "SELECT * FROM vtiger_" . $prefix . "comments WHERE " . $prefix . "id=" . $efocus->id;
$result = $this->db->query($sql);
while ($row = $this->db->fetchByAssoc($result)) {
$comment = $row["comments"];
$crtime = getValidDisplayDate($row["createdtime"]);
$body = "";
if ($prefix == "ticket") {
$author = $this->x19($row["ownerid"]);
$body = $comment . "<br />" . $mod_lang["LBL_AUTHOR"] . ": " . $author . "<br />" . $mod_lang["Created Time"] . ": " . $crtime . "<br /><br />";
} else {
$body = $comment . "<br />" . $mod_lang["Created Time"] . ": " . $crtime . "<br /><br />";
}
$commentlist .= $body;
}
}
return $commentlist;
}
示例15: getCollectColumnOpts
function getCollectColumnOpts()
{
global $adb;
global $app_strings, $current_language;
$current_module = $this->reportmodule;
$tabid = getTabid($current_module);
$mod_strings = return_specified_module_language($current_language, $current_module);
$collectopts = "";
$selected = "";
if ($this->type == 'count') {
$selected = "selected";
}
$collectopts .= "<option value='count' {$selected}>记录数</option>";
if ($this->type == 'sum') {
$selectoptval = implode(";", $this->collectcolumnfield);
}
$ssql = "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 inner join ec_tab on ec_tab.tabid = ec_field.tabid where ec_field.uitype != 50 and ec_field.tabid=" . $tabid . " and ec_field.displaytype = 1 union select * from ec_field where ec_field.displaytype=3 and ec_field.tabid=" . $tabid . " order by sequence";
// echo $ssql;
$result = $adb->query($ssql);
while ($row = $adb->fetch_array($result)) {
$fieldtablename = $row["tablename"];
$fieldcolname = $row["columnname"];
$fieldname = $row["fieldname"];
$fieldtype = $row["typeofdata"];
$fieldtype = explode("~", $fieldtype);
$fieldtypeofdata = $fieldtype[0];
$fieldlabel = $row["fieldlabel"];
if (isset($mod_strings[$fieldlabel])) {
$fieldlabel = $mod_strings[$fieldlabel];
} elseif (isset($app_strings[$fieldlabel])) {
$fieldlabel = $app_strings[$fieldlabel];
}
$optionvalue = "{$fieldlabel};{$fieldname};{$fieldtablename};{$fieldcolname}";
$columnname = substr($fieldcolname, -2);
if (($fieldtype[0] == "N" || $fieldtype[0] == "NN" || $fieldtype[0] == "I") && $columnname != "id") {
$selected = "";
if ($this->type == 'sum' && $optionvalue == $selectoptval) {
$selected = "selected";
}
$collectopts .= "<option value='{$optionvalue}' {$selected}>{$fieldlabel}</option>";
}
}
return $collectopts;
}