本文整理汇总了PHP中returntablecolumn函数的典型用法代码示例。如果您正苦于以下问题:PHP returntablecolumn函数的具体用法?PHP returntablecolumn怎么用?PHP returntablecolumn使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了returntablecolumn函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: newai_list_one
function newai_list_one()
{
global $db, $common_html, $tablename_one, $tablename_two, $link;
global $html_etc_one, $html_etc_two, $columns_one, $columns_two;
global $tablename, $SYTEM_CONFIG_TABLE;
global $SUNSHINE_USER_NAME_VAR, $SUNSHINE_USER_ID_VAR, $_SESSION;
$USER_NAME = $_SESSION[$SUNSHINE_USER_NAME_VAR];
print "<SCRIPT language=JavaScript>\n\tfunction clickMenu(url){\n\tparent.main_body.location=url;\n\t}\n\t</SCRIPT>\n\t";
$one_array = explode(':', $tablename_one);
//print_R($one_array);
$link_array = explode(':', $link);
//print_R($link_array);
$columns = returntablecolumn($tablename);
$columns_one = returntablecolumn($one_array[0]);
$html_etc_one = returnsystemlang($one_array[0], $SYTEM_CONFIG_TABLE);
switch ($db->databaseType) {
case 'mysql':
switch ($one_array[3]) {
case 'name':
$sql_one = "select " . $columns_one[(string) $one_array[1]] . "," . $columns_one[(string) $one_array[2]] . " from " . $one_array[0] . " where " . $columns_one[(string) $one_array[4]] . "='" . $USER_NAME . "'";
break;
case 'id':
$sql_one = "select " . $columns_one[(string) $one_array[1]] . "," . $columns_one[(string) $one_array[2]] . " from " . $one_array[0] . "";
break;
default:
$sql_one = "select " . $columns_one[(string) $one_array[1]] . "," . $columns_one[(string) $one_array[2]] . " from " . $one_array[0] . "";
break;
}
break;
case 'mssql':
switch ($one_array[3]) {
case 'name':
$sql_one = "select [" . $columns_one[(string) $one_array[1]] . "],[" . $columns_one[(string) $one_array[2]] . "] from [" . $one_array[0] . "] where [" . $columns_one[(string) $one_array[4]] . "]='" . $USER_NAME . "'";
break;
case 'id':
$sql_one = "select [" . $columns_one[(string) $one_array[1]] . "],[" . $columns_one[(string) $one_array[2]] . "] from [" . $one_array[0] . "]";
break;
default:
$sql_one = "select [" . $columns_one[(string) $one_array[1]] . "],[" . $columns_one[(string) $one_array[2]] . "] from [" . $one_array[0] . "]";
break;
}
break;
}
//print $sql_one;
$rs_one = $db->CacheExecute(150, $sql_one);
if ($rs_one->RecordCount() == 0) {
print_infor($common_html['common_html']['norecord'], 'trip');
exit;
}
while (!$rs_one->EOF) {
if (StrLen($link_array[3]) > 2) {
$LinkIndexName = (string) $link_array[3];
} else {
$LinkIndexName = $columns[(string) $link_array[3]];
}
$url = $link_array[0] . "?" . $link_array[1] . "=" . $link_array[2] . "&" . $LinkIndexName . "=" . $rs_one->fields[(string) $columns_one[(string) $one_array[1]]];
print "\n\t<TABLE class=small cellSpacing=1 cellPadding=0 width='100%' align=center bgColor=#000000 border=0>\n\t<TBODY>\n\t<TR class=TableContent title='' style='CURSOR: hand'\t onclick=clickMenu('{$url}')>\n\t<TD noWrap align=middle><table class=small cellPadding=3 align=center width=100% border=0 onmouseover=bgColor='#ffffff' onmouseout=bgColor='#d3e5fa'>\n\t<Tr><td align=middle><B>" . $rs_one->fields[(string) $columns_one[(string) $one_array[2]]] . "</B></TD></TR>\n\t</table></TD></TR>\n\t</TBODY></TABLE>\n";
$rs_one->MoveNext();
}
}
示例2: newai_chart
function newai_chart()
{
global $common_html;
global $table, $field, $filter, $mark, $title, $type, $time, $type;
global $_POST, $_GET;
$table_array = explode('::', $table);
//print_R($table_array);
$field_array = explode('::', $field);
$filter_array = explode('::', $filter);
$mark_array = explode('::', $mark);
$title_array = explode('::', $title);
$type_array = explode('::', $type);
$time_array = explode('::', $time);
for ($i = 0; $i < sizeof($table_array); $i++) {
$columns = returntablecolumn($table_array[$i]);
$fieldname = $columns[(string) $field_array[$i]];
$filter_element_array = explode(':', $filter_array[$i]);
$columns_filter = returntablecolumn($filter_element_array[1]);
$showvalue = $columns_filter[(string) $filter_element_array[2]];
$showfield = $columns_filter[(string) $filter_element_array[3]];
$filename = $fieldname . "_" . $type_array[$i] . "_" . date(Y_m_d_H) . ".png";
//exit;
if ($_GET['action'] == 'chart_model' && $_GET['modelname'] != '') {
$filename = $_GET['modelname'] . "_" . $filename;
}
if ($_GET['action'] == 'chart_user' && $_GET['USER_NAME'] != '') {
$filename = $_GET['USER_NAME'] . "_" . $filename;
}
if ($_GET['action'] == 'chart_project' && $_GET['projectid'] != '') {
$filename = $_GET['projectid'] . "_" . $filename;
}
//print $filename;exit;
$filedirname = "../cache/statics";
if (!is_dir($filedirname)) {
mkdir($filedirname);
}
$filename = $filedirname . "/" . $filename;
$showtable = $filter_element_array[1];
$mode = $filter_element_array[0];
//print $filename;exit;
file_exists($filename) ? '' : ($filename = table_analyze($table_array[$i], $fieldname, $showtable, $showfield, $showvalue, $mode, $type_array[$i], $mark_array[$i], $title_array[$i]));
file_exists($filename) ? print "<div align=center><img src='{$filename}' border=0/></div><BR>" : '';
}
}
示例3: relatePrice_add
function relatePrice_add($fields, $i)
{
global $html_etc, $tablename, $db;
$product_columns = returntablecolumn('product');
$priceArray = array();
foreach ($product_columns as $row) {
if (stristr($row, "sellprice") != false) {
$priceArray[$row] = '';
}
}
$sql = "select fieldname,chinese from systemlang where tablename='product'";
$rs = $db->Execute($sql);
$rs_a = $rs->GetArray();
foreach ($rs_a as $row) {
if (isset($priceArray[$row['fieldname']])) {
$priceArray[$row['fieldname']] = $row['chinese'];
}
}
print_array_select('relatePrice', $html_etc[$tablename]['relatePrice'], 2, $priceArray, $fields['value']['relatePrice']);
}
示例4: newai_list_two
function newai_list_two()
{
global $db, $common_html, $tablename_one, $tablename_two, $link;
global $html_etc_one, $html_etc_two, $columns_one, $columns_two;
global $tablename, $SYTEM_CONFIG_TABLE;
print "<SCRIPT language=JavaScript>\n\tfunction clickMenu(ID){ \n\t targetelement=document.all(ID);\n\tif (targetelement.style.display=='none')\n\t\t\ttargetelement.style.display='';\n\telse\n\t targetelement.style.display='none';\n\t }\n\t</SCRIPT>\n\t";
$one_array = explode(':', $tablename_one);
$two_array = explode(':', $tablename_two);
$link_array = explode(':', $link);
$columns = returntablecolumn($tablename);
$columns_one = returntablecolumn($one_array[0]);
$html_etc_one = returnsystemlang($one_array[0], $SYTEM_CONFIG_TABLE);
$columns_two = returntablecolumn($two_array[0]);
$html_etc_two = returnsystemlang($two_array[0], $SYTEM_CONFIG_TABLE);
$sql_one = "select " . $columns_one[(string) $one_array[1]] . "," . $columns_one[(string) $one_array[2]] . " from " . $one_array[0] . "";
$rs_one = $db->Execute($sql_one);
$Number = $rs_one->RecordCount();
if ($Number == 0) {
print_infor($common_html['common_html']['norecord'], 'trip');
exit;
}
while (!$rs_one->EOF) {
print "\n\t<TABLE class=small cellSpacing=1 cellPadding=0 width='100%' align=center bgColor=#000000 border=0>\n\t<TBODY>\n\t<TR bgColor='#d3e5fa' title='' style='CURSOR: hand'\t onclick=clickMenu('" . $rs_one->fields[(string) $columns_one[(string) $one_array[1]]] . "')>\n\t<TD noWrap align=middle><table class=small cellPadding=3 align=center width=100% border=0 onmouseover=bgColor='#ffffff' onmouseout=bgColor='#d3e5fa'>\n\t<Tr><td align=middle><B>" . $rs_one->fields[(string) $columns_one[(string) $one_array[2]]] . "</B></TD></TR>\n\t</table></TD></TR>\n\t</TBODY></TABLE>\n";
$one_id = $rs_one->fields[(string) $columns_one[(string) $one_array[1]]];
$sql_two = "select " . $columns_two[(string) $two_array[1]] . "," . $columns_two[(string) $two_array[2]] . " from " . $two_array[0] . " where " . $columns_two[(string) $two_array[3]] . "='{$one_id}'";
$rs_two = $db->Execute($sql_two);
//print $sql_two;//exit;
print "\n\t<TABLE class=small id={$one_id} style='DISPLAY: none'\n\tcellSpacing=1 cellPadding=0 width='100%' bgColor=#000000 border=0>\n\t<TBODY>\n";
while (!$rs_two->EOF) {
$two_id = $rs_two->fields[(string) $columns_two[(string) $two_array[1]]];
$two_name = $rs_two->fields[(string) $columns_two[(string) $two_array[2]]];
print "<TR class=TableData align=middle height=20>\n\t<TD noWrap><A href='" . $link_array[0] . "?" . $link_array[1] . "=" . $link_array[2] . "&" . $columns[(string) $link_array[3]] . "={$two_id}&" . $columns_one[(string) $one_array[1]] . "={$one_id}' target=\"main_body\">" . $two_name . "</A>\n\t</TD></TR>\n";
$rs_two->MoveNext();
}
print "</TBODY></TABLE>\n";
$rs_one->MoveNext();
}
}
示例5: newai_tree
function newai_tree()
{
global $db, $common_html, $tablename_one, $tablename_two, $link, $tablename_three;
global $html_etc_one, $html_etc_two, $columns_one, $columns_two;
global $tablename;
require_once 'lib/function_menu.php';
system_menu_css();
global $db;
$tablename_one_array = explode(":", $tablename_one);
$tablename_two_array = explode(":", $tablename_two);
$tablename_three_array = explode(":", $tablename_three);
$columns_one = returntablecolumn($tablename_one_array[0]);
$columns_two = returntablecolumn($tablename_two_array[0]);
$columns_three = returntablecolumn($tablename_three_array[0]);
$sql = "select " . $columns_one[$tablename_one_array[1]] . "," . $columns_one[$tablename_one_array[2]] . " from " . $tablename_one_array[0] . "";
$rs_dept = $db->Execute($sql);
$rs_dept_array = $rs_dept->GetArray();
for ($i = 0; $i < sizeof($rs_dept_array); $i++) {
$newarray_dept[(string) $rs_dept_array[$i][(string) $columns_one[$tablename_one_array[1]]]] = $rs_dept_array[$i][(string) $columns_one[$tablename_one_array[2]]];
$newarray_dept_list['DEPT_NO'][$i] = $rs_dept_array[$i][(string) $columns_one[$tablename_one_array[1]]];
$newarray_dept_list['DEPT_NAME'][$i] = $rs_dept_array[$i][(string) $columns_one[$tablename_one_array[2]]];
}
$sql_major = "select " . $columns_two[$tablename_two_array[1]] . "," . $columns_two[$tablename_two_array[2]] . "," . $columns_two[$tablename_two_array[3]] . " from " . $tablename_two_array[0] . "";
$rs_major = $db->Execute($sql_major);
$rs_major_array = $rs_major->GetArray();
for ($i = 0; $i < sizeof($rs_major_array); $i++) {
$newarray_major[(string) $rs_major_array[$i][(string) $columns_two[$tablename_two_array[3]]]][(string) $rs_major_array[$i][(string) $columns_two[$tablename_two_array[1]]]] = $rs_major_array[$i][(string) $columns_two[$tablename_two_array[2]]];
$newarray_major_list[(string) $rs_major_array[$i][(string) $columns_two[$tablename_two_array[1]]]] = $rs_major_array[$i][(string) $columns_two[$tablename_two_array[2]]];
$newarray_major_list[(string) $rs_major_array[$i][(string) $columns_two[$tablename_two_array[3]]]][$i] = $rs_major_array[$i][(string) $columns_two[$tablename_two_array[1]]];
}
$sql_class = "select " . $columns_three[$tablename_three_array[1]] . "," . $columns_three[$tablename_three_array[2]] . "," . $columns_three[$tablename_three_array[3]] . " from " . $tablename_three_array[0] . "";
$rs_class = $db->Execute($sql_class);
$rs_class_array = $rs_class->GetArray();
for ($i = 0; $i < sizeof($rs_class_array); $i++) {
$newarray_class[(string) $rs_class_array[$i][(string) $columns_three[$tablename_three_array[3]]]][(string) $rs_class_array[$i][(string) $columns_three[$tablename_three_array[1]]]] = $rs_class_array[$i][(string) $columns_three[$tablename_three_array[2]]];
$newarray_class_list[(string) $rs_class_array[$i][(string) $columns_three[$tablename_three_array[1]]]] = $rs_class_array[$i][(string) $columns_three[$tablename_three_array[2]]];
$newarray_class_list[(string) $rs_class_array[$i][(string) $columns_three[$tablename_three_array[3]]]][$i] = $rs_class_array[$i][(string) $columns_three[$tablename_three_array[1]]];
}
foreach ($newarray_dept_list['DEPT_NO'] as $DEPT_NO_LIST) {
parent_table_1($newarray_dept[(string) $DEPT_NO_LIST], "system.gif", "MENU_" . $DEPT_NO_LIST, $image = 'tree_plus.gif', $addfile = 'A_Ban_newai.php?action=tree_student');
part_table_begin($id = "MENU_" . $DEPT_NO_LIST);
if (!is_array($newarray_major_list[(string) $DEPT_NO_LIST])) {
$newarray_major_list[(string) $DEPT_NO_LIST] = array();
}
foreach ($newarray_major_list[(string) $DEPT_NO_LIST] as $MAJOR_LIST) {
parent_table_2($newarray_major_list[$MAJOR_LIST], $pic = 'system.gif', "MENU_" . $MAJOR_LIST, 'tree_plus.gif', 'tree_line.gif', $addfile = 'A_Ban_newai.php?action=tree_student');
part_table_begin("MENU_" . $MAJOR_LIST);
if (!is_array($newarray_class_list[(string) $MAJOR_LIST])) {
$newarray_class_list[(string) $MAJOR_LIST] = array();
}
foreach ($newarray_class_list[(string) $MAJOR_LIST] as $CLASS_LIST) {
menu_table_3($newarray_class_list[$CLASS_LIST], $linkurl = "A_Stu_newai.php?action=init_default&所属班号={$CLASS_LIST}", $pic = 'system.gif', $tree_pic = "tree_blank.gif", $tree_pic2 = "tree_line.gif", $tree_pic3 = 'tree_line.gif', $addfile = 'A_Ban_newai.php?action=tree_student');
}
part_table_end();
}
//end rs_major_array
part_table_end();
}
//end rs_dept_array
system_menu_js($location = 'parent.main_body');
}
示例6: newai_dataline
function newai_dataline($modulename, $functionname = "dataline_view")
{
global $SUNSHINE_USER_NAME_VAR;
global $SUNSHINE_USER_ID_VAR;
global $_SESSION;
global $common_html;
global $db;
global $file_ini;
global $array_index;
global $SUNSHINE_USER_DEPT_VAR;
$USER_ID = $_SESSION[$SUNSHINE_USER_NAME_VAR];
$tablename = $file_ini[$modulename]['tablename'];
$primarykey = $file_ini[$modulename]['primarykey'];
$primaryname = $file_ini[$modulename]['primaryname'];
$date = $file_ini[$modulename]['date'];
$link = $file_ini[$modulename]['link'];
$width = $file_ini[$modulename]['width'];
$reader = $file_ini[$modulename]['reader'];
$format = $file_ini[$modulename]['format'];
$hidden_field = $file_ini[$modulename]['hidden_field'];
$columns = returntablecolumn($tablename);
$html_etc = returnsystemlang($tablename);
$primarykey_index = $columns[$primarykey];
$primaryname_index = $columns[$primaryname];
$date_index = $columns[$date];
$reader_index = $columns[$reader];
$list['index']['id'] = $primarykey_index;
$list['index']['name'] = $primaryname_index;
$list['index']['date'] = $date_index;
$list['index']['reader'] = $reader_index;
$list['index']['format'] = $format_index;
$hidden_field_array = explode(",", $hidden_field);
$i = 0;
for (; $i < sizeof($hidden_field_array); ++$i) {
$element = explode(":", $hidden_field_array[$i]);
$index_name = $columns[(bool) $element[1]];
switch ($element[2]) {
case "name":
$index_id = $USER_ID;
$index[++$j - 1] = $index_name . "='" . $index_id . "'";
break;
case "dept":
$index_id = $_SESSION[$SUNSHINE_USER_DEPT_VAR];
$index[++$j - 1] = $index_name . "='" . $index_id . "' or " . $index_name . "='0'";
}
}
is_array($index) ? $index_sql = join(" ", $index) : ($index_sql = "");
6 < strlen($index_sql) ? $index_sql = "where " . $index_sql : ($index_sql = "");
switch ($functionname) {
case "url_dataline_view":
$functionname = "url_dataline_view";
$sql = "select {$primarykey_index},{$primaryname_index},{$date_index},{$reader_index},USER from {$tablename} where USER='' or USER='{$USER_ID}' order by {$date_index}";
$rs = $db->selectlimit($sql, 60);
break;
case "dataline_view":
$functionname = "dataline_view";
$reader_index == "" ? "" : ($reader_index = "," . $reader_index);
$sql = "select {$primarykey_index},{$primaryname_index},{$date_index}" . $reader_index . " from {$tablename} {$index_sql} order by {$date_index} desc";
$rs = $db->selectlimit($sql, 6);
break;
default:
$functionname = "dataline_view";
$sql = "select {$primarykey_index},{$primaryname_index},{$date_index},{$reader_index} from {$tablename} {$index_sql} order by {$date_index} desc";
$rs = $db->selectlimit($sql, 6);
break;
}
$rs_a = $rs->getarray();
$list['body'] = $rs_a;
$list['header']['name'] = $common_html['common_html'][$tablename];
$list['bottom'] = $common_html['common_html']['more'];
$list['link'] = $link;
$list['width'] = $width;
$list['format'] = $format;
$list['tablename'] = $tablename;
$functionname($list);
}
示例7: returntablecolumn
print "<tr class=TableData><td colspan=1>" . $人员 . "[{$人员用户名}]</td>";
for ($iX = 0; $iX < sizeof($Header); $iX++) {
$状态 = $Header[$iX];
print "<td colspan=1> <a href=\"?action=StaticSingleTeacher&开始时间={$开始时间}&结束时间={$结束时间}&人员用户名={$人员用户名}&TYPE={$状态}\" target=_blank>" . $Text[$状态] . "</a></td>";
}
print "</tr>";
//}
}
exit;
}
//数据明细
if ($_GET['action'] == "StaticSingleTeacher" && $_GET['开始时间'] != "" && $_GET['结束时间'] != "" && $_GET['人员用户名'] != "") {
$DateMonth = $_GET['Month'];
$人员用户名 = $_GET['人员用户名'];
$TYPE = $_GET['TYPE'];
$Column = returntablecolumn("edu_xingzheng_kaoqinmingxi");
//$DateMonthArray = explode('-',$DateMonth);
//$本月天数 = date("t",mktime(1,1,1,$DateMonthArray[1],1,$DateMonthArray[0]));
//$开始时间 = date("Y-m-d",mktime(1,1,1,$DateMonthArray[1],1,$DateMonthArray[0]));
//$结束时间 = date("Y-m-d",mktime(1,1,1,$DateMonthArray[1],$本月天数,$DateMonthArray[0]));
print "\n<table width=100% align=center class=TableBlock>\n<tr class=TableHeader>\n<td colspan=" . sizeof($Column) . "+3>行政人员打卡考勤管理(统计时间:" . $开始时间 . " 至 " . $结束时间 . " 行政人员姓名:{$人员用户名} 统计项:{$TYPE})[上班和下班按两次进行统计] <input type=button value=\"关 闭\" class=\"SmallButton\" onclick=\"window.close();\"></td>\n</tr>\n<tr class=TableHeader>";
//array_shift($Column);
for ($i = 0; $i < sizeof($Column); $i++) {
print "<td nowrap>" . $Column[$i] . "</td>";
}
print "</tr>";
//print_R($_GET);
switch ($TYPE) {
case '总需考勤次数':
$AddSql = "";
break;
示例8: print_select
function print_select($showtext, $showfield, $value, $tablename2, $field_value, $field_name, $colspan = 1, $setfieldname = '', $setfieldvalue = '', $setfieldboolean = '', $initvalue = '')
{
global $db, $_GET;
global $_SESSION;
global $FORM_SELECT_DISABLED;
global $html_etc, $tablename;
global $SYSTEM_SELECT_MENU_SHOW_KEY;
//print $SYSTEM_SELECT_MENU_SHOW_KEY;
//用户类型限制条件##########################开始
global $fields;
//print_R($fields['USER_PRIVATE'][$showfield]);
if ($fields['USER_PRIVATE'][$showfield] != "") {
$readonly = $fields['USER_PRIVATE'][$showfield];
$class = "SmallStatic";
} else {
$readonly = "";
$class = "SmallSelect";
}
if ($_GET["" . $showfield . "_disabled"] == "disabled") {
$readonly = "disabled";
$class = "SmallStatic";
$showFieldName = returntablefield($tablename2, $field_value, $_GET[$showfield], $field_name);
print "<TR>";
print "<TD class=TableData noWrap>" . $showtext . "</TD>\n";
print "<TD class=TableData noWrap colspan=\"{$colspan}\">\n";
print "<input type=hidden name=\"{$showfield}\" value=\"" . $_GET[$showfield] . "\"/>\n";
if ($SYSTEM_SELECT_MENU_SHOW_KEY == 1) {
print "<font color=green>" . $showFieldName . "[" . $_GET[$showfield] . "]</font>\n";
} else {
print "<font color=green>{$showFieldName}</font>\n";
}
print "</TD></TR>\n";
return;
}
//print_R($_GET);
//用户类型限制条件##########################结束
global $fields;
global $columns;
//print_R($columns);
//print_R($initvalue);exit;
$sql = "select distinct {$field_value},{$field_name} from {$tablename2}";
print $initvalue;
if ($initvalue != "") {
$columnschild = returntablecolumn($tablename2);
$组名称 = $columnschild[$initvalue];
if ($_GET[$组名称] != "") {
//print_R($_GET);
$sql = $sql . " where {$组名称} = " . $_GET[$组名称] . "";
}
}
//$外加字段
//print $sql;
$rs = $db->CacheExecute(30, $sql);
//实时更新界面语言说明
$showtext = FilterFieldName($showtext, $showfield);
print "<TR>";
print "<TD class=TableData noWrap>" . $showtext . "</TD>\n";
print "<TD class=TableData noWrap colspan=\"{$colspan}\">\n";
//#########################################################
//定义指定其它字段可用功能模块
if ($setfieldname != "" && $setfieldvalue != "" && $setfieldboolean != "") {
//何时设定未使用:当不为最后一个时,即为不能使用状态
if ($setfieldvalue != $value) {
$FORM_SELECT_DISABLED[$setfieldname] = 'disabled';
}
print "\n\t\t<script>\n\t\tfunction changeselect" . $setfieldname . "(locationid)\n\t\t{\n\t\t\tif(locationid == '" . $setfieldvalue . "')\t\t{\n\t\t\t\tdocument.form1." . $setfieldname . ".disabled = false;\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tdocument.form1." . $setfieldname . ".disabled = true;\n\t\t\t}\n\t\t}\n\t\t</script>\n\t";
}
//#########################################################
print "<input type=hidden name='" . $showfield . "_原始值' value='{$value}'>\n";
print "<select class=\"{$class}\" name=\"{$showfield}\" title='" . $fields['USER_PRIVATE_TEXT'][$showfield] . "' ";
//修改功能,变指定列为未使用功能
if ($setfieldname != "" && $setfieldvalue != "" && $setfieldboolean != "") {
print " onChange=\"changeselect" . $setfieldname . "(this.value)\" ";
}
//系统初始化时,是否使用;
print $FORM_SELECT_DISABLED[$showfield];
//变回车为Tab Key功能
print " onkeydown=\"if(event.keyCode==13)event.keyCode=9\" {$readonly}>\n";
//处理数据区==00
if ($tablename2 == 'department') {
print "<option value=''>======[单位]</option>\n";
}
//处理数据区
while (!$rs->EOF) {
if ($value == $rs->fields[$field_value] || $_GET[$showfield] == $rs->fields[$field_value]) {
$temp = 'selected';
}
//对部门信息进行特别处理
if ($tablename2 == 'department' && $value == "") {
$SUNSHINE_USER_DEPT = $_SESSION['SUNSHINE_USER_DEPT'];
if ($rs->fields[$field_value] == $SUNSHINE_USER_DEPT) {
$temp = 'selected';
}
}
//对用户信息进行特别处理
if ($tablename2 == 'user' && $value == "") {
$SUNSHINE_USER_NAME = $_SESSION['SUNSHINE_USER_NAME'];
if ($rs->fields[$field_value] == $SUNSHINE_USER_NAME) {
$temp = 'selected';
}
//.........这里部分代码省略.........
示例9: newai_import_XLS
//.........这里部分代码省略.........
if ($sql_where != '') {
$exists_sql_text = "select count(*) as num from {$tablename} where 1=1" . $sql_where;
$rs = $db->Execute($exists_sql_text);
$rs_a = $rs->GetArray();
if ($rs_a[0][num] != 0) {
$uniquekey_error_sig = true;
$is_error = true;
$uniquekey_error_info .= '<' . $uniquekey_realname . ">列数据不能和数据库中的数据重复";
break;
}
}
//对每格数据进行处理
$ColumnName = $first_row_array[$j];
$in_array = in_array($ColumnName, $result);
if ($in_array) {
if (array_key_exists($ColumnName, $newstring1)) {
$ChildTableArray = explode(":", $newstring1[$ColumnName]);
if ($ChildTableArray[0] == 'zhujima') {
$srcFieldName = $Columns[$ChildTableArray[1]];
$key = array_search($srcFieldName, $first_row_array);
$line_array[$j] = 汉字转拼音首字母($line_array[$key]);
} else {
if ($ChildTableArray[0] == 'system_datetime') {
if ($line_array[$j] == '') {
$line_array[$j] = date("Y-m-d H:i:s");
} else {
if (strtotime($line_array[$j]) == -1) {
$line_array[$j] = date("Y-m-d H:i:s");
}
}
} else {
$ChildTableName = $ChildTableArray[1];
if ($ChildTableCacheArray[$ChildTableName][$line_array[$j]] == '' && $line_array[$j] != '') {
$ChildColumns = returntablecolumn($ChildTableName);
$ChildTableFieldValue = $ChildColumns[$ChildTableArray[2]];
$ChildTableFieldName = $ChildColumns[$ChildTableArray[3]];
$realvalue = returntablefield($ChildTableName, $ChildTableFieldName, $line_array[$j], $ChildTableFieldValue);
if ($realvalue == '') {
$uniquekey_error_sig = true;
$is_error = true;
$uniquekey_error_info .= '<' . $first_row_array_chinese[$j] . ">列在关联表" . $ChildTableName . "中找不到对应的数据";
break;
}
$ChildTableCacheArray[$ChildTableName][$line_array[$j]] = $realvalue;
} else {
$realvalue = $ChildTableCacheArray[$ChildTableName][$line_array[$j]];
}
$line_array[$j] = $realvalue;
}
}
}
if (array_key_exists($ColumnName, $newstring2)) {
$line_array[$j] = str_replace("\r", "", $line_array[$j]);
$line_array[$j] = str_replace("\n", "", $line_array[$j]);
$line_array[$j] = str_replace("'", "", $line_array[$j]);
//$line_array[$j]=str_replace("\"","",$line_array[$j]);
$line_array[$j] = str_replace("\\", "", $line_array[$j]);
$line_array[$j] = str_replace("/", "", $line_array[$j]);
$line_array[$j] = str_replace(",", "", $line_array[$j]);
$line_array[$j] = str_replace("#", "", $line_array[$j]);
}
/*
if(function_exists('FK_'.$tablename.'_'.$ColumnName)){
$line_array[$j] = call_user_func('FK_'.$tablename.'_'.$ColumnName,$line_array[$j]);
}
*/
示例10: newaiCharts
function newaiCharts()
{
global $html_etc, $tablename, $common_html, $custom_type;
global $db, $return_sql_line, $columns;
global $_POST, $_GET, $returnmodel, $primarykey_index;
global $action_submit, $merge, $form_attribute;
global $tabletitle;
global $showlistfieldlist, $showlistfieldfilter, $showlistfieldtype;
$showlistfieldlistArray = explode(',', $showlistfieldlist);
$showlistfieldfilterArray = explode(',', $showlistfieldfilter);
$showlistfieldtypeArray = explode(',', $showlistfieldtype);
//获取系统显示的色彩信息
$ColorArray = returnColorArray();
//获取系统求和字段信息
global $sum_index, $UserUnitFunctionIndex;
if ($sum_index != "") {
$sum_sql_index = " ,sum({$sum_index}) as sum ";
} else {
$sum_sql_index = "";
}
//报表统计主体部分开始
for ($k = 0; $k < sizeof($showlistfieldlistArray); $k++) {
$fieldIndex = $showlistfieldlistArray[$k];
$fieldName = $columns[$fieldIndex];
$fieldText = $html_etc[$tablename][$fieldName];
$mode = $showlistfieldfilterArray[$k];
$modeArray = explode(':', $mode);
//print_R($modeArray);
$modeIndex = $modeArray[0];
$Mode = "";
switch ($modeIndex) {
case '':
break;
case 'tablefilter':
case 'tablefiltercolor':
case 'radiofilter':
case 'radiofiltercolor':
if ($modeArray[1] == "month" && $modeArray[2] == "") {
$Mode = "Month";
$SQL = "select Date_Format({$fieldName},'%c') AS {$fieldName},Sum({$sum_index}) as sum,Count({$fieldName}) as num from {$tablename} group by {$fieldName}";
} else {
if ($modeArray[1] == "year" && $modeArray[2] == "") {
$Mode = "Year";
$SQL = "select Date_Format({$fieldName},'%Y') AS {$fieldName},Sum({$sum_index}) as sum,Count({$fieldName}) as num from {$tablename} group by {$fieldName}";
} else {
$Mode = "";
$SQL = "select {$fieldName},Count({$fieldName}) as num {$sum_sql_index} from {$tablename} group by {$fieldName}";
}
}
$rs = $db->CacheExecute(150, $SQL);
$rs_array = $rs->GetArray();
//print_R($rs_array);
//父表结构部分
$tablenameIndex = $modeArray[1];
$ColumnsIndex = returntablecolumn($tablenameIndex);
$html_etcIndex = returnsystemlang($tablenameIndex, $tablenameIndex);
$WhatIndex = $ColumnsIndex[(string) $modeArray[2]];
$ReturnIndex = $ColumnsIndex[(string) $modeArray[3]];
//本表操作部分--数据处理部分 --形成FLASH要处理的数据类型
$TotalNumberIndex = 0;
$TotalSumIndex = 0;
$Array = array();
for ($i = 0; $i < sizeof($rs_array); $i++) {
$ResultNumber = $rs_array[$i]['num'];
$ResultSum = $rs_array[$i]['sum'];
$ResultFieldCode = $rs_array[$i][$fieldName];
switch ($Mode) {
case 'Month':
$ResultFieldName = $ResultFieldCode . "" . $common_html['common_html']['month'];
break;
case 'Year':
$ResultFieldName = $ResultFieldCode . "" . $common_html['common_html']['year'];
break;
default:
$ResultFieldName = returntablefield($tablenameIndex, $WhatIndex, $ResultFieldCode, $ReturnIndex);
if ($ResultFieldName == "") {
$ResultFieldName = $ResultFieldCode;
}
break;
}
$TotalNumberIndex += $ResultNumber;
$TotalSumIndex += $ResultSum;
$Array_Statistic_Value = $sum_index != "" ? $ResultSum : $ResultNumber;
$Array['XData'][$i]['Name'] = $ResultFieldName;
$Array['XData'][$i]['Value'] = $Array_Statistic_Value;
$Array['XData'][$i]['Dir'] = $ResultFieldName;
$Array['XData'][$i]['AltText'] = $ResultFieldName;
//$Array['XData'][$i]['Url'] = "?action=init_customer&$fieldName=$ResultFieldCode";
$ColorArray[$i] == "" ? $ColorArray[$i] = "0xCC0000" : '';
$Array['XData'][$i]['Color'] = $ColorArray[$i];
$Array['Dir'][$i]['Name'] = $ResultFieldName;
$Array['Dir'][$i]['Color'] = $ColorArray[$i];
$Array['YData']['AltText'] = "移动查看详细信息";
$Array['YData']['Value'] < $Array_Statistic_Value ? $Array['YData']['Value'] = $Array_Statistic_Value : '';
}
$Array['title'] = $html_etc[$tablename][$tabletitle] . "[" . $html_etc[$tablename][$fieldName] . "]";
$array_graphInfo = $Array['title'] . "[" . date("Y-m-d H:i:s") . "] " . $common_html['common_html']['totalrecords'] . ": " . $TotalNumberIndex;
if ($sum_index != "") {
$array_graphInfo .= " " . $common_html['common_html']['allnumbers'] . ": " . $TotalSumIndex . " " . $UserUnitFunctionIndex . "\n";
}
//.........这里部分代码省略.........
示例11: StockOutToStore
function StockOutToStore($Rowid, $flowState)
{
global $db;
if ($Rowid == "") {
exit;
}
$MainTable = "stockoutmain";
$DetailTable = "stockoutdetail";
$sql = "select * from {$MainTable} where ROWID='{$Rowid}'";
$rs = $db->Execute($sql);
$rs_a = $rs->GetArray();
//print_R($rs_a);
$tabledate = $rs_a[0]['tabledate'];
$stockid = $rs_a[0]['stockid'];
$stockiplaceid = $rs_a[0]['stockiplaceid'];
$supplyid = $rs_a[0]['supplyid'];
$tablecode = $rs_a[0]['tablecode'];
$sql = "select * from {$DetailTable} where mainrowid='{$Rowid}'";
$rs = $db->Execute($sql);
$rs_a = $rs->GetArray();
//print_R($rs_a);
$stockinpersion = $SUNSHINE_USER_NAME;
$Columns = returntablecolumn($DetailTable);
for ($i = 0; $i < sizeof($rs_a); $i++) {
for ($j = 0; $j < sizeof($Columns); $j++) {
$Element = $Columns[$j];
${$Element} = $rs_a[$i][$Element];
}
$plannum == "" ? $plannum = 0 : '';
//第一:把入库单据转换为库存
//INSERT INTO `store` ( `productid` , `stocknum` , `storemaxnum` , `storeminnum` , `storesign` , `signtype` , `ROWID` , `mobilesign` , `stock` , `standard` , `mode` , `freenum` , `allnum` , `price` , `amt` )
//VALUES (
//'', '0', '', '', '', '0', '', '0', '', '', '', '0', '0', '0', '0'
//);
$sql = "select stocknum,ROWID from store where productid='{$productid}'";
$rss = $db->Execute($sql);
$rss_a = $rss->GetArray();
//print $rss_a[0]['NUM'];exit;
$allnum = $rss_a[0]['stocknum'];
if ($rss_a[0]['ROWID'] != "") {
$sql = "update store set stocknum = stocknum - {$plannum} , allnum = allnum - {$plannum}, standard='{$standard}' , mode='{$mode}' ,price='{$price}' where productid='{$productid}'";
}
//else {
//$sql = "INSERT INTO `store` ( `productid` , `stocknum` , `storemaxnum` , `storeminnum` , `storesign` , `signtype` , `ROWID` , `mobilesign` , `stock` , `standard` , `mode` , `freenum` , `allnum` , `price` , `amt` )
//VALUES ( '$productid' , '$plannum' , '$storemaxnum' , '$storeminnum' , '$storesign' , '$stockintype' , '' , '$mobilesign' , '$stockid' , '$standard' , '$mode' , '$freenum' , '$allnum' , '$price' , '$storeamt' );
//";
//}
if ($flowState == "1") {
$db->Execute($sql);
////print $sql."<HR>";
} else {
if ($flowState == "-1") {
$sql = "update store set stocknum = stocknum + {$plannum} , allnum = allnum + {$plannum} , standard='{$standard}' , mode='{$mode}' ,price='{$price}' where productid='{$productid}'";
$db->Execute($sql);
////print $sql."<HR>";
}
}
//完成库存数量更新部分
//stockoutmain : tablecode tabledate stockoutpersion stockoutsign stockouttype userexplian stockpersion stockid stockiplaceid stockstate ROWID fillindate state exampersion supplyid user_id amt sellmess sellmobile outmess outmobile outtype flowState payamt factpayamt isfax issend sellman payment chinaAmt sendAmt rebate noFaxAmt fromRowId fromModuleId datascope invoice customerPO fromModuleId2 fromRowId2 tableNo
//stockoutdetail : stockoutcode receivecode ordercode productid plannum stockoutfactnum price money profitmoney costmoney stockoutdetailsign ROWID state stockouttype toreturn user_id mainrowid standard mode freenum allnum storenum
//第二:把入库单据转换为库存明细
$storeamt = $plannum * $price;
$sql = "INSERT INTO `storedetail` ( \n\t\t\t`productid` , `stockinfactnum` , `storefactnum` , `stockoutfactnum` ,\n\t\t\t`stockincode` , `stockoutcode` , `storedetailsign` , `signtype` ,\n\t\t\t`ROWID` , `storecode` , `stockinfactprice` , `stockinpersion` ,\n\t\t\t`stockinmaincode` , `stockindate` , `user_id` , `stock` , \n\t\t\t`stockplace` , `standard` , `mode` , `exchrowid` , \n\t\t\t`freenum` , `allnum` , `storeamt` ) \n\t\t\tVALUES (\n\t\t\t'{$productid}' , '{$plannum}' , '{$allnum}' , '{$stockoutfactnum}' ,\n\t\t\t'{$stockincode}' , '{$tablecode}' , '{$stockoutdetailsign}' , '{$stockouttype}' ,\n\t\t\t'' , '{$storecode}' , '{$price}' , '{$stockinpersion}' ,\n\t\t\t'{$Rowid}' , '{$tabledate}' , '{$user_id}' , '{$stockid}' , \n\t\t\t'{$stockiplaceid}' , '{$standard}' , '{$mode}' , '{$exchrowid}' , \n\t\t\t'{$freenum}' , '{$allnum}' , '{$storeamt}' \n\t\t);\n\t\t";
if ($flowState == "1") {
$db->Execute($sql);
////print $sql."<HR>";
}
}
$sql = "delete from storedetail where stockoutcode='{$tablecode}'";
if ($flowState == "-1") {
$db->Execute($sql);
////print $sql."<HR>";
}
}
示例12: viewChildTableList
function viewChildTableList($subtable, $parent_value)
{
global $db;
$maintable_key = $subtable['maintable_key'];
$table_title = $subtable['subtable_title'];
$tablename2 = $subtable['subtable_name'];
$childkey2 = $subtable['subtable_key'];
$where2 = $subtable['subtable_where'];
$where2 = str_replace("(", "(", $where2);
$where2 = str_replace(")", ")", $where2);
$showlistfieldlist2 = $subtable['subtable_showlistfieldlist'];
$columns2 = returntablecolumn($tablename2);
$html_etc2 = returnsystemlang($tablename2);
$showlistfieldlistArray2 = explode(",", $showlistfieldlist2);
$iniFilename = "Model/" . $tablename2 . "_newai.ini";
if (!file_exists($iniFilename)) {
$iniFilename = "../JXC/Model/" . $tablename2 . "_newai.ini";
}
if (!file_exists($iniFilename)) {
$iniFilename = "../CRM/Model/" . $tablename2 . "_newai.ini";
}
if (!file_exists($iniFilename)) {
$iniFilename = "../Framework/Model/" . $tablename2 . "_newai.ini";
}
$file_ini2 = parse_ini_file($iniFilename, true);
$org_showlistfieldlist = explode(",", $file_ini2['view_default']['showlistfieldlist']);
$org_showlistfieldfilter = explode(",", $file_ini2['view_default']['showlistfieldfilter']);
$showlistfieldfilterArray2 = array();
for ($i = 0; $i < sizeof($org_showlistfieldlist); $i++) {
if (in_array($org_showlistfieldlist[$i], $showlistfieldlistArray2)) {
$showlistfieldfilterArray2[$org_showlistfieldlist[$i]] = $org_showlistfieldfilter[$i];
}
}
//构建SQL语句
$SQLText = "";
for ($i = 0; $i < sizeof($showlistfieldlistArray2); $i++) {
$listIndex = $showlistfieldlistArray2[$i];
$listIndexName = $columns2[$listIndex];
if ($SQLText != "") {
$SQLText .= ",";
}
$SQLText .= $listIndexName;
}
if (is_array($parent_value)) {
$childkey2Array = explode(",", $childkey2);
$mainkey2Array = explode(",", $maintable_key);
$SQL_Select = "select {$SQLText} from {$tablename2} where 1=1 ";
$i = 0;
foreach ($mainkey2Array as $row) {
$SQL_Select = $SQL_Select . "and " . $childkey2Array[$i] . "='" . $parent_value[$row] . "' ";
$i++;
}
} else {
$SQL_Select = "select {$SQLText} from {$tablename2} where {$childkey2} = '" . $parent_value . "'";
}
if ($where2 != '') {
$where2 = str_replace(":", "=", $where2);
$where2 = str_replace("\\", "", $where2);
$SQL_Select .= " and " . $where2;
}
$rs = $db->Execute($SQL_Select);
$rs_a = $rs->GetArray();
//print_R($rs_a);print_R($showlistfieldlistArray2);
print "<tr ><td colspan=6 nowrap width=100%>\n";
table_begin("100%");
//标题显示部分
if ($table_title != "") {
$url_filename = $tablename2 . "_newai.php";
if (file_exists("../JXC/" . $url_filename)) {
$url_filename = "../JXC/" . $url_filename;
} else {
if (file_exists("../CRM/" . $url_filename)) {
$url_filename = "../CRM/" . $url_filename;
} else {
$url_filename = "";
}
}
if ($url_filename != '') {
$table_title = "<a href='{$url_filename}' target='_blank'>{$table_title}</a>";
}
print "<tr><td class=TableHeader align=center colspan=" . sizeof($showlistfieldlistArray2) . ">{$table_title}</td></tr>";
}
print "<tr class=TableContent>\n";
for ($i = 0; $i < sizeof($showlistfieldlistArray2); $i++) {
$listIndex = $showlistfieldlistArray2[$i];
$listIndexName = $columns2[$listIndex];
$listFilter = $showlistfieldfilterArray2[$listIndex];
$listFilterArray = explode(":", $listFilter);
if (stristr($listFilterArray[0], "tablefilter") && $listFilterArray[1] == $tablename2) {
$TempColumns = returntablecolumn($listFilterArray[1]);
$showText = $html_etc2[$tablename2][$TempColumns[$listFilterArray[3]]];
} else {
$showText = $html_etc2[$tablename2][$listIndexName];
}
print "<td nowrap>" . $showText . "</td>";
}
print "</tr>";
$allnum = array();
$allmoney = array();
//数据窗口部分
//.........这里部分代码省略.........
示例13: sizeof
</table>
</div>
<div id="dataId">
<?php
$dataCount = sizeof($rs_a2);
if ($dataCount == 0) {
$rs_a2[0] = "";
$dataCount = 1;
$MarkName = "";
} else {
print "<input type=hidden name=dataDealMethod value=update>";
print "<input type=hidden name=updateDataMax value=" . $dataCount . ">";
print "<input type=hidden name=updateRowid value=" . $_GET['ROWID'] . ">";
}
//print_R($rs_a2);
$ChildColumns = returntablecolumn("stockoutdetail");
for ($i = 0; $i < sizeof($rs_a2); $i++) {
$MarkID = $i + 1;
$MarkName = "_" . $MarkID;
$Element = $rs_a2[$i];
for ($childID = 0; $childID < sizeof($ChildColumns); $childID++) {
$ColumnName = $ChildColumns[$childID];
${$ColumnName} = $Element[$ColumnName];
}
?>
<table width="95%" class="TableBlock">
<tr>
<td nowrap width="40" align="center" class="TableContent">
<input type="hidden" name="dataNo" value="<?php
echo $MarkID;
?>
示例14: StockInToRefer
//.........这里部分代码省略.........
echo $Rowid;
?>
" method="post">
<table border="0" cellspacing="1" width="95%" class="small" bgcolor="#000000" cellpadding="3">
<tr align="left" >
<td nowrap class="TableContent" colspan=8>入库单据号码:<?php
echo $tablecode;
?>
</td>
</tr>
<tr align="center" >
<td nowrap class="TableHeader" >商品名称</td>
<td nowrap class="TableHeader" >入库数量</td>
<td nowrap class="TableHeader" >单价</td>
<td nowrap class="TableHeader" >金额</td>
<td nowrap class="TableHeader" >备注</td>
<td nowrap class="TableHeader" >退货数量</td>
<td nowrap class="TableHeader" >退货单价</td>
<td nowrap class="TableHeader" >退货金额</td>
</tr>
<?php
$sql = "select * from stockindetail where mainrowid='{$Rowid}'";
$rs = $db->Execute($sql);
$rs_a = $rs->GetArray();
$Columns = returntablecolumn("stockindetail");
for ($i = 0; $i < sizeof($rs_a); $i++) {
for ($j = 0; $j < sizeof($Columns); $j++) {
$Element = $Columns[$j];
${$Element} = $rs_a[$i][$Element];
}
$productname = returntablefield("product", "productid", $productid, "productname");
$ii = $i + 1;
$plannum_ALL += $plannum;
$money_ALL += $money;
?>
<tr class="TableLine1" id="TR<?php
echo $ii;
?>
" >
<input type="hidden" name="productid<?php
echo $ii;
?>
" value="<?php
echo $productid;
?>
">
<td align="left" ><input readonly type="text" name="0<?php
echo $ii;
?>
" value="<?php
echo $productname;
?>
" size="10" maxlength="54" class="SmallInput2"></td>
<td align="left" ><input readonly type="text" name="1<?php
示例15: newaiReport
function newaiReport($fields, $list, $mode)
{
global $html_etc, $tablename, $common_html, $custom_type;
global $db, $return_sql_line, $columns;
global $_POST, $_GET, $returnmodel, $primarykey_index;
global $action_submit, $merge, $form_attribute;
//列表及数组转化区
global $showlistfieldlist, $showlistfieldfilter;
$showlistfieldlistArray = explode(',', $showlistfieldlist);
$showlistfieldfilterArray = explode(',', $showlistfieldfilter);
//SQL语句初始化区
$fields['other']['title'] = $common_html['common_html'][$mode];
$_GET[$primarykey_index] = $list;
$return_sql_line = return_sql_line($fields);
$SQL = $return_sql_line['select_sql'];
//print $SQL;
//多项数据搜索部分 如果定义了外部SQL语句,即结果集为多数据时采用外部SQL语句
global $NEWAI_REPORT_SEARCH_SYSTEM;
if (strlen($NEWAI_REPORT_SEARCH_SYSTEM) > 10 && $mode == "Multiple") {
$SQL = $NEWAI_REPORT_SEARCH_SYSTEM;
}
//定义要显示的结果集,默认为30个结果集
global $totalnumber;
$totalnumber == "" ? $totalnumber = 30 : '';
//执行SQL语言部分
$result = $db->CacheSelectLimit(15, $SQL, $totalnumber, 0);
$rs_array = $result->GetArray();
//数据显示区,其含数据过滤部分
for ($h = 0; $h < sizeof($rs_array); $h++) {
$ReportData = $rs_array[$h];
//数据过滤区 - Begin #################################################
for ($f = 0; $f < sizeof($showlistfieldlistArray); $f++) {
$filterIndex = $showlistfieldlistArray[$f];
//索引列表值
$filterType = $showlistfieldfilterArray[$f];
//过滤列表值
$filterName = $columns[$filterIndex];
//列表名称
$TypeNameFilterArray = explode(':', $filterType);
//对应的过滤数组
switch ($TypeNameFilterArray[0]) {
case 'input':
break;
case 'boolean':
$ReportData[$filterName] = returnboolean($ReportData[$filterName]);
break;
case 'tablefilter':
$filterTableName = $TypeNameFilterArray[1];
$filterTableColumns = returntablecolumn($filterTableName);
$filterTableFieldID = $filterTableColumns[(string) $TypeNameFilterArray[2]];
$filterTableFieldName = $filterTableColumns[(string) $TypeNameFilterArray[3]];
$filterResultText = returntablefield($filterTableName, $filterTableFieldID, $ReportData[$filterName], $filterTableFieldName);
$ReportData[$filterName] = $filterResultText;
break;
case 'userdefine':
$filtervalue = $fields['value'][$counter][$list_index];
$functionName = $TypeNameFilterArray[1];
$fileName = $functionName . ".php";
$fileName0 = "userdefine/{$fileName}";
$fileName = "../../Enginee/userdefine/{$fileName}";
if (file_exists($fileName0)) {
require_once $fileName0;
$functionName = $functionName . "_Value";
if (function_exists($functionName)) {
$ReportData[$filterName] = $functionName($fields['value'][$counter][$list_index], $fields, $counter);
}
} else {
if (file_exists($fileName)) {
require_once $fileName;
$functionName = $functionName . "_Value";
if (function_exists($functionName)) {
$ReportData[$filterName] = $functionName($fields['value'][$counter][$list_index], $fields, $counter);
} else {
print "函数名称[{$functionName}]不存在!";
}
} else {
print "没有相应文件,文件名:{$fileName}";
}
}
break;
}
}
//数据过滤区 - End ##################################################
print "<BR>";
table_begin("80%");
print "<TR class=TableHeader>";
print "<TD noWrap colspan=4>" . $html_etc[$tablename][$tablename] . $common_html['common_html']['report'] . " </TD>";
print "</TR>";
$Counter = 0;
for ($i = 0; $i < sizeof($showlistfieldlistArray); $i += 2) {
$fieldName1 = (string) $columns[(string) $showlistfieldlistArray[$i]];
$k = $i + 1;
$fieldName2 = (string) $columns[(string) $showlistfieldlistArray[$k]];
print "<TR class=TableData>";
print "<TD noWrap width=15%>" . $html_etc[$tablename][$fieldName1] . " </TD>";
print "<TD width=35%>" . $ReportData[$fieldName1] . " </TD>";
print "<TD noWrap width=15%>" . $html_etc[$tablename][$fieldName2] . " </TD>";
print "<TD width=35%>" . $ReportData[$fieldName2] . " </TD>";
print "</TR>";
}
//.........这里部分代码省略.........