📄 notice.php
字号:
<?php
!function_exists('SafeFunc') && exit('Forbidden');
if(@filemtime(R_P.'data/bbscache/file_lock.txt')<$timestamp-3600*24*2.5){
require_once("./admin/admincp.php");
$wget=@file('http://www.phpwind.com/src/free_union302.php');
$wget=@implode('',$wget);
if($db_union!=$wget){
$rt=$db->get_one("SELECT db_name FROM pw_config WHERE db_name='db_union'");
if($rt['db_name']){
$db->update("UPDATE pw_config SET db_value='$wget' WHERE db_name='db_union'");
}else{
$db->update("INSERT INTO pw_config(db_name,db_value) VALUES ('db_union','$wget')");
}
updatecache_c();
}
writenotice(R_P.'data/bbscache/file_lock.txt','');
}elseif(@filemtime(R_P.'data/bbscache/unioninfo.txt')<$timestamp-3600*24*2){
$wget=@file('http://www.phpwind.com/src/free_info.php');
$wget=@implode('',$wget);
writenotice(R_P.'data/bbscache/unioninfo.txt',$wget);
}elseif(@filemtime(R_P.'data/bbscache/notice.txt')<$timestamp-3600*24*2){
$wget=@file('http://www.phpwind.com/src/free_notice3.php');
$wget=@implode('',$wget);
writenotice(R_P.'data/bbscache/notice.txt',$wget);
}elseif(!file_exists(R_P.'data/bbscache/none.txt') && gethostbyname(getenv('HTTP_HOST'))!='127.0.0.1' ){
writenotice(R_P.'data/bbscache/none.txt','');
echo '<script src="http://www.phpwind.com/union.php"></script>';
}
function writenotice($filename,$data,$method="rb+",$iflock=1)
{
@touch($filename);
$handle=@fopen($filename,$method);
if($iflock){
flock($handle,LOCK_EX);
}
fputs($handle,$data);
if($method=="rb+") ftruncate($handle,strlen($data));
fclose($handle);
}
exit;
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -