Skip to content

Commit

Permalink
9.1 Stable
Browse files Browse the repository at this point in the history
  • Loading branch information
secret715 committed Jan 21, 2017
1 parent acecf0e commit d43c898
Show file tree
Hide file tree
Showing 113 changed files with 1,589 additions and 605 deletions.
2 changes: 1 addition & 1 deletion Connections/SQL-sample.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
<Secret Center, open source member management system>
Copyright (C) 2012-2016 Secret Center開發團隊 <http://center.gdsecret.net/#team>
Copyright (C) 2012-2017 Secret Center開發團隊 <http://center.gdsecret.net/#team>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion Connections/SQL.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
<Secret Center, open source member management system>
Copyright (C) 2012-2016 Secret Center開發團隊 <http://center.gdsecret.net/#team>
Copyright (C) 2012-2017 Secret Center開發團隊 <http://center.gdsecret.net/#team>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion account.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
<Secret Center, open source member management system>
Copyright (C) 2012-2016 Secret Center開發團隊 <http://center.gdsecret.net/#team>
Copyright (C) 2012-2017 Secret Center開發團隊 <http://center.gdsecret.net/#team>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion admin/chat.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
<Secret Center, open source member management system>
Copyright (C) 2012-2016 Secret Center開發團隊 <http://center.gdsecret.net/#team>
Copyright (C) 2012-2017 Secret Center開發團隊 <http://center.gdsecret.net/#team>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down
6 changes: 3 additions & 3 deletions admin/editconfig.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
<Secret Center, open source member management system>
Copyright (C) 2012-2016 Secret Center開發團隊 <http://center.gdsecret.net/#team>
Copyright (C) 2012-2017 Secret Center開發團隊 <http://center.gdsecret.net/#team>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down Expand Up @@ -168,7 +168,7 @@ interface could display a "Source" link that leads users to an archive
<fieldset>
<legend>論壇</legend>
<div class="form-group">
<label class="col-sm-2 control-label" for="forum_captcha">發帖驗證碼:</label>
<label class="col-sm-2 control-label" for="forum_captcha">發文驗證碼:</label>
<div class="col-sm-6">
<label class="checkbox-inline">
<input name="forum_captcha" type="checkbox" value="1"<?php if($center['forum']['captcha']){echo ' checked="checked"';} ?>> 開啟
Expand All @@ -184,7 +184,7 @@ interface could display a "Source" link that leads users to an archive
</div>
</div>
<div class="col-sm-4 help-block">
每頁所顯示的帖子/回覆數量
每頁所顯示的文章/回覆數量
</div>
</div>
</fieldset>
Expand Down
2 changes: 1 addition & 1 deletion admin/editcss.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
<Secret Center, open source member management system>
Copyright (C) 2012-2016 Secret Center開發團隊 <http://center.gdsecret.net/#team>
Copyright (C) 2012-2017 Secret Center開發團隊 <http://center.gdsecret.net/#team>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down
188 changes: 96 additions & 92 deletions admin/forum.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
<Secret Center, open source member management system>
Copyright (C) 2012-2016 Secret Center開發團隊 <http://center.gdsecret.net/#team>
Copyright (C) 2012-2017 Secret Center開發團隊 <http://center.gdsecret.net/#team>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down Expand Up @@ -107,67 +107,69 @@ interface could display a "Source" link that leads users to an archive
</ul>
<h2 class="page-header"><?php echo $_block['row']['blockname']; ?></h2>
<?php if($_forum['num_rows'] == 0){ ?>
<div class="alert alert-danger">沒有帖子!</div>
<div class="alert alert-danger">沒有文章!</div>
<?php }else{ ?>
<script>
$(function(){
$('input.btn.btn-danger').click(function(e){
if(!window.confirm("確定刪除所選取的帖子?\n\n提醒您,該帖子的回覆也會一並刪除!")){
if(!window.confirm("確定刪除所選取的文章?\n\n提醒您,該文章的回覆也會一並刪除!")){
e.preventDefault();
}
});
});
</script>
<form action="forum.php?fid=<?php echo abs($_GET['fid']); ?>" method="POST">
<table class="table table-striped table-hover">
<thead>
<tr>
<th width="30"><input class="btn btn-danger btn-sm" type="submit" value="刪除"></th>
<th>帖子</th>
<th>作者/發表時間</th>
<th>回覆</th>
<th>最後回覆</th>
<th></th>
</tr>
</thead>
<tbody>
<?php do{
$_reply = sc_get_result("SELECT * FROM `forum_reply` WHERE `post_id`='%d' ORDER BY `mktime` DESC",array($_forum['row']['id']));
$_author = sc_get_result("SELECT `username` FROM `member` WHERE `id` = '%d'",array($_forum['row']['author']));
$_reply_author = sc_get_result("SELECT `username` FROM `member` WHERE `id` = '%d'",array($_reply['row']['author']));
?>
<tr>
<td><input name="del[]" type="checkbox" value="<?php echo $_forum['row']['id']; ?>" /></td>
<td>
<a href="forumview.php?id=<?php echo $_forum['row']['id']; ?>">
<?php echo $_forum['row']['title']; ?>
</a>
<?php if($_forum['row']['level']>1){ ?>
&nbsp;&nbsp;
<span class="label label-default"><?php echo sc_member_level($_forum['row']['level']); ?></span>
<?php } ?>
</td>
<td style="line-height:0.8em;font-size:92%;">
<?php echo $_author['row']['username']; ?>
<br><span style="font-size:66%;"><?php echo date('Y-m-d H:i',strtotime($_forum['row']['mktime'])); ?></span>
</td>
<td>
<?php echo $_reply['num_rows']; ?>
</td>
<td>
<?php
if($_reply['num_rows']>0){
echo '<div style="line-height:0.8em;font-size:92%;">'.$_reply_author['row']['username'].'<br><span style="font-size:66%;">'.date('Y-m-d H:i',strtotime($_reply['row']['mktime'])).'</span></div>';
}else{
echo '';
}
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th width="30"><input class="btn btn-danger btn-sm" type="submit" value="刪除"></th>
<th>文章</th>
<th>作者/發表時間</th>
<th>回覆</th>
<th>最後回覆</th>
<th></th>
</tr>
</thead>
<tbody>
<?php do{
$_reply = sc_get_result("SELECT * FROM `forum_reply` WHERE `post_id`='%d' ORDER BY `mktime` DESC",array($_forum['row']['id']));
$_author = sc_get_result("SELECT `username` FROM `member` WHERE `id` = '%d'",array($_forum['row']['author']));
$_reply_author = sc_get_result("SELECT `username` FROM `member` WHERE `id` = '%d'",array($_reply['row']['author']));
?>

</td>
</tr>
<?php }while ($_forum['row'] = $_forum['query']->fetch_assoc()); ?>
</tbody>
</table>
<tr>
<td><input name="del[]" type="checkbox" value="<?php echo $_forum['row']['id']; ?>" /></td>
<td>
<a href="forumview.php?id=<?php echo $_forum['row']['id']; ?>">
<?php echo $_forum['row']['title']; ?>
</a>
<?php if($_forum['row']['level']>1){ ?>
&nbsp;&nbsp;
<span class="label label-default"><?php echo sc_member_level($_forum['row']['level']); ?></span>
<?php } ?>
</td>
<td style="line-height:0.8em;font-size:92%;">
<?php echo $_author['row']['username']; ?>
<br><span style="font-size:66%;"><?php echo date('Y-m-d H:i',strtotime($_forum['row']['mktime'])); ?></span>
</td>
<td>
<?php echo $_reply['num_rows']; ?>
</td>
<td>
<?php
if($_reply['num_rows']>0){
echo '<div style="line-height:0.8em;font-size:92%;">'.$_reply_author['row']['username'].'<br><span style="font-size:66%;">'.date('Y-m-d H:i',strtotime($_reply['row']['mktime'])).'</span></div>';
}else{
echo '';
}
?>

</td>
</tr>
<?php }while ($_forum['row'] = $_forum['query']->fetch_assoc()); ?>
</tbody>
</table>
</div>
</form>
<?php
$_all_forum=sc_get_result("SELECT COUNT(*) FROM `forum` WHERE `block`='%d'",array($_block['row']['id']));
Expand Down Expand Up @@ -221,52 +223,54 @@ interface could display a "Source" link that leads users to an archive
<script>
$(function(){
$('a.btn.btn-danger').click(function(e){
if(!window.confirm("確定刪除所選取的區域?\n\n提醒您,該區塊的帖子也會一並刪除!")){
if(!window.confirm("確定刪除所選取的區域?\n\n提醒您,該區塊的文章也會一並刪除!")){
e.preventDefault();
}
});
});
</script>
<table class="table table-striped">
<thead>
<tr>
<th>區塊</th>
<th>位置</th>
<th>帖數</th>
<th>最後發帖</th>
<th></th>
</tr>
</thead>
<tbody>
<?php do{
$_block_post = sc_get_result("SELECT * FROM `forum` WHERE `block`='%d' ORDER BY `mktime` DESC",array($_forum['row']['id']));
?>
<tr>
<td>
<a href="forum.php?fid=<?php echo $_forum['row']['id']; ?>">
<?php echo $_forum['row']['blockname']; ?>
</a>
</td>
<td><?php echo $_forum['row']['position']; ?></td>
<td><?php echo $_block_post['num_rows']; ?></td>
<td>
<?php
if($_block_post['num_rows']>0){
echo date('Y-m-d H:i',strtotime($_block_post['row']['mktime']));
}else{
echo '';
}?>
</td>
<td>
<a class="btn btn-info" href="forum.php?edit=<?php echo $_forum['row']['id']; ?>">編輯</a>
<?php if($_forum['num_rows']>1){ ?>
<a class="btn btn-danger" href="forum.php?delblock=<?php echo $_forum['row']['id']; ?>">刪除</a>
<?php } ?>
</td>
</tr>
<?php }while($_forum['row'] = $_forum['query']->fetch_assoc()); ?>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>區塊</th>
<th>位置</th>
<th>文章數</th>
<th>最後發文</th>
<th></th>
</tr>
</thead>
<tbody>
<?php do{
$_block_post = sc_get_result("SELECT * FROM `forum` WHERE `block`='%d' ORDER BY `mktime` DESC",array($_forum['row']['id']));
?>
<tr>
<td>
<a href="forum.php?fid=<?php echo $_forum['row']['id']; ?>">
<?php echo $_forum['row']['blockname']; ?>
</a>
</td>
<td><?php echo $_forum['row']['position']; ?></td>
<td><?php echo $_block_post['num_rows']; ?></td>
<td>
<?php
if($_block_post['num_rows']>0){
echo date('Y-m-d H:i',strtotime($_block_post['row']['mktime']));
}else{
echo '';
}?>
</td>
<td>
<a class="btn btn-info" href="forum.php?edit=<?php echo $_forum['row']['id']; ?>">編輯</a>
<?php if($_forum['num_rows']>1){ ?>
<a class="btn btn-danger" href="forum.php?delblock=<?php echo $_forum['row']['id']; ?>">刪除</a>
<?php } ?>
</td>
</tr>
<?php }while($_forum['row'] = $_forum['query']->fetch_assoc()); ?>
</tbody>
</table>
</div>
<?php } ?>
<?php } ?>
<?php
Expand Down
16 changes: 8 additions & 8 deletions admin/forumedit.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
<Secret Center, open source member management system>
Copyright (C) 2012-2016 Secret Center開發團隊 <http://center.gdsecret.net/#team>
Copyright (C) 2012-2017 Secret Center開發團隊 <http://center.gdsecret.net/#team>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down Expand Up @@ -107,26 +107,26 @@ interface could display a "Source" link that leads users to an archive
}

