?? usercom.php
字號(hào):
<?php
require("global.php");
$subtitle='向本站推薦音樂';
function showcategory() {
global $datadir;
$catlist=file("$datadir/cat.php");
$fcount=count($catlist);
echo "-->";
for ($i=0; $i<$fcount; $i++) {
$detail=explode("|",$catlist[$i]);
echo "<OPTION VALUE=\"$detail[0]\">$detail[1]</OPTION>\n";
}
echo "<!--";
}
if (GetCookie('userlogin')!="1"){
Showmsg("no","您還沒有登錄或注冊(cè)!","登錄或注冊(cè)", "login.php?jumpurl=addlrc.php?id=$id");
exit;
}
else {
$username=GetCookie('username');
}
if(empty($action)){
require ("header.php");
include_once PrintEot('usercom');
footer();
exit;
}
elseif ($action=="save"){
if(empty($comsongname) || empty($comsinger) || empty($comurl)){
Showmsg("no","所有項(xiàng)都要填寫!","返回前一頁", "javascript:history.back(-1)");
exit;
}
$user_info=@file("$userdir/$username.php");
list($usernamec,$usernicheng,$userpassc,$reglevel,$usermail,$addlrcnum,$commendsong,$regtime)=explode("|",$user_info[1]);
$comsongname=safeconvert($comsongname);
$comsinger=safeconvert($comsinger);
$addtime=$timestamp;
$line=$username."|".$comsongname."|".$comsinger."|".$comsort."|".$comurl."|".$addtime."|\n";
writetofile("$datadir/usercom.php",$line,"a+");
$commendsong=$commendsong+1;
$new_line=array($usernamec,$usernicheng,$userpassc,$reglevel,$usermail,$addlrcnum,$commendsong,$regtime);
$line_u=implode("|",$new_line)."|\n";
$line_u="<? exit;?>\n".$line_u;
writetofile("$userdir/$usernamec.php",$line_u);
Showmsg("yes","提交成功,謝謝您的支持!","繼續(xù)推薦", "usercom.php");
exit;
}
?>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -