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

📄 my_message.asp

📁 一个完全仿照阿里巴巴的网站管理系统 本软件没有版权问题
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="top.asp"--><%usertopview%>
<%if userflag28=0 then
response.redirect"ok.asp?action=flag"
end if
set rs1=server.createobject("adodb.recordset")
set rs=server.createobject("adodb.recordset")

action=request("action")
id=request("id")
key=request("key")

if action="del" then
id=split(id,",")
for i=0 to ubound(id)

sql="select * from SMT_message where SMT_id="&id(i)&""
rs.open sql,conn,1,1
if not rs.eof then
if rs("SMT_yp_id")=0 and rs("SMT_Send_id")=0 then
errstyle="·系统信息不能删除!"
scripterr
end if
if rs("SMT_send_id")=session("id") then
errstyle="·这是您发布的信息,不可以删除!"
scripterr
end if

conn.execute("delete from SMT_message where SMT_yp_id="&session("id")&" and SMT_id="& id(i))
end if
rs.close

next
response.redirect"my_message.asp"
'==================================================
elseif action="sendsave" then
SMT_yp_id=request("SMT_yp_id")
SMT_message=code_jk(request("SMT_message"))
SMT_title=request("SMT_title")
SMT_yp_id=split(SMT_yp_id,",")
for i=0 to ubound(SMT_yp_id)

sql="select * from SMT_yp where SMT_coname='"&SMT_yp_id(i)&"'"
rs.open sql,conn,1,3
if not rs.eof then
SMT_id=rs("SMT_id")
end if
rs.close

if SMT_id=session("id") then
errstyle="·您不能给自己发短信息哦!"
scripterr
end if

sql="select * from SMT_message"
rs.open sql,conn,1,3
rs.addnew
rs("SMT_yp_id")=SMT_id
rs("SMT_send_id")=session("id")
rs("SMT_message")=SMT_message
rs("SMT_title")=SMT_title
rs.update
rs.close
next
response.redirect "my_message.asp?action=send"
end if%>
<script language = "JavaScript" src = "user_admin.js" type="text/javascript"></script>
<script language="JavaScript">
<!--
function checkdata() {
if( addform.SMT_yp_id.value =="") {
alert("\操作错误,下面是产生错误的可能原因:\n\n·请填写收件人")
return false;
}
if( addform.SMT_title.value =="") {
alert("\操作错误,下面是产生错误的可能原因:\n\n·请输入短信标题")
return false;
}
if( addform.SMT_message.value =="") {
alert("\操作错误,下面是产生错误的可能原因:\n\n·请输入短息内容")
return false;
}
return true;
}
  function textLimitCheck(thisArea, maxLength){
    if (thisArea.value.length > maxLength){
      alert(maxLength + ' 个字限制. \r超出的将自动去除.');
      thisArea.value = thisArea.value.substring(0, maxLength);
      thisArea.focus();
    }
messageCount.innerText = thisArea.value.length;
  }
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }
// -->
</script>

<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
<tr>
<td width="160" valign=top bgcolor=#efefef>
<!--==============-->
<!--#include file="left.asp"-->
<!--==============-->
</td>
<td width="600" valign=top>
<!--==============-->
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td height=25>您现在的位置是:我的公文包 > 短信中心</td></tr>
  <tr>
    <td>
<!--####################################-->
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor=#6C94D1>
  <tr>
    <td bgcolor=#ffffff>
<!--======-->
<table width="80%" border="0" cellspacing="0" cellpadding="5" align=center>
  <tr align=center>
<td><a href=my_message.asp><img src="../img/msg_take.gif" border=0><br>收件箱</a></td>
<td><a href=my_message.asp?action=send><img src="../img/msg_send.gif" border=0><br>发件箱</a></td>
<td><a href=my_message.asp?action=write><img src="../img/msg_write.gif" border=0><br>撰写</a></td>
<td><a href=<%if id<>"" then%>my_message.asp?action=re&id=<%=id%><%else%>#<%end if%>><img src="../img/msg_re<%if id="" then%>_no<%end if%>.gif" border=0><br>回复</a></td>
<td><a href=<%if id<>"" then%>my_message.asp?action=transmit&id=<%=id%><%else%>#<%end if%>><img src="../img/msg_transmit<%if id="" then%>_no<%end if%>.gif" border=0><br>转发</a></td>
<td><a href=<%if id<>"" then%>my_message.asp?action=del&id=<%=id%><%else%>#<%end if%>><img src="../img/msg_del<%if id="" then%>_no<%end if%>.gif" border=0><br>删除</a></td>
  </tr>
</table>
<!--======-->
	</td>
  </tr>
</table>
<!--####################################-->
	</td>
  </tr>
  <tr>
    <td height=10></td>
  </tr>
  <tr>
    <td>
<%if action="write" then%>
<!--========================短信发送======================-->
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor=#6C94D1>
  <tr><td height=25 bgcolor=#6C94D1>  <font color=white>写新短信</font></td></tr>
  <tr><td bgcolor=#ffffff height=25>