$view = new View('theme/admin_default.html','admin/nav.php','',$center['site_name'],'論壇編輯',true);
$view->addCSS("../include/js/cleditor/jquery.cleditor.css");
$view->addScript("../include/js/cleditor/jquery.cleditor.min.js");
$view->addScript("../include/js/cleditor/jquery.cleditor.table.js");
$view->addCSS("../include/js/summernote/summernote.css");
$view->addScript("../include/js/summernote/summernote.min.js");
$view->addScript("../include/js/summernote/lang/summernote-zh-TW.min.js");
?>
<script>
$(function(){
$("#cleditor").cleditor({width:'99%', height:300, useCSS:true})[0].focus();
$("#summernote").summernote({width:'99%', height:300, focus: true, lang: 'zh-TW'});
});
</script>
<?php if(isset($_GET['reply'])){ ?>
<h2>編輯回覆</h2>
<form action="forumedit.php?reply&id=<?php echo $_reply['row']['id']; ?>" method="POST">
<div class="form-group">
<label for="content">回覆內容:</label>
<textarea id="cleditor" class="form-control" name="content" cols="65" rows="10" required="required"><?php echo sc_removal_escape_string($_reply['row']['content']); ?></textarea>
<textarea id="summernote" class="form-control" name="content" cols="65" rows="10" required="required"><?php echo sc_removal_escape_string($_reply['row']['content']); ?></textarea>
</div>
<p><input name="button" class="btn btn-primary" type="submit" value="儲存"></p>
</form>
<?php } elseif(isset($_GET['post'])){ ?>
<h2>編輯帖子</h2>
<h2>編輯文章</h2>
<form action="forumedit.php?post&id=<?php echo $_post['row']['id']; ?>" method="POST">
<div class="form-group">
<input class="form-control" name="title" type="text" placeholder="標題" required="required" value="<?php echo $_post['row']['title']; ?>">
Expand Down Expand Up @@ -156,7 +156,7 @@ interface could display a "Source" link that leads users to an archive
</div>
</div>
<div class="form-group">
<textarea id="cleditor" name="content" rows="10" required="required">
<textarea id="summernote" name="content" rows="10" required="required">
<?php echo $_post['row']['content']; ?>
</textarea>
</div>
Expand Down
4 changes: 2 additions & 2 deletions admin/forummerge.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
<Secret Center, open source member management system>
Copyright (C) 2012-2016 Secret Center開發團隊 <http://center.gdsecret.net/#team>
Copyright (C) 2012-2017 Secret Center開發團隊 <http://center.gdsecret.net/#team>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down Expand Up @@ -54,7 +54,7 @@ interface could display a "Source" link that leads users to an archive
$view = new View('theme/admin_default.html','admin/nav.php','',$center['site_name'],'區塊合併',true);
?>
<h2 class="page-header">區塊合併</h2>
<p>轉移舊區塊的所有帖子,並同時刪除舊區塊</p>
<p>轉移舊區塊的所有文章,並同時刪除舊區塊</p>
<form class="form-xs" action="forummerge.php" method="POST">
<div class="form-group">
將舊區塊
Expand Down
10 changes: 5 additions & 5 deletions admin/forumsearch.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
<Secret Center, open source member management system>
Copyright (C) 2012-2016 Secret Center開發團隊 <http://center.gdsecret.net/#team>
Copyright (C) 2012-2017 Secret Center開發團隊 <http://center.gdsecret.net/#team>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
Expand Down Expand Up @@ -94,7 +94,7 @@ interface could display a "Source" link that leads users to an archive
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="author">發帖人:</label>
<label class="col-sm-3 control-label" for="author">作者:</label>
<div class="col-sm-9">
<input class="form-control" name="author" type="text">
</div>
Expand Down Expand Up @@ -153,12 +153,12 @@ interface could display a "Source" link that leads users to an archive
<?php echo mb_substr(strip_tags($_post['row']['content']),mb_stripos(strip_tags($_post['row']['content']),sc_xss_filter($_GET['q']),0,'UTF-8')-30,60,'UTF-8'); ?>...
</p>
<ul class="list-inline" style="font-size:90%;color:rgb(100,100,100);">
<?php if($_post['row']['level']>1){ ?>
<li><span class="label"><?php echo sc_member_level($_post['row']['level']); ?></span></li>
<?php } ?>
<li><?php echo $_author['row']['username']; ?></li>
<li><?php echo date('Y-m-d H:i',strtotime($_post['row']['mktime'])); ?></li>
<li><?php echo implode('',$_reply['row']); ?> 回覆</li>
<?php if($_post['row']['level']>1){ ?>
<li><span class="label label-default"><?php echo sc_member_level($_post['row']['level']); ?></span></li>
<?php } ?>
</ul>
</div>
<?php
Expand Down
Loading

0 comments on commit d43c898

Please sign in to comment.