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

📄 comment.php

📁 哈克MusicPHP音乐程序v1.0一套基本于PHP+TXT的在线音乐播放程序。程序采用文本数据存储方式
💻 PHP
字号:
<?php
require("global.php");
$subtitle='发表评论';

if(empty($id) || empty($action)){ 
	Showmsg("no","非法操作!", "关闭本页", "javascript:window.close()");
	exit; }
if($action=="save"){
   if(!$content || !$user){
       Showmsg("no","所有项都要填写!", "返回前一页", "javascript:history.back(-1)");
	   exit; }
    else{ 
	     $user=safeconvert($user);
	     $content=safeconvert($content);
		 $c=readfromfile("$datadir/data/$id.php");
		 $list=explode("\n",$c);
         $count=count($list);
		 $c_list=explode("|",$list[2]);
	     $c_list[4]=$c_list[4]+$grade;
	     $c_list[2]=implode("|",$c_list);
	     $w=$list[0];
	     $w1=$list[1];
	     $w2=$list[2];
	     unset($list[0]);
	     unset($list[1]);
	     unset($list[2]);
		 $line2="$user|$grade|$content|$timestamp|\n";
         $list= $w."\n".$w1."\n".$w2."\n".$line2.implode("\n",$list);
         writetofile("$datadir/data/$id.php",$list);
		  Showmsg("yes","评论发布成功!", "返回前一页", "play.php?id=$id");
	      exit;
	 }
}
?>

⌨️ 快捷键说明

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