www.gusucode.com > 仿51.com的php源码 1.1 > User/MusicHomepageBg.php

    <?php 
include("CheckLogined.php");
include("../include/dbclass.php");
$db=new DbConn();
include "functions.php";
$function=new functions();
include "user.php";
$globalvars->set_vars();
$user_dat = $user->process_user($globalvars);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>村委会档案管理中心 - 首页</title>
<link href="../images/User_Main.css" rel="stylesheet" type="text/css" />
<script>
try{
	if(top!=window){
		document.domain	="www.wu-liao.com";		
	}else{
		top.location.href="/webin.php?refer=%2FUser%2FMusicHomepageBg.php";
	}
}catch(e){}
function showNewMessage(user){
	top.showNewMessage(user);
}

</script>
<script>
/*********Js Function Begin*********/
//非VIP使用受限功能时弹出free-vip.php
function AppUpgrateVip(msg) {
<?php if((int)$_COOKIE["vip"]==0){?>
	var isVip=false;
	<?php }else{?>
	var isVip = true;
	<?php }?>
	if (!isVip) {
		alert(msg);
		window.open('/help/vip.php', 'VIP');
		return false;
	} else {
		return true;
	}
}

/*********Js Function End*********/
</script>
</head>
<body>
<div id="top"><?php require("../top.php"); ?>
</div>
<div id="nav">
<div id="navt"></div>
</div>

<div id="mjx"></div>
<div id="main">
<div id="left">
<div id="leph">
<div class="phff">
<div class="phtt">
主页设置</div>
<div class=phl2><a href='MyHomepageTemplate.php' title='选择经典模板'>选择经典模板</a></div><div class=phl2><a href='MyHomepageTemplate2.php?group=2' title='选择博客模板'>选择博客模板</a></div><div class=phl1><div class=phz><a title='设置背景音乐'>设置背景音乐</a></div></div><div class=phl2><a href='MyHomepageBulletin.php' title='设置主页标题'>设置主页标题</a></div><!--<div class="phl2">
<a href='http://shop.51.com/main/' title='设置主页特效'>设置主页特效</a></div>-->
</div>
</div>
</div>
<div id="right">
<div id="a4n">
<div class="anphg">
<div class="a4">设置背景音乐 </div>
<font color="#FF0000">注:如果没有选择特定的一首的话,系统会随机选择一首播放</font>
</div>
</div>
<div id="fenle">

<script language="JavaScript">
var nowSelect=null;
function playBgMusic(num,u)
{
	if(num==nowSelect)
	{
		oBgSound.stop();
		document.all("tr"+nowSelect).style.backgroundColor="";
		document.all("play"+nowSelect).title="试听这首MIDI";
		document.all("play"+nowSelect).src="skin/i/st.gif";
		nowSelect=null;
		return;
	}
	oBgSound.filename=u;
	oBgSound.play();
	document.all("play"+num).title="停止播放";
	if(nowSelect!=null)
	{
		document.all("play"+nowSelect).title="试听这首MIDI";
		document.all("tr"+nowSelect).style.backgroundColor="";
		document.all("play"+nowSelect).src="skin/i/st.gif";
	}
	document.all("tr"+num).style.backgroundColor="#73A2D6";
	document.all("play"+num).src="skin/i/stop.gif";
	nowSelect=num;
}
function showBg(num)
{
	oBgSound.stop();
	document.all("btnPlay"+num).value="试听";
	document.all("btnPlay"+num).disabled=false;
	document.all("btnStop"+num).style.display="none";
}
</script>

<div class="bjyyk">
<div style="margin-top:10px;text-align:center;">
主页当前背景音乐:《<?php if($user_dat['midbg']==""){echo "<font color=red>随机播放中</font>";}else{echo $user_dat['midtitle'];}?>》&nbsp;&nbsp;
<input name="Submit" type="button" class="btn" style="width:110px;" value="取消主页背景音乐" onclick="self.location.href='../Music/MusicList.php?id=&action=midbg'" />
</div>
<div style="margin-top:10px;text-align:center;">
<span><input name="upload" type="button" class="btn" style="width:90px;" value="上传背景音乐" onclick="javascrip: if (AppUpgrateVip('只有VIP用户才能上传音乐。请升级为VIP')) {window.location.href='../Music/MusicUpload.php';};"></span>
<span><input name="upload" type="button" class="btn" style="width:170px;" value="设置音乐盒的音乐为背景音乐" onclick="javascript: window.location.href='../Music/MusicList.php'; "></span>
</div>


<table width="570" border="0" cellpadding="0" cellspacing="0" class="tb">
<tr class="tbti">
<td height="20" align="left">音乐名称</td>
<td width="50">试听</td>
<td width="80">设为背景音乐</td>
</tr>
<?php 
$sql1="select * from homepagebg   order by id desc";
$result=$db->query($sql1);
$i=0;
while ($row=@mysql_fetch_array($result)) {
?>

<tr id="tr<?php echo $i; ?>">
<TD <?php if($row["Good"]==1){?>style="color:red;"<?php }?> align=left><?php echo $i+1; ?>.   <?php echo $row["Mid_Title"]; ?> </TD>
<TD><img id='play<?php echo $i; ?>' style='cursor:hand' title='试听这首MIDI' src='skin/i/st.gif' onclick="playBgMusic(<?php echo $i; ?>,'<?php echo $row["Mid_Url"]; ?>')"></TD>

<TD><a href="../Music/MusicList.php?id=<?php echo $row["Mid_Play"]; ?>&action=midbg&title=<?php echo $row["Mid_Title"]; ?>">设置</a></TD>
</tr>
<?php $i++; }?>

</div>
</table>
<object id="oBgSound" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" height="0"  id="MediaPlayer1" width="0">
<param name="AutoStart" value="1">
<param name="PlayCount" value="1">
<param name="Filename" value="">
</object>
</div>
</div>
</div>
</div>
<div id="bottom">
<div id="baidu" style="color:#a0a0a0;"><?php require("../foot.php"); ?></div>
</div>
</body>
</html>