⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tabledetail.asp

📁 办公自动化系统
💻 ASP
字号:
<%'--------------------------------------------------------------------------
'      Project: AMBER-SOFT网络办公系统
'      Module : 联系人
'      By: imafar
'      Discription: 列出谋联系人所有资料活动
'--------------------------------------------------------------------------%>

<%if session("userid")="" then
	response.write "<SCRIPT LANGUAGE='JavaScript'>"&chr(13)
			response.write "<!--"&chr(13)
			response.write "parent.location.href=""/error/error.htm"""&chr(13)&chr(13)
			response.write "//-->"&chr(13)
			response.write "</SCRIPT>"&chr(13)
end if
%>
<!--#include virtual="/_inc/GeneralADO.asp"-->
<html>
<head>
<title>联系人信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%=session("css")%>/person.css" type="text/css">
</head>
<body bgcolor="#F5F4F1" leftmargin="0" topmargin="0" >

<%
function fnGetDataTypeConstant(Value)
select case value
	case 8192
fnGetDataTypeConstant="Array"
 	case  20
fnGetDataTypeConstant="BigInt"
	case   128
fnGetDataTypeConstant="Binary"
	case   11
fnGetDataTypeConstant="Boolean"
	case   8 
fnGetDataTypeConstant="BSTR"
	case   136 
fnGetDataTypeConstant="Chapter"
	case   129 
fnGetDataTypeConstant="Char"
	case   6 
fnGetDataTypeConstant="Currency"
	case   7 
fnGetDataTypeConstant="Date"
	case   133 
fnGetDataTypeConstant="DBDate"
	case   134 
fnGetDataTypeConstant="DBTime"
	case   135 
fnGetDataTypeConstant="DBTimeStamp"
	case   14 
fnGetDataTypeConstant="Decimal"
	case   5 
fnGetDataTypeConstant="Double"
	case   0 
fnGetDataTypeConstant="Empty"
	case   10
fnGetDataTypeConstant="Error"
	case   64
fnGetDataTypeConstant="FileTime"
	case  72
fnGetDataTypeConstant="GUID"
	case   9 
fnGetDataTypeConstant="IDispatch"
 
	case   3 
fnGetDataTypeConstant="Integer"
	case   13 
fnGetDataTypeConstant="IUnknown"
 
	case   205
fnGetDataTypeConstant="LongVarBinary"
	case   201
fnGetDataTypeConstant="LongVarChar"
	case   203
fnGetDataTypeConstant="LongVarWChar"
	case   131 
fnGetDataTypeConstant="Numeric"
	case   138
fnGetDataTypeConstant="PropVariant"
	case   4
fnGetDataTypeConstant="Single"
	case   2
fnGetDataTypeConstant="SmallInt"
	case   16
fnGetDataTypeConstant="TinyInt"
	case   21
fnGetDataTypeConstant="UnsignedBigInt"
	case   19
fnGetDataTypeConstant="UnsignedInt"
	case   18
fnGetDataTypeConstant="UnsignedSmallInt"
	case   17
fnGetDataTypeConstant="UnsignedTinyInt"
	case   132
fnGetDataTypeConstant="UserDefined"
	case   204
fnGetDataTypeConstant="VarBinary"
	case   200
fnGetDataTypeConstant="VarChar"
	case   12
fnGetDataTypeConstant="Variant"
 
	case   139
fnGetDataTypeConstant="VarNumeric"
	case   202
fnGetDataTypeConstant="VarWChar"
	case   130 
fnGetDataTypeConstant="WChar"
end select

end function
function fnGetDataTypeDescription(Value)
select case value
	case 8192
fnGetDataTypeDescription="Array (Does not apply to ADOX.)  A flag value, always combined with another data type constant, that indicates an array of that other data type. 	"
	case  20
fnGetDataTypeDescription="BigInt  Indicates an eight-byte signed integer (DBTYPE_I8). "
	case  128
fnGetDataTypeDescription="Binary  Indicates a binary value (DBTYPE_BYTES). "
	case  11
fnGetDataTypeDescription="Boolean  Indicates a boolean value (DBTYPE_BOOL). "
	case  8
fnGetDataTypeDescription="BSTR  Indicates a null-terminated character string (Unicode) (DBTYPE_BSTR). "
	case  136
fnGetDataTypeDescription="Chapter  Indicates a four-byte chapter value that identifies rows in a child rowset (DBTYPE_HCHAPTER). "
	case  129
fnGetDataTypeDescription="Char  Indicates a string value (DBTYPE_STR). "
	case  6
