帮忙一段php代码转成asp的....
<?phprequire_once"../include/function.php";(替换成conn.asp)if(!empty($_GET['qr'])){$sql=...
<?php
require_once "../include/function.php";(替换成conn.asp)
if(!empty($_GET['qr']))
{
$sql = "update web_user set lmzt=2 where id=".$_GET['qr'];
if(mssql_query($sql))
{
echo "<script>location.href='user.asp';</script>";
}
}
$sql = "select * from web_user where lmfrom is not NULL order by id desc";
$re = mssql_query($sql);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style></head>
<body>
<table width="100%" border="0" cellspacing="1" cellpadding="5" bgcolor="#C0C0C0">
<tr>
<td align="center" bgcolor="#F7F7F7">编号</td>
<td align="center" bgcolor="#F7F7F7">用户名</td>
<td align="center" bgcolor="#F7F7F7">学校</td>
<td align="center" bgcolor="#F7F7F7">学校用户ID</td>
<td align="center" bgcolor="#F7F7F7">注册IP</td>
<td align="center" bgcolor="#F7F7F7">状态</td>
</tr>
<?php
while($rs = mssql_fetch_object($re)) {
?>
<tr>
<td align="center" bgcolor="#F7F7F7"><?php echo $rs->id; ?></td>
<td align="center" bgcolor="#F7F7F7"><?php echo $rs->username; ?></td>
<td align="center" bgcolor="#F7F7F7"><?php echo $rs->lmfrom; ?></td>
<td align="center" bgcolor="#F7F7F7"><?php echo $rs->lmuid; ?></td>
<td align="center" bgcolor="#F7F7F7"><?php echo $rs->lmip; ?></td>
<td align="center" bgcolor="#F7F7F7">
<?php
if($rs->lmzt == 1) echo "<a href='?qr=".$rs->id."'>未确认</a>";
if($rs->lmzt == 2) echo "已确认";
?>
</td>
</tr>
<?php } ?>
</table>
</body>
</html> 展开
require_once "../include/function.php";(替换成conn.asp)
if(!empty($_GET['qr']))
{
$sql = "update web_user set lmzt=2 where id=".$_GET['qr'];
if(mssql_query($sql))
{
echo "<script>location.href='user.asp';</script>";
}
}
$sql = "select * from web_user where lmfrom is not NULL order by id desc";
$re = mssql_query($sql);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style></head>
<body>
<table width="100%" border="0" cellspacing="1" cellpadding="5" bgcolor="#C0C0C0">
<tr>
<td align="center" bgcolor="#F7F7F7">编号</td>
<td align="center" bgcolor="#F7F7F7">用户名</td>
<td align="center" bgcolor="#F7F7F7">学校</td>
<td align="center" bgcolor="#F7F7F7">学校用户ID</td>
<td align="center" bgcolor="#F7F7F7">注册IP</td>
<td align="center" bgcolor="#F7F7F7">状态</td>
</tr>
<?php
while($rs = mssql_fetch_object($re)) {
?>
<tr>
<td align="center" bgcolor="#F7F7F7"><?php echo $rs->id; ?></td>
<td align="center" bgcolor="#F7F7F7"><?php echo $rs->username; ?></td>
<td align="center" bgcolor="#F7F7F7"><?php echo $rs->lmfrom; ?></td>
<td align="center" bgcolor="#F7F7F7"><?php echo $rs->lmuid; ?></td>
<td align="center" bgcolor="#F7F7F7"><?php echo $rs->lmip; ?></td>
<td align="center" bgcolor="#F7F7F7">
<?php
if($rs->lmzt == 1) echo "<a href='?qr=".$rs->id."'>未确认</a>";
if($rs->lmzt == 2) echo "已确认";
?>
</td>
</tr>
<?php } ?>
</table>
</body>
</html> 展开
展开全部
<!--#include file="conn.asp"-->
<%
qr=cint(request.querystring("qr") )
if qr = "" then
sql = "update web_user set lmzt=2 where id="&qr
conn.execute sql '这里的conn请自行修改
response.write "<script>location.href='user.asp';</script>";
end if
sql= "select * from web_user where lmfrom is not NULL order by id desc"
set rs=conn.execute sql
%>
中间略过
<td align="center" bgcolor="#F7F7F7"><%=rs("id")%></td>
参照这样写
if rs("lmzt") = 1 then
response.write "<a href="?qr="&<%=rs("id")%>&">未确认</a>"
else if rs("lmzt") = 2 then
response.write "<a href="?qr="&<%=rs("id")%>&">已确认</a>"
end if
手写代码,谢绝他人复制.楼主使用前请检查我是否有错别字现象,以免影响使用.
<%
qr=cint(request.querystring("qr") )
if qr = "" then
sql = "update web_user set lmzt=2 where id="&qr
conn.execute sql '这里的conn请自行修改
response.write "<script>location.href='user.asp';</script>";
end if
sql= "select * from web_user where lmfrom is not NULL order by id desc"
set rs=conn.execute sql
%>
中间略过
<td align="center" bgcolor="#F7F7F7"><%=rs("id")%></td>
参照这样写
if rs("lmzt") = 1 then
response.write "<a href="?qr="&<%=rs("id")%>&">未确认</a>"
else if rs("lmzt") = 2 then
response.write "<a href="?qr="&<%=rs("id")%>&">已确认</a>"
end if
手写代码,谢绝他人复制.楼主使用前请检查我是否有错别字现象,以免影响使用.
展开全部
<!--#include file="conn.asp"-->
<%
If Request.QueryString("qr")<>"" Then
Sql = "update web_user set lmzt=2 where id="&Request.QueryString("qr")
Conn.Execute(Sql)'Conn是你建立的数据库连接对象,Set Conn = Server.CreateObject("ADODB.Connection")
Response.Write "<script>location.href='user.asp';</script>"
End If
Sql = "select * from web_user where lmfrom is not NULL order by id desc"
Set Rs = Conn.Execute(Sql)
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style></head>
<body>
<table width="100%" border="0" cellspacing="1" cellpadding="5" bgcolor="#C0C0C0">
<tr>
<td align="center" bgcolor="#F7F7F7">编号</td>
<td align="center" bgcolor="#F7F7F7">用户名</td>
<td align="center" bgcolor="#F7F7F7">学校</td>
<td align="center" bgcolor="#F7F7F7">学校用户ID</td>
<td align="center" bgcolor="#F7F7F7">注册IP</td>
<td align="center" bgcolor="#F7F7F7">状态</td>
</tr>
<%
Do While Not Rs.Eof
%>
<tr>
<td align="center" bgcolor="#F7F7F7"><%=Rs("id")%></td>
<td align="center" bgcolor="#F7F7F7"><%=Rs("username")%></td>
<td align="center" bgcolor="#F7F7F7"><%=Rs("lmfrom")%></td>
<td align="center" bgcolor="#F7F7F7"><%=Rs("lmuid")%></td>
<td align="center" bgcolor="#F7F7F7"><%=Rs("lmip")%></td>
<td align="center" bgcolor="#F7F7F7"><%
if Rs("lmzt")=1 Then Response.Write "<a href='?qr="&Rs("id")&"'>未确认</a>"
if Rs("lmzt")=2 Then Response.Write "已确认"
%>
</td>
</tr>
<%
Rs.MoveNext
Loop
Rs.Close
Set Rs = Nothing
%>
</table>
</body>
</html>
<%
If Request.QueryString("qr")<>"" Then
Sql = "update web_user set lmzt=2 where id="&Request.QueryString("qr")
Conn.Execute(Sql)'Conn是你建立的数据库连接对象,Set Conn = Server.CreateObject("ADODB.Connection")
Response.Write "<script>location.href='user.asp';</script>"
End If
Sql = "select * from web_user where lmfrom is not NULL order by id desc"
Set Rs = Conn.Execute(Sql)
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style></head>
<body>
<table width="100%" border="0" cellspacing="1" cellpadding="5" bgcolor="#C0C0C0">
<tr>
<td align="center" bgcolor="#F7F7F7">编号</td>
<td align="center" bgcolor="#F7F7F7">用户名</td>
<td align="center" bgcolor="#F7F7F7">学校</td>
<td align="center" bgcolor="#F7F7F7">学校用户ID</td>
<td align="center" bgcolor="#F7F7F7">注册IP</td>
<td align="center" bgcolor="#F7F7F7">状态</td>
</tr>
<%
Do While Not Rs.Eof
%>
<tr>
<td align="center" bgcolor="#F7F7F7"><%=Rs("id")%></td>
<td align="center" bgcolor="#F7F7F7"><%=Rs("username")%></td>
<td align="center" bgcolor="#F7F7F7"><%=Rs("lmfrom")%></td>
<td align="center" bgcolor="#F7F7F7"><%=Rs("lmuid")%></td>
<td align="center" bgcolor="#F7F7F7"><%=Rs("lmip")%></td>
<td align="center" bgcolor="#F7F7F7"><%
if Rs("lmzt")=1 Then Response.Write "<a href='?qr="&Rs("id")&"'>未确认</a>"
if Rs("lmzt")=2 Then Response.Write "已确认"
%>
</td>
</tr>
<%
Rs.MoveNext
Loop
Rs.Close
Set Rs = Nothing
%>
</table>
</body>
</html>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询