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

📄 admin_jsmodify.asp

📁 新闻发布系统
💻 ASP
字号:
<!--#include file = "include.asp"-->
<!--#include file = "admin_CheckMana.asp"-->
<%
'=========================================================
'产品目录:风讯产品N系列
'软件名称:风讯站点管理系统
'当前版本:2004.I.0225
'最新更新:2004.2.10
'=========================================================
'Copyright (C) 2002-2004 cooin.com. All rights reserved.
'网站: http://www.cooin.com  Foosun.net
'程序制作:轻风云(QQ:655071)
'Email:skeen@cooin.com,skeen@Foosun.net
'论坛支持:风讯在线论坛(http://bbs.cooin.com   http://bbs.foosun.net)
'=========================================================
if EnoughPopedom("jsm")=1 then
Response.write"<script>alert(""[操作失败]\n\n你的权限不足!\n\n请与系统管理员联系获得足够的权限!"");location.href=""javascript:history.back()"";</script>"
Response.end
end if

  Set fso=Server.CreateObject("scripting.FileSystemObject")
  Sub DelJS(FileName)
     if fso.FileExists(Server.Mappath("..")&"\otherjs\"&FileName&".js") then
        fso.DeleteFile(Server.Mappath("..")&"\otherjs\"&FileName&".js")
     end if
	 if fso.FileExists(Server.Mappath("..")&"\otherjs\TOPjs\"&FileName&".js") then
        fso.DeleteFile(Server.Mappath("..")&"\otherjs\TOPjs\"&FileName&".js")
     end if
     if fso.FileExists(Server.Mappath("..")&"\otherjs\"&FileName&".htm") then
        fso.DeleteFile(Server.Mappath("..")&"\otherjs\"&FileName&".htm")
     end if
  End SUb

  Sub addjss()
    if request.form("JSNameCN")="" or request.form("JSNameEN")="" then Call Wran("JS中文名称或者英文名称不能为空")
    set rs=Server.CreateObject("adodb.recordset")
    sql="select * from JS where JSNameCN='"&replace(request.form("JSNameCN"),"'","''")&"' or JSNameCN='"&replace(request.form("JSNameEN"),"'","''")&"'"
    rs.open sql,conn,3,3
    if not rs.eof then Call Wran("JS中文名称或者英文名称与现存的JS重名")
    rs.addnew
      rs("JSNameCN")=replace(request.form("JSNameCN"),"'","''")
      rs("JSNameEN")=replace(request.form("JSNameEN"),"'","''")	  
      rs("Type")=request.form("Type")
      if request.form("Type")="文字新闻" then
        rs("IndexCount")=request.form("IndexCount1")
      else
        rs("IndexCount")=request.form("IndexCount")
        rs("PhotoCSS")=request.form("PhotoCSS")
		if request.form("PhotoCSS")="CSS2" then rs("Depict")=request.form("Depict")
        rs("PicWi")=request.form("PicWi")
        rs("PicHi")=request.form("PicHi")
      end if
    rs.update
    rs.close
    set rs=nothing
	fso.CreateTextFile(Server.Mappath("..")&"\otherjs\"&replace(request.form("JSNameEN"),"'","''")&".js")
	response.redirect"admin_JSManage.asp"
  End Sub

  Sub MoJS()
    set rs=Server.CreateObject("adodb.recordset")
    sql="select * from JS where ID="&request.form("ID")
    rs.open sql,conn,3,3
      if request.form("Type")="文字新闻" then
        rs("IndexCount")=request.form("IndexCount1")
      else
        rs("IndexCount")=request.form("IndexCount")
        rs("PicWi")=request.form("PicWi")
        rs("PicHi")=request.form("PicHi")
		rs("Depict")=request.form("Depict")
      end if
    rs.update
    rs.close
    set rs=nothing
    response.redirect"admin_JSManage.asp"
  End Sub


  Sub Wran(content)
%>
  <script>
    history.back()
    alert("<%=content%>")
  </script>
<%
  response.end
  End Sub
%>

<%
  if request.form("o")="Modify" then
    Call MoJs
  end if
  if request.querystring("ID")="" then response.redirect"admin_JSManage.asp"
  set rs=Server.CreateObject("adodb.recordset")
  sql="select * from JS where id="&request.querystring("ID")
  rs.open sql,conn,1,1
  if rs("type")="文字新闻" then
    WordNews=""
  else
    WordNews="none"
  end if
  if rs("type")="图片新闻" then
    PhotoNews=""
  else
    PhotoNews="none"
  end if
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<body bgcolor="#FFFFFF">
<form name="form1" method="POST" action="">
  <table width="98%" border="0" cellpadding="0" align="center" cellspacing="1" bgcolor="#7ED3A7">
    <tr bgcolor="#9FBBDF"> 
      <td height="25" colspan="2" align="center" valign="middle"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg1.gif">
          <tr> 
            <td height="26"> <div align="center"><b><font color="0">修改JS列表</font></b></div></td>
          </tr>
        </table>
        
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="131" height="20" valign="middle">JS中文名称:</td>
      <td width="243" valign="middle"> 
        <input type="text" name="JSNameCN" value=<%=rs("JSNameCN")%> class=InputStyle Disabled> 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="131" height="20" valign="middle">JS英文名称:</td>
      <td width="243" valign="middle"> 
        <input type="text" name="JSNameEN" value=<%=rs("JSNameEN")%> Class=InputStyle Disabled> 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="131" height="20" valign="middle">JS类型: 
      </td>
      <td width="243" valign="middle"> 
        <input id=WordNews type="radio" name="Type" value="文字新闻" <% if rs("Type")="文字新闻" then response.write"checked"%> onclick="return CheckType()" class=InputStyle Disabled>
        文字新闻 
        <input id=PhotoNews type="radio" name="Type" value="图片新闻" <% if rs("Type")="图片新闻" then response.write("checked") %> onclick="return CheckType()" class=InputStyle Disabled>
        图片新闻 </td>
    </tr>
    <tr bgcolor="#FFFFFF" align="center"> 
      <td height="27" valign="middle" colspan="2"> 
        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#7ED3A7" id=WordNews style="DISPLAY:<%=WordNews%>">
          <tr bgcolor="#FFFFFF"> 
            <td width="35%">新闻调用数量</td>
            <td width="65%"> <input type="text" name="IndexCount1" size="5" value=<%=rs("IndexCount")%>> 
            </td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#BBB3AA" id=PhotoNews style="DISPLAY: <%=PhotoNews%>">
          <tr bgcolor="#FFFFFF"> 
            <td width="35%">新闻调用数量</td>
            <td width="65%"> <input type="text" name="IndexCount" size="5" value=<%=rs("IndexCount")%>> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td width="35%" height="23">样式</td>
            <td width="65%" height="23"> <input id=CSS1 type="radio" name="PhotoCSS" value="CSS1" onclick="return CheckCSS()" <% if rs("PhotoCSS")="CSS1" then response.write("checked"):CSS1="":else: CSS1="none":end if %> class=InputStyle Disabled>
              样式A 
              <input id=CSS2 type="radio" name="PhotoCSS" value="CSS2" onclick="return CheckCSS()" <% if rs("PhotoCSS")="CSS2" then response.write("checked"):CSS2="":else: CSS2="none":end if %> class=InputStyle Disabled>
              样式B
<input id=CSS3 type="radio" name="PhotoCSS" value="CSS3" onclick="return CheckCSS()" <% if rs("PhotoCSS")="CSS3" then response.write("checked"):CSS3="":else: CSS3="none":end if %> class=InputStyle Disabled>
              样式C
<input id=CSS4 type="radio" name="PhotoCSS" value="CSS4" onclick="return CheckCSS()" <% if rs("PhotoCSS")="CSS4" then response.write("checked"):CSS4="":else: CSS4="none":end if %> class=InputStyle Disabled>
              样式D</td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td width="35%">图片高度</td>
            <td width="65%"> <input type="text" name="PicHi" size="5" value=<%=rs("PicHi")%>> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td width="35%">图片宽度</td>
            <td width="65%"> <input type="text" name="PicWi" size="5" value=<%=rs("PicWi")%>> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF" ID=Depict style="DISPLAY: <%=CSS2%> "> 
            <td width="35%">新闻描述文字数量</td>
            <td width="65%"> <input type="text" name="Depict" size="5" value=<%=rs("depict")%>> 
            </td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="23" colspan="2"> <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center" id=CSS1 style="DISPLAY: <%=CSS1%>">
                <tr align="center"> 
                  <td><a href="images/anli1.gif" alt="sdfsdf" target="_blank"><img src="images/anli1.gif" width="472" height="86" border="0"></a></td>
                </tr>
              </table>
              <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center" id=CSS2 style="DISPLAY:  <%=CSS2%> ">
                <tr align="center"> 
                  <td height="2"><a href="images/anli2.gif" target="_blank"><img src="images/anli2.gif" width="278" height="335" border="0"></a></td>
                </tr>
              </table>
              <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center" id=CSS3 style="DISPLAY:  <%=CSS3%> ">
                <tr align="center"> 
                  <td height="163"><a href="images/anli3.gif" target="_blank"><img src="images/anli3.gif" width="69" height="320" border="0"></a></td>
                </tr>
              </table>
			  <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center" id=CSS4 style="DISPLAY:  <%=CSS4%> ">
                <tr align="center"> 
                  <td height="163"><table width="100" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
                      <tr>
                        <td bgcolor="#FFFFFF"><a href="images/anli4-1.gif" target="_blank"><img src="images/anli4.gif" width="206" height="88" border="0"></a></td>
                      </tr>
                    </table>
                    
                  </td>
                </tr>
              </table></td>
          </tr>
        </table></td>
    </tr>
    <tr bgcolor="#FFFFFF" align="center"> 
      <td height="51" valign="middle" colspan="2"> 
        <input type="Hidden" name="o" value="Modify"> <input type="Hidden" name="ID" value="<%=request.querystring("ID")%>">	
        <input type="Hidden" name="Type" value="<%=rs("Type")%>"> <input type="submit" name="Submit" value=" 修 改 JS "> 
      </td>
    </tr>
  </table>
</form>
<script>
function CheckType(){
if (document.form1.WordNews.checked == true){
        WordNews.style.display = "";

}else{
        WordNews.style.display = "none";

}

if (document.form1.PhotoNews.checked == true) {
        PhotoNews.style.display = "";

}else{
        PhotoNews.style.display = "none";

}
}
function CheckCSS(){
if (document.form1.CSS1.checked == true) {
        CSS1.style.display = "";
}else{
        CSS1.style.display = "none";

}
if (document.form1.CSS2.checked == true) {
        CSS2.style.display = "";

}else{
        CSS2.style.display = "none";

}
if (document.form1.CSS3.checked == true) {
        CSS3.style.display = "";

}else{
        CSS3.style.display = "none";

}
if (document.form1.CSS4.checked == true) {
        CSS4.style.display = "";

}else{
        CSS4.style.display = "none";

}
}

</script>

⌨️ 快捷键说明

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