fnGetDataTypeDescription="Currency  Indicates a currency value (DBTYPE_CY). Currency is a fixed-point number with four digits to the right of the decimal point. 	It is stored in an eight-byte signed integer scaled by 10,000. "
	case  7
fnGetDataTypeDescription="Date  Indicates a date value (DBTYPE_DATE). A date is stored as a double, the whole part of which is the number of days since December 30, 1899, and the fractional part of which is the fraction of a day. "
	case  133
fnGetDataTypeDescription="DBDate  Indicates a date value (yyyymmdd) (DBTYPE_DBDATE). "
	case  134
fnGetDataTypeDescription="DBTime  Indicates a time value (hhmmss) (DBTYPE_DBTIME). "
	case  135
fnGetDataTypeDescription="DBTimeStamp  Indicates a date/time stamp (yyyymmddhhmmss plus a fraction in billionths) (DBTYPE_DBTIMESTAMP)." 
	case  14
fnGetDataTypeDescription="Decimal  Indicates an exact numeric value with a fixed precision and scale (DBTYPE_DECIMAL). "
	case  5
fnGetDataTypeDescription="Double  Indicates a double-precision floating-point value (DBTYPE_R8). "
	case  0
fnGetDataTypeDescription="Empty  Specifies no value (DBTYPE_EMPTY). "
	case  10
fnGetDataTypeDescription="Error  Indicates a 32-bit error code (DBTYPE_ERROR). "
	case  64
fnGetDataTypeDescription="FileTime  Indicates a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (DBTYPE_FILETIME). "
	case  72
fnGetDataTypeDescription="GUID  Indicates a globally unique identifier (GUID) (DBTYPE_GUID). "
	case  9
fnGetDataTypeDescription="IDispatch  Indicates a pointer to an IDispatch interface on a COM object (DBTYPE_IDISPATCH). Note   This data type is currently not supported by ADO. Usage may cause unpredictable results."
 
	case  3
fnGetDataTypeDescription="Integer  Indicates a four-byte signed integer (DBTYPE_I4). "
	case  13
fnGetDataTypeDescription="IUnknown  Indicates a pointer to an IUnknown interface on a COM object (DBTYPE_IUNKNOWN). Note   This data type is currently not supported by ADO. Usage may cause unpredictable results."
 
	case  205
fnGetDataTypeDescription="LongVarBinary  Indicates a long binary value (Parameter object only). "
	case  201
fnGetDataTypeDescription="LongVarChar  Indicates a long string value (Parameter object only). "
	case  203
fnGetDataTypeDescription="LongVarWChar  Indicates a long null-terminated Unicode string value (Parameter object only). "
	case  131
fnGetDataTypeDescription="Numeric  Indicates an exact numeric value with a fixed precision and scale (DBTYPE_NUMERIC). "
	case  138
fnGetDataTypeDescription="PropVariant  Indicates an Automation PROPVARIANT (DBTYPE_PROP_VARIANT). "
	case  4
fnGetDataTypeDescription="Single  Indicates a single-precision floating-point value (DBTYPE_R4). "
	case  2
fnGetDataTypeDescription="SmallInt  Indicates a two-byte signed integer (DBTYPE_I2). "
	case  16
fnGetDataTypeDescription="TinyInt  Indicates a one-byte signed integer (DBTYPE_I1). "
	case  21
fnGetDataTypeDescription="UnsignedBigInt  Indicates an eight-byte unsigned integer (DBTYPE_UI8). "
	case  19
fnGetDataTypeDescription="UnsignedInt  Indicates a four-byte unsigned integer (DBTYPE_UI4). "
	case  18
fnGetDataTypeDescription="UnsignedSmallInt  Indicates a two-byte unsigned integer (DBTYPE_UI2). "
	case  17
fnGetDataTypeDescription="UnsignedTinyInt  Indicates a one-byte unsigned integer (DBTYPE_UI1). "
	case  132
fnGetDataTypeDescription="UserDefined  Indicates a user-defined variable (DBTYPE_UDT). "
	case  204
fnGetDataTypeDescription="VarBinary  Indicates a binary value (Parameter object only). "
	case  200
fnGetDataTypeDescription="VarChar  Indicates a string value (Parameter object only). "
	case  12
fnGetDataTypeDescription="Variant  Indicates an Automation Variant (DBTYPE_VARIANT). Note   This data type is currently not supported by adO. Usage may cause unpredictable results."
 
	case  139
fnGetDataTypeDescription="VarNumeric  Indicates a numeric value (Parameter object only). "
	case  202
