<!-- #include file="include/admin_onlogin.asp" -->
<!-- #INCLUDE file="include/common_music.asp" -->
<!-- #include file="include/jk_code.asp" -->
<%
tit="音乐管理"
index_url="music"
call admin_header(0,0)
%>
<tr><td align=center colspan=2 height=30>
  <table border=0>
  <tr>
  <td><a href='?'>歌手分类首页</a></td>
  <td width=10></td>
  <td><a href='?action=addclass'>添加一级分类</a></td>
  <td width=10></td>
  <td><a href='admin_music_disk.asp'>专辑管理</a></td>
  <td width=10></td>
  <td><a href='admin_music_song.asp'>歌曲管理</a></td>
  </tr>
  </table>
</td></tr>
<tr><td colspan=2 align=center>
  <table border=0 cellspacing=0 cellpadding=2>
  <form action='?action=sea' method=post>
  <tr>
  <td>搜索（歌手列表）关键字：</td>
  <td><input type=text name=keyword value='<%response.write keyword%>' size=15 maxlength=20></td>
  <td><input type=submit value='搜索'></td>
  </tr>
  </form>
  </table>
</td></tr>
<%
call admin_table(1,0)
call music_setup()
call admin_ender(1)

sub music_setup()
  dim file_name,tdim,tnum,tmp1,music_ip,mint,jint,yint,power,playserver,downserver,musicserver,music_num,music_username
  file_name="include/common_music.asp"
  if chk() then
    music_ip=code_config(request.form("music_ip"),0)
    music_username=code_config(request.form("music_username"),0)
    musicserver=code_config(request.form("music_server"),0)
    musicserver=replace(musicserver," ","")
    musicserver=replace(musicserver,",","$")
    musicserver=musicserver&"$"
    for i=0 to 1
      if instr(musicserver,"$$")<1 then exit for
      musicserver=replace(musicserver,"$$","$")
    next
    if right(musicserver,1)="$" then musicserver=left(musicserver,len(musicserver)-1)
    mint=code_num(request.form("music_dim_0"),100)
    jint=code_num(request.form("music_dim_1"),250)
    yint=code_num(request.form("music_dim_2"),1000)
    power=code_admin("power",1,50)
    power=replace(power," ","")
    power=replace(power,",",".")
    music_ip=replace(music_ip," ","")
    music_ip=replace(music_ip,",","|")
    music_ip=music_ip&"|"
    for i=0 to 1
      if instr(music_ip,"||")<1 then exit for
      music_ip=replace(music_ip,"||","|")
    next
    if right(music_ip,1)="|" then music_ip=left(music_ip,len(music_ip)-1)
    music_num=code_num(request.form("music_num_1"),0)&code_num(request.form("music_num_2"),0)&code_num(request.form("music_num_3"),0)
    tmp1=vbcrlf&"<"&"%" & _
         vbcrlf&"dim music_dim(12)" & _
         vbcrlf&"music_dim(0)="""&mint&"""" & _
         vbcrlf&"music_dim(1)="""&jint&"""" & _
         vbcrlf&"music_dim(2)="""&yint&"""" & _
         vbcrlf&"music_dim(3)="""&music_num&"""" & _
         vbcrlf&"music_dim(4)="""&power&"""" & _
         vbcrlf&"music_dim(5)="""&musicserver&"""" & _
         vbcrlf&"music_dim(6)="""&music_ip&"""" & _
         vbcrlf&"music_dim(7)="""&music_username&"""" & _
         vbcrlf&"music_dim(8)="""&code_config(request.form("music_addin"),0)&"""" & _
         vbcrlf&"music_dim(9)="""&code_config(request.form("music_comp"),0)&"""" & _
         vbcrlf&"music_dim(10)="""&code_config(request.form("music_lang"),0)&"""" & _
         vbcrlf&"music_dim(11)="""&code_config(request.form("music_favnum"),0)&"""" & _
         vbcrlf&"music_dim(12)="""&code_config(request.form("music_mailnum"),0)&"""" & _
         vbcrlf&"%"&">"
    call create_file(file_name,file_trim_vbcrlf(tmp1))
    call admin_msg("已成功修改了"&tit_fir&"参数！","?action="&action,1)
    exit sub
  end if
  call form_first()
  if len(music_dim(3))<>3 then music_dim(3)="000"
%>
<tr>
<td class=td>参数名称</td>
<td class=td>参数设置</td>
<td class=td>参数说明</td>
</tr>
<form action='?action=<%response.write action%>' method=post>
<input type=hidden name=chk value='yes'>
<tr>
<td>月卡花费：</td>
<td><input type=text name=music_dim_0 value='<%response.write music_dim(0)%>' size=10 maxlength=5>&nbsp;个虚拟币</td>
<td class=gray>购买月卡所需虚拟币</td>
</tr>
<tr>
<td>度卡花费：</td>
<td><input type=text name=music_dim_1 value='<%response.write music_dim(1)%>' size=10 maxlength=5>&nbsp;个虚拟币</td>
<td class=gray>购买季卡所需虚拟币</td>
</tr>
<tr>
<td>年卡花费：</td>
<td><input type=text name=music_dim_2 value='<%response.write music_dim(2)%>' size=10 maxlength=5>&nbsp;个虚拟币</td>
<td class=gray>购买年卡所需虚拟币</td>
</tr>
<% tmp1=int(mid(music_dim(3),1,1)) %>
<tr>
<td>下载防盗：</td>
<td><input type=radio name=music_num_1 value='1'<% if int(tmp1)=1 then response.write " checked" %>>&nbsp;开启&nbsp;<input type=radio name=music_num_1 value='0'<% if int(tmp1)=0 then response.write " checked" %>>&nbsp;关闭</td>
<td class=gray>歌曲下载防盗功能，注意开启后不扣币</td>
</tr>
<% tmp1=int(mid(music_dim(3),3,1)) %>
<tr>
<td>地址加密：</td>
<td><input type=radio name=music_num_3 value='1'<% if int(tmp1)=1 then response.write " checked" %>>&nbsp;开启&nbsp;<input type=radio name=music_num_3 value='0'<% if int(tmp1)=0 then response.write " checked" %>>&nbsp;关闭</td>
<td class=gray>RM格式歌曲地址加密功能</td>
</tr>
<% tmp1=int(mid(music_dim(3),2,1)) %>
<tr>
<td>前台发布：</td>
<td><input type=radio name=music_num_2 value='1'<% if int(tmp1)=1 then response.write " checked" %>>&nbsp;开启&nbsp;<input type=radio name=music_num_2 value='0'<% if int(tmp1)=0 then response.write " checked" %>>&nbsp;关闭</td>
<td class=gray>用户是否能在前台发布歌曲</td>
</tr>
<tr>
<td>前台发布加分：</td>
<td><input type=text name=music_addin value='<%response.write music_dim(8)%>' size=10>&nbsp;分</td>
<td class=gray>用户前台发布加积分值</td>
</tr>
<tr>
<td>最多收藏基数：</td>
<td colspan=2><input type=text name=music_favnum value='<%response.write music_dim(11)%>' size=10>&nbsp;条&nbsp;&nbsp;&nbsp;&nbsp;用户最多收藏基数 * 用户组系数 = 用户最多收藏数量</td>
</tr>
<tr>
<td>最多点歌基数：</td>
<td colspan=2><input type=text name=music_mailnum value='<%response.write music_dim(12)%>' size=10>&nbsp;条&nbsp;&nbsp;&nbsp;&nbsp;用户最多点歌基数 * 用户组系数 = 用户最多点歌数量</td>
</tr>
<tr>
<td>免费用户：</td>
<td><input type=text name=music_username value='<%response.write music_dim(7)%>' size=40></td>
<td class=gray>某用户可免费观看，请用“|”分隔</td>
</tr>
<tr>
<td colspan=2><table border=0 width='100%'><%call chk_power("免费",music_dim(4),0)%></table></td>
<td class=gray>某用户组成员都可免费观看</td>
</tr>
<tr><td colspan=3 class=td>&nbsp;后台管理参数</td></tr>
<tr>
<td>隶属公司：</td>
<td><input type=text name=music_comp value='<%response.write music_dim(9)%>' size=40></td>
<td class=gray>歌手和专辑所属公司，请用“|”分隔</td>
</tr>
<tr>
<td>语言种类：</td>
<td><input type=text name=music_lang value='<%response.write music_dim(10)%>' size=40></td>
<td class=gray>歌手和专辑语言种类，请用“|”分隔</td>
</tr>
<tr><td colspan=3 class=td>&nbsp;服务器设置</td></tr>
<tr><td colspan=3 class=td0>&nbsp;每个服务器地址分播放与下载两类，请用下列方式输入。</td></tr>
<tr><td colspan=3 class=td0>&nbsp;“播放服务器<font class=red>|</font>下载服务器”，注意用“|”分隔，否则出错！地址结尾请加上“/”！</td></tr>
<tr><td colspan=3 align=center>
  <table border=0 width='98%'>
  <tr><td width='10%' height=1></td><td width='90%'></td></tr>
<%
  tdim=split(music_dim(5),"$")
  tnum=ubound(tdim)
  for i=0 to tnum+1
    tmp1=""
    if i<tnum+1 then tmp1=tdim(i)
    response.write vbcrlf&"<tr>"
    response.write vbcrlf&"<td>服务器"&i+1&"：</td>"
    response.write vbcrlf&"<td><input type=text name=music_server value='"&tmp1&"' size=80 maxlength=80></td>"
    response.write vbcrlf&"</tr>"
  next
  erase tdim
%>
  </table>
</td></tr>
<tr><td colspan=3 class=td>&nbsp;免费IP访问设置</td></tr>
<tr><td colspan=3 align=center>
  <table border=0 width='98%'>
  <tr><td width='33%' height=1></td><td width='34%'></td><td width='33%'></td></tr>
<%
  tdim=split(music_dim(6),"|")
  tnum=ubound(tdim)
  for i=0 to tnum+1
    if (i/3)-(i\3)=0 then response.write vbcrlf&"<tr>"
    tmp1=""
    if i<tnum+1 then tmp1=tdim(i)
    response.write vbcrlf&"<td>IP"&i+1&"：<input type=text name=music_ip value='"&tmp1&"' size=18 maxlength=15></td>"
    if ((i-2)/3)-((i-2)\3)=0 then response.write vbcrlf&"</tr>"
  next
  erase tdim
%>
  </table>
</td></tr>
<tr>
<td></td>
<td height=30 colspan=2 align=center><input type=submit value='提交添加'>　　<input type=reset value='重新填写'>　　<input type=button name=go_back value='返回上一页' onclick="javascript:history.back(1);"></td>
</tr></form>
<%
end sub
%>
