网站地址:http://free5.e-168.cn/rannono
http://free5.e-168.cn/rannono/plugins/music/login.htm
<html>
<head>
<style>
.buttonface{
BACKGROUND: #A2DEFB;
border:1 solid #008000; COLOR: #0099cc; FONT-SIZE: 10pt;
FONT-STYLE: normal; FONT-VARIANT: normal;
FONT-WEIGHT: normal;
HEIGHT: 18px; LINE-HEIGHT: normal
}
</style>
<meta http-equiv= Content-Type content= text/html; charset=gb2312 >
<title>在线编辑论坛播放清单</title>
</head>
<body bgcolor= #008080 >
<?php
// 在线编辑论坛播放器清单For Discuz 2.5(其实只是身份认证的时候在是在2.5下面而已)
// Power By lulu /www.5466.ik8.com/2005.5.4
// 我的论坛,你的地盘/www.5466.ik8.com (http://bbs.lulu.e-168.cn)
// 若转载,请保留上面信息。谢谢 !
//-------------下面四行处理有些空间得不到空间的问题----------
$username=$_POST["username"];
$password=$_POST["password"];
$action=$_POST["action"];
$str=$_POST["str"];
//--------------------------------------------
if ($password==""||$username=="")
echo "<p align= center ><font color= #00FFFF >这个问题很严重,你无权访问该页!请联系管理员。</font>";
else
{
//=======下面的你要根据具体情况,具体确定!
$ID=3; // 权限设置->设置为1,只有管理员才可以;设置为2,管理员和超级斑竹可以;设置为3,管理员和超级斑竹和斑竹都可以!依次类推!
$title="啊,你现在的任务为->在线编辑论坛播放清单."; //标题,你怎么改,随你!
$defaultname="playlist.asx"; //播放清单的文件名
$backupname="backup.asx"; //你用来备份播放清单的文件名
$path="http://free5.e-168.cn/rannono/config.php"; //你安装播放器的路径相对与论坛的路径
//============以下的的建议你最好不改!!! 只是强烈建议哦!
$username=$username;
$pw=$password;
require($path);
$password=md5($password);
$link=mysql_connect($dbhost,$dbuser,$dbpw);
mysql_select_db($dbname,$link);
$query="select username,groupid from cdb_members where username='".$username." ' and password='".$password." ' and groupid<='$ID' and groupid>0";
$result=mysql_query($query,$link);
$num_row=mysql_num_rows($result);
if($num_row)
{
while($row = mysql_fetch_array($result))
switch($row["groupid"])
{
case 1 : echo "<p align= center ><font color= #00FFFF >欢迎你->管理员:".$row["username"].$title."</font>";break;
case 2 : echo "<p align= center ><font color= #00FFFF >欢迎你->超级斑竹:".$row["username"].$title."</font>";break;
case 3 : echo "<p align= center ><font color= #00FFFF >欢迎你->斑竹:".$row["username"].$title."</font>";break;
default: echo "<p align= center ><font color= #00FFFF >欢迎你->会员:".$row["username"].$title."</font>";break;
}
function read_list($defaultname,$username,$pw)
{
$filename=$defaultname;
echo "<form method= post action=".$PHP_SELF.">";
echo "<center><textarea rows= 30 name= str cols=96 style='color: #008080; border: 1px dotted #00FFFF; background-color: #CEEFFF '>";
$point=fopen( $filename , 'r' );
$str=fread($point,filesize($filename));
echo $str;
echo " </textarea><br>";
echo "<input type=hidden name=username value=".$username.">";
echo "<input type=hidden name=password value=".$pw.">";
echo "<input type=hidden name=action value=save>";
echo "<input type= submit value=确定修改 class='buttonface' ></form>";
echo "<form method= post target=_blank action=".$PHP_SELF." >";
echo "<input type=hidden name=username value=".$username.">";
echo "<input type=hidden name=password value=".$pw.">";
echo "<input type=hidden name=action value=open>";
echo "<input type= submit value=打开备份 class='buttonface' ></center></form>";
}
function save_list($action,$username,$pw,$str,$defaultname,$backupname)
{
if($action=="save")
$filename=$defaultname;
else
$filename=$backupname;
$filemod = filemtime($filename);
$filemodtime = date("F j Y h:i:s A", $filemod);
$pointer=fopen($filename,"w");
$str=stripSlashes( $str );
$save=fwrite($pointer,$str);
echo '<p align=center><font color=#00FFFF>文件大小' . ': ' . filesize($filename)/1000 . ' K ;' . '文件名:' . $filename.' ;你上次修改的时间为:'.$filemodtime.'</font></p>';
if($save)
if($action=="save")
echo "<p align=center><font color=#FFFF00>恭喜你,修改保存成功,你有新歌听了,嘿嘿!你好伟大哦,我喜欢你了!</font></p>";
else
echo "<p align=center><font color=#FFFF00>恭喜你,备份成功!嘿嘿!你好伟大哦,我喜欢你了!</font></p>";
else
echo "<p align=center><font color=#00FFFF>我很负责任的告诉你,保存没有成功,请重新再来,努力啊>>失败乃成功之母!</font></p>";
}
function open_list($username,$pw,$backupname)
{
$filename=$backupname;
echo "<form method= post action=".$PHP_SELF.">";
echo "<center><textarea rows= 30 name= str cols=96 style='color: #008080; border: 1px dotted #00FFFF; background-color: #CEEFFF '>";
$point=fopen( $filename , 'r' );
$str=fread($point,filesize($filename));
echo $str;
echo " </textarea><br>";
echo "<input type=hidden name=username value=".$username.">";
echo "<input type=hidden name=password value=".$pw.">";
echo "<input type=hidden name=action value=backup>";
echo "<input type= submit value=保存备份 class='buttonface' ></center></form>";
}
switch($action)
{
case "": read_list($defaultname,$username,$pw);break;
case "open": open_list($username,$pw,$backupname);break;
case "save": save_list($action,$username,$pw,$str,$defaultname,$backupname);break;
case "backup": save_list($action,$username,$pw,$str,$defaultname,$backupname);break;
default: read_list($defaultname,$username,$pw);break;
}
} // end if($num_row)
else {
echo "<p align= center ><font color= #00FFFF >这个问题很严重!你的密码或用户名错误或管理员没有授权!请联系管理员</font>";
echo "<p align= center><a target=_self href=login.htm><font color= #00FFFF >登陆</a></p>";
}
} // end first else
?>
</body>
</html>
[ 本帖最后由 rannono 于 2005-8-5 15:33 编辑 ] |