这是我的一个asp页面。有人知道怎么转吗?<!--#include file="../../../system/cnpvpsysconn.asp"-->
<!--#include file="../../../system/const.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../../system/shstyle.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" media="all" href="../../../system/js/calendar-win2k-cold-2.css" title="win2k-cold-1" />
<SCRIPT src="../../../system/js/calendar.js" type=text/javascript></SCRIPT>
<SCRIPT src="../../../system/js/calendar-en.js" type=text/javascript></SCRIPT>
<SCRIPT src="../../../system/js/calendar2.js" type=text/javascript></SCRIPT> <script language="javascript">
function FanAll(form){
for (var i=0;i<form.elements.length;i++){
var e = form.elements[i];
if (e.name == 'selAnnounce' && e.checked == false){ e.checked = true; }
else { e.checked = false;}
}}function FanAll1(form){
for (var i=0;i<form.elements.length;i++){
var e = form.elements[i];
if (e.name == 'selok'&&e.checked == false){ e.checked = true; }
else { e.checked = false;}
}}
function FanAll2(form){
for (var i=0;i<form.elements.length;i++){
var e = form.elements[i];
if (e.name == 'selno'&&e.checked == false){ e.checked = true; }
else { e.checked = false;}
}}
function delit(viewaddform)
{
if (confirm("确定删除数据吗?"))
{
viewaddform.action="dljg_action.asp?action=delit";
viewaddform.submit();
}
} function audit(viewaddform)
{
viewaddform.action="dljg_action.asp?action=audit";
viewaddform.submit();
}
function auditno(viewaddform)
{
viewaddform.action="dljg_action.asp?action=auditno";
viewaddform.submit();
}
</script>
<SCRIPT language=javascript>
function add() {
document.location="dljg_add.asp";
}
</Script>
</head>
<body><br>
<table width="99%" height="30" align=center border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="14" valign="top" class="titledh">信息发布管理 - 代理机构管理</td>
</tr>
<tr>
<td height="35" class="title">
<div align="left"> 代理机构管理</div></td>
</tr>
</table>
<table width="99%" border="1" align="center"cellpadding="0" cellspacing="0" bordercolorlight="#aaaaaa" bordercolordark="#F0F8FF" bgcolor="#F0F9FF" rules=none class="unnamed1">
<form method="POST" name="myform" action="dljg.asp" >
<tr>
<td width="2%" height="60">
<div align="left"></div></td>
<td width="98%"><strong> 语言:
<select name="languages">
<option value="">不指定</option>
<option value="1">中文</option>
<option value="0">英文</option>
</select>
机构名称:
<input name="name" type="text" id="name" size="20">
联系人 :
<input name="lxr" type="text" id="lxr" size="20">
<br>
</strong> <strong> 时间: </strong>
<input name="datetime" type="text" id="datetime" size="15"><input name="reset" type="reset" onClick="return showCalendar('datetime', 'y-mm-dd');" value="...">
至
<input name="datetimere" type="text" id="datetimere" size="15"><input name="reset1" type="reset"
onClick="return showCalendar('datetimere', 'y-mm-dd');" value="...">
<input name="Submit" type="submit" class="button" value="查询">
<input name="button1233" type="button" class="button" value="新加代理机构" onClick="add()">
</td>
</tr>
</form>
</table>
<% action=request("action")
name=replace(trim(request("name")),"'","''")
lxr=replace(trim(request("lxr")),"'","''")
languages=replace(trim(request("languages")),"'","''")
datetime=replace(trim(request("datetime")),"'","''")
datetimere=replace(trim(request("datetimere")),"'","''")
Url_Add="?lxr="&lxr&"&name="&name&"&datetime="&datetime&"&datetimere="&datetimere&"&"
Dim CurPage
If CheckStr(Request.QueryString("Page"))<>Empty Then
Curpage=CheckStr(Request.QueryString("Page"))
If IsInteger(Curpage)=False OR Curpage<0 Then Curpage=1
Else
Curpage=1
End If
Dim arma
Set Arma=Server.CreateObject("Adodb.RecordSet")
sql="SELECT * from organization "
sql=sql+" where lxr like '%"&lxr&"%' and name like '%"&name&"%' and languages like '%"&languages&"%'"
if Request("datetime")<>"" and request("datetimere")="" then
sql=sql+" and convert(char(10),regdate,120) >= '"&Request("datetime")&"'"
end if
if Request("datetime")="" and request("datetimere")<>"" then
sql=sql+" and convert(char(10),regdate,120) <= '"&Request("datetimere")&"'"
end if
if Request("datetime")<>"" and request("datetimere")<>"" then
sql=sql+" and convert(char(10),regdate,120) between '"&Request("datetime")&"'"&" and '"&request("datetimere")&"'"
end if
sql=sql+" order by regdate desc"
ArMa.Open SQL,Conn,1,1 IF ArMa.EOF AND ArMa.BOF Then
Response.write "<table width=99% border=1 rules=none align=center cellpadding=0 cellspacing=0 bordercolorlight=#aaaaaa bordercolordark=#F0F8FF class=unnamed1>"
Response.write "<tr> <td width=99% height=25> <font color=red>没有记录</font></td></tr></table>"
else
%>
<table width="99%" border="0" align="center"cellpadding="0" cellspacing="0" bordercolorlight="#FFE084" bordercolordark="#ffffff" bgcolor="#FCFCFC" >
<!--DWLayoutTable-->
<tr>
<td height="25"> · 共有[<font color="#ff0000"><%=ArMa.recordcount%></font>]条记录</td>
</tr>
</table>
<table width="99%" border="1" rules=none align="center"cellpadding="0" cellspacing="0" bordercolorlight="#aaaaaa" bordercolordark="#F0F8FF" bgcolor="#F5F5F5" class="unnamed1">
<form name="viewaddform" method="POST">
<tr bgcolor="#CCCCCC">
<td width="58" height="18" > <div align="center"> <strong> <font color="#FFFFFF">
<input type="submit" value="删除" name="del" onclick="delit(viewaddform)" class="s02">
</font></strong></div></td>
<td width="52" height="18"> <div align="center"><strong>序号</strong></div></td>
<td width="271"><strong>机构名称</strong></td>
<td width="131"><strong>联系人</strong></td>
<td width="80"><strong>发布时间</strong></td>
<td width="81"><div align="center"><strong>语言</strong></div></td>
<td width="79"><strong>状态</strong></td>
<td width="58"><strong><font color="#000000">
<input type="submit" value="审核" name="del2" onClick="audit(viewaddform)" class="s02">
</font></strong></td>
<td width="58"><strong><font color="#000000">
<input type="submit" value="注销" name="del1" onClick="auditno(viewaddform)" class="s02">
</font></strong></td>
<td width="79"> <p align="center"><strong><font color="#000000">修改
<input type="hidden" name="Curpage" value="<%=cstr(Curpage)%>">
<input type="hidden" name="lxr" value="<%=trim(request("lxr"))%>">
<input type="hidden" name="name" value="<%=trim(request("name"))%>">
<input type="hidden" name="datetime" value="<%=trim(request("datetime"))%>">
<input type="hidden" name="datetimere" value="<%=trim(request("datetimere"))%>">
</font></strong></td>
</tr>
<%
Dim Comm_Nums,MultiPages,PageCount
ArMa.PageSize=SitePerPage
ArMa.AbsolutePage=CurPage
Comm_Nums=ArMa.RecordCount
MultiPages=MultiPage(Comm_Nums,SitePerPage,CurPage,Url_Add)
i=0
Do Until ArMa.EOF OR PageCount=SitePerPage
i=i+1
if i mod 2 =0 then%>
<tr bgcolor="#F7FCFF">
<%else%>
<tr bgcolor="#ffffff">
<%end if%>
<td width="58" height="25" > <div align="center">
<input type="checkbox" name='selAnnounce' value="<%=ArMa("org_id")%>">
</div></td>
<td width="52" height="25" ><div align="center"><%=i%></div></td>
<td width="271" height="25" onMouseOver="this.style.backgroundColor='#E8EFFF';" onMouseOut="this.style.backgroundColor='#F7FCFF';" ><a href="javascript:;" onClick="javascript:window.open('../../../main/cn/dljg_view.asp?org_id=<%=arma("org_id")%>','查看','width=466,height=500,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');"><%=trim(ArMa("name"))%></a></td>
<td width="131" height="25" ><%=trim(ArMa("lxr"))%></td>
<td width="80" height="25" ><%=left(trim(ArMa("regdate")),10)%></td>
<td width="81" height="25" ><div align="center"><%if trim(ArMa("languages"))="1" then response.write "中文" else response.write "英文" end if%></div></td>
<td width="79" height="25" > <%if trim(ArMa("state"))="1" then %>
通过
<%else%> <font color="#FF0000">未审核</font> <%end if %> </td>
<td width="58" height="25" > <%if trim(ArMa("state"))<>"1" then %> <input type="checkbox" name='selok' checked value="<%=trim(ArMa("org_id"))%>">
<%else%> <input type="checkbox" name='selok' value="<%=trim(ArMa("org_id"))%>">
<%end if%> </td>
<td width="58" height="25" > <%if trim(ArMa("state"))="1" then %> <input type="checkbox" name='selno' checked value="<%=trim(ArMa("org_id"))%>">
<%else%> <input type="checkbox" name='selno' value="<%=trim(ArMa("org_id"))%>">
<%end if%> </td>
<td width="79" align="left" > <p align="center"><a href=dljg_modify.asp?org_id=<%=arma("org_id")%>><img src="../../../images/edit.gif" width="18" height="13" border="0"></a>
</tr>
<%
PageCount=PageCount+1
ArMa.MoveNext
Loop
ArMa.Close
Set ArMa=Nothing
%>
</form>
</table>
<!--#include file="../../../system/const.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../../system/shstyle.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" media="all" href="../../../system/js/calendar-win2k-cold-2.css" title="win2k-cold-1" />
<SCRIPT src="../../../system/js/calendar.js" type=text/javascript></SCRIPT>
<SCRIPT src="../../../system/js/calendar-en.js" type=text/javascript></SCRIPT>
<SCRIPT src="../../../system/js/calendar2.js" type=text/javascript></SCRIPT> <script language="javascript">
function FanAll(form){
for (var i=0;i<form.elements.length;i++){
var e = form.elements[i];
if (e.name == 'selAnnounce' && e.checked == false){ e.checked = true; }
else { e.checked = false;}
}}function FanAll1(form){
for (var i=0;i<form.elements.length;i++){
var e = form.elements[i];
if (e.name == 'selok'&&e.checked == false){ e.checked = true; }
else { e.checked = false;}
}}
function FanAll2(form){
for (var i=0;i<form.elements.length;i++){
var e = form.elements[i];
if (e.name == 'selno'&&e.checked == false){ e.checked = true; }
else { e.checked = false;}
}}
function delit(viewaddform)
{
if (confirm("确定删除数据吗?"))
{
viewaddform.action="dljg_action.asp?action=delit";
viewaddform.submit();
}
} function audit(viewaddform)
{
viewaddform.action="dljg_action.asp?action=audit";
viewaddform.submit();
}
function auditno(viewaddform)
{
viewaddform.action="dljg_action.asp?action=auditno";
viewaddform.submit();
}
</script>
<SCRIPT language=javascript>
function add() {
document.location="dljg_add.asp";
}
</Script>
</head>
<body><br>
<table width="99%" height="30" align=center border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="14" valign="top" class="titledh">信息发布管理 - 代理机构管理</td>
</tr>
<tr>
<td height="35" class="title">
<div align="left"> 代理机构管理</div></td>
</tr>
</table>
<table width="99%" border="1" align="center"cellpadding="0" cellspacing="0" bordercolorlight="#aaaaaa" bordercolordark="#F0F8FF" bgcolor="#F0F9FF" rules=none class="unnamed1">
<form method="POST" name="myform" action="dljg.asp" >
<tr>
<td width="2%" height="60">
<div align="left"></div></td>
<td width="98%"><strong> 语言:
<select name="languages">
<option value="">不指定</option>
<option value="1">中文</option>
<option value="0">英文</option>
</select>
机构名称:
<input name="name" type="text" id="name" size="20">
联系人 :
<input name="lxr" type="text" id="lxr" size="20">
<br>
</strong> <strong> 时间: </strong>
<input name="datetime" type="text" id="datetime" size="15"><input name="reset" type="reset" onClick="return showCalendar('datetime', 'y-mm-dd');" value="...">
至
<input name="datetimere" type="text" id="datetimere" size="15"><input name="reset1" type="reset"
onClick="return showCalendar('datetimere', 'y-mm-dd');" value="...">
<input name="Submit" type="submit" class="button" value="查询">
<input name="button1233" type="button" class="button" value="新加代理机构" onClick="add()">
</td>
</tr>
</form>
</table>
<% action=request("action")
name=replace(trim(request("name")),"'","''")
lxr=replace(trim(request("lxr")),"'","''")
languages=replace(trim(request("languages")),"'","''")
datetime=replace(trim(request("datetime")),"'","''")
datetimere=replace(trim(request("datetimere")),"'","''")
Url_Add="?lxr="&lxr&"&name="&name&"&datetime="&datetime&"&datetimere="&datetimere&"&"
Dim CurPage
If CheckStr(Request.QueryString("Page"))<>Empty Then
Curpage=CheckStr(Request.QueryString("Page"))
If IsInteger(Curpage)=False OR Curpage<0 Then Curpage=1
Else
Curpage=1
End If
Dim arma
Set Arma=Server.CreateObject("Adodb.RecordSet")
sql="SELECT * from organization "
sql=sql+" where lxr like '%"&lxr&"%' and name like '%"&name&"%' and languages like '%"&languages&"%'"
if Request("datetime")<>"" and request("datetimere")="" then
sql=sql+" and convert(char(10),regdate,120) >= '"&Request("datetime")&"'"
end if
if Request("datetime")="" and request("datetimere")<>"" then
sql=sql+" and convert(char(10),regdate,120) <= '"&Request("datetimere")&"'"
end if
if Request("datetime")<>"" and request("datetimere")<>"" then
sql=sql+" and convert(char(10),regdate,120) between '"&Request("datetime")&"'"&" and '"&request("datetimere")&"'"
end if
sql=sql+" order by regdate desc"
ArMa.Open SQL,Conn,1,1 IF ArMa.EOF AND ArMa.BOF Then
Response.write "<table width=99% border=1 rules=none align=center cellpadding=0 cellspacing=0 bordercolorlight=#aaaaaa bordercolordark=#F0F8FF class=unnamed1>"
Response.write "<tr> <td width=99% height=25> <font color=red>没有记录</font></td></tr></table>"
else
%>
<table width="99%" border="0" align="center"cellpadding="0" cellspacing="0" bordercolorlight="#FFE084" bordercolordark="#ffffff" bgcolor="#FCFCFC" >
<!--DWLayoutTable-->
<tr>
<td height="25"> · 共有[<font color="#ff0000"><%=ArMa.recordcount%></font>]条记录</td>
</tr>
</table>
<table width="99%" border="1" rules=none align="center"cellpadding="0" cellspacing="0" bordercolorlight="#aaaaaa" bordercolordark="#F0F8FF" bgcolor="#F5F5F5" class="unnamed1">
<form name="viewaddform" method="POST">
<tr bgcolor="#CCCCCC">
<td width="58" height="18" > <div align="center"> <strong> <font color="#FFFFFF">
<input type="submit" value="删除" name="del" onclick="delit(viewaddform)" class="s02">
</font></strong></div></td>
<td width="52" height="18"> <div align="center"><strong>序号</strong></div></td>
<td width="271"><strong>机构名称</strong></td>
<td width="131"><strong>联系人</strong></td>
<td width="80"><strong>发布时间</strong></td>
<td width="81"><div align="center"><strong>语言</strong></div></td>
<td width="79"><strong>状态</strong></td>
<td width="58"><strong><font color="#000000">
<input type="submit" value="审核" name="del2" onClick="audit(viewaddform)" class="s02">
</font></strong></td>
<td width="58"><strong><font color="#000000">
<input type="submit" value="注销" name="del1" onClick="auditno(viewaddform)" class="s02">
</font></strong></td>
<td width="79"> <p align="center"><strong><font color="#000000">修改
<input type="hidden" name="Curpage" value="<%=cstr(Curpage)%>">
<input type="hidden" name="lxr" value="<%=trim(request("lxr"))%>">
<input type="hidden" name="name" value="<%=trim(request("name"))%>">
<input type="hidden" name="datetime" value="<%=trim(request("datetime"))%>">
<input type="hidden" name="datetimere" value="<%=trim(request("datetimere"))%>">
</font></strong></td>
</tr>
<%
Dim Comm_Nums,MultiPages,PageCount
ArMa.PageSize=SitePerPage
ArMa.AbsolutePage=CurPage
Comm_Nums=ArMa.RecordCount
MultiPages=MultiPage(Comm_Nums,SitePerPage,CurPage,Url_Add)
i=0
Do Until ArMa.EOF OR PageCount=SitePerPage
i=i+1
if i mod 2 =0 then%>
<tr bgcolor="#F7FCFF">
<%else%>
<tr bgcolor="#ffffff">
<%end if%>
<td width="58" height="25" > <div align="center">
<input type="checkbox" name='selAnnounce' value="<%=ArMa("org_id")%>">
</div></td>
<td width="52" height="25" ><div align="center"><%=i%></div></td>
<td width="271" height="25" onMouseOver="this.style.backgroundColor='#E8EFFF';" onMouseOut="this.style.backgroundColor='#F7FCFF';" ><a href="javascript:;" onClick="javascript:window.open('../../../main/cn/dljg_view.asp?org_id=<%=arma("org_id")%>','查看','width=466,height=500,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');"><%=trim(ArMa("name"))%></a></td>
<td width="131" height="25" ><%=trim(ArMa("lxr"))%></td>
<td width="80" height="25" ><%=left(trim(ArMa("regdate")),10)%></td>
<td width="81" height="25" ><div align="center"><%if trim(ArMa("languages"))="1" then response.write "中文" else response.write "英文" end if%></div></td>
<td width="79" height="25" > <%if trim(ArMa("state"))="1" then %>
通过
<%else%> <font color="#FF0000">未审核</font> <%end if %> </td>
<td width="58" height="25" > <%if trim(ArMa("state"))<>"1" then %> <input type="checkbox" name='selok' checked value="<%=trim(ArMa("org_id"))%>">
<%else%> <input type="checkbox" name='selok' value="<%=trim(ArMa("org_id"))%>">
<%end if%> </td>
<td width="58" height="25" > <%if trim(ArMa("state"))="1" then %> <input type="checkbox" name='selno' checked value="<%=trim(ArMa("org_id"))%>">
<%else%> <input type="checkbox" name='selno' value="<%=trim(ArMa("org_id"))%>">
<%end if%> </td>
<td width="79" align="left" > <p align="center"><a href=dljg_modify.asp?org_id=<%=arma("org_id")%>><img src="../../../images/edit.gif" width="18" height="13" border="0"></a>
</tr>
<%
PageCount=PageCount+1
ArMa.MoveNext
Loop
ArMa.Close
Set ArMa=Nothing
%>
</form>
</table>
<tr>
<td width="48%" height="25"> <input type=checkbox name=del_all1 value=1 onclick=FanAll(viewaddform)>
<input type=checkbox name=del_all2 value=1 onclick=FanAll1(viewaddform)>
<input type=checkbox name=del_all3 value=1 onclick=FanAll2(viewaddform)>全选
</td>
<td width="52%">
<% Response.Write(MultiPages)
%>
</td>
</tr>
</table>
<%end if%>
</body>
</html>
name=replace(trim(request("name")),"'","''")
lxr=replace(trim(request("lxr")),"'","''")
languages=replace(trim(request("languages")),"'","''")
datetime=replace(trim(request("datetime")),"'","''")
datetimere=replace(trim(request("datetimere")),"'","''")
Url_Add="?lxr="&lxr&"&name="&name&"&datetime="&datetime&"&datetimere="&datetimere&"&"
Dim CurPage
If CheckStr(Request.QueryString("Page"))<>Empty Then
Curpage=CheckStr(Request.QueryString("Page"))
If IsInteger(Curpage)=False OR Curpage<0 Then Curpage=1
Else
Curpage=1
End If
Dim arma
Set Arma=Server.CreateObject("Adodb.RecordSet")
sql="SELECT * from organization "
sql=sql+" where lxr like '%"&lxr&"%' and name like '%"&name&"%' and languages like '%"&languages&"%'"
if Request("datetime")<>"" and request("datetimere")="" then
sql=sql+" and convert(char(10),regdate,120) >= '"&Request("datetime")&"'"
end if
if Request("datetime")="" and request("datetimere")<>"" then
sql=sql+" and convert(char(10),regdate,120) <= '"&Request("datetimere")&"'"
end if
if Request("datetime")<>"" and request("datetimere")<>"" then
sql=sql+" and convert(char(10),regdate,120) between '"&Request("datetime")&"'"&" and '"&request("datetimere")&"'"
end if
sql=sql+" order by regdate desc"
ArMa.Open SQL,Conn,1,1 IF ArMa.EOF AND ArMa.BOF Then
Response.write "<table width=99% border=1 rules=none align=center cellpadding=0 cellspacing=0 bordercolorlight=#aaaaaa bordercolordark=#F0F8FF class=unnamed1>"
Response.write "<tr> <td width=99% height=25> <font color=red>没有记录</font></td></tr></table>"
else
%>
和所有的<input type="hidden" name="Curpage" value="<%=cstr(Curpage)%>">
<input type="hidden" name="lxr" value="<%=trim(request("lxr"))%>">
<input type="hidden" name="name" value="<%=trim(request("name"))%>">
<input type="hidden" name="datetime" value="<%=trim(request("datetime"))%>">
<input type="hidden" name="datetimere" value="<%=trim(request("datetimere"))%>">
这种的。怎么改呀。
<input type="hidden" name="lxr" value="<%=trim(request("lxr"))%>">
<input type="hidden" name="name" value="<%=trim(request("name"))%>">
<input type="hidden" name="datetime" value="<%=trim(request("datetime"))%>">
<input type="hidden" name="datetimere" value="<%=trim(request("datetimere"))%>">
只要这些能挪过来用了。那其他的就不是问题了。 在aspx中不让用这个 <%=trim(request("datetimere"))%> 有什么能把这个显示出来的方法吗?
public string lxr;
Page_Load:lxr = Request.QueryString["lxr"];前台 <input type="hidden" name="lxr" value='<%=lxr%>'>
<%else%>
<tr bgcolor="#ffffff">
<%end if%>
<td width="58" height="25" > <div align="center">
<input type="checkbox" name='selAnnounce' value="<%=ArMa("org_id")%>">
</div></td>
这里的<%else%>和<%=ArMa("org_id")%>怎么改呢。
有<% %>的,在后台code behind中创建对应的方法。如果<% %>中间有Response.Write(),将Response.Write()中的字符串内容作为方法的返回值返回,并在前台页面相关位置添加Literal空间,将返回值付给Literal的Text。
如果html控件中有<%= %>进行属性值绑定,可以在后台使用Attribute.Add()和Style.Add()方法添加相应属性