|
@@ -174,6 +174,8 @@ class LA{
|
|
|
$lang = substr($lang,0,5);
|
|
|
if(preg_match("/zh/i",$lang))$this->LanguageAppendix = 'zh';
|
|
|
else $this->LanguageAppendix = 'en';
|
|
|
+ }else{
|
|
|
+ $this->LanguageAppendix = 'en';
|
|
|
}
|
|
|
}
|
|
|
if(isset($LA_GLOBAL_LANG)){
|
|
@@ -597,7 +599,7 @@ li{display:block;}
|
|
|
.clean_table{border:none;font-size:1em !important;}.clean_table thead{box-shadow:none;}.clean_table td{vertical-align:top;}
|
|
|
table{width:100%;border-collapse:collapse;border-bottom:2px solid %black%;border-top:3px solid %black%;}
|
|
|
.settings input,.post inpiut{border:none!important;}
|
|
|
-.post table img{max-width:min(100%, 10rem) !important;}
|
|
|
+.post table img{max-width:min(100%, 20rem) !important;}
|
|
|
td{padding-left:0.1em;padding-right:0.1em;}
|
|
|
td:first-child{padding-left:0;}
|
|
|
td:last-child{padding-right:0;}
|
|
@@ -850,10 +852,11 @@ width:2em;height:2em;display:block;border:1px solid %black%;background-color:rgb
|
|
|
.center>tbody>tr>td{white-space:normal;vertical-align:top;min-width:1em;}
|
|
|
.center>tbody>tr>td:first-child{text-align:center;color:%gray%;padding-left:0.1em;}
|
|
|
.center>tbody>tr>td:nth-child(1)>*{}
|
|
|
-.center>tbody>tr>td:nth-child(2){text-align:center;color:%gray%;}
|
|
|
+.center>tbody>tr>td:nth-child(2){text-align:center;color:%gray%;box-shadow:0.3em 0px 0px -0.15em %black%44;}
|
|
|
+.center>tbody>.no_line>td:nth-child(2){box-shadow:none;}
|
|
|
.center>tbody>tr>td:nth-child(2) a{color:%gray%;}
|
|
|
.center>tbody>tr>td:nth-child(2) .marked{color:%black% !important;}
|
|
|
-.center>tbody>tr>td:nth-child(3){width:100%;text-align:left;}
|
|
|
+.center>tbody>tr>td:nth-child(3){width:100%;text-align:left;padding-left:0.5em;}
|
|
|
.center>tbody>tr>td:nth-child(3)>div{overflow:auto;}
|
|
|
.center>tbody>tr>td:last-child{padding-right:0.5em;}
|
|
|
.main>.center>tbody>tr{border-bottom:1px dotted %black%;}
|
|
@@ -2817,6 +2820,20 @@ blockquote{border-left:2px solid black;}
|
|
|
return 0;
|
|
|
};
|
|
|
}
|
|
|
+
|
|
|
+ if(isset($_GET['send']) && isset($_GET['addr']) && isset($_GET['post']) && $_GET['post']!=''){
|
|
|
+ require_once("mailsub.php"); $this->ReadPosts(); $this->ReadImages();
|
|
|
+ $post = &$this->GetPost($_GET['post'],true); if($post==$this->NULL_POST){ echo $this->T("问题"); exit; }
|
|
|
+ $content = $this->GenerateSinglePost($post, 0, 0, 0, 0, 0);
|
|
|
+ //$content = preg_replace("/(=[\'\"](.*\.php)?)(\?)/","$1{$GLOBALS['MY_HOST']}/$3",$content);
|
|
|
+ //$content = preg_replace("/(src=[\'\"])(images)/","$1{$GLOBALS['MY_HOST']}/$2",$content);
|
|
|
+ //$content = preg_replace("/(=[\'\"])(Files)/","$1{$GLOBALS['MY_HOST']}/$2",$content);
|
|
|
+ $content = $content."<br />.<hr />".mailsub_regular_text($_GET['send'],$_GET['addr']);
|
|
|
+ $title=$this->GetPostTitle($post);
|
|
|
+ if(send_email($_GET['addr'],$title,$content)<0){ echo $this->T("问题"); exit; }
|
|
|
+ echo $content; exit;
|
|
|
+ }
|
|
|
+
|
|
|
if(isset($_POST['gallery_edit_confirm']) && isset($_POST['gallery_edit_new_name']) && $_POST['gallery_edit_new_name']!=''){
|
|
|
$old_name = isset($_POST['gallery_edit_old_name'])?$_POST['gallery_edit_old_name']:"";
|
|
|
$new_name = $_POST['gallery_edit_new_name'];
|
|
@@ -3316,7 +3333,7 @@ blockquote{border-left:2px solid black;}
|
|
|
function MakePostingFieldsV2($reply_to=NULL, $show_hint=false){ $STR="";
|
|
|
if(isset($this->WayBack)){
|
|
|
$STR.="<span class='gray'><i>{$this->T('以过去日期浏览时不能发帖。')}</i></span>";
|
|
|
- $this->TFill(2,$STR); $this->TRow(); return;
|
|
|
+ $this->TFill(2,$STR); $this->TExtra("class='hidden_on_print no_line'"); $this->TRow(); return;
|
|
|
}
|
|
|
$STR.="<form action='{$_SERVER['REQUEST_URI']}' method='post' style='display:none;' id='post_form'></form>
|
|
|
<div class='smaller'><div style='display:".($show_hint?"block":"none")."'>
|
|
@@ -3342,7 +3359,7 @@ blockquote{border-left:2px solid black;}
|
|
|
if($reply_to){
|
|
|
$STR.="<input style='display:none;' type=input form='post_form' id='post_reply_to' name='post_reply_to' value='{$reply_to}' />";
|
|
|
}
|
|
|
- $this->TFill(2,$STR);$this->TExtra("class='hidden_on_print'"); $this->TRow();
|
|
|
+ $this->TFill(2,$STR);$this->TExtra("class='hidden_on_print no_line'"); $this->TRow();
|
|
|
}
|
|
|
|
|
|
function MakeLinkedPostsV2(&$p){ $STR="";
|
|
@@ -3419,7 +3436,7 @@ blockquote{border-left:2px solid black;}
|
|
|
EOT; } $th=NULL; $STR.="<br /><h2>";
|
|
|
$is_wide = (isset($post['wide'])&&$post['wide']) || ($is_thread && isset($post['tid']['wide']) && $post['tid']['wide']);
|
|
|
if($is_thread){ $th = $post['tid']; $STR.=$this->T('话题'); }else{ $STR.=$this->T('话题');$this->T('详细'); } $STR.="</h2>";
|
|
|
- $this->TFill(2,$STR); $this->TExtra("class='hidden_on_print'"); $this->TRow();
|
|
|
+ $this->TFill(2,$STR); $this->TExtra("class='hidden_on_print no_line'"); $this->TRow();
|
|
|
$cat = NULL;
|
|
|
if($is_thread) { if(isset($th['categories']) && isset($th['categories'][0])){ $cat = $th['categories']; } }
|
|
|
else { if(isset($post['categories']) && isset($post['categories'][0])) { $cat = $post['categories']; } }
|
|
@@ -3429,17 +3446,17 @@ blockquote{border-left:2px solid black;}
|
|
|
EOT; foreach($cat as $c){ $STR.=("<a href='?category=".$c."'>".($c=='none'?$this->T('未分类'):$this->T($c))."</a> "); }
|
|
|
$STR.="</p>";
|
|
|
}
|
|
|
- $STR.="<br class='hidden_on_print' />"; $this->TFill(2,$STR); $this->TRow(); $is_reversed=false;
|
|
|
+ $STR.="<br class='hidden_on_print' />"; $this->TFill(2,$STR); $this->TExtra("class='no_line'"); $this->TRow();$is_reversed=false;
|
|
|
if($is_thread){ $use_arr = $th['arr']; $hinted=false;
|
|
|
$last_end_wide = true; $is_reversed=$this->IsReversedThread($th);
|
|
|
foreach($use_arr as &$p){$use_class="";if($p==$post){$use_class.=" active_post";}
|
|
|
if($last_end_wide){$use_class.=" last_wide";}
|
|
|
$make_title = ($p == $post);
|
|
|
- if(isset($p['restart'])){ $STR="<li class='restart'><h3>{$p['restart']} …</h3></li>"; $this->TFill(0,$STR,3); $this->TRow(); }
|
|
|
+ if(isset($p['restart'])){ $STR="<li class='restart'><h3>{$p['restart']} …</h3></li>"; $this->TFill(0,$STR,3); $this->TExtra("class='no_line'"); $this->TRow(); }
|
|
|
$this->MakeSinglePostV2($p,true,false,$use_class,false, false, false, true, false, false);
|
|
|
if($make_title){ $STR.='<script>
|
|
|
document.title+=" | '.addslashes(preg_replace('/\r|\n/u', ' ', mb_substr($this->GetPostTitle($p),0,100))).'"</script>';
|
|
|
- $this->TFill(2,$STR);
|
|
|
+ $this->TFill(2,$STR); $this->TExtra("class='no_line'");
|
|
|
}
|
|
|
if($is_reversed && !$hinted){ $hinted = true;
|
|
|
if($this->LoggedIn && (!$this->InHereMode)){
|
|
@@ -3463,12 +3480,12 @@ blockquote{border-left:2px solid black;}
|
|
|
<br class='hidden_on_desktop' />".
|
|
|
$this->ReadableTime(isset($post['tid']['last']['version'])?$post['tid']['last']['version']:$post['tid']['last']['id'])."
|
|
|
</div>";
|
|
|
- $this->TFill(2,$STR); $this->TRow(); $STR="";
|
|
|
+ $this->TFill(2,$STR); $this->TExtra("class='no_line'"); $this->TRow(); $STR="";
|
|
|
if(!$is_reversed && ($this->LoggedIn && (!$this->InHereMode))){
|
|
|
$STR.="<div class='hidden_on_print'><br />{$this->MakePostingFieldsV2($is_thread?$th['last']['id']:$post['id'], true)}</div>";
|
|
|
- $this->TFill(2,$STR); $this->TRow();
|
|
|
+ $this->TFill(2,$STR); $this->TExtra("class='no_line'"); $this->TRow();
|
|
|
}
|
|
|
- if($this->NewsletterEnabled){ $STR=$this->MakeSubscription(); $this->TFill(2,$STR); $this->TRow(); }
|
|
|
+ if($this->NewsletterEnabled){ $STR=$this->MakeSubscription(); $this->TFill(2,$STR); $this->TExtra("class='no_line'"); $this->TRow(); }
|
|
|
//$this->MakeCommentSection($post);
|
|
|
$STR="";
|
|
|
if(isset($post['slides']) || ($is_thread&&isset($post['tid']['slides']))){
|
|
@@ -3550,7 +3567,7 @@ blockquote{border-left:2px solid black;}
|
|
|
}
|
|
|
$this->SpecialPinned=$tmppinned;
|
|
|
if($this->NewsletterEnabled && !isset($category) && !isset($search_term) && !$this->NotesView){
|
|
|
- $STR=$this->MakeSubscription(); $this->TFill(2,$STR); $this->TRow(); $STR='';
|
|
|
+ $STR=$this->MakeSubscription(); $this->TFill(2,$STR); $this->TExtra("class='no_line'"); $this->TRow(); $STR='';
|
|
|
}
|
|
|
$STR.="<br /><h2>".(isset($search_term)?$this->T('搜索'):
|
|
|
(isset($category)?("<span class='gray'>".$this->T('分类')."</span> ".
|
|
@@ -3559,17 +3576,17 @@ blockquote{border-left:2px solid black;}
|
|
|
($this->LoggedIn?" <a href='".$INDEXPHP."?set_notes_view=".($this->NotesView?'0':'1')."'>N</a> ".
|
|
|
"<a href='".$INDEXPHP."?comments=all'>@</a> <a href='".$INDEXPHP."?statistics=all'>%</a>":"")."</span>")).
|
|
|
"</h2><br />";
|
|
|
- $this->TFill(2,$STR); $this->TRow();
|
|
|
+ $this->TFill(2,$STR); $this->TExtra("class='no_line'"); $this->TRow();
|
|
|
if(isset($search_term)){
|
|
|
$STR.="<form action='".$INDEXPHP."' method='post' style='display:none;' id='search_form'></form>".
|
|
|
"<input id='search_content' name='search_content' rows='4' form='search_form' type='text' value='$search_term'>".
|
|
|
"<input class='button' form='search_form' type='submit' name='search_button' value='{$this->T('搜索')}'>";
|
|
|
- $this->TFill(2,$STR); $this->TRow();
|
|
|
+ $this->TFill(2,$STR); $this->TExtra("class='no_line'"); $this->TRow();
|
|
|
}else if(isset($category)){
|
|
|
$STR.="<div></div>";
|
|
|
- $this->TFill(2,$STR); $this->TRow();
|
|
|
+ $this->TFill(2,$STR); $this->TExtra("class='no_line'"); $this->TRow();
|
|
|
}else if($this->LoggedIn){
|
|
|
- $this->TFill(2,$STR); $this->TRow();
|
|
|
+ $this->TFill(2,$STR); $this->TExtra("class='no_line'"); $this->TRow();
|
|
|
$this->MakePostingFieldsV2(NULL,false);
|
|
|
}
|
|
|
$this->PostsPerPage=20;
|
|
@@ -3608,7 +3625,7 @@ blockquote{border-left:2px solid black;}
|
|
|
$STR.="<a href='".$INDEXPHP."?offset=".($this->CurrentOffset+1).
|
|
|
(isset($search_term)?"&search=".$search_term:(isset($category)?"&category=".$category:""))."'>".
|
|
|
" → {$this->T('下一页')}</a>";
|
|
|
- $this->TFill(0,$STR,3); $this->TExtra($EXTRA); $this->TRow();
|
|
|
+ $this->TFill(0,$STR,3); $this->TExtra($EXTRA); $this->TExtra("class='no_line'"); $this->TRow();
|
|
|
}
|
|
|
|
|
|
function GeneratePage($is_section=false,$extra_classes=""){ $S="";
|
|
@@ -4193,7 +4210,7 @@ blockquote{border-left:2px solid black;}
|
|
|
</div><div class='spacer hidden_on_print'></div>
|
|
|
EOT;
|
|
|
}
|
|
|
- $this->TFill(2,$STR); $this->TRow();
|
|
|
+ $this->TFill(2,$STR); $this->TExtra("class='no_line'"); $this->TRow();
|
|
|
}
|
|
|
function MakeSidebar(){ ?>
|
|
|
<div class='left mobile_fold'><?php if(isset($this->SpecialSidebar) && ($p = &$this->GetPost($this->SpecialSidebar))!=NULL){
|
|
@@ -5126,6 +5143,48 @@ blockquote{border-left:2px solid black;}
|
|
|
</div>
|
|
|
<?php
|
|
|
}
|
|
|
+
|
|
|
+ function MakeSubscribers(){ ?>
|
|
|
+ <table><tbody><tr><td><?=$this->T("帖子")?></td><td><input type='text' id='mail_news_id' name='mail_news_id'></td></tr>
|
|
|
+ <?php
|
|
|
+ $subs=file_get_contents("all_subscribers.php");
|
|
|
+ if(preg_match_all("/(.+)\s+\[\[\[(.*)\]\]\]/u",$subs,$ma,PREG_SET_ORDER)){
|
|
|
+ foreach($ma as $m){ ?>
|
|
|
+ <tr><td><a id="send<?=$m[1]?>" ondblclick="SendNews(this,'<?=$m[1]?>','<?=$m[2]?>')"><?=$this->T("发送");?></a></td>
|
|
|
+ <td id="content<?=$m[1]?>"><?=$m[2];?></td><?php
|
|
|
+ }
|
|
|
+ } ?>
|
|
|
+ </tbody></table><script>
|
|
|
+ function copyElementToClipboard(element) {
|
|
|
+ window.getSelection().removeAllRanges();
|
|
|
+ let range = document.createRange();
|
|
|
+ range.selectNode(element);
|
|
|
+ window.getSelection().addRange(range);
|
|
|
+ document.execCommand('copy');
|
|
|
+ window.getSelection().removeAllRanges();
|
|
|
+ }
|
|
|
+ function SendNews(but,id,email){
|
|
|
+ txt=document.querySelector("#mail_news_id"); if(!txt)return;
|
|
|
+ post=txt.value; if(post=='') return;
|
|
|
+ but.innerHTML = "<?=$this->T('稍等')?>"; but.ondblclick=null;
|
|
|
+ var xhr = new XMLHttpRequest();
|
|
|
+ function wrapidxhr(_id){ return function() {
|
|
|
+ if (this.readyState == 4) {
|
|
|
+ btn = document.querySelector('#send'+_id);
|
|
|
+ if(this.status == 200){ btn.innerHTML="<?=$this->T('好')?>"
|
|
|
+ //ctn = document.querySelector('#content'+_id);
|
|
|
+ //ctn.innerHTML=this.responseText.trim();
|
|
|
+ //copyElementToClipboard(ctn);
|
|
|
+ //ctn.innerHTML="<?=$this->T('复制到剪贴板')?>";
|
|
|
+ }else{ btn.innerHTML="<?=$this->T('问题')?>" }
|
|
|
+ }
|
|
|
+ }; };
|
|
|
+ xhr.onreadystatechange = wrapidxhr(id)
|
|
|
+ xhr.open("GET", "<?=$INDEXPHP?>?post="+post.toString()+'&send='+id.toString()+'&addr='+email.toString(), true);
|
|
|
+ xhr.send();
|
|
|
+ }
|
|
|
+ </script><?php
|
|
|
+ }
|
|
|
|
|
|
function MakeExtraOperations(){ global $INDEXPHP; ?>
|
|
|
<div class='settings' style='overflow:auto;'>
|
|
@@ -5155,7 +5214,7 @@ blockquote{border-left:2px solid black;}
|
|
|
<?php if($this->NewsletterEnabled){
|
|
|
$subs=file_get_contents("all_subscribers.php"); ?>
|
|
|
<br /><br /><h3><?=$this->T('邮件订阅者')?></h3>
|
|
|
- <textarea rows="4" class='full_box' wrap="off"><?=$subs?substr($subs,5):"error"?></textarea>
|
|
|
+ <?php $this->MakeSubscribers(); ?>
|
|
|
<?php } ?>
|
|
|
|
|
|
<br />
|