📄 modifyshare.asp
字号:
<!--#include file="check.asp"-->
<!--#INCLUDE FILE="connect.asp" -->
<%
set rs=server.createobject("adodb.recordset")
if Request.ServerVariables("Request_Method")="POST" then
if trim(request("donetype"))="save" then
sql="select * from share where uid='"&session("uid")&"' and id="&Clng(request("id"))
rs.open sql,conn,1,3
rs("title")=trim(request("title"))
rs("content")=trim(request("content"))
rs("isshare")=trim(request("isshare"))
rs.update
rs.close
end if
if trim(request("donetype"))="del" then
sql="delete from share where uid='"&session("uid")&"' and id="&Clng(request("id"))
conn.execute(sql)
sql="delete from sharepic where shareid="&Clng(request("id"))
conn.execute(sql)
end if
set rs=nothing
conn.close
set conn=nothing
response.write("<script language=javascript>opener.location=opener.location;window.close()</script>")
response.end
end if
sql="select * from share where uid='"&session("uid")&"' and id="&Clng(request("id"))
rs.open sql,conn,1,1
if not rs.eof then
title=rs("title")
content=rs("content")
isshare=rs("isshare")
end if
rs.close
%>
<html>
<head>
<title>共享资源</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="outplan.css" type="text/css">
<style type="text/css">
<!--
.style2 {font-size: 10pt}
-->
</style>
</head>
<script language="JavaScript" src="swfj.js"></script>
<script language=javascript>
function saveshare(){
if(document.form.title.value==""){
alert("还没有填写标题");
}
else{
document.form.donetype.value="save";
document.form.submit();
}
}
function delshare(){
if(!confirm("您确定要删除吗?")){}
else
{
document.form.donetype.value="del";
document.form.submit();
}
}
</script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form name="form" method="POST" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="35">
<tr>
<td background="images/outplan4.gif" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tbody>
<tr>
<td width="30" align="right"><img src="images/outplan7.gif" width="22" height="35"></td>
<td width="70" align="center">
<a href="javascript:saveshare()" class="wlink">保 存</a></td>
<td width="10"><img src="images/outplanline.gif" width="16" height="35"></td>
<td width="22"><img src="images/outplan6.gif" width="22" height="35"></td>
<td width="70" align="center">
<a href="javascript:delshare()" class="wlink">删 除</a></td>
<td width="3"><img src="images/outplanline.gif" width="16" height="35"></td>
<td width="22"><img src="images/outplan5.gif" width="22" height="35"></td>
<td width="70" align="center"><a href="#" onClick="window.close()" class="wlink">关 闭</a></td>
<td width="6"><img src="images/outplanline.gif" width="16" height="35"></td>
<td class="wnolink"> </td>
</tr>
</tbody>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="40">
<tbody>
<tr>
<td width="326" background="images/outplan1.gif" class="outtitle"> <span class="style2">添加资源</span></td>
<td width="91"><img src="images/outplan11.gif" width="91" height="40"></td>
<td width="337" valign="top" background="images/outplan3.gif"> </td> </td>
</tr>
</tbody>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="123">
<tr>
<td height="33" valign="top">
<div align="center">
<table width="100%" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" align="center">
<tr>
<td height="27" align="left"> </td>
<td align="left"> </td>
<td height="27"> </td>
</tr>
<tr>
<td width="50" height="40" align="left"> </td>
<td width="209" align="left">属 性: </td>
<td width="493" height="40"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td>
<%
if trim(isshare)=0 then
%>
<input name="isshare" type="radio" value="0" checked>
不共享
<input type="radio" name="isshare" value="1">
共享
<%else%>
<input name="isshare" type="radio" value="0">
不共享
<input type="radio" name="isshare" value="1" checked>
共享
<%end if%>
</td>
</tr>
</table></td>
</tr>
<tr>
<td width="50" height="40" align="left"> </td>
<td width="209" align="left">标 题: </td>
<td width="493" height="40"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td><input name="title" type="text" class="noinput" value="<%=title%>" size="40" maxlength="40">
</td>
</tr>
</table></td>
</tr>
<td height="40" align="left"> </td>
<td align="left">内 容:</td>
<td height="40"><textarea name="content" cols="69" rows="5" class="body1" style="width:300px;"><%=content%></textarea>
<input type="hidden" name="id" value="<%=request("id")%>">
<input type="hidden" name="donetype">
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<object width="1" height="1" classid="clsid:8C9AA244-AC33-47F9-8968-CC114654A6EC" codebase="web.ocx" id="web">
</object>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -