📄 admin_music_song.asp
字号:
if chk() then
dim power,emoney,musicserver,no,url,urlname,tim,username,hits,hidden,istop,counter,smi,ispic
songwords=request.form("songwords")
power=code_admin("power",1,50)
power=replace(power," ","")
power=replace(power,",",".")
emoney=trim(request.form("emoney"))
if not isnumeric(emoney) then emoney=0
smi=code_admin("pic",1,100)
tim=code_admin("tim",1,20)
tim=joekoe_cms.time_type(tim,1)
if tim="" then tim=joekoe_cms.now_time
counter=trim(request.form("counter"))
if not isnumeric(counter) then counter=0
hidden=true
if trim(request.form("hidden"))="yes" then hidden=false
istop=false
if trim(request.form("isgood"))="yes" then istop=true
username=code_admin("username",1,20)
if symbol_name(username)=false then username=login_username
no=trim(request.form("no"))
no=int(no)
hits=trim(Request.Form("hits"))
if not isnumeric(hits) then hits=0
musicserver=trim(request.form("musicserver"))
if musicserver="" or isnull(musicserver) then musicserver=0
musicserver=int(musicserver)
for i=1 to no
url=code_admin("url"&i&"",1,255)
if url="" then
call admin_error(tit_fir&"地址"&i&" 不能为空!")
exit sub
end if
if musicserver>0 and instr(url,"://")<>0 then
call admin_error("本地服务器"&tit_fir&"地址"&i&" 错误!请输入服务器相对路径!")
exit sub
end if
if musicserver=0 and instr(url,"://")<1 then
call admin_error("非本地服务器"&tit_fir&"地址"&i&" 错误!请输入服务器绝对路径!")
exit sub
end if
urlname=code_admin("urlname"&i&"",1,20)
if urlname="" or isnull(urlname) then
call admin_error(tit_fir&"名称"&i&" 不能为空!")
exit sub
end if
next
sql="select name from music_singer where id="&n_id
set rs=joekoe_cms.exec(sql,1)
singer=rs("name")
rs.close
sql="select * from music_song"
call joekoe_cms.exec(sql,-1)
rs.open sql,conn,1,3
for i=1 to no
rs.addnew
rs("Name")=code_admin("urlname"&i&"",1,20)
rs("url")=code_admin("url"&i&"",1,255)
rs("urltype")=musicserver
rs("c_id")=c_id
rs("s_id")=s_id
rs("n_id")=n_id
rs("d_id")=d_id
rs("hits")=hits
rs("smi")=smi
rs("counter")=counter
rs("power")=power
rs("emoney")=emoney
rs("username")=username
rs("singer")=singer
rs("words")=songwords
rs("tim")=tim
isgood=trim(request.form("isgood"))
hidden=trim(request.form("hidden"))
if isgood="yes" then
rs("istop")=true
else
rs("istop")=false
end if
if hidden="yes" then
rs("hidden")=false
else
rs("hidden")=true
end if
rs.update
next
rs.close
call admin_msg("已成功添加了"&no&"首歌曲!","?c_id="&c_id&"&s_id="&s_id&"&n_id="&n_id,0)
else
call form_first()
if ispic="" then ispic=joekoe_cms.rand_file(index_url)
%>
<form method=post name=add_frm action="?action=add&types=chk&c_id=<%=c_id%>&s_id=<%=s_id%>&n_id=<%=n_id%>" onsubmit="return Form1_Validator(this)">
<input type=hidden name=chk value='yes'>
<input type=hidden name=upid value=''>
<tr>
<td colspan=2 class=td>添加歌曲</td>
</tr>
<tr>
<td>所属专辑:</td>
<td><%response.write sel_c_id("?action=add")&sel_s_id("?action=add")&sel_n_id("?action=add")&sel_d_id("?action=add")%></td>
</tr>
<script language=javascript>
<!--
function seturl()
{
var str="";
var temname1=add_frm.temname1.value
var temname2=add_frm.temname2.value
if (!window.add_frm.no.value) window.add_frm.no.value=1;
for(i=1;i<=window.add_frm.no.value;i++)
str+=' '+i+': <input type=text name="url'+i+'" style="padding-left:1pt" size=40 value="'+temname1+i+temname2+'"> 歌曲名称: <input type=text name="urlname'+i+'" style="padding-left:1pt" size=10 maxlength=20 value="歌曲名称'+i+'"><BR>';
window.addid.innerHTML=str;
}
function music_server()
{
var tmp1,sn,server,str;
str=" <font class=red>非本地服务器</font>";
server='<%=web_dim(28)%>';
server=server.split('$')
if (window.add_frm.musicserver.value>0)
{
sn=window.add_frm.musicserver.value;
sn-=1;
tmp1=server[sn].split('|');
str=' <font class=red>播放服务器:</font>'+tmp1[0]+' <font class=red>下载服务器:</font>'+tmp1[1];
}
window.addid.innerHTML=str;
}
-->
</script>
<tr><td>服务器设置:</td><td>
<select size=1 name=musicserver onclick="music_server(this.options[this.selectedIndex].value);">
<option value=0>非本地服务器</option>
<%
dim servername
servername=split(web_dim(28),"$")
for i=1 to ubound(servername)+1
response.write "<option value='"&i&"'>音频服务器"&i&"</option>"
next
erase servername
%>
</select>
前缀:<input type=text name=temname1 value='' size=20>
歌曲数:<input type=text name=no value=1 size=2>
后缀:<input type=text name=temname2 value='' size=5>
<input type=button name=Button onclick="seturl();" value='设置'> <% response.write redx %></td></tr>
<tr><td>歌曲地址:</td><td id="addid">(若是本地影片请选择服务器)</td></tr>
<tr>
<td>发布时间:</td><td><input type="text" name="tim" value="<%=now()%>" size=20 maxlength=40> <input type=button name=st_btn value="选择" onclick="javascript:select_time(tim);return false;"> 浏览:<input type="text" name="hits" value="0" size=5 maxlength=40> 人次 推荐:<input type=checkbox name=isgood value='yes'> 隐藏/审核:<input type=checkbox name=hidden value='yes'></td>
</tr>
<%call chk_power("试听","1.2.3.4.5",0)%>
<tr>
<td>歌曲发布人:</td><td><input type="text" name="username" value="<%=login_username%>" size=20 maxlength=40> <%call chk_emoney(0)%></td>
</tr>
<tr>
<td><%call frm_ubb_type("")%></td>
<td><%call frm_ubb("add_frm","remark"," ",0)%></td>
</tr>
<tr>
<td valign=top>歌词内容:</td>
<td>
<table border=0><tr>
<td><textarea name=songwords rows=6 cols=65></textarea></td>
<td width=5></td>
<td valign=bottom><%call textarea_resize("songwords")%></td>
</tr></table>
</td>
</tr>
<tr>
<td>SMI歌词:</td><td><input type="text" name="pic" size="50"></td>
</tr>
<tr>
<td>上传歌词:</td><td><iframe frameborder=0 name=upload_frame width='100%' height=30 scrolling=no src='upload.asp?uppath=<%response.write index_url%>&upname=<%response.write ispic%>&uptext=pic'></iframe></td>
</tr>
<%
call submit_add()
end if
end sub
'-----------------------------------歌曲列表-------------------------------------------
sub song_list_main()
response.write "<form name=del_form action='?jk_mod="&jk_mod&"&action=handle&c_id="&c_id&"&s_id="&s_id&"&n_id="&n_id&"' method=post>" & _
vbcrlf&"<tr align=center>" & _
vbcrlf&"<td class=td width='7%'>序号</td>" & _
vbcrlf&"<td class=td width='52%'>歌曲名字</td>" & _
vbcrlf&"<td class=td width='12%'>所属歌手</td>" & _
vbcrlf&"<td class=td width='7%'>点击</td>" & _
vbcrlf&"<td class=td width='15%'>相关属性</td>" & _
vbcrlf&"<td class=td width='7%'><input type=checkbox name=sel_all value='yes' onclick=""javascript:select_all(this.form);""></td>" & _
vbcrlf&"</tr>"
pageurl="?action=songlist&c_id="&c_id&"&s_id="&s_id&"&n_id="&n_id&"&"
if c_id<>"" then
if n_id<>"" then
sql_add=sql_add&" and n_id="&n_id&" and s_id="&s_id&" and c_id="&c_id
elseif s_id<>"" then
sql_add=sql_add&" and s_id="&s_id&" and c_id="&c_id
else
sql_add=sql_add&" and c_id="&c_id
end if
end if
if d_id<>"" then
sql_add=" where d_id="&d_id
end if
call format_search("name","name,singer",2,1)
sql="select count(id) from music_song"&sql_add
set rs=joekoe_cms.exec(sql,1)
rssum=rs(0)
rs.close
call format_pagecute()
sql="select top "&nummer*viewpage&" * from music_song"&sql_add&" order by id desc"
call joekoe_cms.exec(sql,-1)
rs.open sql,conn,1,1
if int(viewpage)>1 then rs.move (viewpage-1)*nummer
if int(viewpage*nummer)>int(rssum) then nums=nummer-(viewpage*nummer-rssum)
for i=1 to nums
response.write "<tr align=center>" & _
vbcrlf&"<td>"&i&"</td>" & _
vbcrlf&"<td><table border=0 cellspacing=0 cellpadding=0 width='100%'><tr>" & _
vbcrlf&"<td><a href='?jk_mod="&jk_mod&"&action=edit&id="&rs("id")&"&c_id="&rs("c_id")&"&s_id="&rs("s_id")&"&n_id="&rs("n_id")&"'>"&rs("name")&"</a></td>" & _
vbcrlf&"<td align=right><font class=tims>"&joekoe_cms.time_type(rs("tim"),4)&"</font></td>" & _
vbcrlf&"</tr></table></td>" & _
vbcrlf&"<td>"&rs("singer")&"</td>" & _
vbcrlf&"<td>"&rs("hits")&"</td>" & _
vbcrlf&"<td align=center>"&pro_edit("?jk_mod="&jk_mod&"&action=edit&id="&rs("id")&"&c_id="&rs("c_id")&"&s_id="&rs("s_id")&"&n_id="&rs("n_id"),"编辑该歌曲") &" "&pro_hidden(rs("hidden"),1)&" "& pro_istop(rs("istop"))&"</td>" & _
vbcrlf&"<td><input type=checkbox name=sel_id value='"&rs("id")&"' class=bg_tds></td>" & _
vbcrlf&"</tr>"
rs.movenext
next
rs.close
set rs=nothing
response.write "<tr class=tr1>" & _
vbcrlf&"<td colspan=3> 现有<font class=red>"&rssum&"</font>首歌曲,页次:<font class=red>"&viewpage&"</font>/<font class=red>"&thepages&"</font>分页:"&jk_pagecute(nummer,thepages,viewpage,pageurl,5,"#ff0000")&"</td>" & _
vbcrlf&"<td colspan=3 align=center>执行 <select name=sel_type size=1><option value='推荐'>推荐</option><option value='取消推荐'>取消推荐</option><option value='审核'>审核</option><option value='待审核'>待审核</option><option value='删除'>删除</option></select> <input type=submit value='操作' onclick=""return sel_click(this.form);""></td>" & _
vbcrlf&"</tr>" & _
vbcrlf&"</form>" & _
vbcrlf&"</table></td></tr>"
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -