<%@language="vbscript" codepage="936" %>
<%path="../basedata"%>
<!--#include file="../inc/function.asp"-->
<%call Loginpower%>
<%call legalpower%>
<!--#include file="../conn/conn_data.asp"-->
<!--#include file="../inc/config.asp"-->
<!-- #include file="../Inc/Head.asp" -->
<%

dim action,sql,rs
dim counter,javascript,name,link,link_target,description,logo,logo_alpha,skins,bgcolor,backgrounds,volume,play_mode,play_id,auto_play,timeout,buffer_time,buffer_next,lrc_max,lrc_scale,context_menu
action=request.querystring("action")

counter=request.form("counter")
javascript=request.form("javascript")
name=request.form("name")
link=request.form("link")
link_target=request.form("link_target")
description=request.form("description")
logo=request.form("logo")
logo_alpha=request.form("logo_alpha")
skins=request.form("skins")
bgcolor=request.form("bgcolor")
backgrounds=request.form("backgrounds")
volume=request.form("volume")
play_mode=request.form("play_mode")
play_id=request.form("play_id")
auto_play=request.form("auto_play")
timeout=request.form("timeout")
buffer_time=request.form("buffer_time")
buffer_next=request.form("buffer_next")
lrc_max=request.form("lrc_max")
lrc_scale=request.form("lrc_scale")
context_menu=request.form("context_menu")

sql="select * from setglobal"
set rs=server.createobject("adodb.recordset")
	rs.open sql,conn_data,2,3
if action="成功" then

	if rs.bof and rs.eof then rs.addnew

	rs("global_counter")=counter
	rs("global_javascript")=javascript
	rs("global_name")=name
	rs("global_link")=link
	rs("global_link_target")=link_target
	rs("global_description")=description
	rs("global_logo")=logo
	rs("global_logo_alpha")=logo_alpha
	rs("global_skins")=skins
	rs("global_bgcolor")=bgcolor
	rs("global_backgrounds")=backgrounds
	rs("global_volume")=volume
	rs("global_play_mode")=play_mode
	rs("global_play_id")=play_id
	rs("global_auto_play")=auto_play
	rs("global_timeout")=timeout
	rs("global_buffer_time")=buffer_time
	rs("global_buffer_next")=buffer_next
	rs("global_lrc_max")=lrc_max
	rs("global_lrc_scale")=lrc_scale
	rs("global_context_menu")=context_menu

	rs.update
	rs.close
	set rs=nothing
	conn_data.close
	set conn_data=nothing
	response.redirect "?"
end if
%>
<script language="javascript">
function deletepic(s)
{
document.scripts[0].src=s;
document.getElementById("upload_file").style.display="none";
document.getElementById("upload_iframe").style.display="";
document.getElementById("file_up").value="";
document.getElementById("file_up1").value="";
return false;
}
function c(){if(confirm("你确定提交吗？")){document.getElementById("code1").value=1;}else{return false;}}
window.onbeforeunload=function(){if(document.getElementById("code1").value==1){}else{document.scripts[0].src="../file_tmp_Delete.asp?filename="+document.getElementById("file_up1").value;}}
</script>
<br /><br />
<div style="text-align:center;">
<form name="form" method="post" action="?action=成功" onsubmit="return c()" >
<table  border="1" bordercolor="#A5B6D6" align="center" cellpadding="0" cellspacing="2">
  <tr class="southidc">
    <td colspan="2" height="25"><center><strong>全局参数</strong></center></td>
  </tr>
  <tr height="20">
    <td width="80">统计</td>
    <td width="320">&nbsp;<input name="counter" value="<%=codedeHTML(rs("global_counter"))%>" type="text" size="40" title="适用51.la图形统计[http://类型]"/></td>
  </tr>
  <tr height="20">
    <td>脚本JAVA</td>
    <td>&nbsp;<input name="javascript" value="<%=codedeHTML(rs("global_javascript"))%>" type="text" size="40" title="http://类型"/></td>
  </tr>
  <tr height="20">
    <td>播放器的名称</td>
    <td>&nbsp;<input name="name" value="<%=codedeHTML(rs("global_name"))%>" type="text" size="40" title="自定义播放器的名称，默认为当前cmp版本名"/></td>
  </tr>
  <tr height="20">
    <td>链接</td>
    <td>&nbsp;<input name="link" value="<%=codedeHTML(rs("global_link"))%>" type="text" size="40" title="右键中点击名称打开的链接，默认为cmp论坛地址"/></td>
  </tr>
  <tr height="20">
    <td>窗口方式</td>
    <td>&nbsp;<input name="link_target" value="<%=codedeHTML(rs("global_link_target"))%>" type="text" size="40" title="_blank新窗；_sefl本窗；_top顶窗"/></td>
  </tr>
  <tr height="20">
    <td>描述</td>
    <td>&nbsp;<input name="description" value="<%=codedeHTML(rs("global_description"))%>" type="text" size="40" title="描述，无歌词时显示，默认没有"/></td>
  </tr>
  <tr height="20">
    <td>logo图标</td>
    <td>&nbsp;<input name="logo" value="<%=codedeHTML(rs("global_logo"))%>" type="text" size="40" title="加载logo图标的地址，默认为空。logo支持多属性定义,如居右下角显示：{src:logo.png,xywh:[10R,10R,0,0]}"/></td>
  </tr>
  <tr height="20">
    <td>logo透明度</td>
    <td>&nbsp;<input name="logo_alpha" value="<%=codedeHTML(rs("global_logo_alpha"))%>" type="text" size="40" title="logo图标的透明度，默认0.2"/> </td>
  </tr>
  <tr height="20">
    <td>皮肤地址</td>
    <td>
<%
if IsObjInstalled("Scripting.FileSystemObject") then
	set fso=server.createobject("scripting.filesystemobject")
	if fso.fileexists(server.mappath("../../"&rs("global_skins"))) then
		skins=true
		skinsvalue=rs("global_skins")
	else
		skins=false
		skinsvalue=""
	end if
	set fso=nothing
end if
%>
		<div id="upload_iframe" style="Display:<%if not skins then%>clock<%else%>none<%end if%>">&nbsp;<iframe src="../up.html" scrolling="no" frameborder="0" style="width:450px;height:20px;"></iframe></div>
		<div id="upload_file" style="Display:<%if not skins then%>none<%else%>clock<%end if%>">&nbsp;<a href="\<%=skinsvalue%>" id="file_url" target="_blank" ><%=skinsvalue%></a>&nbsp;&nbsp;&nbsp;<a href="../file_tmp_Delete.asp?filename=<%=skinsvalue%>" id="delpicurl" onclick="return deletepic(this.href);"><img src="../images/icon_03.png" border="0" /></a></div>
		<input type="hidden" value="<%=codedeHTML(rs("global_skins"))%>"  id="file_up" name="skins" /><input type="hidden" value="" id="file_up1"/>
    </td>
  </tr>
  <SCRIPT>
function view1(url){
var url; window.open(url,'_blank','status=no,scrollbars=yes,top=20,left=110,width=600,height=460');
}
</SCRIPT>
  <tr height="20">
    <td>背景颜色</td>
    <td>&nbsp;<input name="bgcolor" id="bgcolor" value="<%=codedeHTML(rs("global_bgcolor"))%>" type="text" size="40" title=""/> <a href="javascript:view1('../tool/color.htm?action=bgcolor')">选择颜色</a></td>
  </tr>
  <tr height="20">
    <td>背景地址</td>
    <td>&nbsp;<input name="backgrounds" value="<%=codedeHTML(rs("global_backgrounds"))%>" type="text" size="40" title="如：{src:plugins/bigbg.swf, repeat:x, xywh:[0C,0C,0,0]}"/> </td>
  </tr>
  <tr height="20">
    <td>当前音量</td>
    <td>&nbsp;<input name="volume" value="<%=codedeHTML(rs("global_volume"))%>" type="text" size="40" title="默认0.8"/> </td>
  </tr>
  <tr height="20">
    <td>播放模式</td>
    <td>&nbsp;<input name="play_mode" value="<%=codedeHTML(rs("global_play_mode"))%>" type="text" size="40" title="当前播放模式，0顺序，1重复，2随机"/> </td>
  </tr>
  <tr height="20">
    <td>播放当前列表</td>
    <td>&nbsp;<input name="play_id" value="<%=codedeHTML(rs("global_play_id"))%>" type="text" size="40" title="如：伤感歌曲 1；流行歌曲 2"/> </td>
  </tr>
  <tr height="20">
    <td>自动播放</td>
    <td>&nbsp;<input name="auto_play" value="<%=codedeHTML(rs("global_auto_play"))%>" type="text" size="40" title="是否开启自动播放 1自动，0禁用"/> </td>
  </tr>
  <tr height="20">
    <td>音乐连接超时</td>
    <td>&nbsp;<input name="timeout" value="<%=codedeHTML(rs("global_timeout"))%>" type="text" size="40" title="音乐连接超时的时间 单位秒"/> </td>
  </tr>
  <tr height="20">
    <td>音乐缓冲的时间</td>
    <td>&nbsp;<input name="buffer_time" value="<%=codedeHTML(rs("global_buffer_time"))%>" type="text" size="40" title="音乐需要缓冲的时间 单位秒"/> </td>
  </tr>
  <tr height="20">
    <td>缓冲下一个</td>
    <td>&nbsp;<input name="buffer_next" value="<%=codedeHTML(rs("global_buffer_next"))%>" type="text" size="40" title="播放完后是否需要缓冲下一个，0关闭 1开启"/> </td>
  </tr>
  <tr height="20">
    <td>最大化歌词</td>
    <td>&nbsp;<input name="lrc_max" value="<%=codedeHTML(rs("global_lrc_max"))%>" type="text" size="40" title="是否最大化歌词 0关闭 1开启"/> </td>
  </tr>
  <tr height="20">
    <td>歌词缩放倍数</td>
    <td>&nbsp;<input name="lrc_scale" value="<%=codedeHTML(rs("global_lrc_scale"))%>" type="text" size="40" title="最大化时当前歌词的缩放倍数1 2 3"/> </td>
  </tr>
  <tr height="20">
    <td>右键菜单选项</td>
    <td>&nbsp;<input name="context_menu" value="<%=codedeHTML(rs("global_context_menu"))%>" type="text" size="40" title="右键菜单选项，0为不显示，1为全部，其他为仅名称"/> </td>
  </tr>
  <tr>
    <td colspan="2" height="25"><center><input type="hidden" name="code1" id="code1" value=""/><input type="submit" value="提交"/></center></td>
  </tr>
</table>
</form>
</div>
<%
rs.close
set rs=nothing
conn_data.close
set conn_data=nothing
%>
<!-- #include file="../Inc/Foot.asp" -->