fnGetDataTypeDescription="VarWChar  Indicates a null-terminated Unicode character string. "
	case  130
fnGetDataTypeDescription="WChar  Indicates a null-terminated Unicode character string (DBTYPE_WSTR). "
end select
end function


	'object_id=request.querystring("id")
	'oRS.open "select name from sysobjects where id="&object_id,oCon
	'if not oRS.eof then 
	'	table_name=oRS("name")
	'else
	'	response.write "出错了,数据库里没有这个表!"
	'	response.end
	'end if
	'oRS.close
	table_name=trim(request.querystring("table_name"))
	oRS.open "select top 1 * from ["& table_name &"]",oCon,1,3

%>
<SCRIPT LANGUAGE="JavaScript">
<!--
function fnPopFilterTypeDlg(obj)
{
	showx = event.screenX - event.offsetX - 8  ; // + deltaX;
	showy = event.screenY - event.offsetY + 8; // + deltaY;

	retval = window.showModalDialog("FilterType.asp", "", "dialogWidth:197px; dialogHeight:210px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes;scrollbars:no;Resizable=no; help=0;");
	if( retval != null ){
		alert(obj.value)
		obj.value = retval;
	}else{
		alert("canceled");
	}
}

function fnChangeTypeID(obj1,obj2)
{
	if (obj1.checked)
	{
		fnPopFilterTypeDlg(obj2)
	}
	//alert(obj2.value);
}
function fnChangeSumStr(Param)
{
	//eval()
}

//-->
</SCRIPT>
<FORM METHOD=POST ACTION="TABLEDETAIL_POST.ASP">
<INPUT TYPE="hidden" NAME="object_id" value="<%=object_id%>">
<INPUT TYPE="hidden" NAME="table_name" value="<%=table_name%>">
<INPUT TYPE="hidden" NAME="sum_str" value="">

<TABLE width=100%>
<TR>
	<TD align=right>表:</TD><TD >表:<%=table_name%></TD>
</TR>
<TR>
	<TD align=right>显示名称:</TD><TD ><INPUT TYPE="text" NAME="table_caption" value="<%=table_name%>"></TD>
</TR>
</TABLE>
<table border=1 width=100%>

<%
		response.write "<tr><td>字段名</td><td>类型</td><td>长度</td><td>显示此列</td><td>允许排序</td><td>允许查找</td><td>列标题</td><td>过滤器</td><td>统计</td><td>显示串</td><td>风格</td><td>统计标题</td></tr>"
	for each obj in oRS.fields
		
		response.write "<tr><td>" & obj.name & "</td><td title="""&fnGetDataTypeDescription(obj.type)&""">"& fnGetDataTypeConstant(obj.type) &"<INPUT TYPE=""hidden"" name=""DataType_" & obj.name & """ value=""" & obj.type & """></td><td>"&  obj.definedsize &"</td><td><INPUT TYPE=""checkbox"" NAME=""disp_" & obj.name & """ VALUE=""1""></td><td><INPUT TYPE=""checkbox"" NAME=""SORT_" & obj.name & """ VALUE=""1""></td><td><INPUT TYPE=""checkbox"" NAME=""SEARCH_" & obj.name & """ VALUE=""1""></td><td><INPUT TYPE=""text"" size=8 NAME=""DISP_CAPTION_" & obj.name & """></td><td><INPUT TYPE=""checkbox"" NAME=""FILTER_TYPE_" & obj.name & """  onclick=""fnChangeTypeID(this,FILTER_TYPE_ID_" & obj.name & ")""><INPUT TYPE=""text"" VALUE=""1"" NAME=""FILTER_TYPE_ID_" & obj.name & """ ></td><td><SELECT NAME=""STATISTIC_" & obj.name & """><option value=0>无</OPTION><option>总计</OPTION><option>平均值</OPTION></SELECT></td><td><INPUT TYPE=""text"" NAME=""FIELD_STRING_" & obj.name & """></td><td><INPUT TYPE=""text"" NAME=""FIELD_STYLE_" & obj.name & """></td><td><INPUT TYPE=""text"" NAME=""STAT_CAPTION_" & obj.name & """></td></tr>"

	next
%>
</table>

<%
	oRS.close
%>
<TABLE width=100%>
<TR>
	
	<TD align=center><INPUT TYPE="submit" name="保存" value="保存"><INPUT TYPE="button" name="返回" onclick="history.back()" value="返回"></TD>
</TR>
</TABLE>

</FORM>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -