function login_to_view($content){ if (preg_match_all('/<!--loginview start-->([\s\S]*?)<!--loginview end-->/i', $content, $hide_words)){ if( ISLOGIN ){ $content = str_replace($hide_words[0], $hide_words[1], $conte nt); }else{ $hide_notice = '<div style="text-align:center;border:1px dash ed #FF9A9A;padding:8px;margin:10px auto;color:#FF6666;">您必须 先<a href="'.BLOG_URL.'admin">登录</a>才能查看隐藏内容</div>'; $content = str_replace($hide_words[0], $hide_notice, $content); } } return $content; }
站点统计
留言咨询