⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dj.php

📁 FTB安装版 v1.3(虚拟形象)FTB安装版 v1.3(虚拟形象)
💻 PHP
📖 第 1 页 / 共 2 页
字号:
	$do="添加歌曲";
	print_bar();
	list($fb,$id,$pwd,$usericon,$useremail,$oicq,$regdate,
	     $sign[$author],$homepage,$from,$com,$honor,
	     $lp,$amount,$publicemail,$none,$rvrc,$lasttime,$nowtime,
			 $icq,$sex,$born,$guoji,$tuijianren,$money,$lasttitle,
				 $lastaddr,$group,$yanzheng,$tdpost,$sx,$star,$bei1,$bei2,$bei3,$bei4,$bei5,$bei6)
	= explode("|",readfromfile("$userpath/$username.php"));
$usericon=get_user_portait($usericon);

?>
<TABLE cellSpacing=1 cellPadding=5 width=<?=$tablewidth?> border=0 align=center>
         <TR>
 <TD bgColor=<?=$titlecolor?> height=27><B class=title>-=> 
</B><FONT color=<?=$titlefontcolor?>>欢迎您,<?=$username?>,一天的工作又开始咯,加油哦!</FONT></TD></TR></table>
<table width=<?=$tablewidth?> border=0 cellspacing=1 cellpadding=5 bgcolor=F0F0F0 align=center>
<tr bgcolor=FFFFFF><td width="30%"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr><td bgcolor=<?=$article_color1?> height="22" align="center" <?=$skinbg?>>DJ 资料<br><?=$usericon?><br><?=$username?>
			  </td></tr>
          <tr><td height="1"></td></tr></table>
			  </td><td>
<?php
if ($mp3step==2){
///$songer=trim($songer);
$addgeming=trim($addgeming);
$addjiazai=trim($addjiazai);
if ($songer=="" || $addgeming==""){
echo " 歌曲或者歌名为空!返回填写!";
if (strrpos($songer,",")!==false || strrpos($addgeming,",")!==false){
	echo "歌曲或者歌名含不可接受字符“|”,请修改!";
}
?>
		</td> </tr></table>
<TABLE cellSpacing=1 cellPadding=5 width=<?=$tablewidth?> border=0 align=center>
         <TR>
 <TD bgColor=<?=$titlecolor?> height=27></TD></TR></table>
<?
require_once("footer.php");
exit;
}

if (!eregi("\.wav$",$songer) && !eregi("\.mid$",$songer) && !eregi("\.asf$",$songer) && !eregi("\.wma$",$songer) && !eregi("\.wmv$",$songer) && !eregi("\.asx$",$songer)  && !eregi("\.mp3$",$songer)){
		echo '<center><br><br>状态:发生错误,指定歌曲必须为 *.wav,*.mid,*.asf,*.wma,*.wmv,*.asx,*.mp3 格式!<ul><br><br><li><a href="javascript:history.back(1)">返回前页</a></li></ul></center>';
?>
	</td> </tr></table>
<TABLE cellSpacing=1 cellPadding=5 width=<?=$tablewidth?> border=0 align=center>
         <TR>
 <TD bgColor=<?=$titlecolor?> height=27></TD></TR></table>
<?
require_once("footer.php");
exit;
}

if (file_exists("mp3play/bglist.js")) $song_dat=file("mp3play/bglist.js");
		else $song_dat[0]="";

if ($addjiazai=="") $px_newpost="mkList('$songer','$addgeming','','',$timestamp,'');\n";
else $px_newpost="mkList('$songer','$addgeming','','$jiazai',$timestamp,'');\n";
 
		writetofile("mp3play/bglist.js",$px_newpost,"a+");

echo "添加歌曲成功!<br><br>按<a href=dj.php?job=mp3add>这里继续添加</a><br><br>";
echo "按<a href=dj.php>这里返回总台</a>";
		 }else{				
			  ?>
 <FORM METHOD=POST ACTION="dj.php?job=mp3add&mp3step=2">
请填写完整的歌曲路径,如:pnm://202.103.101.25/zhj1/08.asf <br>
			  格式可以是:*.wav,*.mid,*.asf,*.wma,*.wmv,*.asx,*.mp3</br>
			  歌曲路径:<INPUT TYPE="text" NAME="songer" size=50><br>
			  歌曲名字:<INPUT TYPE="text" NAME="addgeming" size=20><br>
			  是还加载:<INPUT TYPE="text" NAME="addjiazai" size=20>(加载则不填,不加载填f)<br>
                          <INPUT TYPE="submit" value="提交歌曲"><br><br>
			  如果要删除歌曲,请到<a href=dj.php?job=mp3list>歌曲列表</a>
 </FORM>
<?php
		 }
?>			  
		  </td>
			  </tr></table>

<TABLE cellSpacing=1 cellPadding=5 width=<?=$tablewidth?> border=0 align=center>
         <TR>
 <TD bgColor=<?=$titlecolor?> height=27></TD></TR></table>

<?
require("footer.php");echo"$footertp";
exit;
}

if ($job=="del"){
require("header.php");echo"$headertp";
$do="删除歌曲";
print_bar();
if(!$step){
$title="确认继续吗?";
$content="<ul><br><br><li><a href=\"javascript:history.back(1)\">返回前页</a></li><br><br><li><a href=dj.php?job=del&step=2&songid=$songid>确认删除</a></li><br><br></ul>";
msg_box($title,$content);
require("footer.php");echo"$footertp";
}else{
$songlist=file("userdata/song/songs.php");
$num=count($songlist);
$songid=trim($songid);
for ($r=0;$r<$num;$r++){
	$songin=explode("|",$songlist[$r]);
	if (trim($songin[2])==$songid){
		unset($songlist[$r]);
	}
}
$songlist=implode("",$songlist);
writetofile("userdata/song/songs.php",$songlist);

jump_page("dj.php?job=list","执行成功","管理程式已经成功执行了操作:
<ul>
<li><a href='dj.php?job=list'>返回歌曲列表</a></li><br><br>
<li><a href='index.php'>返回论坛</a></li><br>
</ul><br>");
}

exit;
}

if ($job=="list"){
require("header.php");echo"$headertp";
$do="歌曲列表";
print_bar();
?>
<TABLE cellSpacing=1 cellPadding=5 width=<?=$tablewidth?> border=0 align=center>
         <TR>
 <TD bgColor=<?=$titlecolor?> height=27><B class=title>-=> 
</B><FONT color=<?=$titlefontcolor?>>欢迎您,<?=$username?>,一天的工作又开始咯,加油哦!</FONT></TD></TR></table>
<table width=<?=$tablewidth?> border=0 cellspacing=1 cellpadding=5 bgcolor=F0F0F0 align=center>
<tr bgcolor=FFFFFF><td>
现有歌曲列表:<br>
<table width=100% border=0 cellspacing=1 cellpadding=5>
<?
$songlist=@file("userdata/song/songs.php");
	for ($i=0; $i<count($songlist); $i++) {
		$detail=explode("|", trim($songlist[$i]));
		$no=$i+1;
		$color=$article_color1;
		if ($no%2==0) $color=$article_color2;
		echo "<tr bgcolor=$color><td> $no 歌名:$detail[1]  </td><td> 网址:$detail[0] </td><td width=60><a href=javascript:popwin2(\"$detail[0]&songid={$detail[2]}\",410)>试听</a>==<a href=dj.php?job=del&songid={$detail[2]}>删除</a></td></tr>";
	}
?>
</table>

</td></tr></table>
<TABLE cellSpacing=1 cellPadding=5 width=<?=$tablewidth?> border=0 align=center>
         <TR>
 <TD bgColor=<?=$titlecolor?> height=27></TD></TR></table>

<?
require("footer.php");echo"$footertp";
exit;
}

if ($job=="mp3del"){
require("header.php");echo"$headertp";
$do="删除歌曲";
print_bar();
if(!$mp3step){
$title="确认继续吗?";
$content="<ul><br><br><li><a href=\"javascript:history.back(1)\">返回前页</a></li><br><br><li><a href=dj.php?job=mp3del&mp3step=2&songid=$songid>确认删除</a></li><br><br></ul>";
msg_box($title,$content);
require("footer.php");echo"$footertp";
}else{
$songlist=file("mp3play/bglist.js");
$num=count($songlist);
$songid=trim($songid);
for ($r=0;$r<$num;$r++){
	$songin=explode(",",$songlist[$r]);
	if (trim($songin[4])==$songid){
		unset($songlist[$r]);
	}
}
$songlist=implode("",$songlist);
writetofile("mp3play/bglist.js",$songlist);

jump_page("dj.php?job=mp3list","执行成功","管理程式已经成功执行了操作:
<ul>
<li><a href='dj.php?job=mp3list'>返回mp3歌曲列表</a></li><br><br>
<li><a href='index.php'>返回论坛</a></li><br>
</ul><br>");
}

exit;
}

if ($job=="mp3list"){
require("header.php");echo"$headertp";
$do="歌曲列表";
print_bar();
?>
<TABLE cellSpacing=1 cellPadding=5 width=<?=$tablewidth?> border=0 align=center>
         <TR>
 <TD bgColor=<?=$titlecolor?> height=27><B class=title>-=> 
</B><FONT color=<?=$titlefontcolor?>>欢迎您,<?=$username?>,一天的工作又开始咯,加油哦!</FONT></TD></TR></table>
<table width=<?=$tablewidth?> border=0 cellspacing=1 cellpadding=5 bgcolor=F0F0F0 align=center>
<tr bgcolor=FFFFFF><td>
现有歌曲列表:<br>
<table width=100% border=0 cellspacing=1 cellpadding=5>
<?
$songlist=@file("mp3play/bglist.js");
	for ($i=0; $i<count($songlist); $i++) {
		$detail=explode(",", trim($songlist[$i]));
		$no=$i+1;
		$color=$article_color1;
		if ($no%2==0) $color=$article_color2;
		echo "<tr bgcolor=$color><td> $no 歌名:".substr($detail[1],1,-1)."  </td><td> 网址:".substr($detail[0],8,-1)." </td><td width=60>==<a href=dj.php?job=mp3del&songid={$detail[4]}>删除</a>==</td></tr>";
	}
?>
</table>

</td></tr></table>

<TABLE cellSpacing=1 cellPadding=5 width=<?=$tablewidth?> border=0 align=center>
         <TR>
 <TD bgColor=<?=$titlecolor?> height=27></TD></TR></table>

<?
require("footer.php");echo"$footertp";
exit;
}

if ($job=="manage"){
require("header.php");echo"$headertp";
$do="点歌信息";
print_bar();
?>
<TABLE cellSpacing=1 cellPadding=5 width=<?=$tablewidth?> border=0 align=center>
         <TR>
 <TD bgColor=<?=$titlecolor?> height=27><B class=title>-=> 
</B><FONT color=<?=$titlefontcolor?>>欢迎您,<?=$username?>,一天的工作又开始咯,加油哦!</FONT></TD></TR></table>
<table width=<?=$tablewidth?> border=0 cellspacing=1 cellpadding=5 bgcolor=F0F0F0 align=center>
<tr bgcolor=FFFFFF><td>
点歌信息列表:[所有点歌系统保留7天,红色的为当天的点歌]<br>
<table width=100% border=0 cellspacing=1 cellpadding=5>
<?
$ar=getdate(time());
$songlist=@file("userdata/song/song.dat");
	for ($i=0; $i<count($songlist); $i++) {
		$detail=explode("|", trim($songlist[$i]));
		$no=$i+1;
		$color=$article_color1;
		if ($no%2==0) $color=$article_color2;
		$today=getdate($detail[2]);
		if ($ar["mday"]==$today["mday"]){
			$no="<font color=red>$no</font>";
		}
		echo "<tr bgcolor=$color><td> $no <font color=#9FA4B0>点歌人</font>:$detail[0]  </td><td> <font color=#9FA4B0>听歌人:</font>$detail[1] </td><td><font color=#9FA4B0>歌名:</font>$detail[4] </td><td width=200><font color=#9FA4B0>想说的话:</font>$detail[5] </td><td width=25><a href=dj.php?job=deldg&songid={$detail[2]}><font color=#9FA4B0>删除</font></a></td></tr>";
	}
?>
</table>

</td></tr></table>

<TABLE cellSpacing=1 cellPadding=5 width=<?=$tablewidth?> border=0 align=center>
         <TR>
 <TD bgColor=<?=$titlecolor?> height=27></TD></TR></table>

<?
require("footer.php");echo"$footertp";
exit;
}


if ($job=="deldg"){
require("header.php");echo"$headertp";
$do="删除歌曲";
print_bar();
if(!$step){
$title="确认继续吗?";
$content="<ul><br><br><li><a href=\"javascript:history.back(1)\">返回前页</a></li><br><br><li><a href=dj.php?job=deldg&step=2&songid=$songid>确认删除</a></li><br><br></ul>";
msg_box($title,$content);
require("footer.php");echo"$footertp";
}else{
$songlist=file("userdata/song/song.dat");
$num=count($songlist);
$songid=trim($songid);
for ($r=0;$r<$num;$r++){
	$songin=explode("|",$songlist[$r]);
	if (trim($songin[2])==$songid){
		unset($songlist[$r]);
	}
}
$songlist=implode("",$songlist);
writetofile("userdata/song/song.dat",$songlist);

jump_page("dj.php?job=manage","执行成功","管理程式已经成功执行了操作:
<ul>
<li><a href='dj.php?job=manage'>返回歌曲列表</a></li><br><br>
<li><a href='index.php'>返回论坛</a></li><br>
</ul><br>");
}

exit;
}

function print_bar() {
global $do;
headguide("您正处在 <br> DJ  程式中",
"<a href=song.php>点歌服务</a>","<a href=dj.php>DJ 管理</a> >> $do");
}

function print_err() {
global $status;
$title="发生错误";
$content="管理程式发生了错误,情况:<br>
<br>$status<br><ul>
<li><a href='javascript:history.back(1)'>返回前一页</a></li>
</ul>";
msg_box($title,$content);
}

   

⌨️ 快捷键说明

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