<!--======-->
<table width="90%" border="0" cellspacing="0" cellpadding="5" align=center>
<form name="addform" method="post" action="my_message.asp?action=sendsave" onSubmit="return checkdata()">
  <tr>
    <td width="19%" align=right><font color=red>*</font> 收件人:</td>
	<td width="81%"><input name="SMT_yp_id" type="text" size="30" ID="magicfacepic(1)" onclick="lookmagic(1)" style="cursor:hand"> <img src="img/card.gif" align=absmiddle alt="从我的名片选择" onclick="lookmagic(1)" style="cursor:hand"> 多个请用 "," 隔开
	<div id="magicframe(1)" style="visibility:hidden; position: absolute;width:10; left: 2px; top: 479px;"><iframe src="my_friend_view.asp?action=1" width="380" height="210" frameborder="0" scrolling="no"></iframe></div></td>
  </tr>
  <tr>
    <td width="19%" align=right><font color=red>*</font> 标 题:</td>
	<td width="81%"><input name="SMT_title" type="text" size="42" maxlength="30"></td>
  </tr>
  <tr>
    <td width="19%" align=right><font color=red>*</font> 内 容:</td>
	<td width="81%"><p style="line-height:180%"><textarea name="SMT_message" cols=40 rows=5 onkeyUp="textLimitCheck(this, 150);"></textarea><br>限 150 个字符  已输入 <font color="#CC0000"><span id="messageCount">0</span></font> 个字</td>
  </tr>
  <tr>
    <td></td>
	<td><input type="submit" name="Submit" value="发 送" class="input1"> <a href=my_friend.asp class=red>添加名片</a></td>
  </tr>
</form>
</table>
</td>
  </tr>
</table>
<!--========================短信发送 end======================-->
<%elseif action="re" then%>
<!--========================短信回复======================-->
<%sql="select * from SMT_message where SMT_id="&id&""
rs.open sql,conn,1,1
if not rs.eof then
SMT_title="Re:"&rs("SMT_title")
'===============
if rs("SMT_yp_id")=0 and rs("SMT_Send_id")=0 then
errstyle="·系统信息不能回复!"
scripterr
end if
if rs("SMT_yp_id")<>session("id") then
errstyle="·这不是您的信息,不可以回复!"
scripterr
end if
'===============
sql1="select *  from SMT_yp where SMT_ID="&rs("SMT_send_id")
rs1.open sql1,conn,1,1
if not rs1.eof then
SMT_coname=rs1("SMT_coname")
end if
rs1.close%>
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor=#6C94D1>
  <tr><td height=25 bgcolor=#6C94D1>  <font color=white>回复短信</font></td></tr>
  <tr><td bgcolor=#ffffff height=25>
<!--======-->
<table width="90%" border="0" cellspacing="0" cellpadding="5" align=center>
<form name="addform" method="post" action="my_message.asp?action=sendsave" onSubmit="return checkdata()">
  <tr>
    <td width="19%" align=right><font color=red>*</font> 收件人:</td>
	<td width="81%"><input name="SMT_yp_id" type="text" size="35" value="<%=SMT_coname%>"></td>
  </tr>
  <tr>
    <td width="19%" align=right><font color=red>*</font> 标 题:</td>
	<td width="81%"><input name="SMT_title" type="text" size="42" maxlength="30" value="<%=SMT_title%>"></td>
  </tr>
  <tr>
    <td width="19%" align=right><font color=red>*</font> 内 容:</td>
	<td width="81%"><p style="line-height:180%"><textarea name="SMT_message" cols=40 rows=5 onkeyUp="textLimitCheck(this, 150);"></textarea><br>限 150 个字符  已输入 <font color="#CC0000"><span id="messageCount">0</span></font> 个字</td>
  </tr>
  <tr>
    <td></td>
	<td><input type="submit" name="Submit" value="回 复" class="input1"></td>
  </tr>
  <tr><td bgcolor=#efefef colspan=2><strong>原件:</strong><%=trim(rs("SMT_title"))%></td></tr>
  <tr><td colspan=2><p style="line-height:150%">  <%=trim(rs("SMT_message"))%></td></tr>
</form>
</table>
</td>
  </tr>
</table>
<%end if
rs.close%>
<!--========================短信回复 end======================-->
<%elseif action="transmit" then%>
<!--========================短信转发======================-->
<%sql="select * from SMT_message where SMT_id="&id&""
rs.open sql,conn,1,1
if not rs.eof then
SMT_title="Fw:"&rs("SMT_title")
'===============
if rs("SMT_yp_id")=0 and rs("SMT_Send_id")=0 then
errstyle="·系统信息不能转发!"
scripterr
end if
if rs("SMT_yp_id")<>session("id") then
errstyle="·这不是您的信息,不可以转发!"
scripterr
end if%>
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor=#6C94D1>
  <tr><td height=25 bgcolor=#6C94D1>  <font color=white>转发短信</font></td></tr>

⌨️ 快捷键说明

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