admin_softinfo.asp

来自「超炫电台程序开发了两个版本了」· ASP 代码 · 共 584 行 · 第 1/3 页

ASP
584 行
字号
sub myform(isEdit)
 set rs=server.createobject("adodb.recordset")

     sql = "select * from "&CategoryName&"_SubCate order by subcateid asc"
     rs.open sql,conn,1,1
%> <SCRIPT language = "JavaScript">
    var onecount;
    onecount=0;
    subcat = new Array();
        <%count = 0
        do while not rs.eof %>
    subcat[<%=count%>] = new Array("<%= trim(rs("SubCateName"))%>","<%=cstr(rs("cateid"))%>","<%=cstr(rs("subcateid"))%>");<%count = count + 1
        rs.movenext
        loop
        rs.close
        %>
    onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.subcateid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.subcateid.options[document.myform.subcateid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
    </SCRIPT> <form name="myform" method="post" action="Admin_SoftInfo.asp" onSubmit="return Juge(this)" >
          <%
  		 if isedit then
		  set rse=server.createobject("adodb.recordset")
 		   rse.open "select * from "&CategoryName&"_SoftInfo where SoftID=" & cstr(request("SoftID")),conn,1,1
		   cateid=cstr(rse("cateid"))
		   subcateid=cstr(rse("subcateid"))
	        pubTitle="编辑歌曲"
	     else
           cateid=request("cateid")
           subcateid=request("subcateid")	   
	       pubTitle="添加歌曲"
	    end if %>
          <input type="Hidden" name="action" value='<% If isedit then%>modify<% Else  %>add<% End If %>'>
          <%If isedit then%>
          <input type="Hidden" name="SoftID" value='<%=cstr(request("SoftID"))%>'>
          <%End If%>
          
  <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
    <tr> 
      <th height="25" colspan="4"><%=pubTitle%></th>
    </tr>
    <tr> 
      <td class="forumRowHighlight">歌曲名称:</td>
      <td class="forumRow"> 
        <input type="text" name="SoftName" size="28"  value='<% if isedit then
		                                                         response.write trim(rse("SoftName")) 
															 end if %>' maxlength="50">
        <font color="#FF0000">!</font> </td>
      <td class="forumRowHighlight">歌曲类型:</td>
      <td class="forumRow"> 
        <select name="Language">
          <option value="翻唱作品">翻唱作品</option>
          <option value="原创作品">原创作品</option>
        </select>
        <font color="#FF0000">!</font> </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight">所属大类:</td>
      <td class="forumRow"> 
        <select name="cateid" onChange="changelocation(document.myform.cateid.options[document.myform.cateid.selectedIndex].value)" size="1">
          <%
    sql="select * from "&CategoryName&"_Cate"
 	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		response.write "没有大类"
	else
	do while not rs.eof
        if cateid=cstr(rs("cateid")) then 
		sel="selected"
        else
		sel=""
        end if	
	response.write "<option " & sel & " value='"&cstr(rs("cateid"))&"' name=cateid>"+trim(rs("CateName"))+"</option>"
	rs.movenext
    	loop
	end if
	rs.close
%>
        </select>
        <font color="#FF0000">!</font> </td>
      <td class="forumRowHighlight">所属小类:</td>
      <td class="forumRow"> 
        <select name="subcateid" size="1">
          <%
		if isedit or cateid<>"" then
  	       sql="select * from "&CategoryName&"_SubCate where cateid="&cateid
	    else
	       sql="select * from "&CategoryName&"_SubCate"
	    end if
 	    rs.open sql,conn,1,1
	    if rs.eof and rs.bof then
		    response.write "没有小类"
	    else
            do while not rs.eof
            if subcateid=cstr(rs("subcateid")) then
               sel="selected"
            else
               sel=""
            end if	
            response.write "<option " & sel & " value='"&cstr(rs("subcateid"))&"'>" + trim(rs("SubCateName")) + "</option>"
            rs.MoveNext
            Loop
	    end if
        rs.close
%>
        </select>
        <font color="#FF0000">!</font> </td>
    </tr>
    <tr> 
      <td nowrap class="forumRowHighlight">演唱者:</td>
      <td class="forumRow"> <font color="#FF0000"> 
        <input type="text" name="LicenceType" maxlength="40" size="15" value='<% if isedit then
		                                                         response.write trim(rse("LicenceType")) 
															 end if %>'>
        !</font> </td>
      <td class="forumRowHighlight">联系方法:</td>
      <td class="forumRow"> 
        <input type="text" name="SoftFrom" size="24" maxlength="100"  value='<% if isedit then
		                                                         response.write trim(rse("SoftFrom")) 
															 end if %>'>
        <font color="#FF0000">!</font> </td>
    </tr>
    <tr> 
      <td nowrap class="forumRowHighlight">界面预览: </td>
      <td colspan="3" class="forumRow"> 
        <input type="text" name="SoftViewImg" size="38"  value='<% if isedit then
		                                                         response.write trim(rse("SoftViewImg")) 
															 end if %>'>
        界面预览图片,大小不定</td>
    </tr>
    <tr> 
      <td nowrap class="forumRowHighlight">歌手照片:</td>
      <td colspan="3" class="forumRow"> 
        <input type="text" name="images" size="38"  value='<% if isedit then
		                                                         response.write trim(rse("images")) 
															 end if %>'>
        歌手照片,建议大小为:135×120 px</td>
    </tr>
    <tr> 
      <td class="forumRowHighlight">文件上传:</td>
      <td colspan="3" class="forumRow"> <iframe name="ad" frameborder=0 width=100% height=40 scrolling=no src=upload.asp></iframe> 
      </td>
    </tr>
    <tr> 
      <td class="forumRowHighlight">UBB标签:</td>
      <td colspan="3" class="forumRow"> <img onclick=Cbold() src="pic/bold.gif" width="22" height="22" alt="粗体" border="0"><img onclick=Citalic() src="pic/italicize.gif" width="23" height="22" alt="斜体" border="0"><img onclick=Cunder() src="pic/underline.gif" width="23" height="22" alt="下划线" border="0"><img onclick=Ccenter() src="pic/center.gif" width="22" height="22" alt="居中" border="0"><img onclick=Curl() src="pic/url1.gif" width="22" height="22" alt="超级连接" border="0"><img onclick=Cemail() src="pic/email1.gif" width="23" height="22" alt="Email连接" border="0"><img onclick=Cimage() src="pic/image.gif" width="23" height="22" alt="图片" border="0"><img onclick=Cswf() src="pic/swf.gif" width="23" height="22" alt="Flash图片" border="0"><img onclick=Cdir() src="pic/Shockwave.gif" width="23" height="22" alt="Shockwave文件" border="0"><img onclick=Crm() src="pic/rm.gif" width="23" height="22" alt="realplay视频文件" border="0"><img onclick=Cwmv() src="pic/mp.gif" width="23" height="22" alt="Media Player视频文件" border="0"><img onclick=Cmov() src="pic/qt.gif" width="23" height="22" alt="QuickTime视频文件" border="0"><img onclick=Cquote() src="pic/quote1.gif" width="23" height="22" alt="引用" border="0"><IMG onclick=Cfly() height=22 alt=飞行字 src="pic/fly.gif" width=23 border=0><IMG onclick=Cmarquee() height=22 alt=移动字 src="pic/move.gif" width=23 border=0><IMG onclick=Cguang() height=22 alt=发光字 src="pic/glow.gif" width=23 border=0><IMG onclick=Cying() height=22 alt=阴影字 src="pic/shadow.gif" width=23 border=0> 
        <br>
        字体: 
        <SELECT onchange="if(this.options[this.selectedIndex].value!=''){showfont(this.options[this.selectedIndex].value);this.options[0].selected=true;}else {this.selectedIndex=0;}" name=font>
          <option value="宋体" selected>宋体</option>
          <option value="楷体_GB2312">楷体</option>
          <option value="新宋体">新宋体</option>
          <option value="黑体">黑体</option>
          <option value="隶书">隶书</option>
          <OPTION value="Andale Mono">Andale Mono</OPTION>
          <OPTION value=Arial>Arial</OPTION>
          <OPTION value="Arial Black">Arial Black</OPTION>
          <OPTION value="Book Antiqua">Book Antiqua</OPTION>
          <OPTION value="Century Gothic">Century Gothic</OPTION>
          <OPTION value="Comic Sans MS">Comic Sans MS</OPTION>
          <OPTION value="Courier New">Courier New</OPTION>
          <OPTION value=Georgia>Georgia</OPTION>
          <OPTION value=Impact>Impact</OPTION>
          <OPTION value=Tahoma>Tahoma</OPTION>
          <OPTION value="Times New Roman" >Times New Roman</OPTION>
          <OPTION value="Trebuchet MS">Trebuchet MS</OPTION>
          <OPTION value="Script MT Bold">Script MT Bold</OPTION>
          <OPTION value=Stencil>Stencil</OPTION>
          <OPTION value=Verdana>Verdana</OPTION>
          <OPTION value="Lucida Console">Lucida Console</OPTION>
        </SELECT>
        字体大小 
        <select name="size" onChange="if(this.options[this.selectedIndex].value!=''){showsize(this.options[this.selectedIndex].value);this.options[0].selected=true;}else {this.selectedIndex=0;}">
          <option value="1">1</option>
          <option value="2">2</option>
          <option value="3" selected>3</option>
          <option value="4">4</option>
        </select>
        <font face="宋体" color=#333333>颜色:</font> 
        <SELECT onchange="if(this.options[this.selectedIndex].value!=''){showcolor(this.options[this.selectedIndex].value);this.options[0].selected=true;}else {this.selectedIndex=0;}" name=color>
          <option style="background-color:#F0F8FF;color: #F0F8FF" value="#F0F8FF">#F0F8FF</option>

⌨️ 快捷键说明

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