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

📄 delfriend.php

📁 bmb的论坛
💻 PHP
字号:
<?
/* BMForum Plus! Bulletin Board Systems Version : Plus!  This is a freeware, but don't change the copyright information. A SourceForge Project - GNU Licence project. Web Site: http://www.bmforum.com Copyright (C) Bluview Technology*/     

require("datafile/config.php");
require("getskin.php");

if ($login_status==0) {
	include("header.php");
	navi_bar("$gl[50]",$gl[50],$gl[53]);
	$status="$gl[47]";
	print_err();
	include("footer.php");
	exit;
} 
if (empty($step)) {
	include("header.php");
	navi_bar("$gl[165]",
"$gl[166]",
"$gl[167]","no");
	print_confirm();
	include("footer.php");
	exit;
}
if (file_exists("$id_unique/$o_username.frd")) {
//------get the line from the original list------
	$fp=fopen("$id_unique/$o_username.frd","r");
	flock($fp,LOCK_SH);
	$oldlist=file("$id_unique/$o_username.frd");
	fclose($fp);
	$count=count($oldlist);	
	for ($i=0; $i<$count; $i++) {
		$detail=explode("|",$oldlist[$i]);
		if ($detail[0]!=$friendname) {
            $woldlist.=$oldlist[$i];
		}
	}
	writetofile("$id_unique/$o_username.frd",$woldlist);
	jump_page("friendlist.php","$gl[2]",
"$gl[3]
<ul>
<li><a href='friendlist.php'>$gl[15]</a></li><br><br>
<li><a href='index.php'>$gl[5]</a></li><br>
</ul><br>");
	
}else{        
	include("header.php");
	navi_bar("$gl[50]","$gl[50]","$gl[50]");
	$status="$gl[168]";
	print_err();
	include("footer.php");
	exit;
}

function print_err() {
global $status,$gl;
	$title="$gl[53]";
	$content="$gl[169]<br>
<br>$status<br><ul>
<li><a href='javascript:history.back(1)'>$gl[15]</a></li>
</ul>";
	msg_box($title,$content);
}
function print_confirm() {
global $friendname,$gl;
	$title="$gl[170]";
	$content.="$gl[171]<br>
<br>$gl[172]<ul>
<li><a href='javascript:history.back(1)'>$gl[15]</a><br><br></li>
<li><a href='delfriend.php?friendname=$friendname&step=2'>$gl[173]</a>
";
	$content.="</ul>";
	msg_box($title,$content);
}

⌨️ 快捷键说明

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