\s*\@.*?<\/p>/mu","",$html); $html = preg_replace("/
\s*\{\s*INTERESTING\s+(.*?)\}\s*<\/p>/imu","",$html); $images = []; $images_noclick = []; $search_str = $html = preg_replace_callback( "/(
\s*)?(]*)src=[\'\"])(images\/([0-9]{14,}\.(jpg|png|jpeg|gif)))([\'\"][^>]*)\/>(\s*<\/p>)?/u",
                    function($m) use (&$images,&$images_noclick) {
                        $orig_src = $src = $m[5]; $keep = false; $original = false;
                        if (preg_match('/alt=[\'\"].*keep_inline.*[\'\"]/u',$m[3]) ||
                            preg_match('/alt=[\'\"].*keep_inline.*[\'\"]/u',$m[7])) { $keep=true; }
                        if ($keep && preg_match('/alt=[\'\"].*original.*[\'\"]/u',$m[3]) ||
                                     preg_match('/alt=[\'\"].*original.*[\'\"]/u',$m[7])) { $original=true; }
                        if(($im = &$this->FindImage($m[5]))!=NULL && isset($im['thumb'])){ 
                            $src = $im['thumb']; $orig_src=$im['file'];
                        }
                        if($this->InExperimentalMode){
                            $click = "".
                                        $m[2].$orig_src.$m[7].">";
                            return $click;
                        }else{
                            $click = $m[2].($original?$orig_src:$src).$m[7]." data-imgsrc='".$m[5]."'".
                                (isset($im['product'])?" data-product='".$im['product']."'":"").
                                ($original?" class='original_img'":"").">";
                            $images_noclick[]=$m[2].$src.$m[7].">";
                            $ret = "";
                            if($keep) { $ret = $click; }
                            else { $images[] = $click; }
                            if(isset($m[1])&&isset($m[8])&&$m[1]&&$m[8]) return $ret;
                            else return ((isset($m[1])&&$m[1]?$m[1]:"").$ret.(isset($m[8])&&$m[8]?$m[8]:""));
                        }
                    },$html,-1,$count);
        $html = preg_replace('/
\s*<\/p>/u',"", $html); if($html==""){$html="
";} if(sizeof($images)){ if(sizeof($images)==1){$html.="
\s*<\/p>/u',"", $html);
            if (preg_match('/ \s*\{big_table\}\s*<\/p>\s*( ".$post['product']['title']." ".$post['product']['short']." ".$post['product']['price']." \s*\{read_more\}\s*<\/p>[\s\S]*/u'," [".$this->T("阅读更多")."] \s*\{read_more\}\s*<\/p>/u',"", $ht);
        }
        if ($strip_tags){
            $ht = strip_tags($ht,' \s*<\/p>/u',"", $ht);
            $ht = " \s*\{big_table\}\s*<\/p>/u','',$ht);
            }
        }
        if ($strip_tags && $generate_thumbs && isset($post['images']) && isset($post['images'][0])){
            $ht.="  ".$this->T("已关闭评论")."  ".$name.":".$mail."   =$this->T('分类')?> | ".($c=='none'?$this->T('未分类'):$this->T($c))." "; } ?> =$this->T('选择、粘贴或者拖动到页面以上传图片。')?>         =$this->T('当心!下列操作将立即执行:')?>
        [\s\S]*?<\/table>)/u', function ($m) use (&$table){
            $table = $m[1];
            return "";
        }, $html);
        $table_out = $table;
        return $new_html;
    }
    function GenerateSinglePost(&$post, $strip_tags, $generate_anchor=false, $generate_refs=false,
                                 $generate_thumbs=false, &$table_out, $hide_long = false){
        $this->ConvertPost($post);
        if($generate_anchor){ $this->CreatePostAnchor($post); }
        $ht = $post['html'];
        if(isset($post['mark_value']) && $post['mark_value']==5 && ($generate_thumbs || !$generate_anchor)){
            $ht="
');
            $ht = preg_replace('/
";
            foreach($post['images'] as $im){
                $ht.="
".$title."
                
            
                 =$this->T('新增历史记录');?>=$this->T('评论')?>
        CommentEnabled){
            echo "
"; } ?>
        =isset($search_term)?$this->T('搜索'):
                                (isset($category)?("".$this->T('分类')." ".
                                    ($category=='none'?$this->T('未分类'):$this->T($category))):($this->T('最近')).
                    ($this->LoggedIn?" ":""))?>
            
                
                
                T('搜索')?>
            
                
            LoggedIn){ ?>
                
                SpecialPinned) && ($p = &$this->GetPost($this->SpecialPinned))!=NULL && !$this->CurrentOffset) &&
                       $this->CanShowPost($p)){
                        $this->MakeSinglePost($p, true, false, false, false, true, false, false, false, true);
                    }
                    $i = 0;
                    foreach(array_reverse($this->Posts) as &$p){
                        if(!$this->CanShowPost($p) || $this->SkipProduct($p)) continue;
                        if(isset($search_term)){
                            if ($search_term=='' || !preg_match("/".preg_quote($search_term)."/iu", $p['content'])) continue;
                        }else if(isset($category)){
                            $cat = isset($p['tid'])?(isset($p['tid']['categories'])?($p['tid']['categories']):[]):
                                                    (isset($p['categories'])?($p['categories']):[]);
                            if ($category=='none') { if($cat!=[]) continue; }
                            else{ if ($category=='' || !in_array($category, $cat)) continue; }
                            if(isset($p['tid'])){ if(isset($p['tid']['displayed'])) continue; $p['tid']['displayed'] = True; }
                        }else{
                            if(in_array($p['id'],
                                [$this->SpecialPinned,$this->SpecialFooter,$this->SpecialFooter2,$this->SpecialNavigation])) continue;
                            if(isset($p['tid'])){ if(isset($p['tid']['displayed'])) continue; $p['tid']['displayed'] = True; }
                        }
                        if($i < $this->PostsPerPage * $this->CurrentOffset) {$i++; continue;}
                        $this->MakeSinglePost($p, true, false, NULL, false, true, false, false, false, false);
                        $i++;
                        if($i >= $this->PostsPerPage * (1+$this->CurrentOffset)) {break;}
                    }?>
            
        >=$this->T('链接')?>
        
                =$this->T('没有历史记录')?>
            =$this->T('帖子')?> '>=$title?>
        
            =$this->T('历史记录')?>
            =$this->T('帖子')?> '>=$title?>
            
        
    
            =$this->T('版本不存在')?>
        
            =$this->T('差异')?>
            
                
        
    GetArchiveHandle($this->CurrentPostID);
        ?>
        
        =$this->T('选择的版本')?> 
                    
=$this_ver['version']?>=$this->T('下一个版本')?> 
=$next_ver['version']?>=$this_ver['content']?>
=$next_ver['content']?>
=$this->T('评论')?> (=$comment_count;?>)
            ";
                    foreach($to_post['comments'] as $p){
                        $ht = $this->TranslatePostParts($this->GenerateSinglePost($p, false, false, false, false, $t, false));
                        $name = isset($p['link'])?("".$p['name']."↗"):$p['name'];
                        $mail = $this->LoggedIn?(""):"";
                        echo "=$this->T('有趣')?>
                '>→
            
                     =$this->T($header);?> 
                ' =$is_deleted?"data-mark-delete='true'":""?>
                        onDblClick='ClickImage(this)'> 
                    0){ ?>
                     class='clean_a paa'>
                         
                        GetPost($ref);
                            if(isset($post['mark_value']) && $post['mark_value']==5){ $count_product++; continue; }
                            if(!$this->CanShowPost($po)){ continue; }
                            echo "
            MakeCommentSection($th['first']); ?>
        =$this->T('话题')?>
            
                =$this->T('详细')?>
            
            
                
            NULL_POST; $p = &$this->GetPost(isset($p['next'])?$p['next']:NULL)){
                        $use_class = ($p == $post)?'focused_post':'';
                        $show_link = ($p == $post)?false:true;
                        $make_title = ($p == $post);
                        $this->MakeSinglePost($p,$show_link,false,$use_class,false, false, false, true, false, false);
                        if($make_title){?>
                        
                        MakeSinglePost($post,false, false, 'focused_post',false, false, false, true, false, false);
                    ?>
                LoggedIn && (!$this->InExperimentalMode)){ ?>
                    
                MakeCommentSection($post);
                ?>
            
            NULL_POST; $p = &$this->GetPost(isset($p['next'])?$p['next']:NULL)){
                        $this->MakeSinglePostExp($p);
                        if($p == $th['first']){?>
                        
                        MakeSinglePostExp($post);
                    if($post['id']!=$this->ExpIndex){ ?>
            
=$this->T('点击图片以插入:')?>
            
            
            
=(isset($name) && ($gal=$this->GetGallery($name))!=NULL)?
                                    ("".$this->T('相册').":".$this->T($name)):
                                    ($_GET['gallery']=='trash'?$this->T('垃圾桶'):$this->T('画廊'))?>
            =$year;?>
' data-imgsrc='=$im["name"]?>'=isset($im['product'])?
                            'data-product="'.$im["product"].'"':""?>/>
                    
=$this->T('设置')?>
            
                LoggedIn){ ?>
                    
                    
            LoggedIn){ ?>
                ' />
            
                ' />
            
        =$this->T('选项')?> =$this->T('值')?> =$this->T('网站标题')?> 
                        =$this->T('短标题')?> 
                        =$this->T('显示名称')?> 
                        =$this->T('电子邮件')?> 
                        =$this->T('导航栏')?>
                        =isset($this->SpecialNavigation)?"→":""?> 
                        =$this->T('脚注')?> 1=isset($this->SpecialFooter)?"→":""?> 
                        =$this->T('脚注')?> 2=isset($this->SpecialFooter2)?"→":""?> 
                        =$this->T('置顶文')?>=isset($this->SpecialPinned)?"→":""?> 
                        =$this->T('默认相册')?> 
                        =$this->T('启用评论')?> 
                        CommentEnabled?"checked":""?>/> =$this->T('附加操作')?> =$this->T('进入')?>   =$this->T('实验访问')?> =$this->T('主机')?>=isset($this->ExpHost)?"→":""?> 
                        =$this->T('网站标题')?> 
                        =$this->T('短标题')?> 
                        =$this->T('首次提示')?>=isset($this->ExpCaution)?"→":""?> 
                        =$this->T('索引')?>=isset($this->ExpIndex)?"→":""?> 
                        =$this->T('导航栏')?>
                        =isset($this->ExpNavigation)?"→":""?> 
                        =$this->T('脚注')?>=isset($this->ExpFooter)?"→":""?> 
                          =$this->T('管理员')?> 
                        =$this->T('登出')?> =$this->T('帐号')?> 
                        =$this->T('新密码')?> 
                        =$this->T('再次输入')?> 
                        =$this->T('旧密码')?> 
                        =$this->T('请登录')?> =$this->T('帐号')?> 
                        =$this->T('密码')?> 
                        =$this->T('附加操作')?>
            =$this->T('返回一般设置')?>
            =$this->T('自动重定向')?>
            
                =$this->T('P为帖子跳转,匹配REQUEST_URI跳到目标文章;S为站点跳转,可以重定向来源域名,例子:')?>
            P discount:20001001010101;
            
            
            ' />
            
S old_domain:www.new_domain.com:20001001010101;=$this->T('自定义翻译')?>
            
                =$this->T('填写格式:')?>
            - 语言 | Language
            
            
            ' />
            
Posts) as $p){ if(!isset($p['comment_to'])) continue; if($i < $this->CommentsPerPage * $this->CurrentOffset) {$i++; continue;} $ht = $this->TranslatePostParts($this->GenerateSinglePost($p, false, false, false, false, $t, false)); $name = isset($p['link'])?("".$p['name']."↗"):$p['name']; $post_to = $this->GetPost($p['comment_to']); $post_title = $this->GetPostTitle($post_to); if(!$post_to) $post_title = "?"; $mail = " ". "@ ". (isset($p['ip'])?$p['ip']:"?")."";
                
                $i++;
            }
        ?>
". "(".$post_title.")"; echo "
".$name.":".$mail."
".$ht."