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(); } }
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(); } }
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"; } $Array['graphInfo'] = $array_graphInfo; //print_R($FlashFileName); //本表操作部分--FALSH图表显示部分--显示FLASH图表的结果 table_begin("650"); $ChartMode = $showlistfieldtypeArray[$k]; //采用的图表类型选择 //print $tablename; switch ($ChartMode) { case 'vBarF': $FlashFileName = WriteXmlFilevBarF($Array, $tablename, $k); //Flash XML 数据写入文件区 $create_chart = create_chart("vBarF", $FlashFileName); //FLASH 图表读入XML数据处理以后的显示区 break; case 'hBarF': $FlashFileName = WriteXmlFilehBarF($Array, $tablename, $k); //Flash XML 数据写入文件区 $create_chart = create_chart("hBarF", $FlashFileName); //FLASH 图表读入XML数据处理以后的显示区 break; case 'pieF': $FlashFileName = WriteXmlFilePieF($Array, $tablename, $k); //Flash XML 数据写入文件区 $create_chart = create_chart("pieF", $FlashFileName); //FLASH 图表读入XML数据处理以后的显示区 break; default: $FlashFileName = WriteXmlFilevBarF($Array, $tablename, $k); //Flash XML 数据写入文件区 $create_chart = create_chart("vBarF", $FlashFileName); //FLASH 图表读入XML数据处理以后的显示区 break; } //HTML文体显示部分 print "<TR class=TableData>"; print "<TD noWrap width=100% align=center colspan=40>"; print "{$create_chart} </TD>"; print "</TR>"; //本文信息显示部分 //print_title($html_etc[$tablename][$tabletitle]."<font color=green>[".$html_etc[$tablename][$fieldName]."]</font>",40); print_title($html_etc[$tablename][$tabletitle] . "[" . $html_etc[$tablename][$fieldName] . "]", 6); for ($i = 0; $i < sizeof($rs_array); $i++) { $ResultNumber = $rs_array[$i][num]; $ResultSum = $rs_array[$i][sum]; $ResultFieldCode = $rs_array[$i][$fieldName]; $ResultFieldName = returntablefield($tablenameIndex, $WhatIndex, $ResultFieldCode, $ReturnIndex); if ($ResultFieldName == "") { $ResultFieldName = $ResultFieldCode; } print "<TR class=TableData>"; print "<TD noWrap width=15%>统计类别名称 </TD>"; print "<TD width=35%>" . $ResultFieldName . " </TD>"; if ($sum_index != "") { print "<TD noWrap width=15%>统计额度 </TD>"; print "<TD noWrap width=10%><font color=red>" . $ResultSum . " " . $UserUnitFunctionIndex . "</font></TD>"; } else { //print "<TD noWrap width=15%>统计类别代码 </TD>"; //print "<TD noWrap width=10%>".$ResultFieldCode." </TD>"; } print "<TD width=15%>统计记录数 </TD>"; print "<TD noWrap width=10%><font color=red>" . $ResultNumber . " 条</font></TD>"; print "</TR>"; } print "<TR class=TableData>"; print "<TD noWrap colspan = 40>\n"; print $common_html['common_html']['totalrecords'] . ": <font color=red>{$TotalNumberIndex} 条</font>\n"; if ($sum_index != "") { print $common_html['common_html']['allnumbers'] . ": <font color=red>{$TotalSumIndex} " . $UserUnitFunctionIndex . "</font>\n"; } print "</TD>"; print "</TR>"; table_end(); print "<BR>"; break; } } }
newai_tree(); break; case 'framework': $tablename = $file_ini[$action]['tablename']; $SYTEM_CONFIG_TABLE != "" ? $tablename = $SYTEM_CONFIG_TABLE : ''; $columns = returntablecolumn($tablename); $html_etc = returnsystemlang($tablename, $SYTEM_CONFIG_TABLE); $menu_top = $file_ini[$action]['menu_top']; $primary = $file_ini[$action]['primary']; project_framework($mode = 'project_framework'); break; case 'menutop': $tablename = $file_ini[$action]['tablename']; $SYTEM_CONFIG_TABLE != "" ? $tablename = $SYTEM_CONFIG_TABLE : ''; $columns = returntablecolumn($tablename); $html_etc = returnsystemlang($tablename, $SYTEM_CONFIG_TABLE); $menu_top = $file_ini[$action]['menu_top']; $primary = $file_ini[$action]['primary']; project_framework($mode = 'project_fw_menu'); break; } $ExecTimeEnd = getmicrotime(); $ExecTime = $ExecTimeEnd - $ExecTimeBegin; //print substr($ExecTime,0,8)." S"; $PHP_SELF_ARRAY = explode('/', $_SERVER['PHP_SELF']); $PHP_SELF_TEXT = array_pop($PHP_SELF_ARRAY); //print "<a href='StudentFileNew.php?dir=.&editfile=$PHP_SELF_TEXT&n=1' class=OrgAdd target=_blank>$PHP_SELF_TEXT</a>"; //注册提示 @(require_once "lib/version.php"); //定义显示文本 $PHP_SELF_ARRAY = explode('/', $_SERVER['PHP_SELF']);
function print_select_menu_product($showtext, $showFieldName, $showFieldID, $showtext2, $showFieldName2, $showFieldValue, $tableName, $SelectFieldName, $SelectFieldname2, $colspan = 1) { global $db; $sql = "select {$showFieldName},{$showFieldID},{$showFieldName2} from {$tableName} order by {$showFieldName}"; //print $sql;//exit; $rst = $db->Execute($sql); print "<SCRIPT language=JavaScript>\n"; //-----data print "var onecount;\n"; print "onecount=0;\n"; print "subcat = new Array();\n"; $i = 0; while (!$rst->EOF) { print "subcat[{$i}] = new Array(\"" . $rst->fields[$showFieldName] . "\",\"" . $rst->fields[$showFieldID] . "\",\"" . $rst->fields[$showFieldName2] . "\");\n"; $i++; $rst->MoveNext(); } print "onecount={$i};\n"; //----deal_data_begin print " function changelocation(locationid)\n"; print " {\n"; print " document.form1." . $SelectFieldname2 . ".length = 0; \n"; print " var locationid=locationid;\n"; print " var i;\n"; print " for (i=0;i<onecount;i++)\n"; print " {\n"; print " if (subcat[i][1] == locationid)\n"; print " { \n"; print " document.form1." . $SelectFieldname2 . ".value = subcat[i][2];\n"; print " } \n"; print " }\n"; print " } \n"; print "</SCRIPT>\n"; //-----deal_data_end $html_etc_where_table = returnsystemlang($where_table); $sql = "select {$showFieldName},{$showFieldID},{$showFieldName2} from {$tableName} order by {$showFieldName}"; $rse = $db->Execute($sql); print "<TR><TD class=TableData noWrap>" . $showtext . "</TD><TD class=TableData noWrap>\n"; print "<SELECT id={$showFieldName} onkeydown=\"if(event.keyCode==13)event.keyCode=9\" class=\"SmallSelect\" onchange=changelocation(document.form1.{$showFieldName}.options[document.form1.{$showFieldName}.selectedIndex].value) \n"; print "size=1 name={$SelectFieldName}>\n"; $TestSelect = false; while (!$rse->EOF) { if ($rse->fields[$showFieldID] == $showFieldValue) { $selected = 'selected'; $TestSelect = true; $ValueTextField = $rse->fields[$showFieldName2]; } else { $selected = ''; } print "<OPTION value=\"" . $rse->fields[$showFieldID] . "\" {$selected}>" . $rse->fields[$showFieldName] . "</OPTION>\n"; $rse->MoveNext(); } if (!$TestSelect) { print "<OPTION value=\"\" selected>=========</OPTION>\n"; } print "</SELECT> </TD></TR>\n"; print "<TR><TD class=TableData noWrap width=20%>" . $showtext2 . "</TD><TD class=TableData noWrap>\n"; $ValueTextField != "" ? '' : ($ValueTextField = '========='); print "<INPUT class=SmallStatic maxLength=20 name=" . $SelectFieldname2 . " readonly value=\"" . $ValueTextField . "\" onkeydown=\"if(event.keyCode==13)event.keyCode=9\">"; print " </TD></TR>\n"; }
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='******' 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); }
$ColumnName = $Column[$ii]; if ($ColumnName == "编号") { $ColumnValue = $i + 1; } else { $ColumnValue = $rs_a[$i][$ColumnName]; } print "<td nowrap>" . $ColumnValue . "</td>"; } print "</tr>"; } print "</table>"; exit; } //统计项 if ($_GET['action'] == "init_default" || $_GET['action'] == "") { $html_etc = returnsystemlang('edu_xingzheng_kaoqinmingxi'); page_css("行政人员卡机考勤按月份查询"); //此段代码以前为周次统计之前,月份统计之下,后需要用到学期名称,所以提前至此 if ($_GET['学期名称'] != "") { $学期名称 = $_GET['学期名称']; } else { $学期名称 = returntablefield("edu_xueqiexec", "当前学期", '1', "学期名称"); } $学期初始值 = $学期名称; $sql = "select 开始时间,学期名称 from edu_xueqiexec where 当前学期='1' order by 流水号 desc limit 1"; $rs = $db->CacheExecute(150, $sql); $rs_a = $rs->GetArray(); $开始时间 = $rs_a[0]['开始时间']; //$学期名称 = $rs_a[0]['学期名称']; $开始时间Array = explode('-', $开始时间); print "\n\t\t<table border=0 class=TableBlock width=100% >\n\t\t<tr class=TableHeader><td valign=bottom align=left>行政人员卡机考勤管理 " . $html_etc['edu_xingzheng_kaoqinmingxi']['学期'] . ":";
function online_userelement($userid, $username, $userprivname, $usergif = "9.gif") { global $common_html; global $user_online_num; if (isset($userid, $username)) { ++$user_online_num; } } require_once "lib.inc.php"; require_once "../Enginee/newai.php"; $sessionkey = returnsesskey(); $GLOBAL_SESSION = returnsession(); $systemlang = $_SESSION[$SUNSHINE_USER_LANG_VAR]; $ExecTimeBegin = getmicrotime(); $lang = returnsystemlang(); $common_html = returnsystemlang("common_html"); $LOGIN_THEME = $_SESSION['LOGIN_THEME']; $LOGIN_THEME == "" ? $LOGIN_THEME = $SYSTEM_THEME : ""; $sql = "select * from sessions where data IS NOT NULL"; $rs = $db->execute($sql); $user_online_num = 0; while (!$rs->EOF) { $DATA = urldecode($rs->fields['DATA']); $sess_array = explode(";", $DATA); $i = 0; for (; $i < sizeof($sess_array); ++$i) { $sess_array_in = explode("|", $sess_array[$i]); $name = $sess_array_in[0]; $value_array = explode(":", $sess_array_in[1]); $value = $value_array[sizeof($value_array) - 1]; $GLOBAL_SESSION_LIST_INDEX[$name] = ereg_replace("\"", "", $value);
<?php ini_set('display_errors', 1); ini_set('error_reporting', E_ALL); // display warnings and errors error_reporting(E_WARNING | E_ERROR); require_once 'lib.inc.php'; $GLOBAL_SESSION = returnsession(); $common_html = returnsystemlang('common_html'); $html_etc = returnsystemlang('SERVERINFOR'); require_once 'about.php';
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>"; } table_end(); } //end of rs_array //############################################################################## //实现子目录列表 global $child_tablename, $child_showlistfieldlist; global $child_partent, $child_showlistfieldfilter; //子目录列表开始 if ($child_tablename != "" && $child_showlistfieldlist != "") { $child_columns = returntablecolumn($child_tablename); $child_html_etc = returnsystemlang($child_tablename); table_begin("80%"); print "<TR class=TableHeader>"; print "<TD noWrap width=100% colspan=32>" . $child_html_etc[$child_tablename]["list" . $child_tablename] . " </td>"; print "</TR>"; print "<TR class=TableHeader>"; $child_showlistfieldlist_Array = explode(",", $child_showlistfieldlist); $child_showlistfieldfilter_Array = explode(",", $child_showlistfieldfilter); for ($i = 0; $i < sizeof($child_showlistfieldlist_Array); $i++) { $child_index = $child_showlistfieldlist_Array[$i]; $indexName = $child_columns[$child_index]; print "<TD noWrap>" . $child_html_etc[$child_tablename][$indexName] . " </td>"; } print "</TR>"; //子表与父表关联部分 $child_partent_Array = explode(":", $child_partent); $sql = "select * from {$child_tablename} where " . $child_columns[(string) $child_partent_Array[0]] . "='" . $list . "'"; $rs = $db->CacheExecute(150, $sql); $rs_a = $rs->GetArray(); for ($i = 0; $i < sizeof($rs_a); $i++) { print "<TR class=TableData>"; for ($j = 0; $j < sizeof($child_showlistfieldlist_Array); $j++) { $child_index = $child_showlistfieldlist_Array[$j]; $indexName = $child_columns[$child_index]; $ChildValue = $rs_a[$i][$indexName]; $filterType = $child_showlistfieldfilter_Array[$j]; $TypeNameFilterArray = explode(":", $filterType); switch ($TypeNameFilterArray[0]) { case 'input': break; case 'boolean': $ChildValue = returnboolean($ChildValue); break; case 'tablefilter': $filterTableName = $TypeNameFilterArray[1]; $filterTableColumns = returntablecolumn($filterTableName); $filterTableFieldID = $filterTableColumns[(string) $TypeNameFilterArray[2]]; $filterTableFieldName = $filterTableColumns[(string) $TypeNameFilterArray[3]]; $filterResultText = returntablefield($filterTableName, $filterTableFieldID, $ChildValue, $filterTableFieldName); $ChildValue = $filterResultText; break; } print "<TD noWrap>" . $ChildValue . " </td>"; } print "</TR>"; } UserDefineFunction($list); table_end(); print "<BR>"; print "<hr width=\"80%\" height=\"1\" align=\"{$align}\" color=\"white\">"; print "<BR>"; } //子目录列表结束 //############################################################################## }
function print_select_four_address($ValueArray, $SYSTEM_TABLE) { $showfield = "city"; $tablename = "dict_cities"; $field_value = "City_ID"; $field_name = "City"; $where = "Province_ID"; $where_value = "1"; $where_table = "dict_provinces"; $where_table_value = "Province_ID"; $where_table_name = "Province"; $colspan = 1; //附加字段 - 用于语言显示 $province = "provinces"; $City = $showfield; $postcode = "postcode"; $cityCode = "cityCode"; global $db, $html_etc; $sql = "select {$field_value},{$field_name},{$where},Area_Code,ZIP from {$tablename} order by {$field_value}"; $rst = $db->Execute($sql); print "<SCRIPT language=JavaScript>\n"; //-----data print "var onecount;\n"; print "onecount=0;\n"; print "subcat = new Array();\n"; $i = 0; while (!$rst->EOF) { print "subcat[{$i}] = new Array(\"" . $rst->fields[$field_name] . "\",\"" . $rst->fields[$where] . "\",\"" . $rst->fields[$field_value] . "\",\"" . $rst->fields['Area_Code'] . "\",\"" . $rst->fields['ZIP'] . "\");\n"; $i++; $rst->MoveNext(); } print "onecount={$i};\n"; //----deal_data_begin print "function changelocation(locationid)\n"; print "{\n"; print " document.form1.{$showfield}.length = 0; \n"; print " document.form1.{$cityCode}.length = 0; \n"; print " document.form1.{$postcode}.length = 0; \n"; print " var locationid=locationid;\n"; print " var i;\n"; print " for (i=0;i<onecount;i++)\n"; print " {\n"; print " if (subcat[i][1] == locationid)\n"; print " { \n"; print " document.form1.{$showfield}.options[document.form1.{$showfield}.length] = new Option(subcat[i][0], subcat[i][2]);\n"; //print " document.form1.$cityCode.options[document.form1.$cityCode.length] = new Option(subcat[i][3], subcat[i][3]);\n"; print " document.form1.{$cityCode}.value = subcat[i][3];\n"; //print " document.form1.$postcode.options[document.form1.$postcode.length] = new Option(subcat[i][4], subcat[i][4]);\n"; print " document.form1.{$postcode}.value = subcat[i][4];\n"; print " } \n"; print " }\n"; print "} \n"; print "function changelocation_city(locationid)\n"; print "{\n"; print " document.form1.{$cityCode}.length = 0; \n"; print " document.form1.{$postcode}.length = 0; \n"; print " var locationid=locationid;\n"; print " var i;\n"; print " for (i=0;i<onecount;i++)\n"; print " {\n"; print " if (subcat[i][2] == locationid)\n"; print " { \n"; //print " document.form1.$cityCode.options[document.form1.$cityCode.length] = new Option(subcat[i][3], subcat[i][3]);\n"; print " document.form1.{$cityCode}.value = subcat[i][3];\n"; //print " document.form1.$postcode.options[document.form1.$postcode.length] = new Option(subcat[i][4], subcat[i][4]);\n"; print " document.form1.{$postcode}.value = subcat[i][4];\n"; print " } \n"; print " }\n"; print "} \n"; print "</SCRIPT>\n"; //-----deal_data_end //############################################################################# print "<TR><TD class=TableData noWrap width=20%>" . $html_etc[$SYSTEM_TABLE]['country'] . " :</TD><TD class=TableData noWrap>\n"; print "<INPUT class=SmallStatic maxLength=20 name=countryName readonly value=\"中国\" onkeydown=\"if(event.keyCode==13)event.keyCode=9\">"; print "<INPUT type=hidden maxLength=20 name=country value=1>"; //print "<SELECT name=country class=\"SmallSelect\" onkeydown=\"if(event.keyCode==13)event.keyCode=9\">\n"; //print "<OPTION value=\"1\" >中国</OPTION>\n"; //print "</SELECT> \n"; print "</TD></TR>\n"; print "<TR><TD class=TableData noWrap width=20%>" . $html_etc[$SYSTEM_TABLE]['countryCode'] . " :</TD><TD class=TableData noWrap>\n"; print "<INPUT class=SmallStatic maxLength=20 name=countryCode readonly value=\"0086\" onkeydown=\"if(event.keyCode==13)event.keyCode=9\">"; //print "<SELECT name=countryCode class=\"SmallSelect\" onkeydown=\"if(event.keyCode==13)event.keyCode=9\">\n"; //print "<OPTION value=\"0086\" >0086</OPTION>\n"; //print "</SELECT> \n"; print "</TD></TR>\n"; //############################################################################# $html_etc_where_table = returnsystemlang($where_table); print "<TR><TD class=TableData noWrap width=20%>" . $html_etc[$SYSTEM_TABLE][$province] . " :</TD><TD class=TableData noWrap>\n"; print "<SELECT id={$province} onkeydown=\"if(event.keyCode==13)event.keyCode=9\" class=\"SmallSelect\" onchange=changelocation(document.form1.{$province}.options[document.form1.{$province}.selectedIndex].value) \n"; print "size=1 name={$province}>\n"; $sql = "select {$where_table_value},{$where_table_name} from {$where_table} order by {$where_table_value}"; $rse = $db->Execute($sql); //print $sql;//exit; while (!$rse->EOF) { $rse->fields[$where_table_value] == $ValueArray[$province] ? $selected = 'selected' : ($selected = ''); print "<OPTION value=\"" . $rse->fields[$where_table_value] . "\" {$selected}>" . $rse->fields[$where_table_name] . "</OPTION>\n"; $rse->MoveNext(); } print "</SELECT> </TD></TR>\n"; print "<TR><TD class=TableData noWrap width=20%>" . $html_etc[$SYSTEM_TABLE][$City] . " :</TD><TD class=TableData noWrap>\n"; $ValueArray[$province] != '' ? $where_value = $ValueArray[$province] : ''; print "<SELECT name={$showfield} class=\"SmallSelect\" onchange=changelocation_city(document.form1.{$showfield}.options[document.form1.{$showfield}.selectedIndex].value) onkeydown=\"if(event.keyCode==13)event.keyCode=9\">\n"; $sql = "select {$field_value},{$field_name} from {$tablename} where {$where}='{$where_value}' order by {$field_name}"; $rsc = $db->Execute($sql); while (!$rsc->EOF) { $ValueArray[$City] == $rsc->fields[$field_value] ? $selected = 'selected' : ($selected = ''); print "<OPTION value=\"" . $rsc->fields[$field_value] . "\" {$selected}>" . $rsc->fields[$field_name] . "</OPTION>\n"; $rsc->MoveNext(); } print "</SELECT> </TD></TR>\n"; //地区区号 $ValueArray[$cityCode] == "" ? $ValueTextField = '010' : ($ValueTextField = $ValueArray[$cityCode]); print "<TR><TD class=TableData noWrap width=20%>" . $html_etc[$SYSTEM_TABLE][$cityCode] . " :</TD><TD class=TableData noWrap>\n"; print "<INPUT class=SmallStatic maxLength=20 name={$cityCode} readonly value=\"" . $ValueTextField . "\" onkeydown=\"if(event.keyCode==13)event.keyCode=9\">"; //print "<SELECT name=$cityCode class=\"SmallSelect\" onkeydown=\"if(event.keyCode==13)event.keyCode=9\">\n"; //print "<OPTION value=\"".$ValueArray[$postcode]."\" >$ValueTextField</OPTION>\n"; //print "</SELECT>\N"; print " </TD></TR>\n"; //邮政编码 $ValueArray[$postcode] == "" ? $ValueTextField = '100000' : ($ValueTextField = $ValueArray[$postcode]); print "<TR><TD class=TableData noWrap width=20%>" . $html_etc[$SYSTEM_TABLE][$postcode] . " :</TD><TD class=TableData noWrap>\n"; print "<INPUT class=SmallStatic maxLength=20 name={$postcode} readonly value=\"" . $ValueTextField . "\" onkeydown=\"if(event.keyCode==13)event.keyCode=9\">"; //print "<SELECT name=$postcode class=\"SmallSelect\" onkeydown=\"if(event.keyCode==13)event.keyCode=9\">\n"; //print "<OPTION value=\"".$ValueArray[$postcode]."\" >$ValueTextField</OPTION>\n"; //print "</SELECT>\N"; print " </TD></TR>\n"; }
$rs = $db->Execute($field_sql); print "<div align=center><span style=\"BACKGROUND:#EEEEEE;COLOR:#FF6633;margin: 10px;border:1px dotted #FF6633;font-weight:bold;padding:8px;width=300px\">\n\t\t<font color=#FF0000><img src=\"images/attention.gif\" height=20> <b>提示</b></font><hr>\n\t\t对象构建完成,对象名称为 " . $_GET['Tablename'] . "</span></div>\n\t\t<br>\n\t\t<div align=center>\n\t\t\t<input type=button accesskey='r' value=\"初始化对象:" . $_GET['Tablename'] . "\" class=\"SmallButton\" onclick=\"location='php_ide.php?tablename=" . $_GET['Tablename'] . "&action=init'\">\n\t\t</div>"; exit; } $Tablename = $_GET['Tablename']; $TablenameArray = explode('_', $Tablename); $TempName = $TablenameArray[sizeof($TablenameArray) - 1]; if (sizeof($TablenameArray) >= 3 && ($TempName == "input" || $TempName == "edit" || $TempName == "read")) { $addTablename = true; array_pop($TablenameArray); $Tablerealname = join('_', $TablenameArray); } else { $addTablename = false; $Tablerealname = $Tablename; } $html_etc = returnsystemlang($Tablerealname); $columns = returntablecolumn($Tablerealname); //print_R($columns); $sql = "select * from {$Tablerealname}"; $MetaColumns = $db->MetaColumns($Tablerealname); //MetaDatabases MetaTables MetaColumns MetaColumnNames MetaPrimaryKeys ServerInfo //print_R($MetaColumns); //$Attribute = array("name","max_length","type","not_null","default_value","primary_key","auto_increment","binary"); //$AttributeName = array("字段名称","最大长度","类型","非空","默认值","主键","自动增量","二进制"); $Attribute = array("name", "max_length", "type", "not_null", "default_value", 'other'); $AttributeName = array("字段名称", "最大长度", "类型", "非空", "默认值", "操作"); print "\n<FORM name=form1 action=\"?Tablename=" . $Tablerealname . "§ionName=sectionName_data\" method=post encType=multipart/form-data>\n"; print "<table border=1 cellspacing=0 class=small bordercolor=#000000 cellpadding=3 align=center style=\"border-collapse:collapse\">\n"; print "<TR>\n"; print "<TD class=TableHeader nowrap colSpan=6> 表名:" . $Tablerealname . "</TD>"; print "</TR>\n";
CheckSystemPrivate("教务管理-教学基本信息-教学计划","数字化校园系统设置-教师任教设置"); //######################教育组件-权限较验部分########################## session_register("SYSTEM_CURRENT_XUEQI"); if($_GET['学期名称']!="") { $_SESSION['SYSTEM_CURRENT_XUEQI'] = $_GET['学期名称']; } if($_SESSION['SYSTEM_CURRENT_XUEQI']=="") { $当前学期名称 = returntablefield("edu_xueqiexec","当前学期",'1',"学期名称"); $_SESSION['SYSTEM_CURRENT_XUEQI'] = $当前学期名称; } $_GET['学期名称'] = $_SESSION['SYSTEM_CURRENT_XUEQI']; $html_etc =returnsystemlang("edu_planexec"); $common_html=returnsystemlang('common_html');//print_R($common_html); page_css("教学计划执行与执行"); ?> <script language="javascript" src="../LODOP60/LodopFuncs.js"></script> <object id="LODOP" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0> <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0 pluginspage="../LODOP60/install_lodop.exe"></embed> </object> <script language="javascript" type="text/javascript"> var LODOP; //声明为全局变量 LODOP=getLodop(document.getElementById('LODOP'),document.getElementById('LODOP_EM')); function PreviewFun(){
$tabledump .= "'" . mysql_escape_string($row[$fieldcounter]) . "'"; } } $tabledump .= ");\n"; if ($fp) { fwrite($fp, $tabledump); } else { echo $tabledump; } } mysql_free_result($rows); } require_once "lib.inc.php"; $GLOBAL_SESSION = returnsession(); $common_html = returnsystemlang("common_html"); $html_etc = returnsystemlang("SERVERINFOR"); page_css("System Information"); if (function_exists("ini_get")) { $onoff = ini_get("register_globals"); } else { $onoff = get_cfg_var("register_globals"); } if ($onoff != 1) { @extract($_POST, EXTR_SKIP); @extract($_GET, EXTR_SKIP); } $self = $_SERVER['PHP_SELF']; $servername = isset($servername) ? $servername : "localhost"; $dbusername = isset($dbusername) ? $dbusername : "******"; $dbpassword = isset($dbpassword) ? $dbpassword : ""; $dbname = isset($dbname) ? $dbname : "";
} </script> <?php require_once 'config.php'; require_once '../adodb/adodb.inc.php'; if ($SYSTEM_MODE_DIR == "WUYE") { require_once '../Interface/WUYE/config.inc.php'; } else { require_once '../config.inc.php'; } require_once '../setting.inc.php'; require_once '../adodb/session/adodb-session2.php'; require_once '../Enginee/lib/init.php'; $tablename = $_GET['tablename']; $columns = returntablecolumn($tablename); $html_etc2 = returnsystemlang($tablename); $showlistfieldlist2 = $_GET['showlistfieldlist2']; $arrayfield = explode(",", $showlistfieldlist2); print "<table border=1 cellspacing=0 class=small bordercolor=#000000 cellpadding=3 align=center width=100% style=\"border-collapse:collapse\">\n"; print "<tr><td class=TableHeader><input type=\"checkbox\" name=\"allbox\" onclick=\"check_all();\"></td><td class=TableHeader>±àºÅ</td><td class=TableHeader>×Ö¶Î</td><td class=TableHeader>Ãû³Æ</td></tr>"; for ($i = 0; $i < sizeof($columns); $i++) { $selected = ""; for ($j = 0; $j < sizeof($arrayfield); $j++) { if ($arrayfield[$j] == $i) { $selected = "checked"; break; } } ?> <tr><td><input type="checkbox" value=<?php echo $i;
function newai_import($fields, $mode = 'table') { global $common_html, $html_etc; global $return_sql_line, $db; global $columns; //print_R($columns); global $showlistfieldlist, $showlistfieldlist_key; global $foreignkey, $uniquekey, $primarykey; $tablename = $fields['table']['name']; $SQL = $fields['sql']['SQL']; $init = explode('_', $_GET['action']); $mark = $init[1]; if ($uniquekey == '') { $uniquekey = $primarykey; } //print $uniquekey; print "<FORM name=form1 action=\"?action=import_" . $mark . "_data\" method=post encType=multipart/form-data>\n"; print "<input type=hidden name=hidden_str value=''>\n"; print "<script >"; print "\nfunction temp_function()\n{\n\n\tvar selectid_str=\"\";\n\t/*\n\tfor(i=0;i<document.all(\"selectid\").length;i++)\n\t\t{\n\n\t\tel=document.all(\"selectid\").item(i);\n\t\tif(el.checked)\n\t\t{ val=el.value;\n selectid_str+=val + \",\";\n\t\t}\n\t}*/\n\tform1.hidden_str.value=selectid_str;\n\tform1.submit();\n\tvar sbtn=document.getElementsByName('submitbtn');\n\tfor(i=0;i<sbtn.length;i++)\n\t{\n\t\tsbtn[i].value='提交中';\n\t\tsbtn[i].disabled=true;\n\t}\n}\n"; print "</script>"; global $tablewidth, $primarykey, $primarykey_index; $tablewidth = $tablewidth != "" ? $tablewidth : 450; table_begin($tablewidth); print_title("数据导入操作,唯一索引限制,多个表示不能同时重复", 3); //print_R($common_html['common_html']['contentimport']); if ($foreignkey != "") { $foreignkey_array = explode(':', $foreignkey); $columns_parent = returntablecolumn($foreignkey_array[1]); print_R($columns_parent); print_select('选择考试名称', $columns[(string) $foreignkey_array[3]], $value, $foreignkey_array[1], $columns_parent[(string) $foreignkey_array[3]], $columns_parent[(string) $foreignkey_array[2]], $colspan = 3, $columns_parent[(string) $foreignkey_array[4]]); print_hidden($columns[(string) $foreignkey_array[3]], 'foreignkey'); } print "<TR class=TableData>\n"; print "<TD noWrap align=middle width=50>唯一索引:</TD>\n"; print "<TD colspan=2>"; $uniquekey_array = explode(',', $uniquekey); $FieldList = array(); for ($i = 0; $i < sizeof($uniquekey_array); $i++) { $uniquekey_KEY = $uniquekey_array[$i]; if ($uniquekey_KEY != "") { $uniquekey_KEY_ADD = explode(':', $uniquekey_KEY); if ($uniquekey_KEY_ADD[1] == "userid") { $FieldList[] = $columns["" . $uniquekey_KEY_ADD[0] . ""] . "(自动生成)"; } else { if ($uniquekey_KEY_ADD[1] == "username") { $FieldList[] = $columns["" . $uniquekey_KEY_ADD[0] . ""] . "(自动生成)"; } else { if ($uniquekey_KEY_ADD[1] == "datetime") { $FieldList[] = $columns["" . $uniquekey_KEY_ADD[0] . ""] . "(自动生成)"; } else { $tablenamelang = returnsystemlang($tablename); $FieldList[] = $tablenamelang[$tablename][$columns["" . $uniquekey_KEY_ADD[0] . ""]]; } } } } } //print_R($uniquekey_array); //输出不较验主键时的选择列表 $唯一字段显示文本 = join(',', $FieldList); print $唯一字段显示文本; print "</TD>\n"; print "</TR>\n"; global $importgroup; if ($importgroup != "") { //print $importgroup; print_title('选择要导入的组', 3); $importgroupArray = explode(':', $importgroup); $showfieldIndex = $importgroupArray[0]; $showFieldName = $columns[$showfieldIndex]; $showfieldTableName = $importgroupArray[1]; $showfieldColumns = returntablecolumn($showfieldTableName); $showfieldIndexValue = $importgroupArray[2]; $showfieldIndexName = $importgroupArray[3]; $showfieldIndexValue = $showfieldColumns[$showfieldIndexName]; $showfieldIndexName = $showfieldColumns[$showfieldIndexName]; print_select('选择要导入的组:', $showFieldName, $value = '', $showfieldTableName, $showfieldIndexValue, $showfieldIndexName, $colspan = 2, $setfieldname = '', $setfieldvalue = '', $setfieldboolean = ''); } /* if($tablename == 'customer'){ print_title('请您先<a style="color:red;" href="xls_template/客户信息模板.xls">下载模板</a>,编辑完成再进行导入。',3); }elseif($tablename == 'supply'){ print_title('请您先<a style="color:red;" href="xls_template/供应商信息模板.xls">下载模板</a>,编辑完成再进行导入。',3); }elseif($tablename == 'product'){ print_title('请您先<a style="color:red;" href="xls_template/商品信息模板.xls">下载模板</a>,编辑完成再进行导入。',3); }else{ print_title('导入EXCEL格式数据文件,请您直接从导出功能模块下载导入模板',3); } */ print_title('导入EXCEL格式数据文件,请您直接从导出功能模块下载导入模板', 3); print "<TR class=TableData height=50>\n"; print "<TD noWrap align=middle >EXCEL格式文件</TD>\n"; print "<TD colspan=2><input name='uploadfileXLS' type=file size=25 class=SmallInput></TD>\n"; print "</TR>\n"; //print_title('导入CSV格式数据文件',3); //print "<TR class=TableData height=50>\n"; //print "<TD noWrap align=middle >MS CSV文件</TD>\n"; //print "<TD colspan=2><input name='uploadfile' type=file size=25 class=SmallInput></TD>\n"; //print "</TR>\n"; print "<tr align=\"center\" class=\"TableControl\">\n<td colspan=\"3\">\n<div align=\"center\"><input type=\"button\" name='submitbtn' value=\"" . $common_html['common_html']['import'] . "\" class=\"SmallButton\" onClick=\"temp_function();\"> <input type=\"button\" value=\"" . $common_html['common_html']['return'] . "\" class=\"SmallButton\" onClick=\"history.back();\"></div>\n</td></tr>\n"; table_end(); form_end(); print "<BR>"; table_begin($tablewidth); print_title("EXCEL格式数据正确但导入失败时,请按以下方法进行:"); print "<TR class=TableData height=50>\n"; print "<TD colspan=3><font color=green>\n\t如何过滤EXCEL里面的格式,转化为纯净的EXCEL数据格式文件:<BR>\n\n\t 1 准备好原始格式数据文件<BR>\n\t 2 新建一个EXCEL文件,即空白文件<BR>\n\t 3 工具栏选择数据->导入外部数据->导入数据,弹出的对话框里面,选择第一步准备好的原始文件<BR>\n\t 4 其它不要动,一切按默认的方法进行操作<BR>\n\t 5 即可得到纯净的EXCEL数据格式文件,把这个文件进行导入即可<BR>\n\t 注意:这种方法只用于解决,数据列数及列名正确,但软件无法识别的情况<BR>\n\t</font>\n\t\n"; print "</TD></TR>\n"; table_end(); form_end(); }
function print_select_two($showtext, $showfield, $showtext2, $fieldname2, $value, $tablename, $field_value, $field_name, $where, $where_value, $where_table, $where_table_value, $where_table_name, $colspan = 1, $value2, $notnulltext = "") { global $db, $_SESSION, $SUNSHINE_USER_DEPT_VAR; //用户类型限制条件##########################开始 global $fields; global $fields2; //print $value; //print_R($fields['value']); //print_R($fields['USER_PRIVATE'][$var]); if ($fields['USER_PRIVATE'][$showfield] != "") { $readonly = $fields['USER_PRIVATE'][$showfield]; $class = "SmallStatic"; } else { $readonly = ""; $class = "SmallSelect"; } //用户类型限制条件##########################结束 $sql = "select {$where_table_value},{$where_table_name},{$where} from {$where_table} order by {$where_table_value}"; //print $sql; $rst = $db->Execute($sql); print "<SCRIPT language=JavaScript>\n"; //-----data print "var onecount;\n"; print "onecount=0;\n"; print "subcat = new Array();\n"; $i = 0; while (!$rst->EOF) { //对班级信息进行特殊处理 if ($where_table == "edu_banji") { $OneClassStudentNumber = OneClassStudentNumber($rst->fields[$where_table_name]); $OneClassStudentNumber = "(" . $OneClassStudentNumber . "人)"; } else { $OneClassStudentNumber = ''; } print "subcat[{$i}] = new Array(\"" . $rst->fields[$where_table_name] . $OneClassStudentNumber . "\",\"" . $rst->fields[$where] . "\",\"" . $rst->fields[$where_table_value] . "\");\n"; $i++; $rst->MoveNext(); } print "onecount={$i};\n"; //----deal_data_begin print " function changelocation(locationid)\n"; print " {\n"; print " document.form1.{$fieldname2}.length = 0; \n"; print " var locationid=locationid;\n"; print " var i;\n"; print " for (i=0;i<onecount;i++)\n"; print " {\n"; print " if (subcat[i][1] == locationid)\n"; print " { \n"; print " document.form1.{$fieldname2}.options[document.form1.{$fieldname2}.length] = new Option(subcat[i][0], subcat[i][2]);\n"; print " } \n"; print " }\n"; print " } \n"; print "</SCRIPT>\n"; //-----deal_data_end $html_etc_where_table = returnsystemlang($where_table); $sql = "select {$field_value},{$field_name} from {$tablename} order by {$field_value}"; $rse = $db->Execute($sql); //print "<BR>".$sql;//exit; print "<TR><TD class=TableData noWrap>" . $showtext . "</TD><TD class=TableData noWrap>\n"; print "<SELECT id={$showfield} {$readonly} title='" . $fields['USER_PRIVATE_TEXT'][$showfield] . "' onkeydown=\"if(event.keyCode==13)event.keyCode=9\" class=\"{$class}\" onchange=changelocation(document.form1.{$showfield}.options[document.form1.{$showfield}.selectedIndex].value) \n"; print "size=1 name={$showfield}>\n"; ${$TestSelect} = false; while (!$rse->EOF) { if ($rse->fields[$field_value] == $value) { $selected = 'selected'; $TestSelect = true; } else { $selected = ''; } //print "<OPTION value=\"".$rse->fields[$field_value]."\" $selected>".$rse->fields[$field_name]."[".$rse->fields[$field_value]."]</OPTION>\n"; print "<OPTION value=\"" . $rse->fields[$field_value] . "\" {$selected}>" . $rse->fields[$field_name] . "</OPTION>\n"; $rse->MoveNext(); } if (!$TestSelect) { print "<OPTION value=\"\" selected></OPTION>\n"; } print "</SELECT> {$notnulltext}</TD></TR>\n"; $where_value == "" ? $where_value = $value : ''; //print $where_value; $sql = "select {$where_table_value},{$where_table_name} from {$where_table} where {$where}='{$where_value}' order by {$where_table_name}"; //print $sql;//exit; global $html_etc; print "<TR><TD class=TableData noWrap>" . $showtext2 . "</TD><TD class=TableData noWrap>\n"; print "<SELECT name={$fieldname2} class=\"{$class}\" {$readonly} title='" . $fields['USER_PRIVATE_TEXT'][$showfield] . "' onkeydown=\"if(event.keyCode==13)event.keyCode=9\">\n"; $rsc = $db->Execute($sql); while (!$rsc->EOF) { //对班级信息进行特殊处理 if ($where_table == "edu_banji") { $OneClassStudentNumber = OneClassStudentNumber($班级名称); $OneClassStudentNumber = "(" . $OneClassStudentNumber . "人)"; } else { $OneClassStudentNumber = ''; } $value2 == $rsc->fields[$where_table_value] ? $selected = 'selected' : ($selected = ''); //print "<OPTION value=\"".$rsc->fields[$where_table_value]."\" $selected>".$rsc->fields[$where_table_name]."[".$rsc->fields[$where_table_value]."]$OneClassStudentNumber</OPTION>\n"; print "<OPTION value=\"" . $rsc->fields[$where_table_value] . "\" {$selected}>" . $rsc->fields[$where_table_name] . $OneClassStudentNumber . "</OPTION>\n"; $rsc->MoveNext(); } if ($rsc->RecordCount() == 0) { print "<OPTION value=\"\" {$selected}></OPTION>\n"; } print "</SELECT> " . $rsc->fields[$where_table_value] . "</TD></TR>\n"; }
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(); //数据窗口部分 for ($j = 0; $j < sizeof($rs_a); $j++) { print "<tr class=TableData>\n"; for ($i = 0; $i < sizeof($showlistfieldlistArray2); $i++) { $listIndex = $showlistfieldlistArray2[$i]; $listIndexName = $columns2[$listIndex]; $listFilter = $showlistfieldfilterArray2[$listIndex]; //数据过滤区 $listFilterArray = explode(":", $listFilter); if (stristr($listFilterArray[0], 'color')) { $hascolor = true; } else { $hascolor = false; } $nowrap = ""; if (strlen($rs_a[$j][$listIndexName]) < 20) { $nowrap = "nowrap"; } switch ($listFilterArray[0]) { case 'tablefilter': case 'tablefiltercolor': $TempColumns = returntablecolumn($listFilterArray[1]); $DataElement = returntablefieldColorFilterGray($listFilterArray[1], $TempColumns[(string) $listFilterArray[2]], $rs_a[$j][$listIndexName], $TempColumns[(string) $listFilterArray[3]], '', '', '', $hascolor); break; case 'radiofilter': $TempColumns = returntablecolumn($listFilterArray[1]); $DataElement = returntablefield($listFilterArray[1], $TempColumns[(string) $listFilterArray[2]], $rs_a[$j][$listIndexName], $TempColumns[(string) $listFilterArray[3]]); break; case 'radiofiltergroup': $TempColumns = returntablecolumn($listFilterArray[1]); $DataElement = returntablefield($listFilterArray[1], $TempColumns[(string) $listFilterArray[2]], $rs_a[$j][$listIndexName], $TempColumns[(string) $listFilterArray[3]]); break; case 'select_sex': $DataElement = returnsex($rs_a[$j][$listIndexName]); break; case 'boolean': $DataElement = returnboolean($rs_a[$j][$listIndexName]); break; case 'datetime': if ($rs_a[$j][$listIndexName] == '0000-00-00 00:00:00') { $DataElement = ''; } else { $DataElement = $rs_a[$j][$listIndexName]; } break; /* case 'input': $DataElement=cutStr($rs_a[$j][$listIndexName],15); if($DataElement!=$rs_a[$j][$listIndexName]) $DataElement="<span title='".$rs_a[$j][$listIndexName]."'>".$DataElement."..</span>"; else $DataElement = $rs_a[$j][$listIndexName]; break; case 'textarea': if(cutStr($rs_a[$j][$listIndexName],30)!=$rs_a[$j][$listIndexName]) $DataElement = "<div title='".$rs_a[$j][$listIndexName]."'>".cutStr($rs_a[$j][$listIndexName],30)."...</div>"; else $DataElement = $rs_a[$j][$listIndexName]; break; */ /* case 'input': $DataElement=cutStr($rs_a[$j][$listIndexName],15); if($DataElement!=$rs_a[$j][$listIndexName]) $DataElement="<span title='".$rs_a[$j][$listIndexName]."'>".$DataElement."..</span>"; else $DataElement = $rs_a[$j][$listIndexName]; break; case 'textarea': if(cutStr($rs_a[$j][$listIndexName],30)!=$rs_a[$j][$listIndexName]) $DataElement = "<div title='".$rs_a[$j][$listIndexName]."'>".cutStr($rs_a[$j][$listIndexName],30)."...</div>"; else $DataElement = $rs_a[$j][$listIndexName]; break; */ case 'qq': $DataElement = !empty($rs_a[$j][$listIndexName]) ? "<a target=\"_blank\" href=\"http://wpa.qq.com/msgrd?v=3&uin=" . $rs_a[$j][$listIndexName] . "&site=qq&menu=yes\"><img border=\"0\" src=\"http://wpa.qq.com/pa?p=2:" . $rs_a[$j][$listIndexName] . ":45\" onerror=\"this.src='" . ROOT_DIR . "general/ERP/Framework/images/help3.gif';this.title='此QQ号码可能不存在'\" title=\"点击这里发消息\">" . $rs_a[$j][$listIndexName] . "</a>" : ''; break; case 'mobile': $addicon = "<img src='" . ROOT_DIR . "general/ERP/Framework/images/menu/gif-0348.gif' title='点击号码发送短信'>"; if ($rs_a[$j][$listIndexName] != '') { $DataElement = "<a href='../JXC/sms_sendlist_newai.php?" . base64_encode("action=add_default&sendlist=" . $rs_a[$j][$listIndexName]) . "' target='_blank'>" . $addicon . $rs_a[$j][$listIndexName] . "</a>"; } else { $DataElement = $rs_a[$j][$listIndexName]; } break; case 'email': $linkman = ''; $fromsrc = ''; if ($tablename2 == 'linkman') { $fromsrc = 'customer'; $linkman = gettablefield($tablename2, 'email', 'rowid', $rs_a[$j][$listIndexName]); } else { if ($tablename2 == 'supplylinkman') { $fromsrc = 'supply'; $linkman = gettablefield($tablename2, 'email', 'rowid', $rs_a[$j][$listIndexName]); } else { $linkman = $rs_a[$j][$listIndexName]; $fromsrc = ''; } } $addicon = "<img src='" . ROOT_DIR . "general/ERP/Framework/images/menu/gif-0037.gif' title='点击链接发送邮件'>"; if ($rs_a[$j][$listIndexName] != '') { $DataElement = "<a href='../CRM/email_newai.php?" . base64_encode("action=add_default&sendlist=" . $linkman . "&fromsrc=" . $fromsrc) . "' target='_blank' >" . $addicon . $rs_a[$j][$listIndexName] . "</a>"; } break; case 'picturefile': global $ifincludemaginfier; $PicturePath = $rs_a[$j][$listIndexName]; if ($PicturePath != "" && strlen($PicturePath) > 10) { if (!$ifincludemaginfier) { print "<script type=\"text/javascript\" language=\"javascript\" src=\"" . ROOT_DIR . "general/ERP/Enginee/jquery/jquery.js\"></script>"; print "<script type=\"text/javascript\" language=\"javascript\" src=\"" . ROOT_DIR . "general/ERP/Enginee/jquery/jquery.magnifier.js\"></script>"; $ifincludemaginfier = true; } $DataElement = "<img src='" . $PicturePath . "' width=32 class=\"magnify\" data-magnifyto=\"500\" onmouseover=\"this.style.cursor='pointer';this.style.cursor='hand'\" onmouseout=\"this.style.cursor='default'\">"; //$file_path="<a href='$PicturePath'><img src='".$PicturePath."' border=0 width=120></a>"; } else { $DataElement = ""; } break; case 'userdefine': $functionName = trim($listFilterArray[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)) { $DataElement = $functionName($rs_a[$j][$listIndexName], $rs_a, $j); } } else { $DataElement = $rs_a[$j][$listIndexName]; } break; case 'tdoafile': require_once 'lib/utility_file.php'; //形成通达OA下载文件所需要的变量格式 $var_value_array = explode('||', $rs_a[$j][$listIndexName]); $ATTACHMENT_ID = $var_value_array[1]; $ATTACHMENT_NAME = $var_value_array[0]; if (strlen($rs_a[$j][$listIndexName]) < 3) { $file_path = "无附件"; } else { $file_path = attach_link($ATTACHMENT_ID, $ATTACHMENT_NAME, 1, 1, 1, 0, 0, 1, 1, 0); } //print_R($ATTACHMENT_NAME);exit; print "<script src=\"../../Enginee/lib/attach.js\"></script>"; print "\n\t\t\t\t\t<input type=\"hidden\" name=\"ATTACHMENT_ID_OLD\" value=\"{$ATTACHMENT_ID}\">\n\t\t\t\t\t<input type=\"hidden\" name=\"ATTACHMENT_NAME_OLD\" value=\"{$ATTACHMENT_NAME}\">"; $DataElement = $file_path; break; default: $DataElement = $rs_a[$j][$listIndexName]; break; } if ($listIndexName == 'zhekou') { $DataElement = $DataElement * 100 . "%"; } $tip = ''; if ((stristr($tablename2, "detail") || $tablename2 == "store_product") && $listIndexName == 'num') { $tablename3 = $tablename2 . "_color"; if ($tablename2 == "store_product") { $tablename3 = "store_color"; } $sql = "SELECT COUNT(*) as allnum FROM information_schema.TABLES WHERE TABLE_NAME='{$tablename3}'"; $rs = $db->Execute($sql); if ($rs->fields['allnum'] == 1) { $sql = "select id,{$SQLText} from {$tablename2} where {$childkey2} = '" . $parent_value . "'"; $rs = $db->Execute($sql); $rs_id = $rs->GetArray(); $id = $rs_id[$j][id]; $sql = "select a.num,b.name from {$tablename3} a inner join productcolor b on a.color=b.id where a.id={$id}"; $rs = $db->Execute($sql); $rs_color = $rs->GetArray(); foreach ($rs_color as $row) { $tip .= $row[name] . ":" . $row[num] . "\r\n"; } if ($tip != '') { $tip = " <span title='{$tip}'><img src='" . ROOT_DIR . "general/ERP/Framework/images/sepan.gif'></span>"; } } } print "<td {$nowrap}>" . $DataElement . $tip . "</td>"; if (stristr($html_etc2[$tablename2][$listIndexName], "数量")) { $allnum[$html_etc2[$tablename2][$listIndexName]] = $allnum[$html_etc2[$tablename2][$listIndexName]] + $rs_a[$j][$listIndexName]; } else { if (stristr($html_etc2[$tablename2][$listIndexName], "金额")) { $allmoney[$html_etc2[$tablename2][$listIndexName]] = $allmoney[$html_etc2[$tablename2][$listIndexName]] + $rs_a[$j][$listIndexName]; } } } print "</tr>"; } if (sizeof($allnum) > 0 || sizeof($allmoney) > 0) { print "<tr class=TableData><td align=center><b>合计</b></td>"; for ($i = 1; $i < sizeof($showlistfieldlistArray2); $i++) { $listIndex = $showlistfieldlistArray2[$i]; $listIndexName = $columns2[$listIndex]; if (array_key_exists($html_etc2[$tablename2][$listIndexName], $allnum)) { print "<td nowrap>" . $allnum[$html_etc2[$tablename2][$listIndexName]] . "</td>"; } else { if (array_key_exists($html_etc2[$tablename2][$listIndexName], $allmoney)) { print "<td nowrap>" . $allmoney[$html_etc2[$tablename2][$listIndexName]] . "</td>"; } else { print "<td nowrap></td>"; } } } print "</tr>"; } if (sizeof($rs_a) == 0) { print "<tr class=TableData><td align=center nowrap colspan=" . sizeof($showlistfieldlistArray2) . "><font color=gray>无此项记录</font></td>"; print "</tr>"; } table_end(); print "</td></tr>"; }
<?php require_once 'lib.inc.php'; $common_html = returnsystemlang('common_html'); $GLOBAL_SESSION = returnsession(); $ExecTimeBegin = getmicrotime(); if ($_GET['action'] == "dataDeal") { //print_R($_POST);//exit; //print_R($_SESSION); $tablecode = returnDateAutoIncrement("tablecode", "stockoutmain"); $tabledate = date("Y-m-d"); //print $tablecode."<HR>"; $USER_NAME = $_SESSION['SUNSHINE_USER_NAME']; $NICK_NAME = $_SESSION['SUNSHINE_USER_NICK_NAME']; $stockid = $_POST['stockid']; $supplyid = $_POST['supplyId']; $amt = $_POST['countAllAmt']; //$factpayamt = $_POST['factpayamt']; $amt = ereg_replace(',', '', $amt); $amt = (int) $amt; $factpayamt = $amt; $state = $_POST['state']; $buyman = $_POST['buyman']; $outtype = $_POST['outtype']; $chinaAmt = $_POST['chinaAmt']; $state = '1'; $_POST['state']; $flowState = '-1'; $outtype = $_POST['outtype']; $sendDate = date("Y-m-d"); $stockoutsign = "来自于销售订单单";
print "<BR><BR><div align=center><input type=Button class=SmallButton name=inputSelect onclick='SetParentValue();' value='点击确定'> <input type=Button class=SmallButton name=inputSelect onclick='SetParentValue2();' value='确定并关闭'></div>"; break; case 'userdefine': print "<script>\n\t\tfunction SetParentValue_UserDefine(ParaUserDefine)\t{\n\t\t\tvar parent_window = parent.dialogArguments;\n\n\t\t\tparent_window.form1." . $_GET['parentName'] . ".value = 'userdefine:'+ParaUserDefine;\n\t\t\twindow.opener =window.self;\n\t\t\twindow.close();\n\t\t}\n\t\t</script>"; break; case 'select_input': $filter = 'select_input'; case 'radiofilter': $filter = 'radiofilter'; case 'tablefilter': $filter == "" ? $filter = "tablefilter" : ""; print "<script>\n\t\tfunction LoadSection()\t{\n\t\t\tvar InputSelectName = \"\";\n\t\t\tInputSelectName = document.form1.inputName.value;\n\t\t\tURL=\"?action=" . $_GET['action'] . "§ionName=" . $_GET['sectionName'] . "&parentName=" . $_GET['parentName'] . "&Tablename=\"+InputSelectName+\"\";\n\t\t\tlocation = URL;\n\t\t}\n\t\tfunction SetParentValue()\t{\n\t\t\tvar SelectName = document.form1.SelectName.options[document.form1.SelectName.selectedIndex].value;\n\t\t\tvar SelectValue = document.form1.SelectValue.options[document.form1.SelectValue.selectedIndex].value;\n\t\t\tvar ReturnText = \"{$filter}:" . $_GET['Tablename'] . ":\"+SelectValue+\":\"+SelectName;\n\t\t\t//Text.innerHTML = ReturnText;\n\t\t\tvar parent_window = parent.dialogArguments;\n\n\t\t\tparent_window.form1." . $_GET['parentName'] . ".value = ReturnText;\n\t\t}\n\t\tfunction SetParentValue2()\t{\n\t\t\tvar parent_window = parent.dialogArguments;\n\n\t\t\tvar SelectName = document.form1.SelectName.options[document.form1.SelectName.selectedIndex].value;\n\t\t\tvar SelectValue = document.form1.SelectValue.options[document.form1.SelectValue.selectedIndex].value;\n\t\t\tvar ReturnText = \"{$filter}:" . $_GET['Tablename'] . ":\"+SelectValue+\":\"+SelectName;\n\t\t\t//Text.innerHTML = ReturnText;\n\n\t\t\tparent_window.form1." . $_GET['parentName'] . ".value = ReturnText;\n\t\t\twindow.opener =window.self;\n\t\t\twindow.close();\n\t\t}\n\n\t\t</script>"; print "输入需要关连的表名:<input type=text class=SmallInput name=inputName size=15\n\t\tonkeydown=\"if(event.keyCode==13) event.keyCode=9\" value='" . $_GET['Tablename'] . "'> <input type=Button class=SmallButton name=inputSelect onclick='LoadSection();'\n\t\tvalue='选择'>"; if ($_GET['Tablename'] != "") { $columns = returntablecolumn($_GET['Tablename']); $html_etc = returnsystemlang($_GET['Tablename']); print "<BR><BR>菜单显示名:"; print "<select class=\"SmallSelect\" name=\"SelectName\" onkeydown=\"if(event.keyCode==13)event.keyCode=9\" >\n"; for ($i = 0; $i < sizeof($columns); $i++) { print "<option value=\"{$i}\" {$temp}>" . $html_etc[(string) $_GET['Tablename']][(string) $columns[$i]] . "[" . $columns[$i] . "]</option>\n"; $temp = ''; } print "</select>\n"; print "<BR><BR>菜单显示值:"; print "<select class=\"SmallSelect\" name=\"SelectValue\" onkeydown=\"if(event.keyCode==13)event.keyCode=9\" >\n"; for ($i = 0; $i < sizeof($columns); $i++) { print "<option value=\"{$i}\" {$temp}>" . $html_etc[(string) $_GET['Tablename']][(string) $columns[$i]] . "[" . $columns[$i] . "]</option>\n"; $temp = ''; } print "</select>\n"; print "<BR><BR><div align=center><input type=Button class=SmallButton name=inputSelect onclick='SetParentValue();' value='点击确定'> <input type=Button class=SmallButton name=inputSelect onclick='SetParentValue2();' value='确定并关闭'></div>";
function return_parent_group() { global $common_html, $db, $group_user, $SYTEM_CONFIG_TABLE; global $SUNSHINE_USER_NAME_VAR, $SUNSHINE_USER_ID_VAR, $_SESSION; $group_user_array = explode(':', $group_user); //$group_user在xx_newai.ini配置文件中定义 ---by cwf $columns_group = returntablecolumn($group_user_array[0]); $html_etc_group = returnsystemlang($group_user_array[0], $SYTEM_CONFIG_TABLE); $group_array['tablename'] = $group_user_array[0]; $group_array['sql_text'][(string) $group_user_array[1]] = $columns_group[(string) $group_user_array[2]]; $group_array['sql_text'][(string) $group_user_array[3]] = $columns_group[(string) $group_user_array[4]]; $group_array['sql_text'][(string) $group_user_array[5]] = $columns_group[(string) $group_user_array[6]]; $group_array['sql_text'][(string) $group_user_array[7]] = $columns_group[(string) $group_user_array[8]]; $group_array['sql_text'][(string) $group_user_array[9]] = $group_user_array[10]; // var_dump($group_array);//---by cwf return $group_array; }
/* 版权归属:郑州单点科技软件有限公司; 联系方式:0371-69663266; 公司地址:河南郑州经济技术开发区第五大街经北三路通信产业园四楼西南; 公司简介:郑州单点科技软件有限公司位于中国中部城市-郑州,成立于2007年1月,致力于把基于先进信息技术(包括通信技术)的最佳管理与业务实践普及到教育行业客户的管理与业务创新活动中,全面提供具有自主知识产权的教育管理软件、服务与解决方案,是中部最优秀的高校教育管理软件及中小学校管理软件提供商。目前己经有多家高职和中职类院校使用通达中部研发中心开发的软件和服务; 软件名称:单点科技软件开发基础性架构平台,以及在其基础之上扩展的任何性软件作品; 发行协议:数字化校园产品为商业软件,发行许可为LICENSE方式;单点CRM系统即SunshineCRM系统为GPLV3协议许可,GPLV3协议许可内容请到百度搜索; 特殊声明:软件所使用的ADODB库,PHPEXCEL库,SMTARY库归原作者所有,余下代码沿用上述声明; */ require_once "lib.inc.php"; empty($_GET['sessionkey']) ? exit : ""; $GLOBAL_SESSION = returnsession($_GET['sessionkey']); $ExecTimeBegin = getmicrotime(); $lang = returnsystemlang(); $CAL_ID = $_GET['CAL_ID']; $sql = "select * from calendar where CAL_ID='{$CAL_ID}'"; $rs = $db->execute($sql); $CAL_TIME = $rs->fields['CAL_TIME']; $content = $rs->fields['CONTENT']; $subject = 20 < strlen($subject) ? substr($subject, 0, 20) : $subject; $itemCategory_array = array("Anniversary", "Birthday", "Business", "Get-together", "Gifts", "Holiday", "Meeting", "Personal", "Shopping"); $LOGIN_THEME = $_SESSION['LOGIN_THEME']; $LOGIN_THEME == "" ? $LOGIN_THEME = $SYSTEM_THEME : ""; echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\r\n<HTML><HEAD><TITLE></TITLE>\r\n<META http-equiv=Content-Type content=\"text/html; charset=gb2312\">\r\n<LINK href=\"../theme/"; echo $LOGIN_THEME; echo "/style.css\" rel=stylesheet>\r\n<html>\r\n<head>\r\n<title>日程安排:"; echo $subject; echo " </title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n</head>\r\n\r\n<body bgcolor=\"#FFFFCC\" topmargin=\"5\">\r\n\r\n<div class=\"small\">\r\n"; echo $CAL_TIME;
function newai_export($fields, $mode = 'table') { global $common_html, $html_etc; global $return_sql_line, $db; global $columns; //print_R($_GET); global $showlistfieldlist, $group_filter; $tablename = $fields['table']['name']; $SQL = $fields['sql']['SQL']; $init = explode('_', $_GET['action']); $mark = $init[1]; global $tablewidth; $tablewidth = $tablewidth != "" ? $tablewidth : 450; if ($group_filter != "") { $group_filter_Array = explode(':', $group_filter); $TableFieldIndex = $group_filter_Array[0]; $KeyName = $columns[$TableFieldIndex]; $ChildTableName = $group_filter_Array[1]; $ChildTableFieldValueIndex = $group_filter_Array[2]; $ChildTableFieldNameIndex = $group_filter_Array[3]; $ChildColumns = returntablecolumn($ChildTableName); $ChildTableFieldValue = $ChildColumns[$ChildTableFieldValueIndex]; $ChildTableFieldName = $ChildColumns[$ChildTableFieldNameIndex]; $Childhtml_etc = returnsystemlang($ChildTableName, $SYTEM_CONFIG_TABLE); //print_R($Childhtml_etc); $ChildTableFieldHTMLValue = $Childhtml_etc[$ChildTableName][$ChildTableFieldValue]; $ChildTableFieldHTMLName = $Childhtml_etc[$ChildTableName][$ChildTableFieldName]; } else { $KeyName = "说明"; } print "<script>\n\t//CSV\n\tfunction selectid_str_init_CSV(mark)\n\t{\n\tselectid_str = \"\";\n\tfor(i=0;i<document.all(\"selectid\").length-1;i++)\n\t\t{\n\n\t\tel = document.all(\"selectid\").item(i);\n\t\tif(el.checked)\n\t\t{\tval = el.value;\n\t\t\tif(val !=\"\")\t{\n\t\t\t\tselectid_str += val + \",\";\n\t\t\t}\n\t\t}\n\t}\n\n\tell = document.all(\"selectid\").item(document.all(\"selectid\").length-1);\n\tif(ell.checked)\n\t{\tval = ell.value;\n\t\tif(val !=\"\")\t{\n\t\t\tselectid_str += val ;\n\t\t}\n\t}\n\n\ttablename_\t\t=\tdocument.form1.tablename.value;\n\tsearchfield_\t=\tdocument.form1.searchfield.value;\n\tsearchvalue_\t=\tdocument.form1.searchvalue.value;\n\tAdvanceSearch_\t=\tdocument.form1.AdvanceSearch.value;\n\texportfield= selectid_str;\n\n\n\t"; if ($_GET['actionadv'] == "exportadv_default") { //不用显示或得到SELECTID的值 print "\turl=\"?action=export_\"+mark+\"_data&method=CSV&actionadv=exportadv_default&exportfield=\"+exportfield+\"&tablename=\"+tablename_+\"&searchfield=\"+searchfield_+\"&searchvalue=\"+searchvalue_+AdvanceSearch_"; } else { print "\tvar " . $KeyName . "SelectValue = document.form1." . $KeyName . ".options[document.form1." . $KeyName . ".selectedIndex].value;\n\t\t"; print "\turl=\"?action=export_\"+mark+\"_data&method=CSV&exportfield=\"+exportfield+\"&tablename=\"+tablename_+\"&searchfield=\"+searchfield_+\"&searchvalue=\"+searchvalue_+\"&" . $KeyName . "=\"+" . $KeyName . "SelectValue+AdvanceSearch_"; } print "\n\t//alert(url);\n\tlocation=url;\n\t}\n\t//XLS\n\tfunction selectid_str_init_XLS(mark)\n\t{\n\tselectid_str = \"\";\n\tfor(i=0;i<document.all(\"selectid\").length-1;i++)\n\t\t{\n\n\t\tel = document.all(\"selectid\").item(i);\n\t\tif(el.checked)\n\t\t{\tval = el.value;\n\t\t\tif(val !=\"\")\t{\n\t\t\t\tselectid_str += val + \",\";\n\t\t\t}\n\t\t}\n\t}\n\n\tell = document.all(\"selectid\").item(document.all(\"selectid\").length-1);\n\tif(ell.checked)\n\t{\tval = ell.value;\n\t\tif(val !=\"\")\t{\n\t\t\tselectid_str += val ;\n\t\t}\n\t}\n\n\ttablename_\t\t=\tdocument.form1.tablename.value;\n\tsearchfield_\t=\tdocument.form1.searchfield.value;\n\tsearchvalue_\t=\tdocument.form1.searchvalue.value;\n\tAdvanceSearch_\t=\tdocument.form1.AdvanceSearch.value;\n\texportfield= selectid_str;\n\t"; if ($_GET['actionadv'] == "exportadv_default") { //不用显示或得到SELECTID的值 print "\turl=\"?action=export_\"+mark+\"_data&actionadv=exportadv_default&exportfield=\"+exportfield+\"&tablename=\"+tablename_+\"&searchfield=\"+searchfield_+\"&searchvalue=\"+searchvalue_+AdvanceSearch_"; } else { print "\tvar " . $KeyName . "SelectValue = document.form1." . $KeyName . ".options[document.form1." . $KeyName . ".selectedIndex].value;\n\t\t"; print "\turl=\"?action=export_\"+mark+\"_data&exportfield=\"+exportfield+\"&tablename=\"+tablename_+\"&searchfield=\"+searchfield_+\"&searchvalue=\"+searchvalue_+\"&" . $KeyName . "=\"+" . $KeyName . "SelectValue+AdvanceSearch_"; } print "\n\t//url\n\t//alert(url);\n\tlocation=url;\n\t}\n\t</script>"; form_begin("form1"); table_begin($tablewidth); switch ($mode) { case 'table': print_title($common_html['common_html']['tableexport'], 3); print "<TR class=TableData>\n"; print "<TD noWrap align=middle>选择</TD>\n"; print "<TD width=200>字段描述</TD>\n"; print "<TD width=200>字段名称</TD>\n"; print "</TR>\n"; for ($i = 0; $i < sizeof($columns); $i++) { $list = $columns[$i]; print "<TR class=TableData>\n"; print "<TD noWrap align=middle width=20><input type=\"checkbox\" checked name=\"selectfield\" value=\"{$list}\"></TD>\n"; print "<TD>" . $html_etc[$tablename][$list] . "</TD>\n"; print "<TD>{$list}</TD>\n"; print "</TR>\n"; $temp_function = 'selectfield_str'; } break; case 'content': print_title($common_html['common_html']['contentexport'], 3); print "<TR class=TableData>\n"; print "<TD noWrap align=center width=30>选择</TD>\n"; print "<TD width=100>字段描述</TD>\n"; print "<TD width=150>字段名称</TD>\n"; print "</TR>\n"; //附加组数据导出--开始 //print_R($group_filter_Array); if ($group_filter != "" && $_GET['actionadv'] != "exportadv_default") { //如果强制GET变量已经进行过预定义,那么沿用预定义内容进行 2010-9-2 $TableFieldIndex = $group_filter_Array[0]; $KeyName = $columns[$TableFieldIndex]; $PHP_SELF_ARRAY = explode('/', $_SERVER['PHP_SELF']); $FILE_SELF_NAME = array_pop($PHP_SELF_ARRAY); $FileDirName = array_pop($PHP_SELF_ARRAY); //用于PGSQL下面不进行数据较验 //print $_SESSION['LOGIN_USER_ID']; //如果强制GET变量已经进行过预定义,那么沿用预定义内容进行 2010-9-2 //&&$FileDirName=="Teacher" 只有在Teacher目录下面使用 2010-9-25 正常使用 if ($_GET[$KeyName] != "") { //$ChildTableName = $group_filter_Array[1]; //$ChildTableFieldValueIndex = $group_filter_Array[2]; //$ChildTableFieldNameIndex = $group_filter_Array[3]; //print $KeyName; $附加判断条件Array = explode(',', $_GET[$KeyName]); $附加判断条件 = "'" . join("','", $附加判断条件Array) . "'"; $sql = "\n\t\t\t\t\tselect {$ChildTableFieldValue},{$ChildTableFieldName}\n\t\t\t\t\tfrom {$ChildTableName}\n\t\t\t\t\twhere ( {$ChildTableFieldValue} in ({$附加判断条件})\n\t\t\t\t\t\t\tor\n\t\t\t\t\t\t\t{$ChildTableFieldName} in ({$附加判断条件})\n\t\t\t\t\t\t\t)\n\t\t\t\t\torder by {$ChildTableFieldName}"; // } else { $sql = "select {$ChildTableFieldValue},{$ChildTableFieldName} from {$ChildTableName} order by {$ChildTableFieldName}"; } //print $sql; //print $index_name;print_R($_GET); $rs = $db->CacheExecute(150, $sql); $rs_a = $rs->GetArray(); if ($Childhtml_etc[$ChildTableName][$ChildTableFieldName] != "") { $ShowText = "按" . $html_etc[$tablename][$KeyName] . "过滤"; //$ShowText = "按".$Childhtml_etc[$ChildTableName][$ChildTableFieldName]."过滤"; } else { $ShowText = "按" . $html_etc[$tablename][$KeyName] . "过滤"; } print "<TR class=TableData>\n"; print "<TD noWrap align=middle><input type=\"checkbox\" checked name=\"selectidtemp\" disabled value=\"{$index}\"></TD>\n"; print "<TD width=120 nowrap>" . $ShowText . "</TD>\n"; print "<TD width=150 nowrap>"; //print_R($_GET); //print $KeyName; //如果隐藏的话就显示为只读 if ($group_filter_Array[4] == "hidden") { //如果隐藏的话就显示为只读 $显示名称 = returntablefield($ChildTableName, $ChildTableFieldValue, $_GET[$KeyName], $ChildTableFieldName); print "<select class=\"SmallSelect\" name=\"" . $KeyName . "\">\n"; print "<option value=\"" . $_GET[$KeyName] . "\" >" . $显示名称 . "[" . $_GET[$KeyName] . "]</option>\n"; print "</select>\n"; } else { //显示成为列表 print "<select class=\"SmallSelect\" name=\"" . $KeyName . "\" >\n"; //print "<option value=\"\" >".$common_html['common_html']['allrecords']."</option>\n"; print "<option value=\"\" >" . $html_etc[$tablename][$list['index_name']] . "[" . $common_html['common_html']['allrecords'] . "]</option>\n"; //2009-12-24加入对列表组的过滤 for ($i = 0; $i < sizeof($rs_a); $i++) { if ($_GET[$KeyName] == $rs_a[$i][$ChildTableFieldValue]) { $CheckedX = "selected"; } else { $CheckedX = ""; } print "<option value=\"" . $rs_a[$i][$ChildTableFieldValue] . "\" {$CheckedX} >" . $rs_a[$i][$ChildTableFieldName] . "[" . $rs_a[$i][$ChildTableFieldValue] . "]</option>\n"; } print "</select>\n"; } //2009-12-24加入对搜索属性的支持 print "<input type=hidden name='searchfield' value='" . $_GET['searchfield'] . "'>\n"; print "<input type=hidden name='searchvalue' value='" . $_GET['searchvalue'] . "'>\n"; print "<input type=hidden name='tablename' value='{$tablename}'>\n"; print "<input type=hidden name='AdvanceSearch' value='{$ADD_SEARCH_VALUE}'>\n"; print "</TD></TR>\n"; } else { //高级搜索时出现的隐藏变量 if ($_GET['actionadv'] == "exportadv_default") { print "<TR class=TableData>\n"; print "<TD noWrap align=middle><input type=\"checkbox\" checked name=\"selectidtemp\" disabled value=\"{$index}\"></TD>\n"; print "<TD width=90% colspan=2>高级搜索:\n"; //print "<select class=\"SmallSelect\" name=\"".$KeyName."\" disabled>\n"; //print "<option value=\"\" >".$common_html['common_html']['allrecords']."</option>\n"; //print "<option value=\"\" >".$html_etc[$tablename][$list['index_name']]."[".$common_html['common_html']['allrecords']."]</option>\n"; //print "</select>\n"; $showlistfieldlist_array = explode(',', $showlistfieldlist); //print_R($showlistfieldlist_array); for ($i = 0; $i < sizeof($showlistfieldlist_array); $i++) { $index = $showlistfieldlist_array[$i]; $list = $columns[$index]; if ($_GET[$list] != "") { $ADD_SEARCH_VALUE .= "&{$list}=" . $_GET[$list]; $ADD_SEARCH_TEXT .= " {$list}:" . $_GET[$list]; } else { if ($_GET[$list . "_最小值"] != "" && $_GET[$list . "_最大值"] != "") { $ADD_SEARCH_VALUE .= "&" . $list . "_最小值=" . $_GET[$list . "_最小值"] . "&" . $list . "_最大值=" . $_GET[$list . "_最大值"] . ""; $ADD_SEARCH_TEXT .= " " . $list . "最小值:" . $_GET[$list . "_最小值"] . " " . $list . "最大值:" . $_GET[$list . "_最大值"] . ""; } else { if ($_GET[$list . "_开始时间"] != "" && $_GET[$list . "_结束时间"] != "") { $ADD_SEARCH_VALUE .= "&" . $list . "_开始时间=" . $_GET[$list . "_开始时间"] . "&" . $list . "_结束时间=" . $_GET[$list . "_结束时间"] . ""; $ADD_SEARCH_TEXT .= " " . $list . "开始时间:" . $_GET[$list . "_开始时间"] . " " . $list . "结束时间:" . $_GET[$list . "_结束时间"] . ""; } } } } print $ADD_SEARCH_TEXT; //print $ADD_SEARCH_VALUE; print "<input type=hidden name='{$KeyName}' value='" . $_GET['searchfield'] . "'>\n"; print "<input type=hidden name='searchfield' value='" . $_GET['searchfield'] . "'>\n"; print "<input type=hidden name='searchvalue' value='" . $_GET['searchvalue'] . "'>\n"; print "<input type=hidden name='tablename' value='{$tablename}'>\n"; print "<input type=hidden name='AdvanceSearch' value='{$ADD_SEARCH_VALUE}'>\n"; print "</TD></TR>\n"; } else { print "<TR class=TableData>\n"; print "<TD noWrap align=middle><input type=\"checkbox\" checked name=\"selectidtemp\" disabled value=\"{$index}\"></TD>\n"; print "<TD width=120 disabled>数据过滤</TD>\n"; print "<TD width=150 nowrap>"; print "<select class=\"SmallSelect\" name=\"" . $KeyName . "\" disabled>\n"; //print "<option value=\"\" >".$common_html['common_html']['allrecords']."</option>\n"; print "<option value=\"\" >" . $html_etc[$tablename][$list['index_name']] . "[" . $common_html['common_html']['allrecords'] . "]</option>\n"; print "</select>\n"; print "<input type=hidden name='searchfield' value='" . $_GET['searchfield'] . "'>\n"; print "<input type=hidden name='searchvalue' value='" . $_GET['searchvalue'] . "'>\n"; print "<input type=hidden name='tablename' value='{$tablename}'>\n"; print "<input type=hidden name='AdvanceSearch' value='{$ADD_SEARCH_VALUE}'>\n"; print "</TD></TR>\n"; } } //附加组数据导出--结束 $showlistfieldlist_array = explode(',', $showlistfieldlist); //print_R($showlistfieldlist_array); for ($i = 0; $i < sizeof($showlistfieldlist_array); $i++) { $index = $showlistfieldlist_array[$i]; $list = $columns[$index]; print "<TR class=TableData>\n"; print "<TD noWrap align=middle><input type=\"checkbox\" checked name=\"selectid\" value=\"{$index}\"></TD>\n"; print "<TD >" . $html_etc[$tablename][$list] . "</TD>\n"; print "<TD >{$list}</TD>\n"; print "</TR>\n"; $temp_function = 'selectid_str_init'; } break; } global $returnmodel; $returnmodelArray = explode(',', $returnmodel); if ($returnmodelArray[1] != "") { $returnmodelURL = $returnmodelArray[1]; } else { $returnmodelURL = "?"; } print "<tr align=\"center\" class=\"TableControl\">\n<td colspan=\"3\" nowrap>\n<div align=\"center\">\n\n\t<input type=\"button\" value=\"" . $common_html['common_html']['export'] . "CSV\" accesskey='v' title=\"" . $common_html['common_html']['accesskey'] . ":ALT+V\" class=\"SmallButton\" onClick=\"selectid_str_init_CSV('{$mark}');\">\n\t<input type=\"button\" value=\" " . $common_html['common_html']['export'] . "EXCEL \" accesskey='x' title=\"" . $common_html['common_html']['accesskey'] . ":ALT+X\" class=\"SmallButton\" onClick=\"selectid_str_init_XLS('{$mark}');\">\n\t<input type=\"button\" accesskey='c' title=\"" . $common_html['common_html']['accesskey'] . ":ALT+C\" value=\"" . $common_html['common_html']['cancel'] . "\" class=\"SmallButton\" onClick=\"location='{$returnmodelURL}'\"></div>\n</td></tr>\n"; table_end(); form_end(); print "<BR>"; }
function print_submit($submit = '', $colspan = 2, $status = "all", $return = 'history.back();') { $common_html = returnsystemlang("common_html"); if ($submit == '') { $submit = $common_html['common_html']['submit']; } if ($status == "all") { print "<TR><TD class=TableControl noWrap align=middle colspan=\"{$colspan}\">\n"; print "<div align=\"center\">\n<INPUT class=SmallButton name={$submit} title={$submit} type=submit value=\"{$submit}\" name=button>\n <INPUT class=SmallButton onclick=\"{$return}\" type=button value='" . $common_html['common_html']['cancel'] . "'>\n</div>\n"; print "</TD></TR>\n"; } if ($status == "simple") { print "<INPUT class=SmallButton title=\"{$submit}\" type=submit value=\"{$submit}\" name=button> \n"; } }