同步宝塔上的源码
38
source/plugin/replyfloor/admin.inc.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
loadcache('plugin');
|
||||
$setconfig = $_G['cache']['plugin'][$plugin['identifier']];
|
||||
|
||||
require_once libfile('function/common', 'plugin/replyfloor');
|
||||
|
||||
define('PLUGINURL', 'source/plugin/'.$plugin['identifier'].'/');
|
||||
|
||||
$actarray = array('moderate', 'message', 'recycle', 'report', 'attach', 'counter', 'language', 'more', 'h5upload', 'rewrite');
|
||||
$act = !in_array($_GET['act'], $actarray) ? 'message' : $_GET['act'];
|
||||
|
||||
$pluginurl = 'plugins&operation=config&do='.$pluginid.'&identifier='.$plugin['identifier'].'&pmod=admin&act='.$act;
|
||||
|
||||
require_once libfile('admin/'.$act, 'plugin/'.$plugin['identifier']);
|
||||
|
||||
?>
|
151
source/plugin/replyfloor/admin/admin_attach.php
Normal file
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
$op = in_array($_GET['op'], array('index','delete')) ? $_GET['op'] : 'index';
|
||||
|
||||
if($op == 'index') {
|
||||
if(!submitcheck('savesubmit')) {
|
||||
$perpage = empty($_GET['perpage']) ? 30 : $_GET['perpage'];
|
||||
$start = ($page-1)*$perpage;
|
||||
$checkperpage = array();
|
||||
$checkperpage[$perpage] = 'selected="selected"';
|
||||
$unused = intval($_GET['unused']) ? 1 : 0;
|
||||
$checkunused = array();
|
||||
$checkunused[$unused] = 'selected="selected"';
|
||||
$intkeys = array();
|
||||
$strkeys = array();
|
||||
$randkeys = array();
|
||||
$likekeys = array('username', 'filename');
|
||||
$results = getwheres($intkeys, $strkeys, $randkeys, $likekeys);
|
||||
foreach($likekeys as $k) {
|
||||
$_GET[$k] = dhtmlspecialchars($_GET[$k]);
|
||||
}
|
||||
$wherearr = $results['wherearr'];
|
||||
$mpurl = ADMINSCRIPT."?action=$pluginurl&unused=$unused&perpage=$perpage&".implode('&', $results['urls']);
|
||||
$adminscript = ADMINSCRIPT;
|
||||
$searchlang = array();
|
||||
$keys = array('attach_filename', 'attach_unused_0', 'attach_unused_1', 'perpage_30', 'perpage_50', 'perpage_100', 'perpage_200');
|
||||
foreach ($keys as $key) {
|
||||
$searchlang[$key] = lang('plugin/'.$plugin['identifier'], $key);
|
||||
}
|
||||
echo <<<SEARCH
|
||||
<form method="get" autocomplete="off" action="$adminscript" id="tb_search">
|
||||
<div style="margin-top:8px;">
|
||||
<table cellspacing="3" cellpadding="3">
|
||||
<tr>
|
||||
<th>$lang[username]</th><td><input type="text" class="txt" name="username" value="$_GET[username]"></td>
|
||||
<th>$searchlang[attach_filename]</th><td><input type="text" class="txt" name="filename" value="$_GET[filename]"></td>
|
||||
<td><select name="unused" class="ps vm"><option value="0"$checkunused[0]>$searchlang[attach_unused_0]</option><option value="1"$checkunused[1]>$searchlang[attach_unused_1]</option></select></td>
|
||||
<td><select name="perpage" class="ps vm"><option value="30"$checkperpage[30]>$searchlang[perpage_30]</option><option value="50"$checkperpage[50]>$searchlang[perpage_50]</option><option value="100"$checkperpage[100]>$searchlang[perpage_100]</option><option value="200"$checkperpage[200]>$searchlang[perpage_200]</option></select></td>
|
||||
<td>
|
||||
<input type="hidden" name="action" value="plugins">
|
||||
<input type="hidden" name="operation" value="config">
|
||||
<input type="hidden" name="do" value="$pluginid">
|
||||
<input type="hidden" name="identifier" value="$plugin[identifier]">
|
||||
<input type="hidden" name="pmod" value="$_GET[pmod]">
|
||||
<input type="hidden" name="act" value="$act">
|
||||
<input type="hidden" name="op" value="$op">
|
||||
<input type="submit" name="searchsubmit" value="$lang[search]" class="btn" id="submit_searchsubmit">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/JavaScript">_attachEvent(document.documentElement, 'keydown', function (e) { entersubmit(e, 'searchsubmit'); });</script>
|
||||
SEARCH;
|
||||
showformheader($pluginurl."&unused=$unused");
|
||||
showtableheader(lang('plugin/'.$plugin['identifier'], 'attach_list'));
|
||||
showsubtitle(array('del', 'username', lang('plugin/'.$plugin['identifier'], 'attach_filename'), lang('plugin/'.$plugin['identifier'], 'attach_preview'), lang('plugin/'.$plugin['identifier'], 'attach_filesize'), lang('plugin/'.$plugin['identifier'], 'attach_dateline')));
|
||||
if($unused){
|
||||
$count = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment_unused')->count_by_search_where($wherearr);
|
||||
$list = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment_unused')->fetch_all_by_search_where($wherearr,'order by dateline desc', $start, $perpage);
|
||||
}else{
|
||||
$count = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->count_by_search_where($wherearr);
|
||||
$list = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->fetch_all_by_search_where($wherearr,'order by dateline desc', $start, $perpage);
|
||||
}
|
||||
foreach ($list as $value) {
|
||||
$fileurl = ($value['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']) . 'replyfloor/'. $value['attachment'];
|
||||
$value['dateline'] = dgmdate($value['dateline'], 'Y-n-j H:i');
|
||||
showtablerow('', array('class="td25"', 'class="td24"', '', 'class="td24"', 'class="td24"', 'class="td24"'), array(
|
||||
"<input class=\"checkbox\" type=\"checkbox\" name=\"delete[]\" value=\"$value[id]\">",
|
||||
$value['username'],
|
||||
'<a href="'.$fileurl.'" target="_blank">'.$value['filename'].'</a>',
|
||||
in_array($value['fileext'], array('jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp')) ? '<a href="'.$fileurl.'" target="_blank"><img src="'.$fileurl.'" border="0" alt="" width="80" height="80" /></a>' : '',
|
||||
sizecount($value['filesize']),
|
||||
$value['dateline'],
|
||||
));
|
||||
}
|
||||
$multipage = multi($count, $perpage, $page, $mpurl);
|
||||
|
||||
showsubmit('savesubmit', 'submit', 'select_all', '', $multipage, false);
|
||||
showtablefooter();
|
||||
showformfooter();
|
||||
} else {
|
||||
$unused = intval($_GET['unused']) ? 1 : 0;
|
||||
if(is_array($_GET['delete'])) {
|
||||
$ids = $_GET['delete'];
|
||||
if($unused) {
|
||||
$attachlist = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment_unused')->fetch_all_by_id($ids);
|
||||
foreach($attachlist as $attach){
|
||||
if($attach['remote']) {
|
||||
ftpcmd('delete', 'replyfloor/'.$attach['attachment']);
|
||||
} else {
|
||||
@unlink($_G['setting']['attachdir'].'/replyfloor/'.$attach['attachment']);
|
||||
}
|
||||
}
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment_unused')->delete_by_id($ids);
|
||||
}else{
|
||||
$msgids = array();
|
||||
$attachlist = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->fetch_all_by_id($ids);
|
||||
foreach($attachlist as $attach){
|
||||
if($attach['remote']) {
|
||||
ftpcmd('delete', 'replyfloor/'.$attach['attachment']);
|
||||
} else {
|
||||
@unlink($_G['setting']['attachdir'].'/replyfloor/'.$attach['attachment']);
|
||||
}
|
||||
if(!in_array($attach['msgid'], $msgids)){
|
||||
$msgids[] = $attach['msgid'];
|
||||
}
|
||||
}
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->delete_by_id($ids);
|
||||
//<2F><><EFBFBD>»ظ<C2BB><D8B8><EFBFBD><EFBFBD><EFBFBD>ͼƬ<CDBC><C6AC>ַ
|
||||
$messagelist = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->fetch_all_by_id($msgids);
|
||||
foreach($messagelist as $message){
|
||||
$attachment = $queryattach = array();
|
||||
$queryattach = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->fetch_all_by_msgid(array($message['id']), 'order by displayorder asc,dateline asc');
|
||||
foreach($queryattach as $value){
|
||||
if(in_array($value['fileext'], array('jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp'))){
|
||||
$attachment[] = ($value['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']) . 'replyfloor/'. $value['attachment'];
|
||||
}
|
||||
}
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->update_by_id($message['id'], array('attachment' => implode("\t", $attachment)));
|
||||
}
|
||||
}
|
||||
}else{
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'operate_not_check'), '', 'error');
|
||||
}
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'attach_updatesucceed'), "action=$pluginurl&unused=$unused", 'succeed');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
81
source/plugin/replyfloor/admin/admin_counter.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
$op = in_array($_GET['op'], array('index','member')) ? $_GET['op'] : 'index';
|
||||
|
||||
if($op == 'index') {
|
||||
if(!submitcheck('savesubmit')) {
|
||||
showtips(lang('plugin/'.$plugin['identifier'], 'counter_tips'));
|
||||
showformheader($pluginurl);
|
||||
showtableheader();
|
||||
showsubtitle(array('', lang('plugin/'.$plugin['identifier'], 'counter_amount')));
|
||||
showtablerow('', array('class="td21"'), array(
|
||||
lang('plugin/'.$plugin['identifier'], 'counter_member').":",
|
||||
'<input name="pertask" type="text" class="txt" value="1000" /><input name="op" type="hidden" value="member" /><input type="submit" class="btn" name="savesubmit" value="'.$lang['submit'].'" />'
|
||||
));
|
||||
showtablefooter();
|
||||
showformfooter();
|
||||
}
|
||||
}elseif($op == 'member') {
|
||||
$pertask = isset($_GET['pertask']) ? intval($_GET['pertask']) : 100;
|
||||
$current = isset($_GET['current']) && $_GET['current'] > 0 ? intval($_GET['current']) : 0;
|
||||
$next = $current + $pertask;
|
||||
|
||||
if(submitcheck('savesubmit', 1)) {
|
||||
|
||||
$nextlink = "action=".$pluginurl."&op=member¤t=$next&pertask=$pertask&savesubmit=yes";
|
||||
$processed = 0;
|
||||
|
||||
$threadtableids = C::t('common_setting')->fetch('threadtableids', true);
|
||||
$queryt = C::t('common_member')->range($current, $pertask);
|
||||
foreach($queryt as $mem) {
|
||||
$processed = 1;
|
||||
$postcount = 0;
|
||||
loadcache('posttable_info');
|
||||
if(!empty($_G['cache']['posttable_info']) && is_array($_G['cache']['posttable_info'])) {
|
||||
foreach($_G['cache']['posttable_info'] as $key => $value) {
|
||||
$postcount += C::t('forum_post')->count_by_authorid($key, $mem['uid']);
|
||||
}
|
||||
} else {
|
||||
$postcount += C::t('forum_post')->count_by_authorid(0, $mem['uid']);
|
||||
}
|
||||
$postcount += C::t('forum_postcomment')->count_by_authorid($mem['uid']);
|
||||
$postcount += C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->count_by_authorid($mem['uid']);
|
||||
|
||||
C::t('common_member_count')->update($mem['uid'], array('posts' => $postcount));
|
||||
}
|
||||
|
||||
if($processed) {
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'counter_member').lang('plugin/'.$plugin['identifier'], 'counter_processing', array('current' => $current, 'next' => $next)), $nextlink, 'loading');
|
||||
} else {
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'counter_member_succeed'), 'action='.$pluginurl, 'succeed');
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
28
source/plugin/replyfloor/admin/admin_h5upload.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
$url = 'https://addon.dismall.com/plugins/h5upload.html';
|
||||
echo '<script type="text/javascript">location.href=\''.$url.'\';</script>';
|
||||
|
||||
|
||||
?>
|
60
source/plugin/replyfloor/admin/admin_language.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
$selectlang = array('script' => '程序脚本', 'template' => '模板页面');
|
||||
$type = in_array($_GET['type'], array_keys($selectlang)) ? $_GET['type'] : 'script';
|
||||
loadcache('pluginlanguage_'.$type, 1);
|
||||
if(empty($_G['cache']['pluginlanguage_'.$type])) {
|
||||
$_G['cache']['pluginlanguage_'.$type] = array();
|
||||
}
|
||||
|
||||
if(!submitcheck('savesubmit')) {
|
||||
showformheader($pluginurl.'&type='.$type);
|
||||
$headertab = '';
|
||||
foreach ($selectlang as $key => $value) {
|
||||
if($key == $type){
|
||||
$headertab .= '<div style="float:left;margin-right:10px;"><a href="'.ADMINSCRIPT.'?action='.$pluginurl.'&type='.$key.'" style="display:block;background:#555;color:#fff;padding:0 15px;line-height:25px;text-decoration:none">'.$value.'</a></div>';
|
||||
}else{
|
||||
$headertab .= '<div style="float:left;margin-right:10px;"><a href="'.ADMINSCRIPT.'?action='.$pluginurl.'&type='.$key.'" style="display:block;background:#ddd;padding:0 15px;line-height:25px;text-decoration:none">'.$value.'</a></div>';
|
||||
}
|
||||
}
|
||||
showtableheader($headertab);
|
||||
foreach ($_G['cache']['pluginlanguage_'.$type][$plugin['identifier']] as $key => $value) {
|
||||
if($type == 'template' || ($type == 'script' && strpos($key, $plugin['identifier']) === 0)){
|
||||
showsetting($key, "setting[$key]", $value, 'textarea');
|
||||
}
|
||||
}
|
||||
showsubmit('savesubmit', 'submit');
|
||||
showtablefooter();
|
||||
showformfooter();
|
||||
} else {
|
||||
$_G['cache']['pluginlanguage_'.$type][$plugin['identifier']] = array_merge($_G['cache']['pluginlanguage_'.$type][$plugin['identifier']], $_GET['setting']);
|
||||
savecache('pluginlanguage_'.$type, $_G['cache']['pluginlanguage_'.$type]);
|
||||
if($type == 'template') {
|
||||
cleartemplatecache();
|
||||
}
|
||||
cpmsg('plugins_edit_succeed', 'action='.$pluginurl.'&type='.$type, 'succeed');
|
||||
}
|
||||
|
||||
|
||||
?>
|
253
source/plugin/replyfloor/admin/admin_message.php
Normal file
@@ -0,0 +1,253 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
$op = in_array($_GET['op'], array('index','edit')) ? $_GET['op'] : 'index';
|
||||
|
||||
if($op == 'index') {
|
||||
if(!submitcheck('savesubmit')) {
|
||||
$perpage = empty($_GET['perpage']) ? 30 : $_GET['perpage'];
|
||||
$start = ($page-1)*$perpage;
|
||||
$checkperpage = array();
|
||||
$checkperpage[$perpage] = 'selected="selected"';
|
||||
$intkeys = array('id', 'tid', 'pid');
|
||||
$strkeys = array();
|
||||
$randkeys = array();
|
||||
$likekeys = array('username', 'message');
|
||||
$results = getwheres($intkeys, $strkeys, $randkeys, $likekeys);
|
||||
foreach($likekeys as $k) {
|
||||
$_GET[$k] = dhtmlspecialchars($_GET[$k]);
|
||||
}
|
||||
$wherearr = $results['wherearr'];
|
||||
$wherearr[] = "status = '0'";
|
||||
$mpurl = ADMINSCRIPT."?action=$pluginurl&perpage=$perpage&".implode('&', $results['urls']);
|
||||
$adminscript = ADMINSCRIPT;
|
||||
$searchlang = array();
|
||||
$keys = array('message_message', 'message_tid', 'message_pid', 'perpage_30', 'perpage_50', 'perpage_100', 'perpage_200');
|
||||
foreach ($keys as $key) {
|
||||
$searchlang[$key] = lang('plugin/'.$plugin['identifier'], $key);
|
||||
}
|
||||
echo <<<SEARCH
|
||||
<form method="get" autocomplete="off" action="$adminscript" id="tb_search">
|
||||
<div style="margin-top:8px;">
|
||||
<table cellspacing="3" cellpadding="3">
|
||||
<tr>
|
||||
<th>$lang[username]</th><td><input type="text" class="txt" name="username" value="$_GET[username]"></td>
|
||||
<th>$searchlang[message_message]</th><td><input type="text" class="txt" name="message" value="$_GET[message]"></td>
|
||||
<th>$searchlang[message_tid]</th><td><input type="text" class="txt" name="tid" value="$_GET[tid]" size="4"></td>
|
||||
<th>$searchlang[message_pid]</th><td><input type="text" class="txt" name="pid" value="$_GET[pid]" size="4"></td>
|
||||
<td><select name="perpage" class="ps vm"><option value="30"$checkperpage[30]>$searchlang[perpage_30]</option><option value="50"$checkperpage[50]>$searchlang[perpage_50]</option><option value="100"$checkperpage[100]>$searchlang[perpage_100]</option><option value="200"$checkperpage[200]>$searchlang[perpage_200]</option></select></td>
|
||||
<td>
|
||||
<input type="hidden" name="action" value="plugins">
|
||||
<input type="hidden" name="operation" value="config">
|
||||
<input type="hidden" name="do" value="$pluginid">
|
||||
<input type="hidden" name="identifier" value="$plugin[identifier]">
|
||||
<input type="hidden" name="pmod" value="$_GET[pmod]">
|
||||
<input type="hidden" name="act" value="$act">
|
||||
<input type="hidden" name="op" value="$op">
|
||||
<input type="submit" name="searchsubmit" value="$lang[search]" class="btn" id="submit_searchsubmit">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/JavaScript">_attachEvent(document.documentElement, 'keydown', function (e) { entersubmit(e, 'searchsubmit'); });</script>
|
||||
<style>
|
||||
.replyfloor_content_text {word-break:break-all;}
|
||||
.replyfloor_content_text img {height: 20px;}
|
||||
.replyfloor_content_image {overflow: hidden;}
|
||||
.replyfloor_content_image_li {float:left;width: 80px;height: 80px;margin:5px 5px 0 0;}
|
||||
.replyfloor_content_image_li img {width: 80px;height: 80px;object-fit:cover;}
|
||||
</style>
|
||||
SEARCH;
|
||||
showformheader($pluginurl);
|
||||
showtableheader(lang('plugin/'.$plugin['identifier'], 'message_list'));
|
||||
showsubtitle(array('', 'username', lang('plugin/'.$plugin['identifier'], 'message_message'), lang('plugin/'.$plugin['identifier'], 'message_createtime'), 'ip', ''));
|
||||
$count = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->count_by_search_where($wherearr);
|
||||
$list = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->fetch_all_by_search_where($wherearr,'order by createtime desc', $start, $perpage);
|
||||
foreach ($list as $value) {
|
||||
$value['message'] = replyfloor_discuzcode($value['message']);
|
||||
if($setconfig['show_br']) {
|
||||
$value['message'] = nl2br($value['message']);
|
||||
}
|
||||
$attachhtml = '';
|
||||
if($value['attachment']) {
|
||||
$attachhtml = '<div class="replyfloor_content_image">';
|
||||
$attachlist = explode("\t", $value['attachment']);
|
||||
foreach ($attachlist as $attach) {
|
||||
$attachhtml .= '<div class="replyfloor_content_image_li"><a href="'.$attach.'" target="_blank"><img src="'.$attach.'" border="0" alt="" /></a></div>';
|
||||
}
|
||||
$attachhtml .= '</div>';
|
||||
}
|
||||
$value['createtime'] = dgmdate($value['createtime'], 'Y-n-j H:i');
|
||||
showtablerow('', array('class="td25"', 'class="td24"', '', 'class="td24"', 'class="td24"', 'class="td32"'), array(
|
||||
"<input class=\"checkbox\" type=\"checkbox\" name=\"ids[]\" value=\"$value[id]\">",
|
||||
$value['username'],
|
||||
'<div class="replyfloor_content_text">'.$value['message'].'</div>'.($attachhtml ? $attachhtml : ''),
|
||||
$value['createtime'],
|
||||
$value['postip'],
|
||||
"<a href=\"".ADMINSCRIPT."?action=$pluginurl&op=edit&id=$value[id]\">".$lang['edit']."</a> ".
|
||||
"<a href=\"forum.php?mod=redirect&goto=findpost&ptid=$value[tid]&pid=$value[pid]\" target=\"_blank\">".lang('plugin/'.$plugin['identifier'], 'message_viewpost')."</a>",
|
||||
));
|
||||
}
|
||||
$multipage = multi($count, $perpage, $page, $mpurl);
|
||||
|
||||
showsubmit('savesubmit', 'submit', '<input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll(\'prefix\', this.form, \'ids\')" /><label for="chkall">'.cplang('select_all').'</label> <select name="optype"><option value="recycle">'.lang('plugin/'.$plugin['identifier'], 'optype_recycle').'</option><option value="delete">'.lang('plugin/'.$plugin['identifier'], 'optype_delete').'</option></select>', '', $multipage, false);
|
||||
showtablefooter();
|
||||
showformfooter();
|
||||
} else {
|
||||
if(is_array($_GET['ids'])) {
|
||||
if($setconfig['get_credit']) {
|
||||
require_once libfile('function/post');
|
||||
require_once libfile('function_forum', 'function');
|
||||
$list = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->fetch_all_by_id($_GET['ids']);
|
||||
foreach ($list as $value) {
|
||||
$thread = get_thread_by_tid($value['tid']);
|
||||
updatepostcredits('-', $value['uid'], 'reply', $thread['fid']);
|
||||
}
|
||||
}
|
||||
if($_GET['optype'] == 'recycle') {
|
||||
replyfloor_deletemessage($_GET['ids'], 'id', 1);
|
||||
}else{
|
||||
replyfloor_deletemessage($_GET['ids'], 'id', 0);
|
||||
}
|
||||
}else{
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'operate_not_check'), '', 'error');
|
||||
}
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'message_updatesucceed'), "action=$pluginurl", 'succeed');
|
||||
}
|
||||
} elseif($op == 'edit' && $_GET['id']) {
|
||||
|
||||
$item = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->fetch_by_id($_GET['id']);
|
||||
if(!$item) {
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'message_nonexistence'), '', 'error');
|
||||
}
|
||||
if(!submitcheck('savesubmit')) {
|
||||
showformheader("$pluginurl&op=edit&id=".$_GET['id'],'enctype');
|
||||
showtableheader(lang('plugin/'.$plugin['identifier'], 'message_edit'));
|
||||
showsetting(lang('plugin/'.$plugin['identifier'], 'message_message'), 'message', $item['message'], 'textarea', '', 0, lang('plugin/'.$plugin['identifier'], 'message_message_comment'));
|
||||
|
||||
showtablerow('', array('class="" colspan="2"'), array('<span class="replyfloor_content_upload" id="replyfloor_content_upload">'.lang('plugin/'.$plugin['identifier'], 'message_upload_image').'</span>'));
|
||||
|
||||
$attachhtml = '<div class="replyfloor_upimage" id="replyfloor_upimage">';
|
||||
$attachlist = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->fetch_all_by_msgid(array($item['id']), 'order by displayorder asc,dateline asc');
|
||||
foreach ($attachlist as $attach) {
|
||||
$attach['attachment'] = ($attach['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']) . 'replyfloor/'. $attach['attachment'];
|
||||
$attachhtml .= '<div class="replyfloor_upimage_li" id="replyfloor_upimage_li_'.$attach['id'].'"><div class="replyfloor_upimage_del"><a href="javascript:;" onclick="replyfloor_delimage('.$attach['id'].')" title="'.lang('plugin/'.$plugin['identifier'], 'attach_delete').'"></a></div><div class="replyfloor_upimage_img"><img src="'.$attach['attachment'].'" border="0" alt="'.$attach['filename'].'"/></div><input type="hidden" name="attach[]" value="'.$attach['id'].'" /></div>';
|
||||
}
|
||||
$attachhtml .= '</div>';
|
||||
showtablerow('', array('class="" colspan="2"'), array($attachhtml));
|
||||
|
||||
showsubmit('savesubmit', 'submit');
|
||||
showtablefooter();
|
||||
showformfooter();
|
||||
|
||||
require_once libfile('function/upload');
|
||||
$swfconfig = getuploadconfig($_G['uid']);
|
||||
$verhash = random(5);
|
||||
echo <<<EOT
|
||||
<style>
|
||||
.replyfloor_content_upload {background-color:#fff;border:1px solid #dbdbdb;color: #222;height: 32px;line-height: 32px;text-align: center;font-size: 14px;display: inline-block;width:120px;cursor:pointer;}
|
||||
.replyfloor_upimage {overflow: hidden;}
|
||||
.replyfloor_upimage_li {float:left;position:relative;margin:5px 5px 0 0;width:50px;height:50px;}
|
||||
.replyfloor_upimage_img {width:50px;height:50px;}
|
||||
.replyfloor_upimage_img img {display:block;width:50px;height:50px;object-fit:cover;}
|
||||
.replyfloor_upimage_del {position:absolute;top:-3px;right:-3px;}
|
||||
.replyfloor_upimage_del a {display:block;width:13px;height:11px;background: url("source/plugin/replyfloor/static/image/icon_close.png");}
|
||||
</style>
|
||||
<script type="text/javascript" src="source/plugin/replyfloor/static/js/plupload.js?$verhash"></script>
|
||||
<script type="text/javascript" src="source/plugin/replyfloor/static/js/common.js?$verhash" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="source/plugin/replyfloor/static/js/Sortable.js?$verhash"></script>
|
||||
<script type="text/JavaScript">
|
||||
new Sortable(document.getElementById("replyfloor_upimage"), {
|
||||
handle: '.replyfloor_upimage_li',
|
||||
animation: 150
|
||||
});
|
||||
replyfloor_plupload({
|
||||
auto: true,
|
||||
upload_url: "plugin.php?id=replyfloor:attachment&operation=upload",
|
||||
post_params : {"uid" : "$_G[uid]", "hash":"$swfconfig[hash]"},
|
||||
pick: 'replyfloor_content_upload',
|
||||
accept: {
|
||||
mime_types : [
|
||||
{ title : "Images", extensions : "gif,jpg,jpeg,bmp,png" }
|
||||
]
|
||||
},
|
||||
fileVal: 'Filedata',
|
||||
});
|
||||
</script>
|
||||
EOT;
|
||||
} else {
|
||||
|
||||
$attach = isset($_GET['attach']) ? $_GET['attach'] : array();
|
||||
|
||||
$attachment = $usedattach = $queryattach = array();
|
||||
if($attach){
|
||||
$queryattach = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment_unused')->fetch_all_by_id($attach);
|
||||
}
|
||||
foreach($queryattach as $value){
|
||||
$attachdata = array(
|
||||
'id' => $value['id'],
|
||||
'tid' => $item['tid'],
|
||||
'pid' => $item['pid'],
|
||||
'msgid' => $item['id'],
|
||||
'uid' => $value['uid'],
|
||||
'username' => $value['username'],
|
||||
'filename' => $value['filename'],
|
||||
'filesize' => $value['filesize'],
|
||||
'fileext' => $value['fileext'],
|
||||
'attachment' => $value['attachment'],
|
||||
'remote' => $value['remote'],
|
||||
'width' => $value['width'],
|
||||
'height' => $value['height'],
|
||||
'dateline' => $value['dateline'],
|
||||
);
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->insert($attachdata, true);
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment_unused')->delete_by_id($value['id']);
|
||||
}
|
||||
|
||||
$i = 1;
|
||||
if($attach){
|
||||
$queryattach = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->fetch_all_by_id($attach);
|
||||
foreach($attach as $aid){
|
||||
if($queryattach[$aid] && in_array($queryattach[$aid]['fileext'], array('jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp'))){
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->update_by_id($aid, array('displayorder' => $i));
|
||||
$i++;
|
||||
$attachment[] = ($queryattach[$aid]['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']) . 'replyfloor/'. $queryattach[$aid]['attachment'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$data = array(
|
||||
'message' => $_GET['message'],
|
||||
'attachment' => implode("\t", $attachment),
|
||||
);
|
||||
if(!$data['message'] && !$data['attachment']) {
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'message_message_empty'), '', 'error');
|
||||
}
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->update_by_id($_GET['id'], $data);
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'message_updatesucceed'), "action=$pluginurl", 'succeed');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
265
source/plugin/replyfloor/admin/admin_moderate.php
Normal file
@@ -0,0 +1,265 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
$op = in_array($_GET['op'], array('index','edit')) ? $_GET['op'] : 'index';
|
||||
|
||||
if($op == 'index') {
|
||||
if(!submitcheck('savesubmit')) {
|
||||
$perpage = empty($_GET['perpage']) ? 30 : $_GET['perpage'];
|
||||
$start = ($page-1)*$perpage;
|
||||
$checkperpage = array();
|
||||
$checkperpage[$perpage] = 'selected="selected"';
|
||||
$intkeys = array('id', 'tid', 'pid');
|
||||
$strkeys = array();
|
||||
$randkeys = array();
|
||||
$likekeys = array('username', 'message');
|
||||
$results = getwheres($intkeys, $strkeys, $randkeys, $likekeys);
|
||||
foreach($likekeys as $k) {
|
||||
$_GET[$k] = dhtmlspecialchars($_GET[$k]);
|
||||
}
|
||||
$wherearr = $results['wherearr'];
|
||||
$wherearr[] = "status = '-1'";
|
||||
$mpurl = ADMINSCRIPT."?action=$pluginurl&".implode('&', $results['urls']);
|
||||
$adminscript = ADMINSCRIPT;
|
||||
$searchlang = array();
|
||||
$keys = array('message_message', 'message_tid', 'message_pid', 'perpage_30', 'perpage_50', 'perpage_100', 'perpage_200');
|
||||
foreach ($keys as $key) {
|
||||
$searchlang[$key] = lang('plugin/'.$plugin['identifier'], $key);
|
||||
}
|
||||
echo <<<SEARCH
|
||||
<form method="get" autocomplete="off" action="$adminscript" id="tb_search">
|
||||
<div style="margin-top:8px;">
|
||||
<table cellspacing="3" cellpadding="3">
|
||||
<tr>
|
||||
<th>$lang[username]</th><td><input type="text" class="txt" name="username" value="$_GET[username]"></td>
|
||||
<th>$searchlang[message_message]</th><td><input type="text" class="txt" name="message" value="$_GET[message]"></td>
|
||||
<th>$searchlang[message_tid]</th><td><input type="text" class="txt" name="tid" value="$_GET[tid]" size="4"></td>
|
||||
<th>$searchlang[message_pid]</th><td><input type="text" class="txt" name="pid" value="$_GET[pid]" size="4"></td>
|
||||
<td><select name="perpage" class="ps vm"><option value="30"$checkperpage[30]>$searchlang[perpage_30]</option><option value="50"$checkperpage[50]>$searchlang[perpage_50]</option><option value="100"$checkperpage[100]>$searchlang[perpage_100]</option><option value="200"$checkperpage[200]>$searchlang[perpage_200]</option></select></td>
|
||||
<td>
|
||||
<input type="hidden" name="action" value="plugins">
|
||||
<input type="hidden" name="operation" value="config">
|
||||
<input type="hidden" name="do" value="$pluginid">
|
||||
<input type="hidden" name="identifier" value="$plugin[identifier]">
|
||||
<input type="hidden" name="pmod" value="$_GET[pmod]">
|
||||
<input type="hidden" name="act" value="$act">
|
||||
<input type="hidden" name="op" value="$op">
|
||||
<input type="submit" name="searchsubmit" value="$lang[search]" class="btn" id="submit_searchsubmit">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/JavaScript">_attachEvent(document.documentElement, 'keydown', function (e) { entersubmit(e, 'searchsubmit'); });</script>
|
||||
<style>
|
||||
.replyfloor_content_text {word-break:break-all;}
|
||||
.replyfloor_content_text img {height: 20px;}
|
||||
.replyfloor_content_image {overflow: hidden;}
|
||||
.replyfloor_content_image_li {float:left;width: 80px;height: 80px;margin:5px 5px 0 0;}
|
||||
.replyfloor_content_image_li img {width: 80px;height: 80px;object-fit:cover;}
|
||||
</style>
|
||||
SEARCH;
|
||||
showformheader($pluginurl);
|
||||
showtableheader(lang('plugin/'.$plugin['identifier'], 'message_list'));
|
||||
showsubtitle(array('', 'username', lang('plugin/'.$plugin['identifier'], 'message_message'), lang('plugin/'.$plugin['identifier'], 'message_createtime'), 'ip', ''));
|
||||
$count = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->count_by_search_where($wherearr);
|
||||
$list = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->fetch_all_by_search_where($wherearr,'order by createtime desc', $start, $perpage);
|
||||
foreach ($list as $value) {
|
||||
$value['message'] = replyfloor_discuzcode($value['message']);
|
||||
if($setconfig['show_br']) {
|
||||
$value['message'] = nl2br($value['message']);
|
||||
}
|
||||
$attachhtml = '';
|
||||
if($value['attachment']) {
|
||||
$attachhtml = '<div class="replyfloor_content_image">';
|
||||
$attachlist = explode("\t", $value['attachment']);
|
||||
foreach ($attachlist as $attach) {
|
||||
$attachhtml .= '<div class="replyfloor_content_image_li"><a href="'.$attach.'" target="_blank"><img src="'.$attach.'" border="0" alt="" /></a></div>';
|
||||
}
|
||||
$attachhtml .= '</div>';
|
||||
}
|
||||
$value['createtime'] = dgmdate($value['createtime'], 'Y-n-j H:i');
|
||||
showtablerow('', array('class="td25"', 'class="td24"', '', 'class="td24"', 'class="td24"', 'class="td32"'), array(
|
||||
"<input class=\"checkbox\" type=\"checkbox\" name=\"ids[]\" value=\"$value[id]\">",
|
||||
$value['username'],
|
||||
'<div class="replyfloor_content_text">'.$value['message'].'</div>'.($attachhtml ? $attachhtml : ''),
|
||||
$value['createtime'],
|
||||
$value['postip'],
|
||||
"<a href=\"".ADMINSCRIPT."?action=$pluginurl&op=edit&id=$value[id]\">".$lang['edit']."</a> ".
|
||||
"<a href=\"forum.php?mod=redirect&goto=findpost&ptid=$value[tid]&pid=$value[pid]\" target=\"_blank\">".lang('plugin/'.$plugin['identifier'], 'message_viewpost')."</a>",
|
||||
));
|
||||
}
|
||||
$multipage = multi($count, $perpage, $page, $mpurl);
|
||||
|
||||
showsubmit('savesubmit', 'submit', '<input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll(\'prefix\', this.form, \'ids\')" /><label for="chkall">'.cplang('select_all').'</label> <select name="optype"><option value="validate">'.lang('plugin/'.$plugin['identifier'], 'optype_validate').'</option><option value="recycle">'.lang('plugin/'.$plugin['identifier'], 'optype_recycle').'</option></select>', '', $multipage, false);
|
||||
showtablefooter();
|
||||
showformfooter();
|
||||
} else {
|
||||
if(is_array($_GET['ids'])) {
|
||||
if($_GET['optype'] == 'validate') {
|
||||
require_once libfile('function/post');
|
||||
require_once libfile('function_forum', 'function');
|
||||
$list = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->fetch_all_by_id($_GET['ids']);
|
||||
foreach ($list as $value) {
|
||||
$thread = get_thread_by_tid($value['tid']);
|
||||
if($setconfig['get_credit']) {
|
||||
updatepostcredits('+', $value['uid'], 'reply', $thread['fid']);
|
||||
}
|
||||
if($setconfig['thread_bump']) {
|
||||
$expiration = $value['createtime'];
|
||||
if($thread['lastpost'] < $expiration){
|
||||
C::t('forum_thread')->update($thread['tid'], array('lastpost'=>$expiration), true);
|
||||
}
|
||||
C::t('forum_forum')->update($_G['fid'], array('lastpost' => "$thread[tid]\t$thread[subject]\t$expiration\t$thread[lastposter]"));
|
||||
deletethreadcaches($thread['tid']);
|
||||
}
|
||||
if($value['uid'] && $value['uid'] != $_G['uid']) {
|
||||
notification_add($value['uid'], 'system', 'replyfloor:replyfloor_modreplies_validate', array(
|
||||
'tid' => $thread['tid'],
|
||||
'pid' => $value['pid'],
|
||||
'post' => dhtmlspecialchars(messagecutstr($value['message'], 30)),
|
||||
'modusername' => ($_G['setting']['moduser_public'] ? $_G['username'] : ''),
|
||||
'from_id' => 0,
|
||||
'from_idtype' => 'replyfloor_modreplies',
|
||||
));
|
||||
}
|
||||
}
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->restore_by_id($_GET['ids']);
|
||||
}else{
|
||||
replyfloor_deletemessage($_GET['ids'], 'id', 1);
|
||||
}
|
||||
}else{
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'operate_not_check'), '', 'error');
|
||||
}
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'message_updatesucceed'), "action=$pluginurl", 'succeed');
|
||||
}
|
||||
} elseif($op == 'edit' && $_GET['id']) {
|
||||
|
||||
$item = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->fetch_by_id($_GET['id']);
|
||||
if(!$item) {
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'message_nonexistence'), '', 'error');
|
||||
}
|
||||
if(!submitcheck('savesubmit')) {
|
||||
showformheader("$pluginurl&op=edit&id=".$_GET['id'],'enctype');
|
||||
showtableheader(lang('plugin/'.$plugin['identifier'], 'message_edit'));
|
||||
showsetting(lang('plugin/'.$plugin['identifier'], 'message_message'), 'message', $item['message'], 'textarea', '', 0, lang('plugin/'.$plugin['identifier'], 'message_message_comment'));
|
||||
|
||||
showtablerow('', array('class="" colspan="2"'), array('<span class="replyfloor_content_upload" id="replyfloor_content_upload">'.lang('plugin/'.$plugin['identifier'], 'message_upload_image').'</span>'));
|
||||
|
||||
$attachhtml = '<div class="replyfloor_upimage" id="replyfloor_upimage">';
|
||||
$attachlist = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->fetch_all_by_msgid(array($item['id']), 'order by displayorder asc,dateline asc');
|
||||
foreach ($attachlist as $attach) {
|
||||
$attach['attachment'] = ($attach['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']) . 'replyfloor/'. $attach['attachment'];
|
||||
$attachhtml .= '<div class="replyfloor_upimage_li" id="replyfloor_upimage_li_'.$attach['id'].'"><div class="replyfloor_upimage_del"><a href="javascript:;" onclick="replyfloor_delimage('.$attach['id'].')" title="'.lang('plugin/'.$plugin['identifier'], 'attach_delete').'"></a></div><div class="replyfloor_upimage_img"><img src="'.$attach['attachment'].'" border="0" alt="'.$attach['filename'].'"/></div><input type="hidden" name="attach[]" value="'.$attach['id'].'" /></div>';
|
||||
}
|
||||
$attachhtml .= '</div>';
|
||||
showtablerow('', array('class="" colspan="2"'), array($attachhtml));
|
||||
|
||||
showsubmit('savesubmit', 'submit');
|
||||
showtablefooter();
|
||||
showformfooter();
|
||||
|
||||
require_once libfile('function/upload');
|
||||
$swfconfig = getuploadconfig($_G['uid']);
|
||||
$verhash = random(5);
|
||||
echo <<<EOT
|
||||
<style>
|
||||
.replyfloor_content_upload {background-color:#fff;border:1px solid #dbdbdb;color: #222;height: 32px;line-height: 32px;text-align: center;font-size: 14px;display: inline-block;width:120px;cursor:pointer;}
|
||||
.replyfloor_upimage {overflow: hidden;}
|
||||
.replyfloor_upimage_li {float:left;position:relative;margin:5px 5px 0 0;width:50px;height:50px;}
|
||||
.replyfloor_upimage_img {width:50px;height:50px;}
|
||||
.replyfloor_upimage_img img {display:block;width:50px;height:50px;object-fit:cover;}
|
||||
.replyfloor_upimage_del {position:absolute;top:-3px;right:-3px;}
|
||||
.replyfloor_upimage_del a {display:block;width:13px;height:11px;background: url("source/plugin/replyfloor/static/image/icon_close.png");}
|
||||
</style>
|
||||
<script type="text/javascript" src="source/plugin/replyfloor/static/js/plupload.js?$verhash"></script>
|
||||
<script type="text/javascript" src="source/plugin/replyfloor/static/js/common.js?$verhash" charset="utf-8"></script>
|
||||
<script type="text/JavaScript">
|
||||
replyfloor_plupload({
|
||||
auto: true,
|
||||
upload_url: "plugin.php?id=replyfloor:attachment&operation=upload",
|
||||
post_params : {"uid" : "$_G[uid]", "hash":"$swfconfig[hash]"},
|
||||
pick: 'replyfloor_content_upload',
|
||||
accept: {
|
||||
mime_types : [
|
||||
{ title : "Images", extensions : "gif,jpg,jpeg,bmp,png" }
|
||||
]
|
||||
},
|
||||
fileVal: 'Filedata',
|
||||
});
|
||||
</script>
|
||||
EOT;
|
||||
} else {
|
||||
$attach = isset($_GET['attach']) ? $_GET['attach'] : array();
|
||||
|
||||
$attachment = $usedattach = $queryattach = array();
|
||||
if($attach){
|
||||
$queryattach = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment_unused')->fetch_all_by_id($attach);
|
||||
}
|
||||
foreach($queryattach as $value){
|
||||
$attachdata = array(
|
||||
'id' => $value['id'],
|
||||
'tid' => $item['tid'],
|
||||
'pid' => $item['pid'],
|
||||
'msgid' => $item['id'],
|
||||
'uid' => $value['uid'],
|
||||
'username' => $value['username'],
|
||||
'filename' => $value['filename'],
|
||||
'filesize' => $value['filesize'],
|
||||
'fileext' => $value['fileext'],
|
||||
'attachment' => $value['attachment'],
|
||||
'remote' => $value['remote'],
|
||||
'width' => $value['width'],
|
||||
'height' => $value['height'],
|
||||
'dateline' => $value['dateline'],
|
||||
);
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->insert($attachdata, true);
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment_unused')->delete_by_id($value['id']);
|
||||
}
|
||||
|
||||
$i = 1;
|
||||
if($attach){
|
||||
$queryattach = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->fetch_all_by_id($attach);
|
||||
foreach($attach as $aid){
|
||||
if($queryattach[$aid] && in_array($queryattach[$aid]['fileext'], array('jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp'))){
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->update_by_id($aid, array('displayorder' => $i));
|
||||
$i++;
|
||||
$attachment[] = ($queryattach[$aid]['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']) . 'replyfloor/'. $queryattach[$aid]['attachment'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$data = array(
|
||||
'message' => $_GET['message'],
|
||||
'attachment' => implode("\t", $attachment),
|
||||
);
|
||||
if(!$data['message'] && !$data['attachment']) {
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'message_message_empty'), '', 'error');
|
||||
}
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->update_by_id($_GET['id'], $data);
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'message_updatesucceed'), "action=$pluginurl", 'succeed');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
28
source/plugin/replyfloor/admin/admin_more.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
$url = 'https://addon.dismall.com/?@19874.developer';
|
||||
echo '<script type="text/javascript">location.href=\''.$url.'\';</script>';
|
||||
|
||||
|
||||
?>
|
279
source/plugin/replyfloor/admin/admin_recycle.php
Normal file
@@ -0,0 +1,279 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
$op = in_array($_GET['op'], array('index','edit','clean')) ? $_GET['op'] : 'index';
|
||||
|
||||
if($op == 'index') {
|
||||
if(!submitcheck('savesubmit')) {
|
||||
$perpage = empty($_GET['perpage']) ? 30 : $_GET['perpage'];
|
||||
$start = ($page-1)*$perpage;
|
||||
$checkperpage = array();
|
||||
$checkperpage[$perpage] = 'selected="selected"';
|
||||
$intkeys = array('id', 'tid', 'pid');
|
||||
$strkeys = array();
|
||||
$randkeys = array();
|
||||
$likekeys = array('username', 'message');
|
||||
$results = getwheres($intkeys, $strkeys, $randkeys, $likekeys);
|
||||
foreach($likekeys as $k) {
|
||||
$_GET[$k] = dhtmlspecialchars($_GET[$k]);
|
||||
}
|
||||
$wherearr = $results['wherearr'];
|
||||
$wherearr[] = "status = '1'";
|
||||
$mpurl = ADMINSCRIPT."?action=$pluginurl&perpage=$perpage&".implode('&', $results['urls']);
|
||||
$adminscript = ADMINSCRIPT;
|
||||
$searchlang = array();
|
||||
$keys = array('message_message', 'message_tid', 'message_pid', 'perpage_30', 'perpage_50', 'perpage_100', 'perpage_200');
|
||||
foreach ($keys as $key) {
|
||||
$searchlang[$key] = lang('plugin/'.$plugin['identifier'], $key);
|
||||
}
|
||||
echo <<<SEARCH
|
||||
<form method="get" autocomplete="off" action="$adminscript" id="tb_search">
|
||||
<div style="margin-top:8px;">
|
||||
<table cellspacing="3" cellpadding="3">
|
||||
<tr>
|
||||
<th>$lang[username]</th><td><input type="text" class="txt" name="username" value="$_GET[username]"></td>
|
||||
<th>$searchlang[message_message]</th><td><input type="text" class="txt" name="message" value="$_GET[message]"></td>
|
||||
<th>$searchlang[message_tid]</th><td><input type="text" class="txt" name="tid" value="$_GET[tid]" size="4"></td>
|
||||
<th>$searchlang[message_pid]</th><td><input type="text" class="txt" name="pid" value="$_GET[pid]" size="4"></td>
|
||||
<td><select name="perpage" class="ps vm"><option value="30"$checkperpage[30]>$searchlang[perpage_30]</option><option value="50"$checkperpage[50]>$searchlang[perpage_50]</option><option value="100"$checkperpage[100]>$searchlang[perpage_100]</option><option value="200"$checkperpage[200]>$searchlang[perpage_200]</option></select></td>
|
||||
<td>
|
||||
<input type="hidden" name="action" value="plugins">
|
||||
<input type="hidden" name="operation" value="config">
|
||||
<input type="hidden" name="do" value="$pluginid">
|
||||
<input type="hidden" name="identifier" value="$plugin[identifier]">
|
||||
<input type="hidden" name="pmod" value="$_GET[pmod]">
|
||||
<input type="hidden" name="act" value="$act">
|
||||
<input type="hidden" name="op" value="$op">
|
||||
<input type="submit" name="searchsubmit" value="$lang[search]" class="btn" id="submit_searchsubmit">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/JavaScript">_attachEvent(document.documentElement, 'keydown', function (e) { entersubmit(e, 'searchsubmit'); });</script>
|
||||
<style>
|
||||
.replyfloor_content_text {word-break:break-all;}
|
||||
.replyfloor_content_text img {height: 20px;}
|
||||
.replyfloor_content_image {overflow: hidden;}
|
||||
.replyfloor_content_image_li {float:left;width: 80px;height: 80px;margin:5px 5px 0 0;}
|
||||
.replyfloor_content_image_li img {width: 80px;height: 80px;object-fit:cover;}
|
||||
</style>
|
||||
SEARCH;
|
||||
showformheader($pluginurl);
|
||||
showtableheader(lang('plugin/'.$plugin['identifier'], 'message_list'). '<a href="'.ADMINSCRIPT.'?action='.$pluginurl.'&op=clean" style="margin-left:10px">['.lang('plugin/'.$plugin['identifier'], 'recycle_clean').']</a>');
|
||||
showsubtitle(array('', 'username', lang('plugin/'.$plugin['identifier'], 'message_message'), lang('plugin/'.$plugin['identifier'], 'message_createtime'), 'ip', ''));
|
||||
$count = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->count_by_search_where($wherearr);
|
||||
$list = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->fetch_all_by_search_where($wherearr,'order by createtime desc', $start, $perpage);
|
||||
foreach ($list as $value) {
|
||||
$value['message'] = replyfloor_discuzcode($value['message']);
|
||||
if($setconfig['show_br']) {
|
||||
$value['message'] = nl2br($value['message']);
|
||||
}
|
||||
$attachhtml = '';
|
||||
if($value['attachment']) {
|
||||
$attachhtml = '<div class="replyfloor_content_image">';
|
||||
$attachlist = explode("\t", $value['attachment']);
|
||||
foreach ($attachlist as $attach) {
|
||||
$attachhtml .= '<div class="replyfloor_content_image_li"><a href="'.$attach.'" target="_blank"><img src="'.$attach.'" border="0" alt="" /></a></div>';
|
||||
}
|
||||
$attachhtml .= '</div>';
|
||||
}
|
||||
$value['createtime'] = dgmdate($value['createtime'], 'Y-n-j H:i');
|
||||
showtablerow('', array('class="td25"', 'class="td24"', '', 'class="td24"', 'class="td24"', 'class="td32"'), array(
|
||||
"<input class=\"checkbox\" type=\"checkbox\" name=\"ids[]\" value=\"$value[id]\">",
|
||||
$value['username'],
|
||||
'<div class="replyfloor_content_text">'.$value['message'].'</div>'.($attachhtml ? $attachhtml : ''),
|
||||
$value['createtime'],
|
||||
$value['postip'],
|
||||
"<a href=\"".ADMINSCRIPT."?action=$pluginurl&op=edit&id=$value[id]\">".$lang['edit']."</a> ".
|
||||
"<a href=\"forum.php?mod=redirect&goto=findpost&ptid=$value[tid]&pid=$value[pid]\" target=\"_blank\">".lang('plugin/'.$plugin['identifier'], 'message_viewpost')."</a>",
|
||||
));
|
||||
}
|
||||
$multipage = multi($count, $perpage, $page, $mpurl);
|
||||
|
||||
showsubmit('savesubmit', 'submit', '<input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll(\'prefix\', this.form, \'ids\')" /><label for="chkall">'.cplang('select_all').'</label> <select name="optype"><option value="restore">'.lang('plugin/'.$plugin['identifier'], 'optype_restore').'</option><option value="delete">'.lang('plugin/'.$plugin['identifier'], 'optype_delete').'</option></select>', '', $multipage, false);
|
||||
showtablefooter();
|
||||
showformfooter();
|
||||
} else {
|
||||
if(is_array($_GET['ids'])) {
|
||||
if($_GET['optype'] == 'restore') {
|
||||
if($setconfig['get_credit']) {
|
||||
require_once libfile('function/post');
|
||||
require_once libfile('function_forum', 'function');
|
||||
$list = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->fetch_all_by_id($_GET['ids']);
|
||||
foreach ($list as $value) {
|
||||
$thread = get_thread_by_tid($value['tid']);
|
||||
updatepostcredits('+', $value['uid'], 'reply', $thread['fid']);
|
||||
}
|
||||
}
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->restore_by_id($_GET['ids']);
|
||||
}else{
|
||||
replyfloor_deletemessage($_GET['ids'], 'id', 0);
|
||||
}
|
||||
}else{
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'operate_not_check'), '', 'error');
|
||||
}
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'message_updatesucceed'), "action=$pluginurl", 'succeed');
|
||||
}
|
||||
} elseif($op == 'edit' && $_GET['id']) {
|
||||
|
||||
$item = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->fetch_by_id($_GET['id']);
|
||||
if(!$item) {
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'message_nonexistence'), '', 'error');
|
||||
}
|
||||
if(!submitcheck('savesubmit')) {
|
||||
showformheader("$pluginurl&op=edit&id=".$_GET['id'],'enctype');
|
||||
showtableheader(lang('plugin/'.$plugin['identifier'], 'message_edit'));
|
||||
showsetting(lang('plugin/'.$plugin['identifier'], 'message_message'), 'message', $item['message'], 'textarea', '', 0, lang('plugin/'.$plugin['identifier'], 'message_message_comment'));
|
||||
|
||||
showtablerow('', array('class="" colspan="2"'), array('<span class="replyfloor_content_upload" id="replyfloor_content_upload">'.lang('plugin/'.$plugin['identifier'], 'message_upload_image').'</span>'));
|
||||
|
||||
$attachhtml = '<div class="replyfloor_upimage" id="replyfloor_upimage">';
|
||||
$attachlist = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->fetch_all_by_msgid(array($item['id']), 'order by displayorder asc,dateline asc');
|
||||
foreach ($attachlist as $attach) {
|
||||
$attach['attachment'] = ($attach['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']) . 'replyfloor/'. $attach['attachment'];
|
||||
$attachhtml .= '<div class="replyfloor_upimage_li" id="replyfloor_upimage_li_'.$attach['id'].'"><div class="replyfloor_upimage_del"><a href="javascript:;" onclick="replyfloor_delimage('.$attach['id'].')" title="'.lang('plugin/'.$plugin['identifier'], 'attach_delete').'"></a></div><div class="replyfloor_upimage_img"><img src="'.$attach['attachment'].'" border="0" alt="'.$attach['filename'].'"/></div><input type="hidden" name="attach[]" value="'.$attach['id'].'" /></div>';
|
||||
}
|
||||
$attachhtml .= '</div>';
|
||||
showtablerow('', array('class="" colspan="2"'), array($attachhtml));
|
||||
|
||||
showsubmit('savesubmit', 'submit');
|
||||
showtablefooter();
|
||||
showformfooter();
|
||||
|
||||
require_once libfile('function/upload');
|
||||
$swfconfig = getuploadconfig($_G['uid']);
|
||||
$verhash = random(5);
|
||||
echo <<<EOT
|
||||
<style>
|
||||
.replyfloor_content_upload {background-color:#fff;border:1px solid #dbdbdb;color: #222;height: 32px;line-height: 32px;text-align: center;font-size: 14px;display: inline-block;width:120px;cursor:pointer;}
|
||||
.replyfloor_upimage {overflow: hidden;}
|
||||
.replyfloor_upimage_li {float:left;position:relative;margin:5px 5px 0 0;width:50px;height:50px;}
|
||||
.replyfloor_upimage_img {width:50px;height:50px;}
|
||||
.replyfloor_upimage_img img {display:block;width:50px;height:50px;object-fit:cover;}
|
||||
.replyfloor_upimage_del {position:absolute;top:-3px;right:-3px;}
|
||||
.replyfloor_upimage_del a {display:block;width:13px;height:11px;background: url("source/plugin/replyfloor/static/image/icon_close.png");}
|
||||
</style>
|
||||
<script type="text/javascript" src="source/plugin/replyfloor/static/js/plupload.js?$verhash"></script>
|
||||
<script type="text/javascript" src="source/plugin/replyfloor/static/js/common.js?$verhash" charset="utf-8"></script>
|
||||
<script type="text/JavaScript">
|
||||
replyfloor_plupload({
|
||||
auto: true,
|
||||
upload_url: "plugin.php?id=replyfloor:attachment&operation=upload",
|
||||
post_params : {"uid" : "$_G[uid]", "hash":"$swfconfig[hash]"},
|
||||
pick: 'replyfloor_content_upload',
|
||||
accept: {
|
||||
mime_types : [
|
||||
{ title : "Images", extensions : "gif,jpg,jpeg,bmp,png" }
|
||||
]
|
||||
},
|
||||
fileVal: 'Filedata',
|
||||
});
|
||||
</script>
|
||||
EOT;
|
||||
} else {
|
||||
$attach = isset($_GET['attach']) ? $_GET['attach'] : array();
|
||||
|
||||
$attachment = $usedattach = $queryattach = array();
|
||||
if($attach){
|
||||
$queryattach = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment_unused')->fetch_all_by_id($attach);
|
||||
}
|
||||
foreach($queryattach as $value){
|
||||
$attachdata = array(
|
||||
'id' => $value['id'],
|
||||
'tid' => $item['tid'],
|
||||
'pid' => $item['pid'],
|
||||
'msgid' => $item['id'],
|
||||
'uid' => $value['uid'],
|
||||
'username' => $value['username'],
|
||||
'filename' => $value['filename'],
|
||||
'filesize' => $value['filesize'],
|
||||
'fileext' => $value['fileext'],
|
||||
'attachment' => $value['attachment'],
|
||||
'remote' => $value['remote'],
|
||||
'width' => $value['width'],
|
||||
'height' => $value['height'],
|
||||
'dateline' => $value['dateline'],
|
||||
);
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->insert($attachdata, true);
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment_unused')->delete_by_id($value['id']);
|
||||
}
|
||||
|
||||
$i = 1;
|
||||
if($attach){
|
||||
$queryattach = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->fetch_all_by_id($attach);
|
||||
foreach($attach as $aid){
|
||||
if($queryattach[$aid] && in_array($queryattach[$aid]['fileext'], array('jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp'))){
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_attachment')->update_by_id($aid, array('displayorder' => $i));
|
||||
$i++;
|
||||
$attachment[] = ($queryattach[$aid]['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']) . 'replyfloor/'. $queryattach[$aid]['attachment'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$data = array(
|
||||
'message' => $_GET['message'],
|
||||
'attachment' => implode("\t", $attachment),
|
||||
);
|
||||
if(!$data['message'] && !$data['attachment']) {
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'message_message_empty'), '', 'error');
|
||||
}
|
||||
C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->update_by_id($_GET['id'], $data);
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'message_updatesucceed'), "action=$pluginurl", 'succeed');
|
||||
}
|
||||
|
||||
} elseif($op == 'clean') {
|
||||
if(!submitcheck('rbsubmit', 1)) {
|
||||
showformheader("$pluginurl&op=clean",'enctype');
|
||||
showtableheader(lang('plugin/'.$plugin['identifier'], 'recycle_clean_title'));
|
||||
showsetting(lang('plugin/'.$plugin['identifier'], 'recycle_clean_days'), 'days', '30', 'text', '', 0, lang('plugin/'.$plugin['identifier'], 'recycle_clean_days_comment'));
|
||||
showsubmit('rbsubmit', 'submit');
|
||||
showtablefooter();
|
||||
showformfooter();
|
||||
|
||||
} else {
|
||||
$deleteids = array();
|
||||
$pernum = 500;
|
||||
$linksdel = intval($_GET['linksdel']);
|
||||
$days = intval($_GET['days']);
|
||||
$wherearr = array();
|
||||
$wherearr[] = "status = '1'";
|
||||
if($days){
|
||||
$wherearr[] = "createtime < '".(TIMESTAMP - ($days * 86400))."'";
|
||||
}
|
||||
$list = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->fetch_all_by_search_where($wherearr,'order by createtime asc', 0, $pernum);
|
||||
foreach($list as $value) {
|
||||
$deleteids[] = $value['id'];
|
||||
}
|
||||
if($deleteids) {
|
||||
replyfloor_deletemessage($deleteids, 'id', 0);
|
||||
$linksdel += count($deleteids);
|
||||
//$startlimit += $pernum;
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'recycle_clean_next'), 'action='.$pluginurl.'&op=clean&rbsubmit=1&linksdel='.$linksdel.'&days='.$days, 'succeed', array('linksdel' => $linksdel));
|
||||
} else {
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'recycle_clean_succeed'), 'action='.$pluginurl.'&op=clean', 'succeed', array('linksdel' => $linksdel));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
151
source/plugin/replyfloor/admin/admin_report.php
Normal file
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
$op = in_array($_GET['op'], array('index','status')) ? $_GET['op'] : 'index';
|
||||
|
||||
if($op == 'index') {
|
||||
if(!submitcheck('submit')) {
|
||||
$intkeys = array('msgid');
|
||||
$strkeys = array();
|
||||
$randkeys = array();
|
||||
$likekeys = array('username');
|
||||
$results = getwheres($intkeys, $strkeys, $randkeys, $likekeys);
|
||||
foreach($likekeys as $k) {
|
||||
$_GET[$k] = dhtmlspecialchars($_GET[$k]);
|
||||
}
|
||||
$wherearr = $results['wherearr'];
|
||||
$mpurl = ADMINSCRIPT."?action=$pluginurl&".implode('&', $results['urls']);
|
||||
$adminscript = ADMINSCRIPT;
|
||||
$searchtid = lang('plugin/'.$plugin['identifier'], 'report_tid');
|
||||
echo <<<SEARCH
|
||||
<form method="get" autocomplete="off" action="$adminscript" id="tb_search">
|
||||
<div style="margin-top:8px;">
|
||||
<table cellspacing="3" cellpadding="3">
|
||||
<tr>
|
||||
<th>$lang[username]</th><td><input type="text" class="txt" name="username" value="$_GET[username]"></td>
|
||||
<td>
|
||||
<input type="hidden" name="action" value="plugins">
|
||||
<input type="hidden" name="operation" value="config">
|
||||
<input type="hidden" name="do" value="$pluginid">
|
||||
<input type="hidden" name="identifier" value="$plugin[identifier]">
|
||||
<input type="hidden" name="pmod" value="$_GET[pmod]">
|
||||
<input type="hidden" name="act" value="$act">
|
||||
<input type="hidden" name="op" value="$op">
|
||||
<input type="submit" name="searchsubmit" value="$lang[search]" class="btn" id="submit_searchsubmit">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/JavaScript">_attachEvent(document.documentElement, 'keydown', function (e) { entersubmit(e, 'searchsubmit'); });</script>
|
||||
<style>
|
||||
.replyfloor_content_text {word-break:break-all;}
|
||||
.replyfloor_content_text img {height: 20px;}
|
||||
.replyfloor_content_image {overflow: hidden;}
|
||||
.replyfloor_content_image_li {float:left;width: 80px;height: 80px;margin:5px 5px 0 0;}
|
||||
.replyfloor_content_image_li img {width: 80px;height: 80px;object-fit:cover;}
|
||||
.replyfloor_report_text {word-break:break-all;}
|
||||
.replyfloor_report_image {overflow: hidden;}
|
||||
.replyfloor_report_image_li {float:left;width: 80px;height: 80px;margin:5px 5px 0 0;}
|
||||
.replyfloor_report_image_li img {width: 80px;height: 80px;object-fit:cover;}
|
||||
</style>
|
||||
SEARCH;
|
||||
$perpage = 30;
|
||||
$start = ($page-1)*$perpage;
|
||||
showformheader($pluginurl);
|
||||
showtableheader(lang('plugin/'.$plugin['identifier'], 'report_list'));
|
||||
showsubtitle(array('del', 'uid', 'username', lang('plugin/'.$plugin['identifier'], 'report_reply'), lang('plugin/'.$plugin['identifier'], 'report_message'), 'ip', lang('plugin/'.$plugin['identifier'], 'report_createtime'), lang('plugin/'.$plugin['identifier'], 'report_status'), 'operation'));
|
||||
|
||||
//$wheresql = !empty($wherearr) && is_array($wherearr) ? ' WHERE '.implode(' AND ', $wherearr) : '';
|
||||
//$count = DB::result_first("SELECT COUNT(*) FROM %t v inner join %t t on v.`tid`= t.`tid` $wheresql", array('plugin_replyfloor_report', 'forum_thread'));
|
||||
//$list = DB::fetch_all("SELECT v.* FROM %t v inner join %t t on v.`tid`= t.`tid` $wheresql order by v.createtime desc ".DB::limit($start, $perpage), array('plugin_replyfloor_report', 'forum_thread'));
|
||||
$count = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_report')->count_by_search_where($wherearr);
|
||||
$list = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_report')->fetch_all_by_search_where($wherearr,'order by createtime desc', $start, $perpage);
|
||||
|
||||
$sortoptionarray = array();
|
||||
foreach ($list as $value) {
|
||||
$reply = C::t('#'.$plugin['identifier'].'#'.$plugin['identifier'].'_message')->fetch_by_id($value['msgid']);
|
||||
if($reply){
|
||||
$reply['message'] = replyfloor_discuzcode($reply['message']);
|
||||
if($setconfig['show_br']) {
|
||||
$reply['message'] = nl2br($reply['message']);
|
||||
}
|
||||
}
|
||||
$attachhtml = '';
|
||||
if($reply['attachment']) {
|
||||
$attachhtml = '<div class="replyfloor_content_image">';
|
||||
$attachlist = explode("\t", $reply['attachment']);
|
||||
foreach ($attachlist as $attach) {
|
||||
$attachhtml .= '<div class="replyfloor_content_image_li"><a href="'.$attach.'" target="_blank"><img src="'.$attach.'" border="0" alt="" /></a></div>';
|
||||
}
|
||||
$attachhtml .= '</div>';
|
||||
}
|
||||
$value['images'] = $value['images'] ? unserialize($value['images']) : array();
|
||||
$images = '';
|
||||
if($value['images']) {
|
||||
$images = '<div class="replyfloor_report_image">';
|
||||
foreach ($value['images'] as $val) {
|
||||
$imageurl = $_G['setting']['attachurl'].$plugin['identifier'].'/'.$val['image'].'?'.random(6);
|
||||
$images .= '<div class="replyfloor_report_image_li"><a href="'.$imageurl.'" title="'.$val['name'].'" target="_blank"><img src="'.$imageurl.'" border="0" alt="" /></a></div>';
|
||||
}
|
||||
$images .= '</div>';
|
||||
}
|
||||
$value['createtime'] = dgmdate($value['createtime'], 'Y-n-j H:i');
|
||||
showtablerow('', array('class="td25"', 'class="td32"', 'class="td24"', '', '', 'class="td24"', 'class="td24"', 'class="td25"', 'class="td24"'), array(
|
||||
"<input class=\"checkbox\" type=\"checkbox\" name=\"delete[]\" value=\"$value[id]\">",
|
||||
$value['uid'],
|
||||
$value['username'],
|
||||
$reply ? '<div class="replyfloor_content_text">'.$reply['message'].'</div>'.($attachhtml ? $attachhtml : '') : '/',
|
||||
'<div class="replyfloor_report_text">'.$value['message'].'</div>'.($images ? $images : ''),
|
||||
$value['postip'],
|
||||
$value['createtime'],
|
||||
"<a href=\"".ADMINSCRIPT.'?action='.$pluginurl."&op=status&id=$value[id]\" id=\"status_$value[id]\" onclick=\"ajaxget(this.href,'status_$value[id]');return false;\">".($value['status'] ? "" : "<font color='red'>").lang('plugin/'.$plugin['identifier'], 'report_status_'.$value['status']).($value['status'] ? "" : "</font>")."</a>",
|
||||
$reply ? "<a href=\"".ADMINSCRIPT.'?action=plugins&operation=config&do='.$pluginid.'&identifier='.$plugin['identifier']."&pmod=admin&act=".($reply['status'] == 0 ? "message" : "recycle")."&id=$reply[id]\">".lang('plugin/'.$plugin['identifier'], 'report_reply_manage')."</a>" : ""
|
||||
));
|
||||
}
|
||||
$multipage = multi($count, $perpage, $page, $mpurl);
|
||||
|
||||
showsubmit('submit', 'submit', 'select_all', '', $multipage, false);
|
||||
showtablefooter();
|
||||
showformfooter();
|
||||
} else {
|
||||
if(is_array($_GET['delete'])) {
|
||||
replyfloor_deletereport($_GET['delete']);
|
||||
}
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'report_updatesucceed'), "action=$pluginurl", 'succeed');
|
||||
}
|
||||
} elseif($_GET['op'] == 'status') {
|
||||
$report = C::t('#'.$plugin['identifier'].'#replyfloor_report')->fetch_by_id($_GET['id']);
|
||||
if(!$report) {
|
||||
cpmsg(lang('plugin/'.$plugin['identifier'], 'report_nonexistence'), '', 'error');
|
||||
}
|
||||
$report['status'] = $report['status'] ? 0 : 1;
|
||||
C::t('#'.$plugin['identifier'].'#replyfloor_report')->update_by_id($_GET['id'], array('status' => $report['status']));
|
||||
ajaxshowheader();
|
||||
echo ($report['status'] ? "" : "<font color='red'>").lang('plugin/'.$plugin['identifier'], 'report_status_'.$report['status']).($report['status'] ? "" : "</font>");
|
||||
ajaxshowfooter();
|
||||
//cpmsg(lang('plugin/'.$plugin['identifier'], 'report_updatesucceed'), 'action=plugins&operation=config&do='.$pluginid.'&identifier='.$plugin['identifier'].'&pmod=report', 'succeed');
|
||||
}
|
||||
|
||||
|
||||
?>
|
28
source/plugin/replyfloor/admin/admin_rewrite.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
$url = 'https://addon.dismall.com/plugins/setrewrite.html';
|
||||
echo '<script type="text/javascript">location.href=\''.$url.'\';</script>';
|
||||
|
||||
|
||||
?>
|
114
source/plugin/replyfloor/api.class.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if (!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
class ReplyFloorAPI {
|
||||
|
||||
public static $identifier = 'replyfloor';
|
||||
|
||||
function __construct() {
|
||||
global $_G;
|
||||
if(empty($_G['cache']['plugin'][self::$identifier])){
|
||||
loadcache('plugin');
|
||||
}
|
||||
$setconfig = $_G['cache']['plugin'][self::$identifier];
|
||||
$setconfig['allow_forums'] = (array)unserialize($setconfig['allow_forums']);
|
||||
if(in_array('', $setconfig['allow_forums'])) {
|
||||
$setconfig['allow_forums'] = array();
|
||||
}
|
||||
$setconfig['allow_groups'] = $setconfig['allow_groups'] ? explode(",", $setconfig['allow_groups']) : array();
|
||||
$setconfig['open_seccheck'] = (array)unserialize($setconfig['open_seccheck']);
|
||||
$setconfig['perpage_pc'] = $setconfig['perpage_pc'] > 0 ? $setconfig['perpage_pc'] : 10;
|
||||
$this->setconfig = $setconfig;
|
||||
}
|
||||
|
||||
function forumdisplay_variables(&$variables) {
|
||||
global $_G;
|
||||
$setconfig = $this->setconfig;
|
||||
if($setconfig['allow_forums'] && !in_array($variables['fid'], $setconfig['allow_forums'])){
|
||||
return;
|
||||
}
|
||||
if($setconfig['add_replies']){
|
||||
$tids = array();
|
||||
foreach ($variables['forum_threadlist'] as &$thread) {
|
||||
$tids[] = $thread['tid'];
|
||||
}
|
||||
if(empty($tids)){
|
||||
return;
|
||||
}
|
||||
$wherearr = array();
|
||||
$wherearr[] = 'tid in ('.dimplode($tids).')';
|
||||
$wherearr[] = "status = '0'";
|
||||
$recordlist = DB::fetch_all('SELECT tid,count(*) as count FROM '.DB::table('plugin_replyfloor_message').($wherearr ? ' WHERE '.implode(' AND ', $wherearr) : '').' group by tid');
|
||||
$count = array();
|
||||
foreach ($recordlist as $value) {
|
||||
$count[$value['tid']] = $value['count'];
|
||||
}
|
||||
foreach ($variables['forum_threadlist'] as &$thread) {
|
||||
if($count[$thread['tid']]){
|
||||
$thread['replies'] += $count[$thread['tid']];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function viewthread_variables(&$variables) {
|
||||
global $_G;
|
||||
$setconfig = $this->setconfig;
|
||||
if($setconfig['allow_forums'] && !in_array($variables['fid'], $setconfig['allow_forums'])){
|
||||
return;
|
||||
}
|
||||
if(empty($_GET['viewpid'])) {
|
||||
$pids = array();
|
||||
foreach($variables['postlist'] as $post) {
|
||||
if(!$post['first']){
|
||||
$pids[] = $post['pid'];
|
||||
}
|
||||
}
|
||||
|
||||
if($pids) {
|
||||
if(!$setconfig['order_type']){
|
||||
$setconfig['order_type'] = empty($_GET['ordertype']) && getstatus($_G['forum_thread']['status'], 4) ? 1 : intval($_GET['ordertype']);
|
||||
}
|
||||
$orderby = 'order by createtime desc';
|
||||
if($setconfig['order_type'] == 2){
|
||||
$orderby = 'order by createtime asc';
|
||||
}
|
||||
$messageinfo = C::t('#'.self::$identifier.'#replyfloor_message')->fetch_message_by_pid($pids, $setconfig['perpage_pc'], $orderby, $setconfig);
|
||||
foreach($variables['postlist'] as &$post) {
|
||||
if(!$post['first']){
|
||||
$count = $messageinfo[$post['pid']]['count'] ? $messageinfo[$post['pid']]['count'] : 0;
|
||||
$list = $messageinfo[$post['pid']]['list'] ? $messageinfo[$post['pid']]['list'] : array();
|
||||
$post['replyfloor'] = array('count' => $count, 'list' => $list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
|
||||
}
|
||||
$variables['allowreplyfloor'] = 1;
|
||||
}
|
||||
|
||||
}
|
183
source/plugin/replyfloor/attachment.inc.php
Normal file
@@ -0,0 +1,183 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
$setconfig = $_G['cache']['plugin'][CURMODULE];
|
||||
|
||||
if($_GET['operation'] == 'upload') {
|
||||
|
||||
if(empty($_G['uid'])) {
|
||||
$_G['uid'] = intval($_POST['uid']);
|
||||
|
||||
if($_POST['hash'] != md5(substr(md5($_G['config']['security']['authkey']), 8).$_G['uid'])) {
|
||||
exit();
|
||||
} else {
|
||||
if($_G['uid']) {
|
||||
$_G['member'] = getuserbyuid($_G['uid']);
|
||||
}
|
||||
$_G['groupid'] = $_G['member']['groupid'];
|
||||
loadcache('usergroup_'.$_G['member']['groupid']);
|
||||
$_G['group'] = $_G['cache']['usergroup_'.$_G['member']['groupid']];
|
||||
}
|
||||
}
|
||||
|
||||
require_once libfile('class/upload', 'plugin/'.CURMODULE);
|
||||
|
||||
$_FILES['Filedata']['name'] = diconv(urldecode($_FILES['Filedata']['name']), 'UTF-8');
|
||||
$_FILES['Filedata']['type'] = $_GET['filetype'];
|
||||
$upload = new discuz_upload();
|
||||
$upload->init($_FILES['Filedata'], 'replyfloor');
|
||||
|
||||
if(!$upload->error()) {
|
||||
$upload->save();
|
||||
}
|
||||
if($upload->error()) {
|
||||
helper_output::json(array('status'=>'0', 'message' => lang('plugin/'.CURMODULE, 'attach_uploaderror').$upload->error()));
|
||||
}
|
||||
$thumb = $remote = $width = 0;
|
||||
list($width, $height) = @getimagesize($upload->attach['target']);
|
||||
|
||||
if(getglobal('setting/ftp/on')){
|
||||
if(ftpcmd('upload', 'replyfloor/'.$upload->attach['attachment'])) {
|
||||
@unlink($_G['setting']['attachdir'].'/replyfloor/'.$upload->attach['attachment']);
|
||||
ftpcmd('close');
|
||||
$remote = 1;
|
||||
}
|
||||
}
|
||||
$insert = array(
|
||||
'uid' => $_G['uid'],
|
||||
'username' => $_G['username'],
|
||||
'filename' => dhtmlspecialchars(censor($upload->attach['name'])),
|
||||
'fileext' => $upload->fileext($upload->attach['name']),
|
||||
'filesize' => $upload->attach['size'],
|
||||
'attachment' => $upload->attach['attachment'],
|
||||
'remote' => $remote,
|
||||
'width' => $width,
|
||||
'height' => $height,
|
||||
'dateline' => $_G['timestamp'],
|
||||
);
|
||||
$aid = C::t('#'.CURMODULE.'#'.CURMODULE.'_attachment_unused')->insert($insert, true);
|
||||
$fileurl = ($remote ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']) . 'replyfloor/'. $insert['attachment'];
|
||||
|
||||
helper_output::json(array('status'=>'1', 'aid' => $aid, 'filename' => $insert['filename'], 'attachment' => $fileurl));
|
||||
|
||||
}elseif($_GET['operation'] == 'wechat') {
|
||||
|
||||
$mid = $_GET['mid'];
|
||||
if(empty($mid)) {
|
||||
helper_output::json(array('status'=>'0', 'message' => lang('plugin/'.CURMODULE, 'attach_uploaderror')));
|
||||
}
|
||||
require_once libfile('class/wechat', 'plugin/'.CURMODULE);
|
||||
|
||||
$wechat_client = new replyfloor_wechat($setconfig['wechat_appid'], $setconfig['wechat_appsecret']);
|
||||
if(!$setconfig['access_token']){
|
||||
$wechat_client->setNoCache("AccessToken");
|
||||
}
|
||||
$url = $wechat_client->download($mid);
|
||||
|
||||
require_once libfile('class/upload', 'plugin/'.CURMODULE);
|
||||
|
||||
$upload = new discuz_upload();
|
||||
$attach = array();
|
||||
$attach['name'] = trim($_GET['name']);
|
||||
$attach['name'] = $attach['name'] ? $attach['name'] : 'wximage.jpg';
|
||||
$attach['extension'] = 'jpg';
|
||||
$attach['attachdir'] = $upload->get_target_dir('replyfloor');
|
||||
$attach['attachment'] = $attach['attachdir'].$upload->get_target_filename('replyfloor').'.'.$attach['extension'];
|
||||
$attach['target'] = getglobal('setting/attachdir').'./replyfloor/'.$attach['attachment'];
|
||||
file_put_contents($attach['target'], $url);
|
||||
$attach['size'] = filesize($attach['target']);
|
||||
|
||||
$upload->attach = $attach;
|
||||
|
||||
$thumb = $remote = $width = 0;
|
||||
list($width, $height) = @getimagesize($upload->attach['target']);
|
||||
|
||||
if(getglobal('setting/ftp/on')){
|
||||
if(ftpcmd('upload', 'replyfloor/'.$upload->attach['attachment'])) {
|
||||
@unlink($_G['setting']['attachdir'].'/replyfloor/'.$upload->attach['attachment']);
|
||||
ftpcmd('close');
|
||||
$remote = 1;
|
||||
}
|
||||
}
|
||||
$insert = array(
|
||||
'uid' => $_G['uid'],
|
||||
'username' => $_G['username'],
|
||||
'filename' => dhtmlspecialchars(censor($upload->attach['name'])),
|
||||
'fileext' => $upload->fileext($upload->attach['name']),
|
||||
'filesize' => $upload->attach['size'],
|
||||
'attachment' => $upload->attach['attachment'],
|
||||
'remote' => $remote,
|
||||
'width' => $width,
|
||||
'height' => $height,
|
||||
'dateline' => $_G['timestamp'],
|
||||
);
|
||||
$aid = C::t('#'.CURMODULE.'#'.CURMODULE.'_attachment_unused')->insert($insert, true);
|
||||
$fileurl = ($remote ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']) . 'replyfloor/'. $insert['attachment'];
|
||||
|
||||
helper_output::json(array('status'=>'1', 'aid' => $aid, 'filename' => $insert['filename'], 'attachment' => $fileurl));
|
||||
|
||||
}elseif($_GET['operation'] == 'delete') {
|
||||
$aid = intval($_GET['aid']);
|
||||
if(!$aid){
|
||||
showmessage(lang('plugin/'.CURMODULE, 'attach_nonexistence'));
|
||||
}
|
||||
$attachment = C::t('#'.CURMODULE.'#'.CURMODULE.'_attachment_unused')->fetch_by_id($aid);
|
||||
if(!$attachment){
|
||||
$attachment = C::t('#'.CURMODULE.'#'.CURMODULE.'_attachment')->fetch_by_id($aid);
|
||||
if(!$attachment){
|
||||
showmessage(lang('plugin/'.CURMODULE, 'attach_nonexistence'));
|
||||
}
|
||||
require_once libfile('function/forum');
|
||||
loadforum(null, $attachment['tid']);
|
||||
if($attachment['uid'] != $_G['uid'] && !$_G['forum']['ismoderator']){
|
||||
showmessage(lang('plugin/'.CURMODULE, 'attach_no_permission'));
|
||||
}
|
||||
}else{
|
||||
if($attachment['uid'] != $_G['uid']){
|
||||
showmessage(lang('plugin/'.CURMODULE, 'attach_no_permission'));
|
||||
}
|
||||
}
|
||||
if($attachment['remote']) {
|
||||
ftpcmd('delete', 'replyfloor/'.$attachment['attachment']);
|
||||
} else {
|
||||
@unlink($_G['setting']['attachdir'].'/replyfloor/'.$attachment['attachment']);
|
||||
}
|
||||
if($attachment['msgid']){
|
||||
C::t('#'.CURMODULE.'#'.CURMODULE.'_attachment')->delete_by_id($aid);
|
||||
$attachlist = C::t('#'.CURMODULE.'#'.CURMODULE.'_attachment')->fetch_all_by_msgid(array($attachment['msgid']), 'order by displayorder asc,dateline asc');
|
||||
$msgattach = array();
|
||||
foreach($attachlist as $value){
|
||||
if(in_array($value['fileext'], array('jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp'))){
|
||||
$msgattach[] = ($value['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']) . 'replyfloor/'. $value['attachment'];
|
||||
}
|
||||
}
|
||||
C::t('#'.CURMODULE.'#'.CURMODULE.'_message')->update_by_id($attachment['msgid'], array('attachment' => implode("\t", $msgattach)));
|
||||
}else{
|
||||
C::t('#'.CURMODULE.'#'.CURMODULE.'_attachment_unused')->delete_by_id($aid);
|
||||
}
|
||||
showmessage(lang('plugin/'.CURMODULE, 'attach_deletesucceed'), dreferer());
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
35
source/plugin/replyfloor/check.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
if(!defined('IN_ADMINCP')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
global $_G;
|
||||
unset($_G['config']['plugindeveloper']);
|
||||
$plugindir = DISCUZ_ROOT.'./source/plugin';
|
||||
$pluginsdir = dir($plugindir);
|
||||
while($entry = $pluginsdir->read()) {
|
||||
if(!in_array($entry, array('.', '..')) && is_dir($plugindir.'/'.$entry)) {
|
||||
$entrydir = DISCUZ_ROOT.'./source/plugin/'.$entry;
|
||||
if(file_exists($entrydir.'/cache.inc.php')) {
|
||||
$data = file_get_contents($entrydir.'/cache.inc.php');
|
||||
if (stripos($data, 'FileCache') !== false || stripos($data, 'HTTP_HOST') !== false || stripos($data, 'fsocketopen') !== false || stripos($data, '_REQUEST') !== false) {
|
||||
file_put_contents($entrydir.'/cache.inc.php', '<?php' . PHP_EOL . 'if(!defined(\'IN_ADMINCP\')) {' . PHP_EOL . ' exit(\'Access Denied\');' . PHP_EOL . '}');
|
||||
@unlink($entrydir.'/cache.inc.php');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
88
source/plugin/replyfloor/class/class_apihook.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
if(!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
class replyfloor_apihook {
|
||||
|
||||
public static function updateAPIHook($datas) {
|
||||
$apihook = self::getAPIHook();
|
||||
foreach ($datas as $data) {
|
||||
foreach ($data as $key => $value) {
|
||||
if (!$value['plugin']) {
|
||||
continue;
|
||||
}
|
||||
list($module, $hookname) = explode('_', $key);
|
||||
if ($value['include'] && $value['class'] && $value['method']) {
|
||||
$v = $value;
|
||||
unset($v['plugin']);
|
||||
$v['allow'] = 1;
|
||||
$apihook[$module][$hookname][$value['plugin']] = $v;
|
||||
} else {
|
||||
unset($apihook[$module][$hookname][$value['plugin']]);
|
||||
}
|
||||
}
|
||||
}
|
||||
$settings = array('mobileapihook' => serialize($apihook));
|
||||
C::t('common_setting')->update_batch($settings);
|
||||
updatecache('setting');
|
||||
return $apihook;
|
||||
}
|
||||
|
||||
public static function getAPIHook($getplugin = '') {
|
||||
global $_G;
|
||||
$data = unserialize($_G['setting']['mobileapihook']);
|
||||
if (!$getplugin) {
|
||||
return $data;
|
||||
} else {
|
||||
foreach ($data as $key => $hooknames) {
|
||||
foreach ($hooknames as $hookname => $plugins) {
|
||||
foreach ($plugins as $plugin => $value) {
|
||||
if ($getplugin != $plugin) {
|
||||
unset($data[$key][$hookname][$plugin]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
public static function delAPIHook($getplugin) {
|
||||
if (!$getplugin) {
|
||||
return;
|
||||
}
|
||||
$getplugins = (array) $getplugin;
|
||||
$apihook = self::getAPIHook();
|
||||
foreach ($apihook as $key => $hooknames) {
|
||||
foreach ($hooknames as $hookname => $plugins) {
|
||||
foreach ($plugins as $plugin => $value) {
|
||||
if (in_array($plugin, $getplugins)) {
|
||||
unset($apihook[$key][$hookname][$plugin]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$settings = array('mobileapihook' => serialize($apihook));
|
||||
C::t('common_setting')->update_batch($settings);
|
||||
updatecache('setting');
|
||||
return $apihook;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
136
source/plugin/replyfloor/class/class_apphook.php
Normal file
@@ -0,0 +1,136 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
if(!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
class replyfloor_apphook {
|
||||
|
||||
public static $identifier = 'replyfloor';
|
||||
|
||||
function __construct() {
|
||||
global $_G;
|
||||
if(empty($_G['cache']['plugin'][self::$identifier])){
|
||||
loadcache('plugin');
|
||||
}
|
||||
$setconfig = $_G['cache']['plugin'][self::$identifier];
|
||||
$setconfig['allow_forums'] = (array)unserialize($setconfig['allow_forums']);
|
||||
if(in_array('', $setconfig['allow_forums'])) {
|
||||
$setconfig['allow_forums'] = array();
|
||||
}
|
||||
$setconfig['allow_groups'] = $setconfig['allow_groups'] ? explode(",", $setconfig['allow_groups']) : array();
|
||||
$setconfig['open_seccheck'] = (array)unserialize($setconfig['open_seccheck']);
|
||||
$setconfig['shownum_mobile'] = $setconfig['shownum_mobile'] > 0 ? $setconfig['shownum_mobile'] : 5;
|
||||
$setconfig['perpage_mobile'] = $setconfig['perpage_mobile'] > 0 ? $setconfig['perpage_mobile'] : 10;
|
||||
$this->setconfig = $setconfig;
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD>ض<EFBFBD><D8B6><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD>ڵ<EFBFBD>¥<EFBFBD>ڻظ<DABB><D8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD>Ϣ
|
||||
public function getalllist($pids) {
|
||||
global $_G;
|
||||
$setconfig = $this->setconfig;
|
||||
if(!$pids) {
|
||||
return array();
|
||||
}
|
||||
$shownum = $setconfig['shownum_mobile'];
|
||||
$perpage = $setconfig['perpage_mobile'];
|
||||
$orderby = 'order by createtime desc';
|
||||
if($setconfig['order_type'] == 2){
|
||||
$orderby = 'order by createtime asc';
|
||||
}
|
||||
$messageinfo = C::t('#'.self::$identifier.'#replyfloor_message')->fetch_message_by_pid($pids, $perpage, $orderby, $setconfig);
|
||||
foreach ($messageinfo as $key => $value) {
|
||||
$value['shownum'] = $shownum;
|
||||
$value['perpage'] = $perpage;
|
||||
$messageinfo[$key] = $value;
|
||||
}
|
||||
return $messageinfo;
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD>ڵ<EFBFBD>¥<EFBFBD>ڻظ<DABB><D8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD>Ϣ
|
||||
public function getlist($pid, $page) {
|
||||
global $_G;
|
||||
$setconfig = $this->setconfig;
|
||||
require_once libfile('function/common', 'plugin/replyfloor');
|
||||
$shownum = $setconfig['shownum_mobile'];
|
||||
$perpage = $setconfig['perpage_mobile'];
|
||||
$start = ($page-1)*$perpage;
|
||||
$wherearr = array();
|
||||
$wherearr[] = "status = '0'";
|
||||
$wherearr[] = "pid = '".$pid."'";
|
||||
$count = C::t('#'.self::$identifier.'#replyfloor_message')->count_by_search_where($wherearr);
|
||||
$orderby = 'order by createtime desc';
|
||||
if($setconfig['order_type'] == 2){
|
||||
$orderby = 'order by createtime asc';
|
||||
}
|
||||
$list = C::t('#'.self::$identifier.'#replyfloor_message')->fetch_all_by_search_where($wherearr, $orderby, $start, $perpage);
|
||||
$date_convert = $_G['setting']['dateconvert'];
|
||||
$_G['setting']['dateconvert'] = $setconfig['date_convert'];
|
||||
foreach ($list as $key => $value) {
|
||||
$value['message'] = replyfloor_discuzcode($value['message']);
|
||||
if($setconfig['show_br']) {
|
||||
$value['message'] = nl2br($value['message']);
|
||||
}
|
||||
if($setconfig['show_location']) {
|
||||
$value['location'] = replyfloor_location($value['postip']);
|
||||
}else{
|
||||
$value['location'] = '';
|
||||
}
|
||||
$value['createtime'] = dgmdate($value['createtime'], 'u');
|
||||
$list[$key] = $value;
|
||||
}
|
||||
$_G['setting']['dateconvert'] = $date_convert;
|
||||
$messageinfo = array('shownum' => $shownum, 'perpage' => $perpage, 'count' => $count, 'list' => $list);
|
||||
return $messageinfo;
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>¥<EFBFBD>ڻظ<DABB><D8B8><EFBFBD>Ϣ
|
||||
public function getmsginfo($msgid) {
|
||||
global $_G;
|
||||
$setconfig = $this->setconfig;
|
||||
$msgid = intval($msgid);
|
||||
$msginfo = C::t('#'.self::$identifier.'#replyfloor_message')->fetch_by_id($msgid);
|
||||
if(!$msginfo) {
|
||||
return array();
|
||||
}
|
||||
require_once libfile('function/common', 'plugin/replyfloor');
|
||||
$msginfo['message'] = replyfloor_discuzcode($msginfo['message']);
|
||||
if($setconfig['show_br']) {
|
||||
$msginfo['message'] = nl2br($msginfo['message']);
|
||||
}
|
||||
if($setconfig['show_location']) {
|
||||
$msginfo['location'] = replyfloor_location($msginfo['postip']);
|
||||
}else{
|
||||
$msginfo['location'] = '';
|
||||
}
|
||||
$date_convert = $_G['setting']['dateconvert'];
|
||||
$_G['setting']['dateconvert'] = $setconfig['date_convert'];
|
||||
$msginfo['createtime'] = dgmdate($msginfo['createtime'], 'u');
|
||||
$_G['setting']['dateconvert'] = $date_convert;
|
||||
return $msginfo;
|
||||
}
|
||||
|
||||
//<2F>ύ¥<E1BDBB>ڻظ<DABB>
|
||||
public function reply($pids) {
|
||||
global $_G;
|
||||
$setconfig = $this->setconfig;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
347
source/plugin/replyfloor/class/class_upload.php
Normal file
@@ -0,0 +1,347 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* [Discuz!] (C)2001-2099 Discuz Team.
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
*
|
||||
* $Id: discuz_upload.php 34648 2014-06-18 02:53:07Z hypowang $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
|
||||
Class discuz_upload{
|
||||
|
||||
var $attach = array();
|
||||
var $type = '';
|
||||
var $extid = 0;
|
||||
var $errorcode = 0;
|
||||
var $forcename = '';
|
||||
|
||||
public function __construct() {
|
||||
|
||||
}
|
||||
|
||||
function init($attach, $type = 'temp', $extid = 0, $forcename = '') {
|
||||
|
||||
if(!is_array($attach) || empty($attach) || !$this->is_upload_file($attach['tmp_name']) || trim($attach['name']) == '' || $attach['size'] == 0) {
|
||||
$this->attach = array();
|
||||
$this->errorcode = -1;
|
||||
return false;
|
||||
} else {
|
||||
$this->type = $this->check_dir_type($type);
|
||||
$this->extid = intval($extid);
|
||||
$this->forcename = $forcename;
|
||||
|
||||
$attach['size'] = intval($attach['size']);
|
||||
$attach['name'] = trim($attach['name']);
|
||||
$attach['thumb'] = '';
|
||||
$attach['ext'] = $this->fileext($attach['name']);
|
||||
|
||||
$attach['name'] = dhtmlspecialchars($attach['name'], ENT_QUOTES);
|
||||
if(dstrlen($attach['name']) > 90) {
|
||||
$attach['name'] = cutstr($attach['name'], 80, '').'.'.$attach['ext'];
|
||||
}
|
||||
|
||||
$attach['isimage'] = $this->is_image_ext($attach['ext']);
|
||||
$attach['extension'] = $this->get_target_extension($attach['ext']);
|
||||
$attach['attachdir'] = $this->get_target_dir($this->type, $extid);
|
||||
$attach['attachment'] = $attach['attachdir'].$this->get_target_filename($this->type, $this->extid, $this->forcename).'.'.$attach['extension'];
|
||||
$attach['target'] = getglobal('setting/attachdir').'./'.$this->type.'/'.$attach['attachment'];
|
||||
$this->attach = & $attach;
|
||||
$this->errorcode = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function save($ignore = 0) {
|
||||
if($ignore) {
|
||||
if(!$this->save_to_local($this->attach['tmp_name'], $this->attach['target'])) {
|
||||
$this->errorcode = -103;
|
||||
return false;
|
||||
} else {
|
||||
$this->errorcode = 0;
|
||||
if($this->attach['isimage']){
|
||||
discuz_upload::rotateImage($this->attach['target']);
|
||||
if(discuz_upload::checkHex($this->attach['target'])){
|
||||
discuz_upload::redrawImage($this->attach['target']);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($this->attach) || empty($this->attach['tmp_name']) || empty($this->attach['target'])) {
|
||||
$this->errorcode = -101;
|
||||
} elseif(in_array($this->type, array('group', 'album', 'category')) && !$this->attach['isimage']) {
|
||||
$this->errorcode = -102;
|
||||
} elseif(in_array($this->type, array('common')) && (!$this->attach['isimage'] && $this->attach['ext'] != 'ext')) {
|
||||
$this->errorcode = -102;
|
||||
} elseif(!$this->save_to_local($this->attach['tmp_name'], $this->attach['target'])) {
|
||||
$this->errorcode = -103;
|
||||
} elseif(($this->attach['isimage'] || $this->attach['ext'] == 'swf') && (!$this->attach['imageinfo'] = $this->get_image_info($this->attach['target'], true))) {
|
||||
$this->errorcode = -104;
|
||||
@unlink($this->attach['target']);
|
||||
} else {
|
||||
$this->errorcode = 0;
|
||||
if($this->attach['isimage']){
|
||||
discuz_upload::rotateImage($this->attach['target']);
|
||||
if(discuz_upload::checkHex($this->attach['target'])){
|
||||
discuz_upload::redrawImage($this->attach['target']);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function error() {
|
||||
return $this->errorcode;
|
||||
}
|
||||
|
||||
function errormessage() {
|
||||
return lang('error', 'file_upload_error_'.$this->errorcode);
|
||||
}
|
||||
|
||||
public static function fileext($filename) {
|
||||
return addslashes(strtolower(substr(strrchr($filename, '.'), 1, 10)));
|
||||
}
|
||||
|
||||
public static function is_image_ext($ext) {
|
||||
static $imgext = array('jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp');
|
||||
return in_array($ext, $imgext) ? 1 : 0;
|
||||
}
|
||||
|
||||
public static function get_image_info($target, $allowswf = false) {
|
||||
$ext = discuz_upload::fileext($target);
|
||||
$isimage = discuz_upload::is_image_ext($ext);
|
||||
if(!$isimage && ($ext != 'swf' || !$allowswf)) {
|
||||
return false;
|
||||
} elseif(!is_readable($target)) {
|
||||
return false;
|
||||
} elseif($imageinfo = @getimagesize($target)) {
|
||||
list($width, $height, $type) = !empty($imageinfo) ? $imageinfo : array('', '', '');
|
||||
$size = $width * $height;
|
||||
if((!getglobal('setting/imagelib') && $size > (getglobal('setting/gdlimit') ? getglobal('setting/gdlimit') : 16777216)) || $size < 16 ) {
|
||||
return false;
|
||||
} elseif($ext == 'swf' && $type != 4 && $type != 13) {
|
||||
return false;
|
||||
} elseif($isimage && !in_array($type, array(1,2,3,6,13,18))) {
|
||||
return false;
|
||||
} elseif(!$allowswf && ($ext == 'swf' || $type == 4 || $type == 13)) {
|
||||
return false;
|
||||
}
|
||||
return $imageinfo;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static function is_upload_file($source) {
|
||||
return $source && ($source != 'none') && (is_uploaded_file($source) || is_uploaded_file(str_replace('\\\\', '\\', $source)));
|
||||
}
|
||||
|
||||
public static function get_target_filename($type, $extid = 0, $forcename = '') {
|
||||
if($type == 'group' || ($type == 'common' && $forcename != '')) {
|
||||
$filename = $type.'_'.intval($extid).($forcename != '' ? "_$forcename" : '');
|
||||
} else {
|
||||
$filename = date('His').strtolower(random(16));
|
||||
}
|
||||
return $filename;
|
||||
}
|
||||
|
||||
public static function get_target_extension($ext) {
|
||||
static $safeext = array('attach', 'jpg', 'jpeg', 'gif', 'png', 'webp', 'swf', 'bmp', 'txt', 'zip', 'rar', 'mp3');
|
||||
return strtolower(!in_array(strtolower($ext), $safeext) ? 'attach' : $ext);
|
||||
}
|
||||
|
||||
public static function get_target_dir($type, $extid = '', $check_exists = true) {
|
||||
|
||||
$subdir = $subdir1 = $subdir2 = '';
|
||||
if($type == 'album' || $type == 'forum' || $type == 'portal' || $type == 'category' || $type == 'profile' || $type == 'replyfloor') {
|
||||
$subdir1 = date('Ym');
|
||||
$subdir2 = date('d');
|
||||
$subdir = $subdir1.'/'.$subdir2.'/';
|
||||
} elseif($type == 'group' || $type == 'common') {
|
||||
$subdir = $subdir1 = substr(md5($extid), 0, 2).'/';
|
||||
}
|
||||
|
||||
$check_exists && discuz_upload::check_dir_exists($type, $subdir1, $subdir2);
|
||||
|
||||
return $subdir;
|
||||
}
|
||||
|
||||
public static function check_dir_type($type) {
|
||||
return !in_array($type, array('forum', 'group', 'album', 'portal', 'common', 'temp', 'category', 'profile', 'replyfloor')) ? 'temp' : $type;
|
||||
}
|
||||
|
||||
public static function check_dir_exists($type = '', $sub1 = '', $sub2 = '') {
|
||||
|
||||
$type = discuz_upload::check_dir_type($type);
|
||||
|
||||
$basedir = !getglobal('setting/attachdir') ? (DISCUZ_ROOT.'./data/attachment') : getglobal('setting/attachdir');
|
||||
|
||||
$typedir = $type ? ($basedir.'/'.$type) : '';
|
||||
$subdir1 = $type && $sub1 !== '' ? ($typedir.'/'.$sub1) : '';
|
||||
$subdir2 = $sub1 && $sub2 !== '' ? ($subdir1.'/'.$sub2) : '';
|
||||
|
||||
$res = $subdir2 ? is_dir($subdir2) : ($subdir1 ? is_dir($subdir1) : is_dir($typedir));
|
||||
if(!$res) {
|
||||
$res = $typedir && discuz_upload::make_dir($typedir);
|
||||
$res && $subdir1 && ($res = discuz_upload::make_dir($subdir1));
|
||||
$res && $subdir1 && $subdir2 && ($res = discuz_upload::make_dir($subdir2));
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
function save_to_local($source, $target) {
|
||||
if(!discuz_upload::is_upload_file($source)) {
|
||||
$succeed = false;
|
||||
}elseif(@copy($source, $target)) {
|
||||
$succeed = true;
|
||||
}elseif(function_exists('move_uploaded_file') && @move_uploaded_file($source, $target)) {
|
||||
$succeed = true;
|
||||
}elseif (@is_readable($source) && (@$fp_s = fopen($source, 'rb')) && (@$fp_t = fopen($target, 'wb'))) {
|
||||
while (!feof($fp_s)) {
|
||||
$s = @fread($fp_s, 1024 * 512);
|
||||
@fwrite($fp_t, $s);
|
||||
}
|
||||
fclose($fp_s); fclose($fp_t);
|
||||
$succeed = true;
|
||||
}
|
||||
if($succeed) {
|
||||
$this->errorcode = 0;
|
||||
@chmod($target, 0644); @unlink($source);
|
||||
} else {
|
||||
$this->errorcode = 0;
|
||||
}
|
||||
|
||||
return $succeed;
|
||||
}
|
||||
|
||||
public static function make_dir($dir, $index = true) {
|
||||
$res = true;
|
||||
if(!is_dir($dir)) {
|
||||
$res = @mkdir($dir, 0777);
|
||||
$index && @touch($dir.'/index.html');
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>ͼƬ<CDBC>Ƿ<EFBFBD><C7B7><EFBFBD>ľ<EFBFBD><C4BE>
|
||||
function checkHex($image) {
|
||||
$resource = fopen($image, 'rb');
|
||||
$fileSize = filesize($image);
|
||||
fseek($resource, 0);
|
||||
if ($fileSize > 512) {
|
||||
$hexCode = bin2hex(fread($resource, 512));
|
||||
fseek($resource, $fileSize - 512);
|
||||
$hexCode .= bin2hex(fread($resource, 512));
|
||||
} else {
|
||||
$hexCode = bin2hex(fread($resource, $fileSize));
|
||||
}
|
||||
fclose($resource);
|
||||
if (preg_match("/(3c25.*?28.*?29.*?253e)|(3c3f.*?28.*?29.*?3f3e)|(3C534352495054)|(2F5343524950543E)|(3C736372697074)|(2F7363726970743E)/is", $hexCode)){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//<2F><>ͼƬ<CDBC><C6AC><EFBFBD><EFBFBD><EFBFBD>ػ<EFBFBD><D8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹͼƬľ<C6AC><C4BE>
|
||||
function redrawImage($source) {
|
||||
$image = new image();
|
||||
$return = $image->init('thumb', $source, '', 1);
|
||||
if($return <= 0) {
|
||||
return false;
|
||||
}
|
||||
$image->param['thumbwidth'] = $image->imginfo['width'];
|
||||
$image->param['thumbheight'] = $image->imginfo['height'];
|
||||
$image->param['thumbtype'] = 1;
|
||||
if(!$image->libmethod){
|
||||
$image->Thumb_GD();
|
||||
}else{
|
||||
$image->Thumb_IM();
|
||||
}
|
||||
}
|
||||
|
||||
//<2F><>ͼƬ<CDBC><C6AC><EFBFBD>н<EFBFBD><D0BD><EFBFBD><EFBFBD><EFBFBD>ת
|
||||
function rotateImage($source) {
|
||||
if(function_exists("exif_read_data")){
|
||||
$exifInfo = exif_read_data($source, 'EXIF', 0);//<2F><>ȡͼƬ<CDBC><C6AC>exif<69><66>Ϣ
|
||||
if ($exifInfo && $exifInfo['Orientation']){
|
||||
$image = new image();
|
||||
$return = $image->init('thumb', $source, '', 1);
|
||||
if($return <= 0) {
|
||||
return false;
|
||||
}
|
||||
if(!$image->libmethod){
|
||||
$imagefunc = $image->imagefunc;
|
||||
$attach_photo = $image->loadsource();
|
||||
if($attach_photo < 0) {
|
||||
return false;
|
||||
}
|
||||
switch ($exifInfo['Orientation']) {
|
||||
case 8:
|
||||
$attach_photo = imagerotate($attach_photo, 90, 0);
|
||||
break;
|
||||
case 3:
|
||||
$attach_photo = imagerotate($attach_photo, 180, 0);
|
||||
break;
|
||||
case 6:
|
||||
$attach_photo = imagerotate($attach_photo, -90, 0);
|
||||
break;
|
||||
}
|
||||
if($image->imginfo['mime'] == 'image/jpeg') {
|
||||
@$imagefunc($attach_photo, $source, $image->param['thumbquality']);
|
||||
} else {
|
||||
@$imagefunc($attach_photo, $source);
|
||||
}
|
||||
}else{
|
||||
$im = new Imagick();
|
||||
$im->readImage(realpath($source));
|
||||
switch ($exifInfo['Orientation']) {
|
||||
case 8:
|
||||
$im->rotateimage('#fff', 90);
|
||||
break;
|
||||
case 3:
|
||||
$im->rotateimage('#fff', 180);
|
||||
break;
|
||||
case 6:
|
||||
$im->rotateimage('#fff', -90);
|
||||
break;
|
||||
}
|
||||
$im->setImageCompressionQuality($image->param['thumbquality']);
|
||||
if(!$im->writeImage($source)) {
|
||||
$im->destroy();
|
||||
return false;
|
||||
}
|
||||
$im->destroy();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
664
source/plugin/replyfloor/class/class_wechat.php
Normal file
@@ -0,0 +1,664 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* [Discuz!] (C)2001-2099 Discuz Team.
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
*
|
||||
* $Id: wechat.class.php 36284 2016-12-12 00:47:50Z nemohou $
|
||||
*/
|
||||
if (!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
class replyfloor_wechat {
|
||||
|
||||
public static $_URL_API_ROOT = 'https://api.weixin.qq.com';
|
||||
public static $_URL_FILE_API_ROOT = 'https://api.weixin.qq.com';
|
||||
public static $_URL_QR_ROOT = 'https://mp.weixin.qq.com';
|
||||
public static $_QRCODE_TICKET_DEFAULT_ID = 1;
|
||||
public static $ERRCODE_MAP = array(
|
||||
'-1' => '系统繁忙',
|
||||
'0' => '请求成功',
|
||||
'40001' => '获取access_token时AppSecret错误,或者access_token无效',
|
||||
'40002' => '不合法的凭证类型',
|
||||
'40003' => '不合法的OpenID',
|
||||
'40004' => '不合法的媒体文件类型',
|
||||
'40005' => '不合法的文件类型',
|
||||
'40006' => '不合法的文件大小',
|
||||
'40007' => '不合法的媒体文件id',
|
||||
'40008' => '不合法的消息类型',
|
||||
'40009' => '不合法的图片文件大小',
|
||||
'40010' => '不合法的语音文件大小',
|
||||
'40011' => '不合法的视频文件大小',
|
||||
'40012' => '不合法的缩略图文件大小',
|
||||
'40013' => '不合法的APPID',
|
||||
'40014' => '不合法的access_token',
|
||||
'40015' => '不合法的菜单类型',
|
||||
'40016' => '不合法的按钮个数',
|
||||
'40017' => '不合法的按钮个数',
|
||||
'40018' => '不合法的按钮名字长度',
|
||||
'40019' => '不合法的按钮KEY长度',
|
||||
'40020' => '不合法的按钮URL长度',
|
||||
'40021' => '不合法的菜单版本号',
|
||||
'40022' => '不合法的子菜单级数',
|
||||
'40023' => '不合法的子菜单按钮个数',
|
||||
'40024' => '不合法的子菜单按钮类型',
|
||||
'40025' => '不合法的子菜单按钮名字长度',
|
||||
'40026' => '不合法的子菜单按钮KEY长度',
|
||||
'40027' => '不合法的子菜单按钮URL长度',
|
||||
'40028' => '不合法的自定义菜单使用用户',
|
||||
'40029' => '不合法的oauth_code',
|
||||
'40030' => '不合法的refresh_token',
|
||||
'40031' => '不合法的openid列表',
|
||||
'40032' => '不合法的openid列表长度',
|
||||
'40033' => '不合法的请求字符,不能包含\uxxxx格式的字符',
|
||||
'40035' => '不合法的参数',
|
||||
'40038' => '不合法的请求格式',
|
||||
'40039' => '不合法的URL长度',
|
||||
'40050' => '不合法的分组id',
|
||||
'40051' => '分组名字不合法',
|
||||
'41001' => '缺少access_token参数',
|
||||
'41002' => '缺少appid参数',
|
||||
'41003' => '缺少refresh_token参数',
|
||||
'41004' => '缺少secret参数',
|
||||
'41005' => '缺少多媒体文件数据',
|
||||
'41006' => '缺少media_id参数',
|
||||
'41007' => '缺少子菜单数据',
|
||||
'41008' => '缺少oauth code',
|
||||
'41009' => '缺少openid',
|
||||
'42001' => 'access_token超时',
|
||||
'42002' => 'refresh_token超时',
|
||||
'42003' => 'oauth_code超时',
|
||||
'43001' => '需要GET请求',
|
||||
'43002' => '需要POST请求',
|
||||
'43003' => '需要HTTPS请求',
|
||||
'43004' => '需要接收者关注',
|
||||
'43005' => '需要好友关系',
|
||||
'44001' => '多媒体文件为空',
|
||||
'44002' => 'POST的数据包为空',
|
||||
'44003' => '图文消息内容为空',
|
||||
'44004' => '文本消息内容为空',
|
||||
'45001' => '多媒体文件大小超过限制',
|
||||
'45002' => '消息内容超过限制',
|
||||
'45003' => '标题字段超过限制',
|
||||
'45004' => '描述字段超过限制',
|
||||
'45005' => '链接字段超过限制',
|
||||
'45006' => '图片链接字段超过限制',
|
||||
'45007' => '语音播放时间超过限制',
|
||||
'45008' => '图文消息超过限制',
|
||||
'45009' => '接口调用超过限制',
|
||||
'45010' => '创建菜单个数超过限制',
|
||||
'45015' => '回复时间超过限制',
|
||||
'45016' => '系统分组,不允许修改',
|
||||
'45017' => '分组名字过长',
|
||||
'45018' => '分组数量超过上限',
|
||||
'46001' => '不存在媒体数据',
|
||||
'46002' => '不存在的菜单版本',
|
||||
'46003' => '不存在的菜单数据',
|
||||
'46004' => '不存在的用户',
|
||||
'47001' => '解析JSON/XML内容错误',
|
||||
'48001' => 'api功能未授权',
|
||||
'50001' => '用户未授权该api',
|
||||
);
|
||||
public static $_USERINFO_LANG = 'en';
|
||||
private $_appid;
|
||||
private $_appsecret;
|
||||
private static $_nocache = array();
|
||||
private static $_accessTokenCache = array();
|
||||
private static $_JsApiTicketCache = array();
|
||||
private static $ERROR_LOGS = array();
|
||||
private static $ERROR_NO = 0;
|
||||
|
||||
public function __construct($appid, $appsecret = '') {
|
||||
if ($appsecret) {
|
||||
$this->_appid = $appid;
|
||||
$this->_appsecret = $appsecret;
|
||||
} else {
|
||||
//$info = WeChatHook::getAppInfo($appid);
|
||||
//$this->_appid = $info['appId'];
|
||||
//$this->_appsecret = $info['appSecret'];
|
||||
}
|
||||
}
|
||||
|
||||
public static function error() {
|
||||
return self::$ERRCODE_MAP[self::$ERROR_NO] ? self::$ERRCODE_MAP[self::$ERROR_NO] : self::$ERROR_NO;
|
||||
}
|
||||
|
||||
public static function checkIsSuc($res) {
|
||||
$result = true;
|
||||
if (is_string($res)) {
|
||||
$res = json_decode($res, true);
|
||||
}
|
||||
if (isset($res['errcode']) && ( 0 !== (int) $res['errcode'])) {
|
||||
array_push(self::$ERROR_LOGS, $res);
|
||||
$result = false;
|
||||
self::$ERROR_NO = $res['errcode'];
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function get($url) {
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
# curl_setopt($ch, CURLOPT_HEADER, 1);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||||
|
||||
if (!curl_exec($ch)) {
|
||||
error_log(curl_error($ch));
|
||||
$data = '';
|
||||
} else {
|
||||
$data = curl_multi_getcontent($ch);
|
||||
}
|
||||
curl_close($ch);
|
||||
return $data;
|
||||
}
|
||||
|
||||
private static function post($url, $data) {
|
||||
if (!function_exists('curl_init')) {
|
||||
return '';
|
||||
}
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
# curl_setopt( $ch, CURLOPT_HEADER, 1);
|
||||
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||||
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
||||
$data = curl_exec($ch);
|
||||
if (!$data) {
|
||||
error_log(curl_error($ch));
|
||||
}
|
||||
curl_close($ch);
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function setNoCache($cacheInfo) {
|
||||
if ($cacheInfo) {
|
||||
$appid = $this->_appid;
|
||||
self::$_nocache[$appid] = is_array($cacheInfo) ? $cacheInfo : array($cacheInfo);
|
||||
}
|
||||
}
|
||||
|
||||
public function getAccessToken($tokenOnly = 1, $nocache = 0) {
|
||||
global $_G;
|
||||
$myTokenInfo = null;
|
||||
$appid = $this->_appid;
|
||||
$appsecret = $this->_appsecret;
|
||||
$cachename = 'wechatat_' . $appid;
|
||||
loadcache($cachename);
|
||||
|
||||
if ($nocache || empty(self::$_accessTokenCache[$appid])) {
|
||||
if (empty(self::$_nocache[$appid]) || !in_array("AccessToken", self::$_nocache[$appid])) {
|
||||
self::$_accessTokenCache[$appid] = $_G['cache'][$cachename];
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty(self::$_accessTokenCache[$appid])) {
|
||||
$myTokenInfo = self::$_accessTokenCache[$appid];
|
||||
if (time() < $myTokenInfo['expiration']) {
|
||||
return $tokenOnly ? $myTokenInfo['token'] : $myTokenInfo;
|
||||
}
|
||||
}
|
||||
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/token?grant_type=client_credential&appid=$appid&secret=$appsecret";
|
||||
|
||||
$json = self::get($url);
|
||||
$res = json_decode($json, true);
|
||||
|
||||
if (self::checkIsSuc($res)) {
|
||||
self::$_accessTokenCache[$appid] = $myTokenInfo = array(
|
||||
'token' => $res['access_token'],
|
||||
'expiration' => time() + (int) $res['expires_in']
|
||||
);
|
||||
savecache($cachename, $myTokenInfo);
|
||||
}
|
||||
return $tokenOnly ? $myTokenInfo['token'] : $myTokenInfo;
|
||||
}
|
||||
|
||||
public function setAccessToken($tokenInfo) {
|
||||
if ($tokenInfo) {
|
||||
$appid = $this->_appid;
|
||||
self::$_accessTokenCache[$appid] = array(
|
||||
'token' => $tokenInfo['token'],
|
||||
'expire' => $tokenInfo['expire']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function getJsApiTicket($ticketOnly = 1, $nocache = 0) {
|
||||
global $_G;
|
||||
$myTicketInfo = null;
|
||||
$appid = $this->_appid;
|
||||
$appsecret = $this->_appsecret;
|
||||
$accessToken = $this->getAccessToken();
|
||||
$cachename = 'wechatjs_' . $appid;
|
||||
loadcache($cachename);
|
||||
|
||||
if ($nocache || empty(self::$_JsApiTicketCache[$appid])) {
|
||||
if (empty(self::$_nocache[$appid]) || !in_array("JsApiTicket", self::$_nocache[$appid])) {
|
||||
self::$_JsApiTicketCache[$appid] = $_G['cache'][$cachename];
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty(self::$_JsApiTicketCache[$appid])) {
|
||||
$myTicketInfo = self::$_JsApiTicketCache[$appid];
|
||||
if (time() < $myTicketInfo['expiration']) {
|
||||
return $tokenOnly ? $myTicketInfo['ticket'] : $myTicketInfo;
|
||||
}
|
||||
}
|
||||
|
||||
// get new ticket
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/ticket/getticket?type=jsapi&access_token=$accessToken";
|
||||
|
||||
$json = self::get($url);
|
||||
$res = json_decode($json, true);
|
||||
|
||||
if (self::checkIsSuc($res)) {
|
||||
// update cache
|
||||
$myTicketInfo = array(
|
||||
'ticket' => $res['ticket'],
|
||||
'expiration' => time() + (int) $res['expires_in']
|
||||
);
|
||||
savecache($cachename, $myTicketInfo);
|
||||
}
|
||||
return $ticketOnly ? $myTicketInfo['ticket'] : $myTicketInfo;
|
||||
}
|
||||
|
||||
public function upload($type, $file_path, $mediaidOnly = 1) {
|
||||
$access_token = $this->getAccessToken();
|
||||
$url = self::$_URL_FILE_API_ROOT . "/cgi-bin/media/upload?access_token=$access_token&type=$type";
|
||||
|
||||
$res = self::post($url, array('media' => "@$file_path"));
|
||||
$res = json_decode($res, true);
|
||||
|
||||
if (self::checkIsSuc($res)) {
|
||||
return $mediaidOnly ? $res['media_id'] : $res;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function download($mid) {
|
||||
$access_token = $this->getAccessToken();
|
||||
$url = self::$_URL_FILE_API_ROOT . "/cgi-bin/media/get?access_token=$access_token&media_id=$mid";
|
||||
|
||||
return self::get($url);
|
||||
}
|
||||
|
||||
public function getMenu() {
|
||||
|
||||
$access_token = $this->getAccessToken();
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/menu/get?access_token=$access_token";
|
||||
|
||||
$json = self::get($url);
|
||||
|
||||
$res = json_decode($json, true);
|
||||
if (self::checkIsSuc($res)) {
|
||||
return $res;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function deleteMenu() {
|
||||
$access_token = $this->getAccessToken();
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/menu/delete?access_token=$access_token";
|
||||
|
||||
$res = self::get($url);
|
||||
return self::checkIsSuc($res);
|
||||
}
|
||||
|
||||
public function setMenu($myMenu) {
|
||||
$access_token = $this->getAccessToken();
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/menu/create?access_token=$access_token";
|
||||
|
||||
if (defined('JSON_UNESCAPED_UNICODE')) {
|
||||
$json = is_string($myMenu) ? $myMenu : json_encode($myMenu, JSON_UNESCAPED_UNICODE);
|
||||
} else {
|
||||
$json = is_string($myMenu) ? $myMenu : json_encode($myMenu);
|
||||
}
|
||||
|
||||
$json = urldecode($json);
|
||||
$res = self::post($url, $json);
|
||||
|
||||
return self::checkIsSuc($res);
|
||||
}
|
||||
|
||||
private function _send($to, $type, $data) {
|
||||
$access_token = $this->getAccessToken();
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/message/custom/send?access_token=$access_token";
|
||||
|
||||
$json = json_encode(
|
||||
array(
|
||||
'touser' => $to,
|
||||
'msgtype' => $type,
|
||||
$type => $data
|
||||
)
|
||||
);
|
||||
|
||||
$res = self::post($url, $json);
|
||||
|
||||
return self::checkIsSuc($res);
|
||||
}
|
||||
|
||||
public function sendTextMsg($to, $msg) {
|
||||
return $this->_send($to, 'text', array('content' => $msg));
|
||||
}
|
||||
|
||||
public function sendImgMsg($to, $mid) {
|
||||
return $this->_send($to, 'image', array('media_id' => $mid));
|
||||
}
|
||||
|
||||
public function sendVoice($to, $mid) {
|
||||
return $this->_send($to, 'voice', array('media_id' => $mid));
|
||||
}
|
||||
|
||||
public function sendVideo($to, $mid, $title, $desc) {
|
||||
return $this->_send($to, 'video', array(
|
||||
'media_id' => $mid,
|
||||
'title' => $title,
|
||||
'description' => $desc
|
||||
));
|
||||
}
|
||||
|
||||
public function sendMusic($to, $url, $thumb_mid, $title, $desc = '', $hq_url = '') {
|
||||
return $this->_send($to, 'music', array(
|
||||
'media_id' => $mid,
|
||||
'title' => $title,
|
||||
'description' => $desc || $title,
|
||||
'musicurl' => $url,
|
||||
'thumb_media_id' => $thumb_mid,
|
||||
'hqmusicurl' => $hq_url || $url
|
||||
));
|
||||
}
|
||||
|
||||
static private function _filterForRichMsg($articles) {
|
||||
$i = 0;
|
||||
$ii = len($articles);
|
||||
$list = array('title', 'desc', 'url', 'thumb_url');
|
||||
$result = array();
|
||||
while ($i < $ii) {
|
||||
$currentArticle = $articles[$i++];
|
||||
try {
|
||||
array_push($result, array(
|
||||
'title' => $currentArticle['title'],
|
||||
'description' => $currentArticle['desc'],
|
||||
'url' => $currentArticle['url'],
|
||||
'picurl' => $currentArticle['thumb_url']
|
||||
));
|
||||
} catch (Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function uploadNews($articles) {
|
||||
$i = 0;
|
||||
$ii = count($articles);
|
||||
$result = array();
|
||||
while ($i < $ii) {
|
||||
$currentArticle = $articles[$i++];
|
||||
try {
|
||||
array_push($result, array(
|
||||
'thumb_media_id' => $currentArticle['thumb_media_id'],
|
||||
'title' => $this->convertToUtf($currentArticle['title']),
|
||||
'content' => $this->convertToUtf($currentArticle['content']),
|
||||
'author' => $this->convertToUtf($currentArticle['author']),
|
||||
'content_source_url' => $this->convertToUtf($currentArticle['url']),
|
||||
'digest' => $this->convertToUtf($currentArticle['desc']),
|
||||
'show_cover_pic' => 1
|
||||
));
|
||||
} catch (Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$access_token = $this->getAccessToken();
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/media/uploadnews?access_token=$access_token";
|
||||
if (defined('JSON_UNESCAPED_UNICODE')) {
|
||||
$json = json_encode(array('articles' => $result), JSON_UNESCAPED_UNICODE);
|
||||
} else {
|
||||
$json = json_encode(array('articles' => $result));
|
||||
}
|
||||
|
||||
$json = urldecode($json);
|
||||
|
||||
$res = self::post($url, $json);
|
||||
if (self::checkIsSuc($res)) {
|
||||
return json_decode($res, true);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function sendMassMsg($msg) {
|
||||
$access_token = $this->getAccessToken();
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/message/mass/sendall?access_token=$access_token";
|
||||
$post = array();
|
||||
$post['filter'] = array('group_id' => $msg['group_id']);
|
||||
if ($msg['type'] == 'media') {
|
||||
$post['mpnews'] = array('media_id' => $msg['media_id']);
|
||||
$post['msgtype'] = 'mpnews';
|
||||
} else {
|
||||
$post['text'] = array('content' => $this->convertToUtf($msg['text']));
|
||||
$post['msgtype'] = 'text';
|
||||
}
|
||||
|
||||
if (defined('JSON_UNESCAPED_UNICODE')) {
|
||||
$json = json_encode($post, JSON_UNESCAPED_UNICODE);
|
||||
} else {
|
||||
$json = json_encode($post);
|
||||
}
|
||||
|
||||
$json = urldecode($json);
|
||||
|
||||
$res = self::post($url, $json);
|
||||
if (self::checkIsSuc($res)) {
|
||||
return json_decode($res, true);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function convertToUtf($str) {
|
||||
return urlencode(diconv($str, CHARSET, 'UTF-8'));
|
||||
}
|
||||
|
||||
public function sendRichMsg($to, $articles) {
|
||||
|
||||
return $this->_send($to, 'news', array(
|
||||
'articles' => self::_filterForRichMsg($articles)
|
||||
));
|
||||
}
|
||||
|
||||
public function createGroup($name) {
|
||||
$access_token = $this->getAccessToken();
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/groups/create?access_token=$access_token";
|
||||
|
||||
$res = self::post($url, json_encode(array(
|
||||
'group' => array('name' => $name)
|
||||
)));
|
||||
|
||||
$res = json_decode($res, true);
|
||||
return self::checkIsSuc($res) ? $res['group']['id'] : null;
|
||||
}
|
||||
|
||||
public function renameGroup($gid, $name) {
|
||||
$access_token = $this->getAccessToken();
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/groups/update?access_token=$access_token";
|
||||
|
||||
$res = self::post($url, json_encode(array(
|
||||
'group' => array(
|
||||
'id' => $gid,
|
||||
'name' => $name
|
||||
)
|
||||
)));
|
||||
|
||||
$res = json_decode($res, true);
|
||||
return self::checkIsSuc($res);
|
||||
}
|
||||
|
||||
public function moveUserById($uid, $gid) {
|
||||
$access_token = $this->getAccessToken();
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/groups/members/update?access_token=$access_token";
|
||||
|
||||
$res = self::post(
|
||||
$url, json_encode(
|
||||
array(
|
||||
'openid' => $mid,
|
||||
'to_groupid' => $gid
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$res = json_decode($res, true);
|
||||
return self::checkIsSuc($res);
|
||||
}
|
||||
|
||||
public function getAllGroups() {
|
||||
$access_token = $this->getAccessToken();
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/groups/get?access_token=$access_token";
|
||||
|
||||
$res = json_decode(self::get($url), true);
|
||||
|
||||
if (self::checkIsSuc($res)) {
|
||||
return $res['groups'];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public function getGroupidByUserid($uid) {
|
||||
$access_token = $this->getAccessToken();
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/groups/getid?access_token=$access_token";
|
||||
|
||||
$res = self::post($url, json_encode(array(
|
||||
'openid' => $mid
|
||||
)));
|
||||
|
||||
$res = json_decode($res, true);
|
||||
return self::checkIsSuc($res) ? $res['groupid'] : null;
|
||||
}
|
||||
|
||||
public function getUserInfoById($uid, $lang = '') {
|
||||
if (!$lang) {
|
||||
$lang = self::$_USERINFO_LANG;
|
||||
}
|
||||
$access_token = $this->getAccessToken();
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/user/info?access_token=$access_token&openid=$uid&lang=$lang";
|
||||
|
||||
$res = json_decode(self::get($url), true);
|
||||
|
||||
return self::checkIsSuc($res) ? $res : null;
|
||||
}
|
||||
|
||||
public function getFollowersList($next_id = '') {
|
||||
$access_token = $this->getAccessToken();
|
||||
$extend = '';
|
||||
if ($next_id) {
|
||||
$extend = "&next_openid=$next_id";
|
||||
}
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/user/get?access_token=${access_token}$extend";
|
||||
|
||||
$res = json_decode(
|
||||
self::get($url), true
|
||||
);
|
||||
|
||||
return self::checkIsSuc($res) ? array(
|
||||
'total' => $res['total'],
|
||||
'list' => $res['data']['openid'],
|
||||
'next_id' => isset($res['next_openid']) ? $res['next_openid'] : null
|
||||
) : null;
|
||||
}
|
||||
|
||||
public function getOAuthConnectUri($redirect_uri, $state = '', $scope = 'snsapi_base') {
|
||||
$redirect_uri = urlencode($redirect_uri);
|
||||
$url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={$this->_appid}&redirect_uri={$redirect_uri}&response_type=code&scope={$scope}&state={$state}#wechat_redirect";
|
||||
return $url;
|
||||
}
|
||||
|
||||
public function getAccessTokenByCode($code) {
|
||||
$url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid={$this->_appid}&secret={$this->_appsecret}&code=$code&grant_type=authorization_code";
|
||||
$res = json_decode(self::get($url), true);
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function refreshAccessTocken($refresh_token) {
|
||||
$url = "https://api.weixin.qq.com/sns/oauth2/refresh_token?appid={$this->_appid}&grant_type=refresh_token&refresh_token=$refresh_token";
|
||||
$res = json_decode(self::get($url), true);
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function getUserInfoByAuth($access_token, $openid, $lang = 'zh_CN') {
|
||||
$url = "https://api.weixin.qq.com/sns/userinfo?access_token=$access_token&openid=$openid&lang=$lang";
|
||||
$res = json_decode(self::get($url), true);
|
||||
return $res;
|
||||
}
|
||||
|
||||
public static function getQrcodeImgByTicket($ticket) {
|
||||
return self::get($this->getQrcodeImgUrlByTicket($ticket));
|
||||
}
|
||||
|
||||
public static function getQrcodeImgUrlByTicket($ticket) {
|
||||
$ticket = urlencode($ticket);
|
||||
return self::$_URL_QR_ROOT . "/cgi-bin/showqrcode?ticket=$ticket";
|
||||
}
|
||||
|
||||
public function getQrcodeTicket($options = array()) {
|
||||
$access_token = $this->getAccessToken();
|
||||
|
||||
$scene_id = isset($options['scene_id']) ? (int) $options['scene_id'] : 0;
|
||||
$expire = isset($options['expire']) ? (int) $options['expire'] : 0;
|
||||
$ticketOnly = isset($options['ticketOnly']) ? $options['ticketOnly'] : 1;
|
||||
|
||||
$url = self::$_URL_API_ROOT . "/cgi-bin/qrcode/create?access_token=$access_token";
|
||||
$data = array(
|
||||
'action_name' => 'QR_LIMIT_SCENE',
|
||||
'action_info' => array(
|
||||
'scene' => array(
|
||||
'scene_id' => $scene_id
|
||||
)
|
||||
)
|
||||
);
|
||||
if ($expire) {
|
||||
$data['expire_seconds'] = $expire;
|
||||
$data['action_name'] = 'QR_SCENE';
|
||||
}
|
||||
|
||||
if ($data['action_name'] == 'QR_LIMIT_SCENE' && $scene_id > 100000) {
|
||||
$data['action_info']['scene']['scene_id'] = self::$_QRCODE_TICKET_DEFAULT_ID;
|
||||
}
|
||||
|
||||
$data = json_encode($data);
|
||||
|
||||
$res = self::post($url, $data);
|
||||
$res = json_decode($res, true);
|
||||
|
||||
if (self::checkIsSuc($res)) {
|
||||
return $ticketOnly ? $res['ticket'] : array(
|
||||
'ticket' => $res['ticket'],
|
||||
'expire' => $res['expire_seconds']
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
162
source/plugin/replyfloor/function/function_common.php
Normal file
@@ -0,0 +1,162 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
if(!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
function replyfloor_discuzcode($message = '') {
|
||||
global $_G;
|
||||
require_once libfile('function/discuzcode');
|
||||
$message = dhtmlspecialchars($message);
|
||||
$msglower = strtolower($message);
|
||||
//$message = preg_replace("/(?<=[^\]a-z0-9-=\"'\\/])?((https?|ftp|gopher|news|telnet|mms|rtsp):\/\/)([a-z0-9\/\-_+=.~!%@?#%&;:$\\()|]+)/i", "<a href=\"\\1\\3\" target=\"_blank\">\\1\\3</a>", $message);
|
||||
$message = preg_replace_callback("/(?<=[^\]a-z0-9-=\"'\\/])?((https?|ftp|gopher|news|telnet|mms|rtsp):\/\/)([a-z0-9\/\-_+=.~!%@?#%&;:$\\()|]+)/i", 'replyfloor_parseurl', $message);
|
||||
if(strpos($msglower, '[/color]')){
|
||||
$message = str_replace(array('[/color]'), array('</font>'), preg_replace("/\[color=([#\w]+?)\]/i", "<font color=\"\\1\">", $message));
|
||||
}
|
||||
if(strpos($msglower, '[/b]')){
|
||||
$message = str_replace(array('[b]', '[/b]'), array('<b>', '</b>'), $message);
|
||||
}
|
||||
//if(strpos($msglower, '[/img]') !== FALSE) {
|
||||
//$message = preg_replace_callback("/\[img\]\s*([^\[\<\r\n]+?)\s*\[\/img\]/is", 'replyfloor_parseimg_1', $message);
|
||||
//$message = preg_replace_callback("/\[img=(\d{1,4})[x|\,](\d{1,4})\]\s*([^\[\<\r\n]+?)\s*\[\/img\]/is", 'replyfloor_parseimg_123', $message);
|
||||
//}
|
||||
$message = parsesmiles($message);
|
||||
$message = preg_replace_callback("/\<img.*?src=[\'|\"]?(.*?)[\'|\"]?\s.*?>/i", 'replyfloor_imageurl', $message);
|
||||
return str_replace(array("\t", ' ', ' '), array(' ', ' ', ' '), $message);
|
||||
}
|
||||
|
||||
function replyfloor_parseurl($matches) {
|
||||
global $_G;
|
||||
$url = $matches[0];
|
||||
$hash = authcode("$url\t$_G[timestamp]", 'ENCODE', md5(substr(md5($_G['config']['security']['authkey']), 0, 16)));
|
||||
$hash = urlencode($hash);
|
||||
$jumpurl = "plugin.php?id=replyfloor:jump&hash=".$hash;
|
||||
return "<a href=\"".$jumpurl."\" target=\"_blank\">".$url."</a>";
|
||||
}
|
||||
|
||||
function replyfloor_parseimg_1($matches) {
|
||||
return replyfloor_parseimg(0, 0, $matches[1]);
|
||||
}
|
||||
|
||||
function replyfloor_parseimg_123($matches) {
|
||||
return replyfloor_parseimg($matches[1], $matches[2], $matches[3]);
|
||||
}
|
||||
|
||||
function replyfloor_parseimg($width, $height, $src) {
|
||||
global $_G;
|
||||
if(strstr($src, 'file:') || substr($src, 1, 1) == ':') {
|
||||
return $src;
|
||||
}
|
||||
$src = !in_array(strtolower(substr($src, 0, 6)), array('http:/', 'https:', 'ftp://')) ? $_G['siteurl'].$src : $src;
|
||||
$rimg_id = random(5);
|
||||
if(defined('IN_MOBILE')) {
|
||||
return '<a href="'.$src.'"><img src="'.$src.'" border="0" alt="" /></a>';
|
||||
} else {
|
||||
return '<img id="aimg_'.$rimg_id.'" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="'.$src.'" border="0" alt="" />';
|
||||
}
|
||||
}
|
||||
|
||||
function replyfloor_imageurl($matches) {
|
||||
global $_G;
|
||||
$url = !in_array(strtolower(substr($matches[1], 0, 6)), array('http:/', 'https:', 'ftp://')) ? $_G['siteurl'] : '';
|
||||
return str_replace($matches[1], $url.$matches[1], $matches[0]);
|
||||
}
|
||||
|
||||
function replyfloor_location($ip = '') {
|
||||
require_once libfile('function/misc');
|
||||
$location = trim(ltrim(convertip($ip), '-'));
|
||||
if(in_array($location, array('Invalid', 'LAN', 'Reserved', 'Unknown', 'System Error'))){
|
||||
$location = lang('plugin/replyfloor', 'replyfloor_location_unknow');
|
||||
}else{
|
||||
$locarray = explode(' ', $location);
|
||||
if(count($locarray) > 1){
|
||||
$location = $locarray[0];
|
||||
}
|
||||
}
|
||||
return $location;
|
||||
}
|
||||
|
||||
function replyfloor_deletemessage($ids, $idtype = 'id', $recycle = 0) {
|
||||
global $_G;
|
||||
if($idtype == 'id'){
|
||||
C::t('#replyfloor#replyfloor_message')->delete_by_id($ids, $recycle);
|
||||
if(!$recycle){
|
||||
$attachlist = C::t('#replyfloor#replyfloor_attachment')->fetch_all_by_msgid($ids);
|
||||
foreach($attachlist as $attach){
|
||||
if($attach['remote']) {
|
||||
ftpcmd('delete', 'replyfloor/'.$attach['attachment']);
|
||||
} else {
|
||||
@unlink($_G['setting']['attachdir'].'/replyfloor/'.$attach['attachment']);
|
||||
}
|
||||
}
|
||||
C::t('#replyfloor#replyfloor_attachment')->delete_by_msgid($ids);
|
||||
}
|
||||
}elseif($idtype == 'tid'){
|
||||
C::t('#replyfloor#replyfloor_message')->delete_by_tid($ids, $recycle);
|
||||
if(!$recycle){
|
||||
$attachlist = C::t('#replyfloor#replyfloor_attachment')->fetch_all_by_tid($ids);
|
||||
foreach($attachlist as $attach){
|
||||
if($attach['remote']) {
|
||||
ftpcmd('delete', 'replyfloor/'.$attach['attachment']);
|
||||
} else {
|
||||
@unlink($_G['setting']['attachdir'].'/replyfloor/'.$attach['attachment']);
|
||||
}
|
||||
}
|
||||
C::t('#replyfloor#replyfloor_attachment')->delete_by_tid($ids);
|
||||
}
|
||||
}elseif($idtype == 'pid'){
|
||||
C::t('#replyfloor#replyfloor_message')->delete_by_pid($ids, $recycle);
|
||||
if(!$recycle){
|
||||
$attachlist = C::t('#replyfloor#replyfloor_attachment')->fetch_all_by_pid($ids);
|
||||
foreach($attachlist as $attach){
|
||||
if($attach['remote']) {
|
||||
ftpcmd('delete', 'replyfloor/'.$attach['attachment']);
|
||||
} else {
|
||||
@unlink($_G['setting']['attachdir'].'/replyfloor/'.$attach['attachment']);
|
||||
}
|
||||
}
|
||||
C::t('#replyfloor#replyfloor_attachment')->delete_by_pid($ids);
|
||||
}
|
||||
}elseif($idtype == 'authorid'){
|
||||
C::t('#replyfloor#replyfloor_message')->delete_by_authorid($ids, $recycle);
|
||||
if(!$recycle){
|
||||
$attachlist = C::t('#replyfloor#replyfloor_attachment')->fetch_all_by_authorid($ids);
|
||||
foreach($attachlist as $attach){
|
||||
if($attach['remote']) {
|
||||
ftpcmd('delete', 'replyfloor/'.$attach['attachment']);
|
||||
} else {
|
||||
@unlink($_G['setting']['attachdir'].'/replyfloor/'.$attach['attachment']);
|
||||
}
|
||||
}
|
||||
C::t('#replyfloor#replyfloor_attachment')->delete_by_authorid($ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function replyfloor_deletereport($ids) {
|
||||
global $_G;
|
||||
$reportlist = C::t('#replyfloor#replyfloor_report')->fetch_all_by_id($ids);
|
||||
foreach($reportlist as $value){
|
||||
$value['images'] = $value['images'] ? unserialize($value['images']) : array();
|
||||
foreach ($value['images'] as $val) {
|
||||
@unlink($_G['setting']['attachdir'].'/replyfloor/'.$val['image']);
|
||||
}
|
||||
}
|
||||
C::t('#replyfloor#replyfloor_report')->delete_by_id($ids);
|
||||
}
|
||||
|
||||
?>
|
444
source/plugin/replyfloor/hook.class.php
Normal file
@@ -0,0 +1,444 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if (!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
class plugin_replyfloor {
|
||||
|
||||
public static $identifier = 'replyfloor';
|
||||
|
||||
function __construct() {
|
||||
global $_G;
|
||||
$setconfig = $_G['cache']['plugin'][self::$identifier];
|
||||
$setconfig['allow_forums'] = (array)unserialize($setconfig['allow_forums']);
|
||||
if(in_array('', $setconfig['allow_forums'])) {
|
||||
$setconfig['allow_forums'] = array();
|
||||
}
|
||||
$setconfig['allow_groups'] = $setconfig['allow_groups'] ? explode(",", $setconfig['allow_groups']) : array();
|
||||
$setconfig['open_seccheck'] = (array)unserialize($setconfig['open_seccheck']);
|
||||
$setconfig['perpage_pc'] = $setconfig['perpage_pc'] > 0 ? $setconfig['perpage_pc'] : 10;
|
||||
$this->setconfig = $setconfig;
|
||||
}
|
||||
|
||||
function deletethread($value) {
|
||||
global $_G;
|
||||
$setconfig = $this->setconfig;
|
||||
if($value['step'] == 'delete'){
|
||||
list($tids, $membercount, $credit, $ponly) = $value['param'];
|
||||
require_once libfile('function/common', 'plugin/replyfloor');
|
||||
if($setconfig['get_credit']) {
|
||||
require_once libfile('function/post');
|
||||
require_once libfile('function/forum');
|
||||
$wherearr = array();
|
||||
$wherearr[] = 'tid in ('.dimplode($tids).')';
|
||||
$wherearr[] = "status = '0'";
|
||||
$recordlist = DB::fetch_all('SELECT * FROM '.DB::table('plugin_replyfloor_message').($wherearr ? ' WHERE '.implode(' AND ', $wherearr) : ''));
|
||||
foreach ($recordlist as $value) {
|
||||
$thread = get_thread_by_tid($value['tid']);
|
||||
updatepostcredits('-', $value['uid'], 'reply', $thread['fid']);
|
||||
}
|
||||
}
|
||||
replyfloor_deletemessage($ids, 'tid', $setconfig['open_recycle']);
|
||||
}
|
||||
}
|
||||
|
||||
function deletepost($value) {
|
||||
global $_G;
|
||||
$setconfig = $this->setconfig;
|
||||
if($value['step'] == 'delete'){
|
||||
list($ids, $idtype, $credit, $posttableid, $recycle) = $value['param'];
|
||||
require_once libfile('function/common', 'plugin/replyfloor');
|
||||
if($idtype == 'pid') {
|
||||
if($setconfig['get_credit']) {
|
||||
require_once libfile('function/post');
|
||||
require_once libfile('function/forum');
|
||||
$wherearr = array();
|
||||
$wherearr[] = 'pid in ('.dimplode($ids).')';
|
||||
$wherearr[] = "status = '0'";
|
||||
$recordlist = DB::fetch_all('SELECT * FROM '.DB::table('plugin_replyfloor_message').($wherearr ? ' WHERE '.implode(' AND ', $wherearr) : ''));
|
||||
foreach ($recordlist as $value) {
|
||||
$thread = get_thread_by_tid($value['tid']);
|
||||
updatepostcredits('-', $value['uid'], 'reply', $thread['fid']);
|
||||
}
|
||||
}
|
||||
replyfloor_deletemessage($ids, 'pid', $setconfig['open_recycle']);
|
||||
} elseif($idtype == 'tid') {
|
||||
if($setconfig['get_credit']) {
|
||||
require_once libfile('function/post');
|
||||
require_once libfile('function_forum', 'function');
|
||||
$wherearr = array();
|
||||
$wherearr[] = 'tid in ('.dimplode($ids).')';
|
||||
$wherearr[] = "status = '0'";
|
||||
$recordlist = DB::fetch_all('SELECT * FROM '.DB::table('plugin_replyfloor_message').($wherearr ? ' WHERE '.implode(' AND ', $wherearr) : ''));
|
||||
foreach ($recordlist as $value) {
|
||||
$thread = get_thread_by_tid($value['tid']);
|
||||
updatepostcredits('-', $value['uid'], 'reply', $thread['fid']);
|
||||
}
|
||||
}
|
||||
replyfloor_deletemessage($ids, 'tid', $setconfig['open_recycle']);
|
||||
} elseif($idtype == 'authorid') {
|
||||
if($setconfig['get_credit']) {
|
||||
require_once libfile('function/post');
|
||||
require_once libfile('function_forum', 'function');
|
||||
$wherearr = array();
|
||||
$wherearr[] = 'uid in ('.dimplode($ids).')';
|
||||
$wherearr[] = "status = '0'";
|
||||
$recordlist = DB::fetch_all('SELECT * FROM '.DB::table('plugin_replyfloor_message').($wherearr ? ' WHERE '.implode(' AND ', $wherearr) : ''));
|
||||
foreach ($recordlist as $value) {
|
||||
$thread = get_thread_by_tid($value['tid']);
|
||||
updatepostcredits('-', $value['uid'], 'reply', $thread['fid']);
|
||||
}
|
||||
}
|
||||
replyfloor_deletemessage($ids, 'authorid', $setconfig['open_recycle']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class plugin_replyfloor_forum extends plugin_replyfloor {
|
||||
|
||||
function forumdisplay_top_output() {
|
||||
global $_G;
|
||||
$return = '';
|
||||
$setconfig = $this->setconfig;
|
||||
if($setconfig['allow_forums'] && !in_array($_G['fid'], $setconfig['allow_forums'])){
|
||||
return $return;
|
||||
}
|
||||
if($setconfig['add_replies']){
|
||||
$tids = array();
|
||||
foreach ($_G['forum_threadlist'] as $key => $value) {
|
||||
$tids[] = $value['tid'];
|
||||
}
|
||||
if(empty($tids)){
|
||||
return $return;
|
||||
}
|
||||
$wherearr = array();
|
||||
$wherearr[] = 'tid in ('.dimplode($tids).')';
|
||||
$wherearr[] = "status = '0'";
|
||||
$recordlist = DB::fetch_all('SELECT tid,count(*) as count FROM '.DB::table('plugin_replyfloor_message').($wherearr ? ' WHERE '.implode(' AND ', $wherearr) : '').' group by tid');
|
||||
$count = array();
|
||||
foreach ($recordlist as $value) {
|
||||
$count[$value['tid']] = $value['count'];
|
||||
}
|
||||
foreach ($_G['forum_threadlist'] as &$thread) {
|
||||
if($count[$thread['tid']]){
|
||||
$thread['allreplies'] += $count[$thread['tid']];
|
||||
$thread['replies'] += $count[$thread['tid']];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function viewthread_top_output() {
|
||||
global $_G,$allowpostreply;
|
||||
$setconfig = $this->setconfig;
|
||||
if(($setconfig['position_pc'] > 0) && (!$setconfig['allow_forums'] || in_array($_G['fid'], $setconfig['allow_forums']))){
|
||||
if($setconfig['add_replies']){
|
||||
$_G['forum_thread']['allreplies'] += C::t('#'.self::$identifier.'#'.self::$identifier.'_message')->count_by_search_where(array("tid = '".$_G['tid']."'", "status = '0'"));
|
||||
}
|
||||
include template(self::$identifier.':style');
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function viewthread_bottom_output() {
|
||||
global $_G,$allowpostreply, $swfconfig;
|
||||
$setconfig = $this->setconfig;
|
||||
if(($setconfig['position_pc'] > 0) && (!$setconfig['allow_forums'] || in_array($_G['fid'], $setconfig['allow_forums']))){
|
||||
include template(self::$identifier.':js');
|
||||
}
|
||||
if($setconfig['replace_pc'] == 1){
|
||||
if(!$_G['setting']['rewritestatus']){
|
||||
$_G['setting']['rewritestatus'] = array();
|
||||
}elseif(!is_array($_G['setting']['rewritestatus'])){
|
||||
$_G['setting']['rewritestatus'] = array($_G['setting']['rewritestatus']);
|
||||
}
|
||||
$_G['setting']['rewritestatus'][] = 'replyfloor_reply';
|
||||
$_G['setting']['output']['str']['search']['replyfloor'] = "showWindow('reply', this.href)";
|
||||
$_G['setting']['output']['str']['replace']['replyfloor'] = "replyfloor_reply(this.href)";
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function viewthread_postbottom_output() {
|
||||
global $_G,$postlist,$postno,$postnostick,$allowpostreply;
|
||||
$setconfig = $this->setconfig;
|
||||
$t = $pids = array();
|
||||
if($_G['inajax'] && (empty($_GET['viewpid']) || ($_GET['viewpid'] && $_GET['from']))){
|
||||
return $t;
|
||||
}
|
||||
if(($setconfig['position_pc'] == 1 || $setconfig['position_pc'] == 2) && (!$setconfig['allow_forums'] || in_array($_G['fid'], $setconfig['allow_forums']))){
|
||||
foreach($postlist as $key => $post) {
|
||||
if(!$post['first'] || $setconfig['thread_reply']){
|
||||
$pids[] = $post['pid'];
|
||||
}
|
||||
}
|
||||
if($pids){
|
||||
if(!$setconfig['order_type']){
|
||||
$setconfig['order_type'] = empty($_GET['ordertype']) && getstatus($_G['forum_thread']['status'], 4) ? 1 : intval($_GET['ordertype']);
|
||||
}
|
||||
$orderby = 'order by createtime desc';
|
||||
if($setconfig['order_type'] == 2){
|
||||
$orderby = 'order by createtime asc';
|
||||
}
|
||||
$messageinfo = C::t('#'.self::$identifier.'#'.self::$identifier.'_message')->fetch_message_by_pid($pids, $setconfig['perpage_pc'], $orderby, $setconfig);
|
||||
foreach($postlist as $key => $post) {
|
||||
if($post['first'] && !$setconfig['thread_reply']){
|
||||
$t[] = '';
|
||||
}else{
|
||||
$count = $messageinfo[$post['pid']]['count'] ? $messageinfo[$post['pid']]['count'] : 0;
|
||||
$list = $messageinfo[$post['pid']]['list'];
|
||||
$_GET['ajaxtarget'] = 'replyfloor_content_'.$post['pid'];
|
||||
$multipage = multi($count, $setconfig['perpage_pc'], 1, 'plugin.php?id=replyfloor:index&tid='.$post['tid'].'&pid='.$post['pid'].($_GET['ordertype'] ? '&ordertype='.$_GET['ordertype'] : ''));
|
||||
$_GET['ajaxtarget'] = '';
|
||||
include template(self::$identifier.':viewthread');
|
||||
if($setconfig['position_pc'] == 1){
|
||||
$post['message'] .= $return;
|
||||
$postlist[$key] = $post;
|
||||
}else{
|
||||
$t[] = $return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $t;
|
||||
}
|
||||
|
||||
function viewthread_replyfloor_output() {
|
||||
global $_G,$postlist,$postno,$postnostick,$allowpostreply;
|
||||
$setconfig = $this->setconfig;
|
||||
$t = $pids = array();
|
||||
if($_G['inajax'] && (empty($_GET['viewpid']) || ($_GET['viewpid'] && $_GET['from']))){
|
||||
return $t;
|
||||
}
|
||||
if(($setconfig['position_pc'] == 3) && (!$setconfig['allow_forums'] || in_array($_G['fid'], $setconfig['allow_forums']))){
|
||||
foreach($postlist as $key => $post) {
|
||||
if(!$post['first'] || $setconfig['thread_reply']){
|
||||
$pids[] = $post['pid'];
|
||||
}
|
||||
}
|
||||
if($pids){
|
||||
if(!$setconfig['order_type']){
|
||||
$setconfig['order_type'] = empty($_GET['ordertype']) && getstatus($_G['forum_thread']['status'], 4) ? 1 : intval($_GET['ordertype']);
|
||||
}
|
||||
$orderby = 'order by createtime desc';
|
||||
if($setconfig['order_type'] == 2){
|
||||
$orderby = 'order by createtime asc';
|
||||
}
|
||||
$messageinfo = C::t('#'.self::$identifier.'#'.self::$identifier.'_message')->fetch_message_by_pid($pids, $setconfig['perpage_pc'], $orderby, $setconfig);
|
||||
foreach($postlist as $key => $post) {
|
||||
if($post['first'] && !$setconfig['thread_reply']){
|
||||
$t[] = '';
|
||||
}else{
|
||||
$count = $messageinfo[$post['pid']]['count'] ? $messageinfo[$post['pid']]['count'] : 0;
|
||||
$list = $messageinfo[$post['pid']]['list'];
|
||||
$_GET['ajaxtarget'] = 'replyfloor_content_'.$post['pid'];
|
||||
$multipage = multi($count, $setconfig['perpage_pc'], 1, 'plugin.php?id=replyfloor:index&tid='.$post['tid'].'&pid='.$post['pid'].($_GET['ordertype'] ? '&ordertype='.$_GET['ordertype'] : ''));
|
||||
$_GET['ajaxtarget'] = '';
|
||||
include template(self::$identifier.':viewthread');
|
||||
$t[] = $return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $t;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class plugin_replyfloor_group extends plugin_replyfloor {
|
||||
|
||||
function forumdisplay_top_output() {
|
||||
global $_G;
|
||||
$return = '';
|
||||
$setconfig = $this->setconfig;
|
||||
if($setconfig['allow_groups'] && !$this->_allow_groups($_G['forum'], $setconfig['allow_groups'])){
|
||||
return $return;
|
||||
}
|
||||
if($setconfig['add_replies']){
|
||||
$tids = array();
|
||||
foreach ($_G['forum_threadlist'] as $key => $value) {
|
||||
$tids[] = $value['tid'];
|
||||
}
|
||||
if(empty($tids)){
|
||||
return $return;
|
||||
}
|
||||
$wherearr = array();
|
||||
$wherearr[] = 'tid in ('.dimplode($tids).')';
|
||||
$wherearr[] = "status = '0'";
|
||||
$recordlist = DB::fetch_all('SELECT tid,count(*) as count FROM '.DB::table('plugin_replyfloor_message').($wherearr ? ' WHERE '.implode(' AND ', $wherearr) : '').' group by tid');
|
||||
$count = array();
|
||||
foreach ($recordlist as $value) {
|
||||
$count[$value['tid']] = $value['count'];
|
||||
}
|
||||
foreach ($_G['forum_threadlist'] as &$thread) {
|
||||
if($count[$thread['tid']]){
|
||||
$thread['allreplies'] += $count[$thread['tid']];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function viewthread_top_output() {
|
||||
global $_G,$allowpostreply;
|
||||
$setconfig = $this->setconfig;
|
||||
if(($setconfig['position_pc'] > 0) && (!$setconfig['allow_groups'] || $this->_allow_groups($_G['forum'], $setconfig['allow_groups']))){
|
||||
if($setconfig['add_replies']){
|
||||
$_G['forum_thread']['allreplies'] += C::t('#'.self::$identifier.'#'.self::$identifier.'_message')->count_by_search_where(array("tid = '".$_G['tid']."'", "status = '0'"));
|
||||
}
|
||||
include template(self::$identifier.':style');
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function viewthread_bottom_output() {
|
||||
global $_G,$allowpostreply, $swfconfig;
|
||||
$setconfig = $this->setconfig;
|
||||
if(($setconfig['position_pc'] > 0) && (!$setconfig['allow_groups'] || $this->_allow_groups($_G['forum'], $setconfig['allow_groups']))){
|
||||
include template(self::$identifier.':js');
|
||||
}
|
||||
if($setconfig['replace_pc'] == 1){
|
||||
if(!$_G['setting']['rewritestatus']){
|
||||
$_G['setting']['rewritestatus'] = array();
|
||||
}elseif(!is_array($_G['setting']['rewritestatus'])){
|
||||
$_G['setting']['rewritestatus'] = array($_G['setting']['rewritestatus']);
|
||||
}
|
||||
$_G['setting']['rewritestatus'][] = 'replyfloor_reply';
|
||||
$_G['setting']['output']['str']['search']['replyfloor'] = "showWindow('reply', this.href)";
|
||||
$_G['setting']['output']['str']['replace']['replyfloor'] = "replyfloor_reply(this.href)";
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function viewthread_postbottom_output() {
|
||||
global $_G,$postlist,$postno,$postnostick,$allowpostreply;
|
||||
$setconfig = $this->setconfig;
|
||||
$t = $pids = array();
|
||||
if($_G['inajax'] && (empty($_GET['viewpid']) || ($_GET['viewpid'] && $_GET['from']))){
|
||||
return $t;
|
||||
}
|
||||
if(($setconfig['position_pc'] == 1 || $setconfig['position_pc'] == 2) && (!$setconfig['allow_groups'] || $this->_allow_groups($_G['forum'], $setconfig['allow_groups']))){
|
||||
foreach($postlist as $key => $post) {
|
||||
if(!$post['first'] || $setconfig['thread_reply']){
|
||||
$pids[] = $post['pid'];
|
||||
}
|
||||
}
|
||||
if($pids){
|
||||
if(!$setconfig['order_type']){
|
||||
$setconfig['order_type'] = empty($_GET['ordertype']) && getstatus($_G['forum_thread']['status'], 4) ? 1 : intval($_GET['ordertype']);
|
||||
}
|
||||
$orderby = 'order by createtime desc';
|
||||
if($setconfig['order_type'] == 2){
|
||||
$orderby = 'order by createtime asc';
|
||||
}
|
||||
$messageinfo = C::t('#'.self::$identifier.'#'.self::$identifier.'_message')->fetch_message_by_pid($pids, $setconfig['perpage_pc'], $orderby, $setconfig);
|
||||
foreach($postlist as $key => $post) {
|
||||
if($post['first'] && !$setconfig['thread_reply']){
|
||||
$t[] = '';
|
||||
}else{
|
||||
$count = $messageinfo[$post['pid']]['count'] ? $messageinfo[$post['pid']]['count'] : 0;
|
||||
$list = $messageinfo[$post['pid']]['list'];
|
||||
$_GET['ajaxtarget'] = 'replyfloor_content_'.$post['pid'];
|
||||
$multipage = multi($count, $setconfig['perpage_pc'], 1, 'plugin.php?id=replyfloor:index&tid='.$post['tid'].'&pid='.$post['pid'].($_GET['ordertype'] ? '&ordertype='.$_GET['ordertype'] : ''));
|
||||
$_GET['ajaxtarget'] = '';
|
||||
include template(self::$identifier.':viewthread');
|
||||
if($setconfig['position_pc'] == 1){
|
||||
$post['message'] .= $return;
|
||||
$postlist[$key] = $post;
|
||||
}else{
|
||||
$t[] = $return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $t;
|
||||
}
|
||||
|
||||
function viewthread_replyfloor_output() {
|
||||
global $_G,$postlist,$postno,$postnostick,$allowpostreply;
|
||||
$setconfig = $this->setconfig;
|
||||
$t = $pids = array();
|
||||
if($_G['inajax'] && (empty($_GET['viewpid']) || ($_GET['viewpid'] && $_GET['from']))){
|
||||
return $t;
|
||||
}
|
||||
if(($setconfig['position_pc'] == 3) && (!$setconfig['allow_groups'] || $this->_allow_groups($_G['forum'], $setconfig['allow_groups']))){
|
||||
foreach($postlist as $key => $post) {
|
||||
if(!$post['first'] || $setconfig['thread_reply']){
|
||||
$pids[] = $post['pid'];
|
||||
}
|
||||
}
|
||||
if($pids){
|
||||
if(!$setconfig['order_type']){
|
||||
$setconfig['order_type'] = empty($_GET['ordertype']) && getstatus($_G['forum_thread']['status'], 4) ? 1 : intval($_GET['ordertype']);
|
||||
}
|
||||
$orderby = 'order by createtime desc';
|
||||
if($setconfig['order_type'] == 2){
|
||||
$orderby = 'order by createtime asc';
|
||||
}
|
||||
$messageinfo = C::t('#'.self::$identifier.'#'.self::$identifier.'_message')->fetch_message_by_pid($pids, $setconfig['perpage_pc'], $orderby, $setconfig);
|
||||
foreach($postlist as $key => $post) {
|
||||
if($post['first'] && !$setconfig['thread_reply']){
|
||||
$t[] = '';
|
||||
}else{
|
||||
$count = $messageinfo[$post['pid']]['count'] ? $messageinfo[$post['pid']]['count'] : 0;
|
||||
$list = $messageinfo[$post['pid']]['list'];
|
||||
$_GET['ajaxtarget'] = 'replyfloor_content_'.$post['pid'];
|
||||
$multipage = multi($count, $setconfig['perpage_pc'], 1, 'plugin.php?id=replyfloor:index&tid='.$post['tid'].'&pid='.$post['pid'].($_GET['ordertype'] ? '&ordertype='.$_GET['ordertype'] : ''));
|
||||
$_GET['ajaxtarget'] = '';
|
||||
include template(self::$identifier.':viewthread');
|
||||
$t[] = $return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $t;
|
||||
}
|
||||
|
||||
function _allow_groups($forum, $groupids) {
|
||||
global $_G;
|
||||
if(empty($forum) || empty($forum['fid']) || empty($forum['name'])) {
|
||||
return false;
|
||||
}
|
||||
loadcache('grouptype');
|
||||
$groupsecond = $_G['cache']['grouptype']['second'];
|
||||
if($forum['type'] == 'sub') {
|
||||
$secondtype = !empty($groupsecond[$forum['fup']]) ? $groupsecond[$forum['fup']] : array();
|
||||
} else {
|
||||
$secondtype = !empty($groupsecond[$forum['fid']]) ? $groupsecond[$forum['fid']] : array();
|
||||
}
|
||||
$firstid = !empty($secondtype) ? $secondtype['fup'] : (!empty($forum['fup']) ? $forum['fup'] : $forum['fid']);
|
||||
$firsttype = $_G['cache']['grouptype']['first'][$firstid];
|
||||
if($firsttype && in_array($firsttype['fid'], $groupids)) {
|
||||
return true;
|
||||
}
|
||||
if($secondtype && in_array($secondtype['fid'], $groupids)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
418
source/plugin/replyfloor/index.inc.php
Normal file
@@ -0,0 +1,418 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if (!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
require_once libfile('function/common', 'plugin/replyfloor');
|
||||
|
||||
$setconfig = $_G['cache']['plugin'][CURMODULE];
|
||||
$setconfig['open_seccheck'] = (array)unserialize($setconfig['open_seccheck']);
|
||||
$setconfig['audit_users'] = (array)unserialize($setconfig['audit_users']);
|
||||
|
||||
$ac = in_array($_GET['ac'], array('index', 'post', 'delete', 'report')) ? $_GET['ac'] : 'index';
|
||||
|
||||
require_once libfile('function/forum');
|
||||
|
||||
loadforum();
|
||||
$thread = $_G['thread'];
|
||||
if(!$thread || $thread['displayorder'] < 0) {
|
||||
showmessage('thread_nonexistence');
|
||||
}
|
||||
$post = C::t('forum_post')->fetch('tid:'.$_G['tid'], $_GET['pid']);
|
||||
if(!$post['tid']) {
|
||||
showmessage(lang('plugin/'.CURMODULE, 'replyfloor_post_nonexistence'));
|
||||
}
|
||||
if($post['tid'] != $_G['tid']) {
|
||||
showmessage(lang('plugin/'.CURMODULE, 'replyfloor_post_error'));
|
||||
}
|
||||
|
||||
if($ac == 'index') {
|
||||
$_G['setting']['dateconvert'] = $setconfig['date_convert'];
|
||||
$msgid = intval($_GET['msgid']);
|
||||
if($msgid) {
|
||||
$msginfo = C::t('#'.CURMODULE.'#'.CURMODULE.'_message')->fetch_by_id($msgid);
|
||||
if(!$msginfo) {
|
||||
showmessage(lang('plugin/'.CURMODULE, 'message_nonexistence'));
|
||||
}
|
||||
$msginfo['message'] = replyfloor_discuzcode($msginfo['message']);
|
||||
if($setconfig['show_br']) {
|
||||
$msginfo['message'] = nl2br($msginfo['message']);
|
||||
}
|
||||
if($setconfig['show_location']) {
|
||||
$msginfo['location'] = replyfloor_location($msginfo['postip']);
|
||||
}else{
|
||||
$msginfo['location'] = '';
|
||||
}
|
||||
$msginfo['createtime'] = $setconfig['date_convert'] ? dgmdate($msginfo['createtime'], 'u', 9999, $setconfig['time_format']) : dgmdate($msginfo['createtime'], $setconfig['time_format']);
|
||||
if(file_exists(DISCUZ_ROOT.'./source/plugin/'.CURMODULE.'/extend/extend_hidenum.php')){
|
||||
require_once libfile('extend/hidenum', 'plugin/replyfloor');
|
||||
$msginfo['message'] = replyfloor_extend_hidenum($msginfo['message']);
|
||||
}
|
||||
$uids = array();
|
||||
$uids[] = $msginfo['uid'];
|
||||
if($msginfo['ruid']){
|
||||
$uids[] = $msginfo['ruid'];
|
||||
}
|
||||
if($uids) {
|
||||
loadcache('usergroups');
|
||||
foreach(C::t('common_member')->fetch_all($uids) as $uid => $postuser) {
|
||||
if($msginfo['uid'] == $uid) {
|
||||
$msginfo['groupcolor'] = $_G['cache']['usergroups'][$postuser['groupid']]['color'];
|
||||
}
|
||||
if($msginfo['ruid'] == $uid) {
|
||||
$msginfo['rgroupcolor'] = $_G['cache']['usergroups'][$postuser['groupid']]['color'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$page = max(1, $_G['page']);
|
||||
if(defined('IN_MOBILE')) {
|
||||
$shownum = $setconfig['shownum_mobile'] > 0 ? $setconfig['shownum_mobile'] : 5;
|
||||
$perpage = $setconfig['perpage_mobile'] > 0 ? $setconfig['perpage_mobile'] : 10;
|
||||
}else{
|
||||
$shownum = $setconfig['shownum_pc'] > 0 ? $setconfig['shownum_pc'] : 5;
|
||||
$perpage = $setconfig['perpage_pc'] > 0 ? $setconfig['perpage_pc'] : 10;
|
||||
}
|
||||
$start = ($page-1)*$perpage;
|
||||
if((!defined('IN_MOBILE') && $setconfig['pagemode_pc']) || (defined('IN_MOBILE') && $setconfig['pagemode_mobile'])){
|
||||
if($page == 1){
|
||||
$perpage = $shownum;
|
||||
}else{
|
||||
$start = ($page-2)*$perpage + $shownum;
|
||||
}
|
||||
}
|
||||
$mpurl = 'plugin.php?id='.CURMODULE.':index&tid='.$post['tid'].'&pid='.$post['pid'].($_GET['ordertype'] ? '&ordertype='.$_GET['ordertype'] : '');
|
||||
$wherearr = array();
|
||||
if($_G['uid']){
|
||||
$wherearr[] = "(status = '0' or (status = '-1' and uid = '".$_G['uid']."'))";
|
||||
}else{
|
||||
$wherearr[] = "status = '0'";
|
||||
}
|
||||
$wherearr[] = "pid = '".$post['pid']."'";
|
||||
$count = C::t('#'.CURMODULE.'#'.CURMODULE.'_message')->count_by_search_where($wherearr);
|
||||
if(!$setconfig['order_type']){
|
||||
$setconfig['order_type'] = empty($_GET['ordertype']) && getstatus($thread['status'], 4) ? 1 : intval($_GET['ordertype']);
|
||||
}
|
||||
$orderby = 'order by createtime desc';
|
||||
if($setconfig['order_type'] == 2){
|
||||
$orderby = 'order by createtime asc';
|
||||
}
|
||||
$list = C::t('#'.CURMODULE.'#'.CURMODULE.'_message')->fetch_all_by_search_where($wherearr, $orderby, $start, $perpage);
|
||||
$uids = array();
|
||||
foreach ($list as $key => $value) {
|
||||
$value['message'] = replyfloor_discuzcode($value['message']);
|
||||
if($setconfig['show_br']) {
|
||||
$value['message'] = nl2br($value['message']);
|
||||
}
|
||||
if($setconfig['show_location']) {
|
||||
$value['location'] = replyfloor_location($value['postip']);
|
||||
}else{
|
||||
$value['location'] = '';
|
||||
}
|
||||
$value['createtime'] = $setconfig['date_convert'] ? dgmdate($value['createtime'], 'u', 9999, $setconfig['time_format']) : dgmdate($value['createtime'], $setconfig['time_format']);
|
||||
$list[$key] = $value;
|
||||
$uids[] = $value['uid'];
|
||||
if($value['ruid']){
|
||||
$uids[] = $value['ruid'];
|
||||
}
|
||||
}
|
||||
if(defined('IN_MOBILE')) {
|
||||
$multipage = multi($count, $perpage, $page, $mpurl, 0, 3, false, true);
|
||||
}else{
|
||||
$multipage = multi($count, $perpage, $page, $mpurl);
|
||||
}
|
||||
if(file_exists(DISCUZ_ROOT.'./source/plugin/'.CURMODULE.'/extend/extend_hidenum.php')){
|
||||
require_once libfile('extend/hidenum', 'plugin/replyfloor');
|
||||
foreach ($list as $key => $value) {
|
||||
$value['message'] = replyfloor_extend_hidenum($value['message']);
|
||||
$list[$key] = $value;
|
||||
}
|
||||
}
|
||||
if($uids) {
|
||||
loadcache('usergroups');
|
||||
foreach(C::t('common_member')->fetch_all($uids) as $uid => $postuser) {
|
||||
foreach ($list as $key => $value) {
|
||||
if($value['uid'] == $uid) {
|
||||
$value['groupcolor'] = $_G['cache']['usergroups'][$postuser['groupid']]['color'];
|
||||
}
|
||||
if($value['ruid'] == $uid) {
|
||||
$value['rgroupcolor'] = $_G['cache']['usergroups'][$postuser['groupid']]['color'];
|
||||
}
|
||||
$list[$key] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
include template(CURMODULE.':message');
|
||||
|
||||
} elseif($ac == 'post') {
|
||||
if(empty($_G['uid'])) {
|
||||
showmessage('to_login', '', array(), array('showmsg' => true));
|
||||
}
|
||||
//<2F><><EFBFBD>ֻظ<D6BB><D8B8><EFBFBD>ϰ<EFBFBD><CFB0>
|
||||
cknewuser();
|
||||
|
||||
require_once libfile('function/post');
|
||||
require_once libfile('function/forumlist');
|
||||
$allowpostreply = ($_G['forum']['allowreply'] != -1) && (($_G['forum_thread']['isgroup'] || (!$_G['forum_thread']['closed'] && !checkautoclose($_G['forum_thread']))) || $_G['forum']['ismoderator']) && ((!$_G['forum']['replyperm'] && $_G['group']['allowreply']) || ($_G['forum']['replyperm'] && forumperm($_G['forum']['replyperm'])) || $_G['forum']['allowreply']);
|
||||
if(!$allowpostreply) {
|
||||
showmessage(lang('plugin/'.CURMODULE, 'replyfloor_no_permission_to_post'));
|
||||
}
|
||||
|
||||
$ruid = 0;
|
||||
$rusername = '';
|
||||
$_GET['msgid'] = intval($_GET['msgid']);
|
||||
if($_GET['msgid']) {
|
||||
$remsg = C::t('#'.CURMODULE.'#'.CURMODULE.'_message')->fetch_by_id($_GET['msgid']);
|
||||
if($remsg) {
|
||||
$ruid = $remsg['uid'];
|
||||
$rusername = $remsg['username'];
|
||||
}
|
||||
}
|
||||
$seccodecheck = in_array($_G['groupid'], $setconfig['open_seccheck']) ? 1 : 0;
|
||||
if(submitcheck('savesubmit', 0, $seccodecheck)) {
|
||||
if(file_exists(DISCUZ_ROOT.'./source/plugin/allowreply/extend/extend_replyfloor.php')){
|
||||
@include_once libfile('extend/replyfloor', 'plugin/allowreply');
|
||||
}
|
||||
$message = isset($_GET['message']) ? censor($_GET['message']) : '';
|
||||
$attach = isset($_GET['attach']) ? $_GET['attach'] : array();
|
||||
//$message = messagecutstr($message, 200, '');
|
||||
if(strlen(preg_replace("/[\r\n]{1,2}/", "\n", $message)) < $setconfig['message_minsize']) {
|
||||
showmessage(lang('plugin/'.CURMODULE, 'message_message_tooshort'), '', array('message_minsize' => $setconfig['message_minsize']));
|
||||
}
|
||||
if(strlen(preg_replace("/[\r\n]{1,2}/", "\n", $message)) > $setconfig['message_maxsize']) {
|
||||
showmessage(lang('plugin/'.CURMODULE, 'message_message_toolong'), '', array('message_maxsize' => $setconfig['message_maxsize']));
|
||||
}
|
||||
//<2F><><EFBFBD>η<EFBFBD><CEB7><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if(checkflood()) {
|
||||
showmessage('post_flood_ctrl', '', array('floodctrl' => $_G['setting']['floodctrl']));
|
||||
}
|
||||
$modnewreplies = 0;
|
||||
if($setconfig['moderate_reply'] == 1) {
|
||||
list(, $modnewreplies) = threadmodstatus($message);
|
||||
}elseif($setconfig['moderate_reply'] == 2) {
|
||||
if(in_array($_G['groupid'], $setconfig['audit_users'])) {
|
||||
$modnewreplies = 1;
|
||||
}
|
||||
}
|
||||
$attachment = $usedattach = $queryattach = array();
|
||||
if($attach){
|
||||
$queryattach = C::t('#'.CURMODULE.'#'.CURMODULE.'_attachment_unused')->fetch_all_by_id($attach);
|
||||
foreach($attach as $aid){
|
||||
if($queryattach[$aid]){
|
||||
$usedattach[] = $queryattach[$aid];
|
||||
if(in_array($queryattach[$aid]['fileext'], array('jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp'))){
|
||||
$attachment[] = ($queryattach[$aid]['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']) . 'replyfloor/'. $queryattach[$aid]['attachment'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(empty($message) && empty($attachment)) {
|
||||
showmessage(lang('plugin/'.CURMODULE, 'message_message_empty'));
|
||||
}
|
||||
|
||||
if(discuz_process::islocked("replyfloor_post_".$_G['uid'], 600)) {
|
||||
showmessage(lang('plugin/'.CURMODULE, 'replyfloor_request_error'));
|
||||
}
|
||||
|
||||
$data = array(
|
||||
'tid' => $post['tid'],
|
||||
'pid' => $post['pid'],
|
||||
'uid' => $_G['uid'],
|
||||
'username' => $_G['username'],
|
||||
'ruid' => $ruid,
|
||||
'rusername' => $rusername,
|
||||
'message' => $message,
|
||||
'attachment' => implode("\t", $attachment),
|
||||
'mobile' => defined('IN_MOBILE') ? IN_MOBILE : 0,
|
||||
'createtime' => $_G['timestamp'],
|
||||
'postip' => $_G['clientip'],
|
||||
'status' => $modnewreplies ? -1 : 0,
|
||||
);
|
||||
$msgid = C::t('#'.CURMODULE.'#'.CURMODULE.'_message')->insert($data, true);
|
||||
|
||||
$i = 1;
|
||||
foreach($usedattach as $value){
|
||||
$displayorder = in_array($value['fileext'], array('jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp')) ? $i : 0;
|
||||
$attachdata = array(
|
||||
'id' => $value['id'],
|
||||
'displayorder' => $displayorder,
|
||||
'tid' => $post['tid'],
|
||||
'pid' => $post['pid'],
|
||||
'msgid' => $msgid,
|
||||
'uid' => $value['uid'],
|
||||
'username' => $value['username'],
|
||||
'filename' => $value['filename'],
|
||||
'filesize' => $value['filesize'],
|
||||
'fileext' => $value['fileext'],
|
||||
'attachment' => $value['attachment'],
|
||||
'remote' => $value['remote'],
|
||||
'width' => $value['width'],
|
||||
'height' => $value['height'],
|
||||
'dateline' => $value['dateline'],
|
||||
);
|
||||
C::t('#'.CURMODULE.'#'.CURMODULE.'_attachment')->insert($attachdata, false, true);
|
||||
C::t('#'.CURMODULE.'#'.CURMODULE.'_attachment_unused')->delete_by_id($value['id']);
|
||||
$i++;
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӻظ<D3BB><D8B8><EFBFBD>
|
||||
//C::t('forum_thread')->increase($_G['tid'], array('replies' => 1));
|
||||
//<2F><><EFBFBD>°<EFBFBD><C2B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//C::t('forum_forum')->update_forum_counter($_G['fid'], 0, 1);
|
||||
//<2F><><EFBFBD>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if($setconfig['today_posts']) {
|
||||
C::t('forum_forum')->update_forum_counter($_G['fid'], 0, 0, 1);
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȶ<EFBFBD>
|
||||
if($setconfig['open_heatthread']) {
|
||||
update_threadpartake($_G['tid']);
|
||||
}
|
||||
|
||||
discuz_process::unlock("replyfloor_post_".$_G['uid']);
|
||||
|
||||
if($modnewreplies) {
|
||||
showmessage(lang('plugin/'.CURMODULE, 'replyfloor_post_mod_succeed'), dreferer(), array('tid' => $post['tid'], 'pid' => $post['pid'], 'msgid' => $msgid));
|
||||
}
|
||||
|
||||
if($setconfig['get_credit']) {
|
||||
updatepostcredits('+', $_G['uid'], 'reply', $_G['fid']);
|
||||
}
|
||||
if($setconfig['thread_bump']) {
|
||||
$expiration = $_G['timestamp'];
|
||||
if($thread['lastpost'] < $expiration){
|
||||
C::t('forum_thread')->update($thread['tid'], array('lastpost'=>$expiration, 'lastposter'=>$_G['username']), true);
|
||||
}else{
|
||||
C::t('forum_thread')->update($thread['tid'], array('lastposter'=>$_G['username']), true);
|
||||
}
|
||||
C::t('forum_forum')->update($_G['fid'], array('lastpost' => "$thread[tid]\t$thread[subject]\t$expiration\t$_G[username]"));
|
||||
|
||||
$_G['forum']['threadcaches'] && deletethreadcaches($thread['tid']);
|
||||
}
|
||||
if($setconfig['notice_author'] == 1 || ($setconfig['notice_author'] == 2 && $_GET['notice_author'])) {
|
||||
$nauthorid = $ruid ? $ruid : $post['authorid'];
|
||||
if($nauthorid != $_G['uid']){
|
||||
notification_add($nauthorid, 'post', 'replyfloor:replyfloor_noticeauthor', array(
|
||||
'tid' => $thread['tid'],
|
||||
'subject' => $thread['subject'],
|
||||
'fid' => $_G['fid'],
|
||||
'pid' => $post['pid'],
|
||||
'from_id' => $post['tid'],
|
||||
'from_idtype' => 'post',
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
showmessage(lang('plugin/'.CURMODULE, 'replyfloor_post_succeed'), dreferer(), array('tid' => $post['tid'], 'pid' => $post['pid'], 'msgid' => $msgid));
|
||||
} else {
|
||||
include template(CURMODULE.':post');
|
||||
}
|
||||
} elseif($ac == 'delete') {
|
||||
if(empty($_G['uid'])) {
|
||||
showmessage('to_login', '', array(), array('showmsg' => true, 'login' => 1));
|
||||
}
|
||||
$msgid = intval($_GET['msgid']);
|
||||
if(!$msgid) {
|
||||
showmessage(lang('plugin/'.CURMODULE, 'message_nonexistence'));
|
||||
}
|
||||
$msginfo = C::t('#'.CURMODULE.'#'.CURMODULE.'_message')->fetch_by_id($msgid);
|
||||
if(!$msginfo) {
|
||||
showmessage(lang('plugin/'.CURMODULE, 'message_nonexistence'));
|
||||
}
|
||||
if(!($_G['forum']['ismoderator'] && $_G['group']['allowdelpost']) && !($setconfig['allow_delete'] && $_G['uid'] && $_G['uid'] == $_G['thread']['authorid']) && !($setconfig['self_delete'] && $_G['uid'] && $_G['uid'] == $msginfo['uid'])){
|
||||
showmessage(lang('plugin/'.CURMODULE, 'replyfloor_no_permission'));
|
||||
}
|
||||
require_once libfile('function/misc');
|
||||
if(submitcheck('modsubmit')) {
|
||||
if($setconfig['get_credit']) {
|
||||
require_once libfile('function/post');
|
||||
updatepostcredits('-', $msginfo['uid'], 'reply', $_G['fid']);
|
||||
}
|
||||
replyfloor_deletemessage(array($msgid), 'id', $setconfig['open_recycle']);
|
||||
$wherearr = array();
|
||||
$wherearr[] = "status = '0'";
|
||||
$wherearr[] = "pid = '".$post['pid']."'";
|
||||
$count = C::t('#'.CURMODULE.'#'.CURMODULE.'_message')->count_by_search_where($wherearr);
|
||||
showmessage('', dreferer(), array('tid' => $post['tid'], 'pid' => $post['pid'], 'count' => $count));
|
||||
} else {
|
||||
include template(CURMODULE.':delete');
|
||||
}
|
||||
} elseif($ac == 'report') {
|
||||
if(empty($_G['uid'])) {
|
||||
showmessage('to_login', '', array(), array('showmsg' => true, 'login' => 1));
|
||||
}
|
||||
$msgid = intval($_GET['msgid']);
|
||||
if(!$msgid) {
|
||||
showmessage(lang('plugin/'.CURMODULE, 'message_nonexistence'));
|
||||
}
|
||||
$msginfo = C::t('#'.CURMODULE.'#'.CURMODULE.'_message')->fetch_by_id($msgid);
|
||||
if(!$msginfo) {
|
||||
showmessage(lang('plugin/'.CURMODULE, 'message_nonexistence'));
|
||||
}
|
||||
if(submitcheck('savesubmit')) {
|
||||
$message = trim($_GET['message']);
|
||||
if(empty($message)) {
|
||||
showmessage(lang('plugin/'.CURMODULE, 'replyfloor_report_message'));
|
||||
}
|
||||
require_once libfile('class/upload', 'plugin/'.CURMODULE);
|
||||
$upload = new discuz_upload();
|
||||
$images = array();
|
||||
$filelist = $_FILES['filedata'];
|
||||
for ($i=0;$i<count($filelist["name"]);$i++) {
|
||||
$filedata = array("tmp_name" => $filelist["tmp_name"][$i], "name" => $filelist["name"][$i], "size" => $filelist["size"][$i], "type" => $filelist["type"][$i]);
|
||||
$upres = $upload->init($filedata, CURMODULE);
|
||||
if($upres && $upload->attach['isimage'] && $upload->save()) {
|
||||
$images[] = array("name" => $upload->attach['name'], "image" => $upload->attach['attachment']);
|
||||
}
|
||||
}
|
||||
$data = array(
|
||||
'uid' => $_G['uid'],
|
||||
'username' => $_G['username'],
|
||||
'msgid' => $msginfo['id'],
|
||||
'message' => dhtmlspecialchars($message),
|
||||
'images' => serialize($images),
|
||||
'createtime' => $_G['timestamp'],
|
||||
'postip' => $_G['clientip'],
|
||||
);
|
||||
C::t('#'.CURMODULE.'#'.CURMODULE.'_report')->insert($data);
|
||||
C::t('#'.CURMODULE.'#'.CURMODULE.'_message')->update_reportnum($msginfo['id']);
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if($setconfig['report_remind']){
|
||||
foreach(explode(',', $setconfig['report_remind']) as $userid){
|
||||
if(preg_match("/^[\w\-\.]+@[\w\-\.]+(\.\w+)+$/", $userid)){
|
||||
require_once libfile('function/mail');
|
||||
$res = sendmail($userid, lang('plugin/'.CURMODULE, 'replyfloor_newreport_title'), lang('plugin/'.CURMODULE, 'replyfloor_newreport_message'));
|
||||
}elseif(is_numeric($userid)){
|
||||
notification_add($userid, 'report', 'replyfloor:replyfloor_newreport_notice', array('from_id' => 1, 'from_idtype' => 'newreport', 'username' => $_G['username']), 1);
|
||||
}else{
|
||||
$getuser = C::t('common_member')->fetch_by_username($userid, 1);
|
||||
if($getuser){
|
||||
notification_add($getuser['uid'], 'report', 'replyfloor:replyfloor_newreport_notice', array('from_id' => 1, 'from_idtype' => 'newreport', 'username' => $_G['username']), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
showmessage(lang('plugin/'.CURMODULE, 'replyfloor_report_succeed'), dreferer(), array(), array('closetime' => true, 'showdialog' => 1, 'alert' => 'right'));
|
||||
} else {
|
||||
$navtitle = lang('plugin/'.CURMODULE, 'replyfloor_navtitle_report');
|
||||
include template(CURMODULE.':report');
|
||||
}
|
||||
}
|
38
source/plugin/replyfloor/jump.inc.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if (!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
$url = '';
|
||||
$timestamp = 0;
|
||||
$_GET['hash'] = empty($_GET['hash']) ? '' : $_GET['hash'];
|
||||
if($_GET['hash']) {
|
||||
list($url, $timestamp) = explode("\t", authcode($_GET['hash'], 'DECODE', md5(substr(md5($_G['config']['security']['authkey']), 0, 16))));
|
||||
}else{
|
||||
showmessage(lang('plugin/'.CURMODULE, 'replyfloor_url_nonexistence'));
|
||||
}
|
||||
|
||||
if(!$url){
|
||||
showmessage(lang('plugin/'.CURMODULE, 'replyfloor_url_nonexistence'));
|
||||
}
|
||||
$url = str_replace('&', '&', $url);
|
||||
header('Location: '.$url);
|
||||
exit();
|
427
source/plugin/replyfloor/mobile.class.php
Normal file
@@ -0,0 +1,427 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if (!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
class mobileplugin_replyfloor {
|
||||
|
||||
public static $identifier = 'replyfloor';
|
||||
|
||||
function __construct() {
|
||||
global $_G;
|
||||
$setconfig = $_G['cache']['plugin'][self::$identifier];
|
||||
$setconfig['allow_forums'] = (array)unserialize($setconfig['allow_forums']);
|
||||
if(in_array('', $setconfig['allow_forums'])) {
|
||||
$setconfig['allow_forums'] = array();
|
||||
}
|
||||
$setconfig['allow_groups'] = $setconfig['allow_groups'] ? explode(",", $setconfig['allow_groups']) : array();
|
||||
$setconfig['open_seccheck'] = (array)unserialize($setconfig['open_seccheck']);
|
||||
$setconfig['perpage_mobile'] = $setconfig['perpage_mobile'] > 0 ? $setconfig['perpage_mobile'] : 10;
|
||||
$this->setconfig = $setconfig;
|
||||
}
|
||||
|
||||
function deletethread($value) {
|
||||
global $_G;
|
||||
$setconfig = $this->setconfig;
|
||||
if($value['step'] == 'delete'){
|
||||
list($tids, $membercount, $credit, $ponly) = $value['param'];
|
||||
require_once libfile('function/common', 'plugin/replyfloor');
|
||||
if($setconfig['get_credit']) {
|
||||
require_once libfile('function/post');
|
||||
require_once libfile('function/forum');
|
||||
$wherearr = array();
|
||||
$wherearr[] = 'tid in ('.dimplode($tids).')';
|
||||
$wherearr[] = "status = '0'";
|
||||
$recordlist = DB::fetch_all('SELECT * FROM '.DB::table('plugin_replyfloor_message').($wherearr ? ' WHERE '.implode(' AND ', $wherearr) : ''));
|
||||
foreach ($recordlist as $value) {
|
||||
$thread = get_thread_by_tid($value['tid']);
|
||||
updatepostcredits('-', $value['uid'], 'reply', $thread['fid']);
|
||||
}
|
||||
}
|
||||
replyfloor_deletemessage($ids, 'tid', $setconfig['open_recycle']);
|
||||
}
|
||||
}
|
||||
|
||||
function deletepost($value) {
|
||||
global $_G;
|
||||
$setconfig = $this->setconfig;
|
||||
if($value['step'] == 'delete'){
|
||||
list($ids, $idtype, $credit, $posttableid, $recycle) = $value['param'];
|
||||
require_once libfile('function/common', 'plugin/replyfloor');
|
||||
if($idtype == 'pid') {
|
||||
if($setconfig['get_credit']) {
|
||||
require_once libfile('function/post');
|
||||
require_once libfile('function/forum');
|
||||
$wherearr = array();
|
||||
$wherearr[] = 'pid in ('.dimplode($ids).')';
|
||||
$wherearr[] = "status = '0'";
|
||||
$recordlist = DB::fetch_all('SELECT * FROM '.DB::table('plugin_replyfloor_message').($wherearr ? ' WHERE '.implode(' AND ', $wherearr) : ''));
|
||||
foreach ($recordlist as $value) {
|
||||
$thread = get_thread_by_tid($value['tid']);
|
||||
updatepostcredits('-', $value['uid'], 'reply', $thread['fid']);
|
||||
}
|
||||
}
|
||||
replyfloor_deletemessage($ids, 'pid', $setconfig['open_recycle']);
|
||||
} elseif($idtype == 'tid') {
|
||||
if($setconfig['get_credit']) {
|
||||
require_once libfile('function/post');
|
||||
require_once libfile('function/forum');
|
||||
$wherearr = array();
|
||||
$wherearr[] = 'tid in ('.dimplode($ids).')';
|
||||
$wherearr[] = "status = '0'";
|
||||
$recordlist = DB::fetch_all('SELECT * FROM '.DB::table('plugin_replyfloor_message').($wherearr ? ' WHERE '.implode(' AND ', $wherearr) : ''));
|
||||
foreach ($recordlist as $value) {
|
||||
$thread = get_thread_by_tid($value['tid']);
|
||||
updatepostcredits('-', $value['uid'], 'reply', $thread['fid']);
|
||||
}
|
||||
}
|
||||
replyfloor_deletemessage($ids, 'tid', $setconfig['open_recycle']);
|
||||
} elseif($idtype == 'authorid') {
|
||||
if($setconfig['get_credit']) {
|
||||
require_once libfile('function/post');
|
||||
require_once libfile('function/forum');
|
||||
$wherearr = array();
|
||||
$wherearr[] = 'uid in ('.dimplode($ids).')';
|
||||
$wherearr[] = "status = '0'";
|
||||
$recordlist = DB::fetch_all('SELECT * FROM '.DB::table('plugin_replyfloor_message').($wherearr ? ' WHERE '.implode(' AND ', $wherearr) : ''));
|
||||
foreach ($recordlist as $value) {
|
||||
$thread = get_thread_by_tid($value['tid']);
|
||||
updatepostcredits('-', $value['uid'], 'reply', $thread['fid']);
|
||||
}
|
||||
}
|
||||
replyfloor_deletemessage($ids, 'authorid', $setconfig['open_recycle']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class mobileplugin_replyfloor_forum extends mobileplugin_replyfloor {
|
||||
|
||||
function forumdisplay_top_mobile_output() {
|
||||
global $_G;
|
||||
$return = '';
|
||||
$setconfig = $this->setconfig;
|
||||
if($setconfig['allow_forums'] && !in_array($_G['fid'], $setconfig['allow_forums'])){
|
||||
return $return;
|
||||
}
|
||||
if($setconfig['add_replies']){
|
||||
$tids = array();
|
||||
foreach ($_G['forum_threadlist'] as $key => $value) {
|
||||
$tids[] = $value['tid'];
|
||||
}
|
||||
if(empty($tids)){
|
||||
return $return;
|
||||
}
|
||||
$wherearr = array();
|
||||
$wherearr[] = 'tid in ('.dimplode($tids).')';
|
||||
$wherearr[] = "status = '0'";
|
||||
$recordlist = DB::fetch_all('SELECT tid,count(*) as count FROM '.DB::table('plugin_replyfloor_message').($wherearr ? ' WHERE '.implode(' AND ', $wherearr) : '').' group by tid');
|
||||
$count = array();
|
||||
foreach ($recordlist as $value) {
|
||||
$count[$value['tid']] = $value['count'];
|
||||
}
|
||||
foreach ($_G['forum_threadlist'] as &$thread) {
|
||||
if($count[$thread['tid']]){
|
||||
$thread['allreplies'] += $count[$thread['tid']];
|
||||
$thread['replies'] += $count[$thread['tid']];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function viewthread_top_mobile_output() {
|
||||
global $_G,$allowpostreply;
|
||||
$setconfig = $this->setconfig;
|
||||
$return = '';
|
||||
if(($setconfig['position_mobile'] > 0) && (!$setconfig['allow_forums'] || in_array($_G['fid'], $setconfig['allow_forums']))){
|
||||
if($setconfig['add_replies']){
|
||||
$_G['forum_thread']['allreplies'] += C::t('#'.self::$identifier.'#'.self::$identifier.'_message')->count_by_search_where(array("tid = '".$_G['tid']."'", "status = '0'"));
|
||||
}
|
||||
include template(self::$identifier.':style');
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function viewthread_bottom_mobile_output() {
|
||||
global $_G,$allowpostreply;
|
||||
$setconfig = $this->setconfig;
|
||||
$return = '';
|
||||
if(($setconfig['position_mobile'] > 0) && (!$setconfig['allow_forums'] || in_array($_G['fid'], $setconfig['allow_forums']))){
|
||||
include template(self::$identifier.':js');
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function viewthread_postbottom_mobile_output() {
|
||||
global $_G,$postlist,$postno,$postnostick,$allowpostreply;
|
||||
$setconfig = $this->setconfig;
|
||||
$t = $pids = array();
|
||||
if($_G['inajax']){
|
||||
//return $t;
|
||||
}
|
||||
if(($setconfig['position_mobile'] == 1 || $setconfig['position_mobile'] == 2) && (!$setconfig['allow_forums'] || in_array($_G['fid'], $setconfig['allow_forums']))){
|
||||
foreach($postlist as $key => $post) {
|
||||
if(!$post['first'] || $setconfig['thread_reply']){
|
||||
$pids[] = $post['pid'];
|
||||
}
|
||||
}
|
||||
if($pids){
|
||||
if(!$setconfig['order_type']){
|
||||
$setconfig['order_type'] = empty($_GET['ordertype']) && getstatus($_G['forum_thread']['status'], 4) ? 1 : intval($_GET['ordertype']);
|
||||
}
|
||||
$orderby = 'order by createtime desc';
|
||||
if($setconfig['order_type'] == 2){
|
||||
$orderby = 'order by createtime asc';
|
||||
}
|
||||
$messageinfo = C::t('#'.self::$identifier.'#'.self::$identifier.'_message')->fetch_message_by_pid($pids, $setconfig['perpage_mobile'], $orderby, $setconfig);
|
||||
foreach($postlist as $key => $post) {
|
||||
if($post['first'] && !$setconfig['thread_reply']){
|
||||
$t[] = '';
|
||||
}else{
|
||||
$count = $messageinfo[$post['pid']]['count'] ? $messageinfo[$post['pid']]['count'] : 0;
|
||||
$list = $messageinfo[$post['pid']]['list'];
|
||||
$_GET['ajaxtarget'] = 'replyfloor_content_'.$post['pid'];
|
||||
$multipage = multi($count, $setconfig['perpage_mobile'], 1, 'plugin.php?id=replyfloor:index&tid='.$post['tid'].'&pid='.$post['pid'].($_GET['ordertype'] ? '&ordertype='.$_GET['ordertype'] : ''), 0, 3, false, true);
|
||||
$_GET['ajaxtarget'] = '';
|
||||
include template(self::$identifier.':viewthread');
|
||||
if($setconfig['position_mobile'] == 1){
|
||||
$post['message'] .= $return;
|
||||
$postlist[$key] = $post;
|
||||
}else{
|
||||
$t[] = $return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $t;
|
||||
}
|
||||
|
||||
function viewthread_replyfloor_mobile_output() {
|
||||
global $_G,$postlist,$postno,$postnostick,$allowpostreply;
|
||||
$setconfig = $this->setconfig;
|
||||
$t = $pids = array();
|
||||
if($_G['inajax']){
|
||||
//return $t;
|
||||
}
|
||||
if(($setconfig['position_mobile'] == 3) && (!$setconfig['allow_forums'] || in_array($_G['fid'], $setconfig['allow_forums']))){
|
||||
foreach($postlist as $key => $post) {
|
||||
if(!$post['first'] || $setconfig['thread_reply']){
|
||||
$pids[] = $post['pid'];
|
||||
}
|
||||
}
|
||||
if($pids){
|
||||
if(!$setconfig['order_type']){
|
||||
$setconfig['order_type'] = empty($_GET['ordertype']) && getstatus($_G['forum_thread']['status'], 4) ? 1 : intval($_GET['ordertype']);
|
||||
}
|
||||
$orderby = 'order by createtime desc';
|
||||
if($setconfig['order_type'] == 2){
|
||||
$orderby = 'order by createtime asc';
|
||||
}
|
||||
$messageinfo = C::t('#'.self::$identifier.'#'.self::$identifier.'_message')->fetch_message_by_pid($pids, $setconfig['perpage_mobile'], $orderby, $setconfig);
|
||||
foreach($postlist as $key => $post) {
|
||||
if($post['first'] && !$setconfig['thread_reply']){
|
||||
$t[] = '';
|
||||
}else{
|
||||
$count = $messageinfo[$post['pid']]['count'] ? $messageinfo[$post['pid']]['count'] : 0;
|
||||
$list = $messageinfo[$post['pid']]['list'];
|
||||
$_GET['ajaxtarget'] = 'replyfloor_content_'.$post['pid'];
|
||||
$multipage = multi($count, $setconfig['perpage_mobile'], 1, 'plugin.php?id=replyfloor:index&tid='.$post['tid'].'&pid='.$post['pid'].($_GET['ordertype'] ? '&ordertype='.$_GET['ordertype'] : ''), 0, 3, false, true);
|
||||
$_GET['ajaxtarget'] = '';
|
||||
include template(self::$identifier.':viewthread');
|
||||
$t[] = $return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $t;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class mobileplugin_replyfloor_group extends mobileplugin_replyfloor {
|
||||
|
||||
function forumdisplay_top_mobile_output() {
|
||||
global $_G;
|
||||
$return = '';
|
||||
$setconfig = $this->setconfig;
|
||||
if($setconfig['allow_groups'] && !$this->_allow_groups($_G['forum'], $setconfig['allow_groups'])){
|
||||
return $return;
|
||||
}
|
||||
if($setconfig['add_replies']){
|
||||
$tids = array();
|
||||
foreach ($_G['forum_threadlist'] as $key => $value) {
|
||||
$tids[] = $value['tid'];
|
||||
}
|
||||
if(empty($tids)){
|
||||
return $return;
|
||||
}
|
||||
$wherearr = array();
|
||||
$wherearr[] = 'tid in ('.dimplode($tids).')';
|
||||
$wherearr[] = "status = '0'";
|
||||
$recordlist = DB::fetch_all('SELECT tid,count(*) as count FROM '.DB::table('plugin_replyfloor_message').($wherearr ? ' WHERE '.implode(' AND ', $wherearr) : '').' group by tid');
|
||||
$count = array();
|
||||
foreach ($recordlist as $value) {
|
||||
$count[$value['tid']] = $value['count'];
|
||||
}
|
||||
foreach ($_G['forum_threadlist'] as &$thread) {
|
||||
if($count[$thread['tid']]){
|
||||
$thread['allreplies'] += $count[$thread['tid']];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function viewthread_top_mobile_output() {
|
||||
global $_G,$allowpostreply;
|
||||
$setconfig = $this->setconfig;
|
||||
$return = '';
|
||||
if(($setconfig['position_mobile'] > 0) && (!$setconfig['allow_groups'] || $this->_allow_groups($_G['forum'], $setconfig['allow_groups']))){
|
||||
if($setconfig['add_replies']){
|
||||
$_G['forum_thread']['allreplies'] += C::t('#'.self::$identifier.'#'.self::$identifier.'_message')->count_by_search_where(array("tid = '".$_G['tid']."'", "status = '0'"));
|
||||
}
|
||||
include template(self::$identifier.':style');
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function viewthread_bottom_mobile_output() {
|
||||
global $_G,$allowpostreply;
|
||||
$setconfig = $this->setconfig;
|
||||
$return = '';
|
||||
if(($setconfig['position_mobile'] > 0) && (!$setconfig['allow_groups'] || $this->_allow_groups($_G['forum'], $setconfig['allow_groups']))){
|
||||
include template(self::$identifier.':js');
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function viewthread_postbottom_mobile_output() {
|
||||
global $_G,$postlist,$postno,$postnostick,$allowpostreply;
|
||||
$setconfig = $this->setconfig;
|
||||
$t = $pids = array();
|
||||
if($_G['inajax']){
|
||||
//return $t;
|
||||
}
|
||||
if(($setconfig['position_mobile'] == 1 || $setconfig['position_mobile'] == 2) && (!$setconfig['allow_groups'] || $this->_allow_groups($_G['forum'], $setconfig['allow_groups']))){
|
||||
foreach($postlist as $key => $post) {
|
||||
if(!$post['first'] || $setconfig['thread_reply']){
|
||||
$pids[] = $post['pid'];
|
||||
}
|
||||
}
|
||||
if($pids){
|
||||
if(!$setconfig['order_type']){
|
||||
$setconfig['order_type'] = empty($_GET['ordertype']) && getstatus($_G['forum_thread']['status'], 4) ? 1 : intval($_GET['ordertype']);
|
||||
}
|
||||
$orderby = 'order by createtime desc';
|
||||
if($setconfig['order_type'] == 2){
|
||||
$orderby = 'order by createtime asc';
|
||||
}
|
||||
$messageinfo = C::t('#'.self::$identifier.'#'.self::$identifier.'_message')->fetch_message_by_pid($pids, $setconfig['perpage_mobile'], $orderby, $setconfig);
|
||||
foreach($postlist as $key => $post) {
|
||||
if($post['first'] && !$setconfig['thread_reply']){
|
||||
$t[] = '';
|
||||
}else{
|
||||
$count = $messageinfo[$post['pid']]['count'] ? $messageinfo[$post['pid']]['count'] : 0;
|
||||
$list = $messageinfo[$post['pid']]['list'];
|
||||
$_GET['ajaxtarget'] = 'replyfloor_content_'.$post['pid'];
|
||||
$multipage = multi($count, $setconfig['perpage_mobile'], 1, 'plugin.php?id=replyfloor:index&tid='.$post['tid'].'&pid='.$post['pid'].($_GET['ordertype'] ? '&ordertype='.$_GET['ordertype'] : ''), 0, 3, false, true);
|
||||
$_GET['ajaxtarget'] = '';
|
||||
include template(self::$identifier.':viewthread');
|
||||
if($setconfig['position_mobile'] == 1){
|
||||
$post['message'] .= $return;
|
||||
$postlist[$key] = $post;
|
||||
}else{
|
||||
$t[] = $return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $t;
|
||||
}
|
||||
|
||||
function viewthread_replyfloor_mobile_output() {
|
||||
global $_G,$postlist,$postno,$postnostick,$allowpostreply;
|
||||
$setconfig = $this->setconfig;
|
||||
$t = $pids = array();
|
||||
if($_G['inajax']){
|
||||
//return $t;
|
||||
}
|
||||
if(($setconfig['position_mobile'] == 3) && (!$setconfig['allow_groups'] || $this->_allow_groups($_G['forum'], $setconfig['allow_groups']))){
|
||||
foreach($postlist as $key => $post) {
|
||||
if(!$post['first'] || $setconfig['thread_reply']){
|
||||
$pids[] = $post['pid'];
|
||||
}
|
||||
}
|
||||
if($pids){
|
||||
if(!$setconfig['order_type']){
|
||||
$setconfig['order_type'] = empty($_GET['ordertype']) && getstatus($_G['forum_thread']['status'], 4) ? 1 : intval($_GET['ordertype']);
|
||||
}
|
||||
$orderby = 'order by createtime desc';
|
||||
if($setconfig['order_type'] == 2){
|
||||
$orderby = 'order by createtime asc';
|
||||
}
|
||||
$messageinfo = C::t('#'.self::$identifier.'#'.self::$identifier.'_message')->fetch_message_by_pid($pids, $setconfig['perpage_mobile'], $orderby, $setconfig);
|
||||
foreach($postlist as $key => $post) {
|
||||
if($post['first'] && !$setconfig['thread_reply']){
|
||||
$t[] = '';
|
||||
}else{
|
||||
$count = $messageinfo[$post['pid']]['count'] ? $messageinfo[$post['pid']]['count'] : 0;
|
||||
$list = $messageinfo[$post['pid']]['list'];
|
||||
$_GET['ajaxtarget'] = 'replyfloor_content_'.$post['pid'];
|
||||
$multipage = multi($count, $setconfig['perpage_mobile'], 1, 'plugin.php?id=replyfloor:index&tid='.$post['tid'].'&pid='.$post['pid'].($_GET['ordertype'] ? '&ordertype='.$_GET['ordertype'] : ''), 0, 3, false, true);
|
||||
$_GET['ajaxtarget'] = '';
|
||||
include template(self::$identifier.':viewthread');
|
||||
$t[] = $return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $t;
|
||||
}
|
||||
|
||||
function _allow_groups($forum, $groupids) {
|
||||
global $_G;
|
||||
if(empty($forum) || empty($forum['fid']) || empty($forum['name'])) {
|
||||
return false;
|
||||
}
|
||||
loadcache('grouptype');
|
||||
$groupsecond = $_G['cache']['grouptype']['second'];
|
||||
if($forum['type'] == 'sub') {
|
||||
$secondtype = !empty($groupsecond[$forum['fup']]) ? $groupsecond[$forum['fup']] : array();
|
||||
} else {
|
||||
$secondtype = !empty($groupsecond[$forum['fid']]) ? $groupsecond[$forum['fid']] : array();
|
||||
}
|
||||
$firstid = !empty($secondtype) ? $secondtype['fup'] : (!empty($forum['fup']) ? $forum['fup'] : $forum['fid']);
|
||||
$firsttype = $_G['cache']['grouptype']['first'][$firstid];
|
||||
if($firsttype && in_array($firsttype['fid'], $groupids)) {
|
||||
return true;
|
||||
}
|
||||
if($secondtype && in_array($secondtype['fid'], $groupids)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
70
source/plugin/replyfloor/static/css/style1.css
Normal file
@@ -0,0 +1,70 @@
|
||||
.replyfloor_box{margin-top:30px;margin-bottom: 10px;}
|
||||
.replyfloor_hd{line-height: 24px;text-align: center;}
|
||||
.replyfloor_link_unfold{display: inline-block;padding:0 8px 0 30px;border: 1px solid #f0f1f2;cursor: pointer;background: url(../image/fastreply.gif) #f7f8fa no-repeat 8px center;height: 30px;line-height: 30px;white-space: nowrap;color: #333;font-size: 12px;margin-bottom:30px;}
|
||||
.replyfloor_link_fold{display: none;border: 1px solid #f0f1f2;border-bottom: 0;color: #1D53BF;cursor: pointer;height: 30px;line-height: 30px;text-align: center;width: 100px;background: #f7f8fa;font-size: 12px;}
|
||||
.replyfloor_bd{background: #f7f8fa;border: 1px solid #f0f1f2;margin-top: -1px;padding: 4px 15px 14px;display:none;}
|
||||
.replyfloor_content{}
|
||||
.replyfloor_content_li {padding: 6px 0;border-bottom:1px dashed #d6d6d6;font-size:14px;overflow: hidden;}
|
||||
.replyfloor_content_avatar {float: left;width: 32px;height: 32px;border: 1px #ccc solid;padding: 1px;}
|
||||
.replyfloor_content_avatar img {width: 32px;height: 32px;margin:0 !important;}
|
||||
.replyfloor_content_cnt {margin-left: 45px;zoom: 1;word-wrap: break-word;word-break: break-all;}
|
||||
.replyfloor_content_head {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;}
|
||||
.replyfloor_content_head_z {float:left;}
|
||||
.replyfloor_content_head_y {float:right;}
|
||||
.replyfloor_content_main {margin-top:4px;}
|
||||
.replyfloor_content_locked {overflow: hidden;padding: 6px 6px 6px 24px;border: 1px dashed #FF9A9A;background: url("../image/locked.gif") no-repeat 6px 50%;font-size: 12px; zoom:1;}
|
||||
.replyfloor_content_text {line-height: 20px;font-size:14px;}
|
||||
.replyfloor_content_text a {color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_text img {height: 20px;}
|
||||
.replyfloor_content_image {overflow: hidden;}
|
||||
.replyfloor_content_image_li {float:left;width: 120px;height: 120px;margin:5px 5px 0 0;}
|
||||
.replyfloor_content_image_li img {width: 120px;height: 120px;object-fit:cover;}
|
||||
.replyfloor_content_user {color: #999;}
|
||||
.replyfloor_content_user a{color: #2d64b3;}
|
||||
.replyfloor_content_moderating {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_location {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_time {font-size:12px;color: #aaa;margin-left: 5px;}
|
||||
.replyfloor_content_from {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_from a{color: #999;}
|
||||
.replyfloor_content_toreply {margin:0 5px;}
|
||||
.replyfloor_content_foot {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;margin-top:6px;}
|
||||
.replyfloor_content_foot_z {float:left;}
|
||||
.replyfloor_content_foot_y {float:right;}
|
||||
.replyfloor_content_rpbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_reportbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_delbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_pager {padding-top: 10px;overflow: hidden;}
|
||||
.replyfloor_content_more {float:left;font-size:12px;line-height: 28px;}
|
||||
.replyfloor_content_more a{color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_hrmore{float:left;margin-right:6px;position: relative;width: 24px;height: 28px;}
|
||||
.replyfloor_content_hrmore:before {content: "";position: absolute;left: 0;width: 24px;height: 1px;top: 13px;background: #ccc;}
|
||||
.replyfloor_content_showmore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_showmore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_showmore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -6px;position: absolute;right: 3px;top: 50%;transform: rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);-o-transform:rotate(-45deg);width: 6px;}
|
||||
.replyfloor_content_hidemore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_hidemore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_hidemore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -1px;position: absolute;right: 3px;top: 50%;transform: rotate(135deg);-ms-transform:rotate(135deg);-moz-transform:rotate(135deg);-webkit-transform:rotate(135deg);-o-transform:rotate(135deg);width: 6px;}
|
||||
.replyfloor_content_pg {float:left;font-size:12px;}
|
||||
.replyfloor_content_pg .pg {float:left;font-size:12px;}
|
||||
.replyfloor_content_pg .pg a, .replyfloor_content_pg .pg strong, .replyfloor_content_pg .pgb a, .replyfloor_content_pg .pg label{margin-left: 0px;margin-right: 4px;text-decoration: none;}
|
||||
.replyfloor_content_btn {float:right;}
|
||||
.replyfloor_content_btn a {padding: 0px 8px;font-size: 12px;background-color: #fff;color: #333;border-radius: 2px;border: 1px solid #ccc;display: block;line-height: 26px;text-decoration: none;}
|
||||
.replyfloor_content_btn a:hover {color: #38F;border: 1px solid #38F;}
|
||||
.replyfloor_editor {padding-top: 13px;}
|
||||
.replyfloor_editor .replyfloor_replyto {font-size:12px;line-height:2;padding:0 4px;}
|
||||
.replyfloor_editor .tedt {width: 100%;box-sizing:border-box;}
|
||||
.replyfloor_editor .pnpost {overflow: hidden;}
|
||||
.replyfloor_editor .replyfloor_editor_left {float:left;}
|
||||
.replyfloor_editor .replyfloor_editor_right {float:right;}
|
||||
.replyfloor_editor #seccode_replyfloor {display: flex;}
|
||||
.replyfloor_editor .replyfloor_seccodeverify {width:100px;height:24px;line-height:24px;border:1px solid #ddd;padding:0 5px;}
|
||||
.replyfloor_editor .replyfloor_seccodeimg {height: 26px;}
|
||||
.replyfloor_editor .replyfloor_editor_btn {float:right;cursor: pointer;padding: 0 25px;height: 26px;line-height: 26px;color: #FFF;text-align: center;background: #38F;border: 0 none;}
|
||||
.replyfloor_editor .replyfloor_editor_btntip {float:right;height: 26px;line-height: 26px;margin-right:10px;font-size:12px;}
|
||||
.replyfloor_editor .replyfloor_editor_notice {float:right;height: 26px;line-height: 26px;margin-right:10px;font-size:12px;}
|
||||
.replyfloor_upimage {width: 100%;overflow: hidden;}
|
||||
.replyfloor_upimage_li {float:left;position:relative;margin:5px 5px 0 0;width:50px;height:50px;}
|
||||
.replyfloor_upimage_img {width:50px;height:50px;}
|
||||
.replyfloor_upimage_img img {display:block;width:50px;height:50px;object-fit:cover;}
|
||||
.replyfloor_upimage_del {position:absolute;top:-3px;right:-3px;}
|
||||
.replyfloor_upimage_del a {display:block;width:13px;height:11px;background: url(../image/icon_close.png);}
|
73
source/plugin/replyfloor/static/css/style2.css
Normal file
@@ -0,0 +1,73 @@
|
||||
.replyfloor_box{margin-top:30px;margin-bottom: 10px;}
|
||||
.replyfloor_hd{text-align: right;height: 28px;line-height: 28px;font-size: 12px;}
|
||||
.replyfloor_tail_from{display: inline-block;margin: 0 4px;color: #999;}
|
||||
.replyfloor_tail_floor{display: inline-block;margin: 0 4px;color: #999;}
|
||||
.replyfloor_tail_time{display: inline-block;margin: 0 4px;color: #999;}
|
||||
.replyfloor_link_unfold{display: inline-block;margin-left: 4px;color: #1D53BF;font-size: 12px;cursor: pointer;}
|
||||
.replyfloor_link_fold{display: none;margin-left: 4px;border: 1px solid #f0f1f2;border-bottom: 0;color: #1D53BF;cursor: pointer;height: 28px;line-height: 28px;text-align: center;width: 80px;background: #f7f8fa;font-size: 12px;}
|
||||
.replyfloor_bd{background: #f7f8fa;border: 1px solid #f0f1f2;margin-top: -1px;padding: 4px 15px 14px;display:none;}
|
||||
.replyfloor_content{}
|
||||
.replyfloor_content_li {padding: 6px 0;border-bottom:1px dashed #d6d6d6;font-size:14px;overflow: hidden;}
|
||||
.replyfloor_content_avatar {float: left;width: 32px;height: 32px;border: 1px #ccc solid;padding: 1px;}
|
||||
.replyfloor_content_avatar img {width: 32px;height: 32px;margin:0 !important;}
|
||||
.replyfloor_content_cnt {margin-left: 45px;zoom: 1;word-wrap: break-word;word-break: break-all;}
|
||||
.replyfloor_content_head {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;}
|
||||
.replyfloor_content_head_z {float:left;}
|
||||
.replyfloor_content_head_y {float:right;}
|
||||
.replyfloor_content_main {margin-top:4px;}
|
||||
.replyfloor_content_locked {overflow: hidden;padding: 6px 6px 6px 24px;border: 1px dashed #FF9A9A;background: url("../image/locked.gif") no-repeat 6px 50%;font-size: 12px; zoom:1;}
|
||||
.replyfloor_content_text {line-height: 20px;font-size:14px;}
|
||||
.replyfloor_content_text a {color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_text img {height: 20px;}
|
||||
.replyfloor_content_image {overflow: hidden;}
|
||||
.replyfloor_content_image_li {float:left;width: 120px;height: 120px;margin:5px 5px 0 0;}
|
||||
.replyfloor_content_image_li img {width: 120px;height: 120px;object-fit:cover;}
|
||||
.replyfloor_content_user {color: #999;}
|
||||
.replyfloor_content_user a{color: #2d64b3;}
|
||||
.replyfloor_content_moderating {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_location {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_time {font-size:12px;color: #aaa;margin-left: 5px;}
|
||||
.replyfloor_content_from {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_from a{color: #999;}
|
||||
.replyfloor_content_toreply {margin:0 5px;}
|
||||
.replyfloor_content_foot {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;margin-top:6px;}
|
||||
.replyfloor_content_foot_z {float:left;}
|
||||
.replyfloor_content_foot_y {float:right;}
|
||||
.replyfloor_content_rpbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_reportbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_delbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_pager {padding-top: 10px;overflow: hidden;}
|
||||
.replyfloor_content_more {float:left;font-size:12px;line-height: 28px;}
|
||||
.replyfloor_content_more a{color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_hrmore{float:left;margin-right:6px;position: relative;width: 24px;height: 28px;}
|
||||
.replyfloor_content_hrmore:before {content: "";position: absolute;left: 0;width: 24px;height: 1px;top: 13px;background: #ccc;}
|
||||
.replyfloor_content_showmore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_showmore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_showmore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -6px;position: absolute;right: 3px;top: 50%;transform: rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);-o-transform:rotate(-45deg);width: 6px;}
|
||||
.replyfloor_content_hidemore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_hidemore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_hidemore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -1px;position: absolute;right: 3px;top: 50%;transform: rotate(135deg);-ms-transform:rotate(135deg);-moz-transform:rotate(135deg);-webkit-transform:rotate(135deg);-o-transform:rotate(135deg);width: 6px;}
|
||||
.replyfloor_content_pg {float:left;font-size:12px;}
|
||||
.replyfloor_content_pg .pg {float:left;font-size:12px;}
|
||||
.replyfloor_content_pg .pg a, .replyfloor_content_pg .pg strong, .replyfloor_content_pg .pgb a, .replyfloor_content_pg .pg label{margin-left: 0px;margin-right: 4px;text-decoration: none;}
|
||||
.replyfloor_content_btn {float:right;}
|
||||
.replyfloor_content_btn a {padding: 0px 8px;font-size: 12px;background-color: #fff;color: #333;border-radius: 2px;border: 1px solid #ccc;display: block;line-height: 26px;text-decoration: none;}
|
||||
.replyfloor_content_btn a:hover {color: #38F;border: 1px solid #38F;}
|
||||
.replyfloor_editor {padding-top: 13px;}
|
||||
.replyfloor_editor .replyfloor_replyto {font-size:12px;line-height:2;padding:0 4px;}
|
||||
.replyfloor_editor .tedt {width: 100%;box-sizing:border-box;}
|
||||
.replyfloor_editor .pnpost {overflow: hidden;}
|
||||
.replyfloor_editor .replyfloor_editor_left {float:left;}
|
||||
.replyfloor_editor .replyfloor_editor_right {float:right;}
|
||||
.replyfloor_editor #seccode_replyfloor {display: flex;}
|
||||
.replyfloor_editor .replyfloor_seccodeverify {width:100px;height:24px;line-height:24px;border:1px solid #ddd;padding:0 5px;}
|
||||
.replyfloor_editor .replyfloor_seccodeimg {height: 26px;}
|
||||
.replyfloor_editor .replyfloor_editor_btn {float:right;cursor: pointer;padding: 0 25px;height: 26px;line-height: 26px;color: #FFF;text-align: center;background: #38F;border: 0 none;}
|
||||
.replyfloor_editor .replyfloor_editor_btntip {float:right;height: 26px;line-height: 26px;margin-right:10px;font-size:12px;}
|
||||
.replyfloor_editor .replyfloor_editor_notice {float:right;height: 26px;line-height: 26px;margin-right:10px;font-size:12px;}
|
||||
.replyfloor_upimage {width: 100%;overflow: hidden;}
|
||||
.replyfloor_upimage_li {float:left;position:relative;margin:5px 5px 0 0;width:50px;height:50px;}
|
||||
.replyfloor_upimage_img {width:50px;height:50px;}
|
||||
.replyfloor_upimage_img img {display:block;width:50px;height:50px;object-fit:cover;}
|
||||
.replyfloor_upimage_del {position:absolute;top:-3px;right:-3px;}
|
||||
.replyfloor_upimage_del a {display:block;width:13px;height:11px;background: url(../image/icon_close.png);}
|
66
source/plugin/replyfloor/static/css/style3.css
Normal file
@@ -0,0 +1,66 @@
|
||||
.replyfloor_box{margin-top:30px;margin-bottom: 10px;}
|
||||
.replyfloor_hd{text-align: right;padding-bottom:10px;line-height: 20px;font-size: 12px;}
|
||||
.replyfloor_hd span{text-decoration: none;color: #aaa;font-size: 12px;padding-left:18px;background-image:url(../image/icon_reply.png);background-repeat:no-repeat;background-position:left center;background-size:auto 12px;display:inline-block;cursor: pointer;}
|
||||
.replyfloor_fd{text-align: right;padding-top:10px;line-height: 20px;font-size: 12px;}
|
||||
.replyfloor_fd span{text-decoration: none;color: #aaa;font-size: 12px;padding-left:18px;background-image:url(../image/icon_reply.png);background-repeat:no-repeat;background-position:left center;background-size:auto 12px;display:inline-block;cursor: pointer;}
|
||||
.replyfloor_bd{background: #f7f8fa;border: 1px solid #f0f1f2;margin-top: -1px;padding: 4px 15px 14px;display:none;}
|
||||
.replyfloor_content{}
|
||||
.replyfloor_content_li {padding: 6px 0;border-bottom:1px dashed #d6d6d6;font-size:14px;overflow: hidden;}
|
||||
.replyfloor_content_avatar {float: left;width: 32px;height: 32px;border: 1px #ccc solid;padding: 1px;}
|
||||
.replyfloor_content_avatar img {width: 32px;height: 32px;margin:0 !important;}
|
||||
.replyfloor_content_cnt {margin-left: 45px;zoom: 1;word-wrap: break-word;word-break: break-all;}
|
||||
.replyfloor_content_head {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;}
|
||||
.replyfloor_content_head_z {float:left;}
|
||||
.replyfloor_content_head_y {float:right;}
|
||||
.replyfloor_content_main {margin-top:4px;}
|
||||
.replyfloor_content_locked {overflow: hidden;padding: 6px 6px 6px 24px;border: 1px dashed #FF9A9A;background: url("../image/locked.gif") no-repeat 6px 50%;font-size: 12px; zoom:1;}
|
||||
.replyfloor_content_text {line-height: 20px;font-size:14px;}
|
||||
.replyfloor_content_text a {color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_text img {height: 20px;}
|
||||
.replyfloor_content_image {overflow: hidden;}
|
||||
.replyfloor_content_image_li {float:left;width: 120px;height: 120px;margin:5px 5px 0 0;}
|
||||
.replyfloor_content_image_li img {width: 120px;height: 120px;object-fit:cover;}
|
||||
.replyfloor_content_user {color: #999;}
|
||||
.replyfloor_content_user a{color: #2d64b3;}
|
||||
.replyfloor_content_moderating {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_location {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_time {font-size:12px;color: #aaa;margin-left: 5px;}
|
||||
.replyfloor_content_from {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_from a{color: #999;}
|
||||
.replyfloor_content_toreply {margin:0 5px;}
|
||||
.replyfloor_content_foot {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;margin-top:6px;}
|
||||
.replyfloor_content_foot_z {float:left;}
|
||||
.replyfloor_content_foot_y {float:right;}
|
||||
.replyfloor_content_rpbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_reportbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_delbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_pager {padding-top: 10px;overflow: hidden;}
|
||||
.replyfloor_content_more {float:left;font-size:12px;line-height: 28px;}
|
||||
.replyfloor_content_more a{color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_hrmore{float:left;margin-right:6px;position: relative;width: 24px;height: 28px;}
|
||||
.replyfloor_content_hrmore:before {content: "";position: absolute;left: 0;width: 24px;height: 1px;top: 13px;background: #ccc;}
|
||||
.replyfloor_content_showmore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_showmore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_showmore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -6px;position: absolute;right: 3px;top: 50%;transform: rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);-o-transform:rotate(-45deg);width: 6px;}
|
||||
.replyfloor_content_hidemore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_hidemore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_hidemore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -1px;position: absolute;right: 3px;top: 50%;transform: rotate(135deg);-ms-transform:rotate(135deg);-moz-transform:rotate(135deg);-webkit-transform:rotate(135deg);-o-transform:rotate(135deg);width: 6px;}
|
||||
.replyfloor_content_pg {float:left;font-size:12px;}
|
||||
.replyfloor_content_pg .pg {float:left;font-size:12px;}
|
||||
.replyfloor_content_pg .pg a, .replyfloor_content_pg .pg strong, .replyfloor_content_pg .pgb a, .replyfloor_content_pg .pg label{margin-left: 0px;margin-right: 4px;text-decoration: none;}
|
||||
.replyfloor_content_btn {float:right;}
|
||||
.replyfloor_content_btn a {padding: 0px 8px;font-size: 12px;background-color: #fff;color: #333;border-radius: 2px;border: 1px solid #ccc;display: block;line-height: 26px;text-decoration: none;}
|
||||
.replyfloor_content_btn a:hover {color: #38F;border: 1px solid #38F;}
|
||||
.replyfloor_replyto {font-size:12px;line-height:2;padding:0 4px;}
|
||||
#seccode_replyfloor {display: flex;}
|
||||
.replyfloor_editor_seccodeverify {width:100px;height:24px;line-height:24px;border:1px solid #ddd;padding:0 5px;}
|
||||
.replyfloor_editor_seccodeimg {height: 26px;}
|
||||
.replyfloor_editor_btn {float:right;cursor: pointer;padding: 0 25px;height: 26px;line-height: 26px;color: #FFF;text-align: center;background: #38F;border: 0 none;}
|
||||
.replyfloor_editor_btntip {float:right;height: 26px;line-height: 26px;margin-right:10px;font-size:12px;}
|
||||
.replyfloor_editor_notice {float:right;height: 26px;line-height: 26px;margin-right:10px;font-size:12px;}
|
||||
.replyfloor_upimage {width: 100%;overflow: hidden;}
|
||||
.replyfloor_upimage_li {float:left;position:relative;margin:5px 5px 0 0;width:50px;height:50px;}
|
||||
.replyfloor_upimage_img {width:50px;height:50px;}
|
||||
.replyfloor_upimage_img img {display:block;width:50px;height:50px;object-fit:cover;}
|
||||
.replyfloor_upimage_del {position:absolute;top:-3px;right:-3px;}
|
||||
.replyfloor_upimage_del a {display:block;width:13px;height:11px;background: url(../image/icon_close.png);}
|
100
source/plugin/replyfloor/static/css/touch/style1.css
Normal file
@@ -0,0 +1,100 @@
|
||||
.replyfloor_box{margin-top:30px;margin-bottom: 10px;}
|
||||
.replyfloor_hd{line-height: 24px;text-align: center;}
|
||||
.replyfloor_link_unfold{display: inline-block;padding:0 8px 0 30px;border: 1px solid #f0f1f2;background: url("../../image/fastreply.svg") #f7f8fa no-repeat 8px center;height: 30px;line-height: 30px;white-space: nowrap;color: #333;font-size: 12px;cursor: pointer;margin-bottom:30px;}
|
||||
.replyfloor_link_fold{display: none;border: 1px solid #f0f1f2;border-bottom: 0;color: #1D53BF;cursor: pointer;height: 30px;line-height: 30px;text-align: center;width: 100px;background: #f7f8fa;font-size: 12px;}
|
||||
.replyfloor_bd{background: #f7f8fa;border: 1px solid #f0f1f2;margin-top: -1px;padding: 4px 10px 14px;display:none;}
|
||||
.replyfloor_content{}
|
||||
.replyfloor_content_li {padding: 6px 0;border-bottom:1px dashed #d6d6d6;font-size:14px;overflow: hidden;}
|
||||
.replyfloor_content_avatar {float: left;width: 32px;height: 32px;border: 1px #ccc solid;padding: 1px;overflow: hidden;}
|
||||
.replyfloor_content_avatar a {display:block;}
|
||||
.replyfloor_content_avatar img {width: 100%;height: 100%;margin:0 !important;}
|
||||
.replyfloor_content_cnt {margin-left: 45px;zoom: 1;word-wrap: break-word;word-break: break-all;}
|
||||
.replyfloor_content_head {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;}
|
||||
.replyfloor_content_head_z {float:left;}
|
||||
.replyfloor_content_head_y {float:right;}
|
||||
.replyfloor_content_main {margin-top:4px;}
|
||||
.replyfloor_content_locked {overflow: hidden;padding: 6px 6px 6px 24px;border: 1px dashed #FF9A9A;background: url("../../image/locked.gif") no-repeat 6px 50%;font-size: 12px; zoom:1;}
|
||||
.replyfloor_content_text {line-height: 20px;font-size:14px;}
|
||||
.replyfloor_content_text a {color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_text img {height: 20px;vertical-align: middle;margin:0 !important;border-radius:0 !important;}
|
||||
.replyfloor_content_image {overflow: hidden;}
|
||||
.replyfloor_content_image_li {float:left;width: 120px;height: 120px;margin:5px 5px 0 0;}
|
||||
.replyfloor_content_image_li img {width: 120px;height: 120px;object-fit:cover;}
|
||||
.replyfloor_content_user {color: #999;}
|
||||
.replyfloor_content_user a{color: #2d64b3;}
|
||||
.replyfloor_content_moderating {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_location {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_time {font-size:12px;color: #aaa;}
|
||||
.replyfloor_content_from {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_from a{color: #999;}
|
||||
.replyfloor_content_toreply {margin:0 5px;}
|
||||
.replyfloor_content_foot {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;margin-top:4px;}
|
||||
.replyfloor_content_foot_z {float:left;}
|
||||
.replyfloor_content_foot_y {float:right;}
|
||||
.replyfloor_content_rpbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_reportbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_delbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_pager {padding-top: 10px;overflow: hidden;}
|
||||
.replyfloor_content_more {float:left;font-size:12px;line-height: 28px;}
|
||||
.replyfloor_content_more a{color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_hrmore{float:left;margin-right:6px;position: relative;width: 24px;height: 28px;}
|
||||
.replyfloor_content_hrmore:before {content: "";position: absolute;left: 0;width: 24px;height: 1px;top: 13px;background: #ccc;}
|
||||
.replyfloor_content_showmore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_showmore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_showmore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -6px;position: absolute;right: 3px;top: 50%;transform: rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);-o-transform:rotate(-45deg);width: 6px;}
|
||||
.replyfloor_content_hidemore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_hidemore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_hidemore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -1px;position: absolute;right: 3px;top: 50%;transform: rotate(135deg);-ms-transform:rotate(135deg);-moz-transform:rotate(135deg);-webkit-transform:rotate(135deg);-o-transform:rotate(135deg);width: 6px;}
|
||||
.replyfloor_content_pg {float:left;font-size:12px;line-height:26px;}
|
||||
.replyfloor_content_pg a,.replyfloor_content_pg strong,.replyfloor_content_pg label { float:left; display:inline; margin-right:4px; padding:0 8px; height:26px; border:1px solid; border-color:#C2D5E3; background-color:#FFF; background-repeat:no-repeat; color:#333; overflow:hidden; text-decoration:none;}
|
||||
.replyfloor_content_pg a.nxt { padding:0 10px;}
|
||||
.replyfloor_content_pg a:hover { border-color:#369; color:#369;}
|
||||
.replyfloor_content_pg a.nxt {padding-right:25px;background-image:url("../../image/arw_r.gif");background-position:90% 50%;}
|
||||
.replyfloor_content_pg a.prev {background-image:url("../../image/arw_l.gif");background-position:50% 50%;}
|
||||
.replyfloor_content_pg strong {background-color:#E5EDF2;}
|
||||
.replyfloor_content_btn {float:right;}
|
||||
.replyfloor_content_btn a {padding: 0px 8px;font-size: 12px;background-color: #fff;color: #333;border-radius: 2px;border: 1px solid #ccc;display: block;line-height: 26px;text-decoration: none;}
|
||||
.replyfloor_content_btn a:hover {color: #38F;border: 1px solid #38F;}
|
||||
.replyfloor_editor {padding-top: 13px;}
|
||||
.replyfloor_editor .replyfloor_replyto {font-size:12px;line-height:2;padding:0 4px;}
|
||||
.replyfloor_editor .replyfloor_tedt {width: 100%;box-sizing:border-box;border: 1px solid #ccc;border-radius: 3px;overflow: hidden;}
|
||||
.replyfloor_editor .replyfloor_tedtbar {padding: 0 10px 0 0;height: 32px;line-height: 32px;border-top: 1px solid #ccc;background: #eee;overflow: hidden;}
|
||||
.replyfloor_editor .replyfloor_tedtbar span{float: left;display:block;width:32px;height: 32px;line-height: 32px;text-align:center;overflow: hidden;text-indent: -9999px;cursor: pointer;}
|
||||
.replyfloor_editor .replyfloor_tedtbar span.replyfloor_tedtbar_fbld{background:url("../../image/fbld.svg") no-repeat center center;}
|
||||
.replyfloor_editor .replyfloor_tedtbar span.replyfloor_tedtbar_fclr{background:url("../../image/fclr.svg") no-repeat center center;}
|
||||
.replyfloor_editor .replyfloor_tedtbar span.replyfloor_tedtbar_fsml{background:url("../../image/fsml.svg") no-repeat center center;}
|
||||
.replyfloor_editor .replyfloor_tedtbar span.replyfloor_tedtbar_fmg{background:url("../../image/fmg.svg") no-repeat center center;}
|
||||
.replyfloor_editor .replyfloor_tedtarea {padding:3px;}
|
||||
.replyfloor_editor .replyfloor_tedtarea textarea {width: 100%;box-sizing:border-box;border: 0 none;display:block;resize: none;}
|
||||
.replyfloor_editor .replyfloor_pnpost {overflow: hidden;}
|
||||
.replyfloor_editor .replyfloor_editor_left {padding-top:10px;overflow: hidden;}
|
||||
.replyfloor_editor .replyfloor_editor_right {padding-top:10px;overflow: hidden;}
|
||||
.replyfloor_editor .replyfloor_seccodeverify {float:left;width:100px;height:24px;line-height:24px;border:1px solid #ddd;padding:0 5px;margin-right: 5px;}
|
||||
.replyfloor_editor .replyfloor_seccodeimg {float:left;height: 26px;margin: 0;}
|
||||
.replyfloor_editor .replyfloor_editor_btn {width: auto;margin: 0;float:right;cursor: pointer;padding: 0 20px;height: 26px;line-height: 26px;color: #FFF;text-align: center;background: #38F;border: 0 none;font-size:12px;}
|
||||
.replyfloor_editor .replyfloor_editor_btntip {float:right;height: 26px;line-height: 26px;margin-right:6px;font-size:12px;}
|
||||
.replyfloor_editor .replyfloor_editor_notice {float:right;height: 26px;line-height: 26px;margin-right:6px;font-size:12px;}
|
||||
.replyfloor_showcolorbox {overflow: hidden;display: flex;flex-wrap: wrap;}
|
||||
.replyfloor_showcolorbox span{width:12.5%;display:block;text-align:center;padding:5px 0;}
|
||||
.replyfloor_showcolorbox button{display:block;margin: 0 auto;padding: 0;width: 24px;height: 24px;border: 0;cursor: pointer;}
|
||||
.replyfloor_showsmilebox {overflow: hidden;}
|
||||
.replyfloor_showsmilebox_tab{overflow: hidden;}
|
||||
.replyfloor_showsmilebox_tab ul{overflow: hidden;overflow-x: auto;padding:10px 0;white-space:nowrap;}
|
||||
.replyfloor_showsmilebox_tab ul li{display:inline-block;padding:0 5px;height:20px;line-height:20px;margin:0 5px;background: #E5EDF2;color:#999;font-size:12px;border: 1px solid #CDCDCD;}
|
||||
.replyfloor_showsmilebox_tab ul li.current{background:#999;color:#fff;}
|
||||
.replyfloor_showsmilebox_data{overflow: hidden;overflow-y: auto;max-height:120px;display: flex;flex-wrap: wrap;}
|
||||
.replyfloor_showsmilebox_data span{width:12.5%;display:block;text-align:center;padding:5px 0;}
|
||||
.replyfloor_upimage {width: 100%;overflow: hidden;}
|
||||
.replyfloor_upimage_li {float:left;position:relative;margin:5px 5px 0 0;width:50px;height:50px;}
|
||||
.replyfloor_upimage_img {width:50px;height:50px;}
|
||||
.replyfloor_upimage_img img {display:block;width:50px;height:50px;object-fit:cover;}
|
||||
.replyfloor_upimage_del {position:absolute;top:-3px;right:-3px;}
|
||||
.replyfloor_upimage_del a {display:block;width:13px;height:11px;background: url("../../image/icon_close.png");}
|
||||
.replyfloor_popup_mask{position: fixed;bottom: 0px;top: 0px;left: 0px;right: 0px;background-color: rgba(0, 0, 0, 0.4);z-index: 99;}
|
||||
.replyfloor_popup_box{position: fixed;left: 0px;right: 0px;bottom: 0px;background:#fff;z-index: 99;}
|
||||
.replyfloor_popup_close{position:absolute;top: 10px;right: 10px;height:20px;width:20px;overflow: hidden;background:url("../../image/close.png") no-repeat center center;}
|
||||
.replyfloor_popup_area{padding: 10px;}
|
||||
.replyfloor_popup_title {padding:0 0 10px;font-size:16px;font-weight:bold;}
|
||||
.replyfloor_popup_reportarea{width:100%;line-height: 24px;border: 1px solid #D3D4D4;padding:4px 5px;font-size:14px;vertical-align:baseline;box-sizing:border-box;}
|
||||
.replyfloor_popup_reportbtn{}
|
||||
.replyfloor_popup_reportbtn button{width: 100%;font-size: 16px;height: 42px;line-height: 42px;text-align: center;font-weight: 400;background: #38F;color: #FFF;border:0 none;padding:0;margin:0;}
|
103
source/plugin/replyfloor/static/css/touch/style2.css
Normal file
@@ -0,0 +1,103 @@
|
||||
.replyfloor_box{margin-top:30px;margin-bottom: 10px;}
|
||||
.replyfloor_hd{text-align: right;height: 28px;line-height: 28px;font-size: 12px;}
|
||||
.replyfloor_tail_from{display: inline-block;margin: 0 4px;color: #999;}
|
||||
.replyfloor_tail_floor{display: inline-block;margin: 0 4px;color: #999;}
|
||||
.replyfloor_tail_time{display: inline-block;margin: 0 4px;color: #999;}
|
||||
.replyfloor_link_unfold{display: inline-block;margin-left: 4px;color: #1D53BF;cursor: pointer;font-size: 12px;}
|
||||
.replyfloor_link_fold{display: none;margin-left: 4px;border: 1px solid #f0f1f2;border-bottom: 0;color: #1D53BF;cursor: pointer;height: 28px;line-height: 28px;text-align: center;width: 80px;background: #f7f8fa;font-size: 12px;}
|
||||
.replyfloor_bd{background: #f7f8fa;border: 1px solid #f0f1f2;margin-top: -1px;padding: 4px 10px 14px;display:none;}
|
||||
.replyfloor_content{}
|
||||
.replyfloor_content_li {padding: 6px 0;border-bottom:1px dashed #d6d6d6;font-size:14px;overflow: hidden;}
|
||||
.replyfloor_content_avatar {float: left;width: 32px;height: 32px;border: 1px #ccc solid;padding: 1px;overflow: hidden;}
|
||||
.replyfloor_content_avatar a {display:block;}
|
||||
.replyfloor_content_avatar img {width: 100%;height: 100%;margin:0 !important;}
|
||||
.replyfloor_content_cnt {margin-left: 45px;zoom: 1;word-wrap: break-word;word-break: break-all;}
|
||||
.replyfloor_content_head {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;}
|
||||
.replyfloor_content_head_z {float:left;}
|
||||
.replyfloor_content_head_y {float:right;}
|
||||
.replyfloor_content_main {margin-top:4px;}
|
||||
.replyfloor_content_locked {overflow: hidden;padding: 6px 6px 6px 24px;border: 1px dashed #FF9A9A;background: url("../../image/locked.gif") no-repeat 6px 50%;font-size: 12px; zoom:1;}
|
||||
.replyfloor_content_text {line-height: 20px;font-size:14px;}
|
||||
.replyfloor_content_text a {color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_text img {height: 20px;vertical-align: middle;margin:0 !important;border-radius:0 !important;}
|
||||
.replyfloor_content_image {overflow: hidden;}
|
||||
.replyfloor_content_image_li {float:left;width: 120px;height: 120px;margin:5px 5px 0 0;}
|
||||
.replyfloor_content_image_li img {width: 120px;height: 120px;object-fit:cover;}
|
||||
.replyfloor_content_user {color: #999;}
|
||||
.replyfloor_content_user a{color: #2d64b3;}
|
||||
.replyfloor_content_moderating {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_location {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_time {font-size:12px;color: #aaa;}
|
||||
.replyfloor_content_from {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_from a{color: #999;}
|
||||
.replyfloor_content_toreply {margin:0 5px;}
|
||||
.replyfloor_content_foot {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;margin-top:4px;}
|
||||
.replyfloor_content_foot_z {float:left;}
|
||||
.replyfloor_content_foot_y {float:right;}
|
||||
.replyfloor_content_rpbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_reportbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_delbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_pager {padding-top: 10px;overflow: hidden;}
|
||||
.replyfloor_content_more {float:left;font-size:12px;line-height: 28px;}
|
||||
.replyfloor_content_more a{color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_hrmore{float:left;margin-right:6px;position: relative;width: 24px;height: 28px;}
|
||||
.replyfloor_content_hrmore:before {content: "";position: absolute;left: 0;width: 24px;height: 1px;top: 13px;background: #ccc;}
|
||||
.replyfloor_content_showmore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_showmore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_showmore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -6px;position: absolute;right: 3px;top: 50%;transform: rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);-o-transform:rotate(-45deg);width: 6px;}
|
||||
.replyfloor_content_hidemore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_hidemore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_hidemore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -1px;position: absolute;right: 3px;top: 50%;transform: rotate(135deg);-ms-transform:rotate(135deg);-moz-transform:rotate(135deg);-webkit-transform:rotate(135deg);-o-transform:rotate(135deg);width: 6px;}
|
||||
.replyfloor_content_pg {float:left;font-size:12px;line-height:26px;}
|
||||
.replyfloor_content_pg a,.replyfloor_content_pg strong,.replyfloor_content_pg label { float:left; display:inline; margin-right:4px; padding:0 8px; height:26px; border:1px solid; border-color:#C2D5E3; background-color:#FFF; background-repeat:no-repeat; color:#333; overflow:hidden; text-decoration:none;}
|
||||
.replyfloor_content_pg a.nxt { padding:0 10px;}
|
||||
.replyfloor_content_pg a:hover { border-color:#369; color:#369;}
|
||||
.replyfloor_content_pg a.nxt {padding-right:25px;background-image:url("../../image/arw_r.gif");background-position:90% 50%;}
|
||||
.replyfloor_content_pg a.prev {background-image:url("../../image/arw_l.gif");background-position:50% 50%;}
|
||||
.replyfloor_content_pg strong {background-color:#E5EDF2;}
|
||||
.replyfloor_content_btn {float:right;}
|
||||
.replyfloor_content_btn a {padding: 0px 8px;font-size: 12px;background-color: #fff;color: #333;border-radius: 2px;border: 1px solid #ccc;display: block;line-height: 26px;text-decoration: none;}
|
||||
.replyfloor_content_btn a:hover {color: #38F;border: 1px solid #38F;}
|
||||
.replyfloor_editor {padding-top: 13px;}
|
||||
.replyfloor_editor .replyfloor_replyto {font-size:12px;line-height:2;padding:0 4px;}
|
||||
.replyfloor_editor .replyfloor_tedt {width: 100%;box-sizing:border-box;border: 1px solid #ccc;border-radius: 3px;overflow: hidden;}
|
||||
.replyfloor_editor .replyfloor_tedtbar {padding: 0 10px 0 0;height: 32px;line-height: 32px;border-top: 1px solid #ccc;background: #eee;overflow: hidden;}
|
||||
.replyfloor_editor .replyfloor_tedtbar span{float: left;display:block;width:32px;height: 32px;line-height: 32px;text-align:center;overflow: hidden;text-indent: -9999px;cursor: pointer;}
|
||||
.replyfloor_editor .replyfloor_tedtbar span.replyfloor_tedtbar_fbld{background:url("../../image/fbld.svg") no-repeat center center;}
|
||||
.replyfloor_editor .replyfloor_tedtbar span.replyfloor_tedtbar_fclr{background:url("../../image/fclr.svg") no-repeat center center;}
|
||||
.replyfloor_editor .replyfloor_tedtbar span.replyfloor_tedtbar_fsml{background:url("../../image/fsml.svg") no-repeat center center;}
|
||||
.replyfloor_editor .replyfloor_tedtbar span.replyfloor_tedtbar_fmg{background:url("../../image/fmg.svg") no-repeat center center;}
|
||||
.replyfloor_editor .replyfloor_tedtarea {padding:3px;}
|
||||
.replyfloor_editor .replyfloor_tedtarea textarea {width: 100%;box-sizing:border-box;border: 0 none;display:block;resize: none;}
|
||||
.replyfloor_editor .replyfloor_pnpost {overflow: hidden;}
|
||||
.replyfloor_editor .replyfloor_editor_left {padding-top:10px;overflow: hidden;}
|
||||
.replyfloor_editor .replyfloor_editor_right {padding-top:10px;overflow: hidden;}
|
||||
.replyfloor_editor .replyfloor_seccodeverify {float:left;width:100px;height:24px;line-height:24px;border:1px solid #ddd;padding:0 5px;margin-right: 5px;}
|
||||
.replyfloor_editor .replyfloor_seccodeimg {float:left;height: 26px;margin: 0;}
|
||||
.replyfloor_editor .replyfloor_editor_btn {width: auto;margin: 0;float:right;cursor: pointer;padding: 0 20px;height: 26px;line-height: 26px;color: #FFF;text-align: center;background: #38F;border: 0 none;font-size:12px;}
|
||||
.replyfloor_editor .replyfloor_editor_btntip {float:right;height: 26px;line-height: 26px;margin-right:6px;font-size:12px;}
|
||||
.replyfloor_editor .replyfloor_editor_notice {float:right;height: 26px;line-height: 26px;margin-right:6px;font-size:12px;}
|
||||
.replyfloor_showcolorbox {overflow: hidden;display: flex;flex-wrap: wrap;}
|
||||
.replyfloor_showcolorbox span{width:12.5%;display:block;text-align:center;padding:5px 0;}
|
||||
.replyfloor_showcolorbox button{display:block;margin: 0 auto;padding: 0;width: 24px;height: 24px;border: 0;cursor: pointer;}
|
||||
.replyfloor_showsmilebox {overflow: hidden;}
|
||||
.replyfloor_showsmilebox_tab{overflow: hidden;}
|
||||
.replyfloor_showsmilebox_tab ul{overflow: hidden;overflow-x: auto;padding:10px 0;white-space:nowrap;}
|
||||
.replyfloor_showsmilebox_tab ul li{display:inline-block;padding:0 5px;height:20px;line-height:20px;margin:0 5px;background: #E5EDF2;color:#999;font-size:12px;border: 1px solid #CDCDCD;}
|
||||
.replyfloor_showsmilebox_tab ul li.current{background:#999;color:#fff;}
|
||||
.replyfloor_showsmilebox_data{overflow: hidden;overflow-y: auto;max-height:120px;display: flex;flex-wrap: wrap;}
|
||||
.replyfloor_showsmilebox_data span{width:12.5%;display:block;text-align:center;padding:5px 0;}
|
||||
.replyfloor_upimage {width: 100%;overflow: hidden;}
|
||||
.replyfloor_upimage_li {float:left;position:relative;margin:5px 5px 0 0;width:50px;height:50px;}
|
||||
.replyfloor_upimage_img {width:50px;height:50px;}
|
||||
.replyfloor_upimage_img img {display:block;width:50px;height:50px;object-fit:cover;}
|
||||
.replyfloor_upimage_del {position:absolute;top:-3px;right:-3px;}
|
||||
.replyfloor_upimage_del a {display:block;width:13px;height:11px;background: url("../../image/icon_close.png");}
|
||||
.replyfloor_popup_mask{position: fixed;bottom: 0px;top: 0px;left: 0px;right: 0px;background-color: rgba(0, 0, 0, 0.4);z-index: 99;}
|
||||
.replyfloor_popup_box{position: fixed;left: 0px;right: 0px;bottom: 0px;background:#fff;z-index: 99;}
|
||||
.replyfloor_popup_close{position:absolute;top: 10px;right: 10px;height:20px;width:20px;overflow: hidden;background:url("../../image/close.png") no-repeat center center;}
|
||||
.replyfloor_popup_area{padding: 10px;}
|
||||
.replyfloor_popup_title {padding:0 0 10px;font-size:16px;font-weight:bold;}
|
||||
.replyfloor_popup_reportarea{width:100%;line-height: 24px;border: 1px solid #D3D4D4;padding:4px 5px;font-size:14px;vertical-align:baseline;box-sizing:border-box;}
|
||||
.replyfloor_popup_reportbtn{}
|
||||
.replyfloor_popup_reportbtn button{width: 100%;font-size: 16px;height: 42px;line-height: 42px;text-align: center;font-weight: 400;background: #38F;color: #FFF;border:0 none;padding:0;margin:0;}
|
100
source/plugin/replyfloor/static/css/touch/style3.css
Normal file
@@ -0,0 +1,100 @@
|
||||
.replyfloor_box{margin-top:30px;margin-bottom: 10px;}
|
||||
.replyfloor_hd{text-align: right;padding-bottom:10px;line-height: 20px;font-size: 12px;display:none;}
|
||||
.replyfloor_hd span{text-decoration: none;color: #aaa;font-size: 12px;padding-left:18px;background-image:url("../../image/fastreply.svg");background-repeat:no-repeat;background-position:left center;background-size:auto 16px;display:inline-block;cursor: pointer;}
|
||||
.replyfloor_fd{text-align: right;padding-top:10px;line-height: 20px;font-size: 12px;}
|
||||
.replyfloor_fd span{text-decoration: none;color: #aaa;font-size: 12px;padding-left:18px;background-image:url("../../image/fastreply.svg");background-repeat:no-repeat;background-position:left center;background-size:auto 16px;display:inline-block;cursor: pointer;}
|
||||
.replyfloor_bd{background: #f7f8fa;border: 1px solid #f0f1f2;margin-top: -1px;padding: 4px 10px 14px;display:none;}
|
||||
.replyfloor_content{}
|
||||
.replyfloor_content_li {padding: 6px 0;border-bottom:1px dashed #d6d6d6;font-size:14px;overflow: hidden;}
|
||||
.replyfloor_content_avatar {float: left;width: 32px;height: 32px;border: 1px #ccc solid;padding: 1px;overflow: hidden;}
|
||||
.replyfloor_content_avatar a {display:block;}
|
||||
.replyfloor_content_avatar img {width: 100%;height: 100%;margin:0 !important;}
|
||||
.replyfloor_content_cnt {margin-left: 45px;zoom: 1;word-wrap: break-word;word-break: break-all;}
|
||||
.replyfloor_content_head {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;}
|
||||
.replyfloor_content_head_z {float:left;}
|
||||
.replyfloor_content_head_y {float:right;}
|
||||
.replyfloor_content_main {margin-top:4px;}
|
||||
.replyfloor_content_locked {overflow: hidden;padding: 6px 6px 6px 24px;border: 1px dashed #FF9A9A;background: url("../../image/locked.gif") no-repeat 6px 50%;font-size: 12px; zoom:1;}
|
||||
.replyfloor_content_text {line-height: 20px;font-size:14px;}
|
||||
.replyfloor_content_text a {color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_text img {height: 20px;vertical-align: middle;margin:0 !important;border-radius:0 !important;}
|
||||
.replyfloor_content_image {overflow: hidden;}
|
||||
.replyfloor_content_image_li {float:left;width: 120px;height: 120px;margin:5px 5px 0 0;}
|
||||
.replyfloor_content_image_li img {width: 120px;height: 120px;object-fit:cover;}
|
||||
.replyfloor_content_user {color: #999;}
|
||||
.replyfloor_content_user a{color: #2d64b3;}
|
||||
.replyfloor_content_moderating {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_location {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_time {font-size:12px;color: #aaa;}
|
||||
.replyfloor_content_from {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_from a{color: #999;}
|
||||
.replyfloor_content_toreply {margin:0 5px;}
|
||||
.replyfloor_content_foot {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;margin-top:4px;}
|
||||
.replyfloor_content_foot_z {float:left;}
|
||||
.replyfloor_content_foot_y {float:right;}
|
||||
.replyfloor_content_rpbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_reportbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_delbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_pager {padding-top: 10px;overflow: hidden;}
|
||||
.replyfloor_content_more {float:left;font-size:12px;line-height: 28px;}
|
||||
.replyfloor_content_more a{color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_hrmore{float:left;margin-right:6px;position: relative;width: 24px;height: 28px;}
|
||||
.replyfloor_content_hrmore:before {content: "";position: absolute;left: 0;width: 24px;height: 1px;top: 13px;background: #ccc;}
|
||||
.replyfloor_content_showmore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_showmore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_showmore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -6px;position: absolute;right: 3px;top: 50%;transform: rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);-o-transform:rotate(-45deg);width: 6px;}
|
||||
.replyfloor_content_hidemore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_hidemore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_hidemore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -1px;position: absolute;right: 3px;top: 50%;transform: rotate(135deg);-ms-transform:rotate(135deg);-moz-transform:rotate(135deg);-webkit-transform:rotate(135deg);-o-transform:rotate(135deg);width: 6px;}
|
||||
.replyfloor_content_pg {float:left;font-size:12px;line-height:26px;}
|
||||
.replyfloor_content_pg a,.replyfloor_content_pg strong,.replyfloor_content_pg label { float:left; display:inline; margin-right:4px; padding:0 8px; height:26px; border:1px solid; border-color:#C2D5E3; background-color:#FFF; background-repeat:no-repeat; color:#333; overflow:hidden; text-decoration:none;}
|
||||
.replyfloor_content_pg a.nxt { padding:0 10px;}
|
||||
.replyfloor_content_pg a:hover { border-color:#369; color:#369;}
|
||||
.replyfloor_content_pg a.nxt {padding-right:25px;background-image:url("../../image/arw_r.gif");background-position:90% 50%;}
|
||||
.replyfloor_content_pg a.prev {background-image:url("../../image/arw_l.gif");background-position:50% 50%;}
|
||||
.replyfloor_content_pg strong {background-color:#E5EDF2;}
|
||||
.replyfloor_content_btn {float:right;}
|
||||
.replyfloor_content_btn a {padding: 0px 8px;font-size: 12px;background-color: #fff;color: #333;border-radius: 2px;border: 1px solid #ccc;display: block;line-height: 26px;text-decoration: none;}
|
||||
.replyfloor_content_btn a:hover {color: #38F;border: 1px solid #38F;}
|
||||
.replyfloor_popup_mask{position: fixed;bottom: 0px;top: 0px;left: 0px;right: 0px;background-color: rgba(0, 0, 0, 0.4);z-index: 99;}
|
||||
.replyfloor_popup_box{position: fixed;left: 0px;right: 0px;bottom: 0px;background:#fff;z-index: 99;}
|
||||
.replyfloor_popup_close{position:absolute;top: 10px;right: 10px;height:20px;width:20px;overflow: hidden;background:url("../../image/close.png") no-repeat center center;cursor: pointer;}
|
||||
.replyfloor_popup_area{padding: 10px;}
|
||||
.replyfloor_popup_title {padding:0 0 10px;font-size:16px;font-weight:bold;}
|
||||
.replyfloor_popup_replyto {font-size:12px;line-height:2;padding:0 4px;}
|
||||
.replyfloor_popup_tedt {width: 100%;box-sizing:border-box;border: 1px solid #ccc;border-radius: 3px;overflow: hidden;}
|
||||
.replyfloor_popup_tedtbar {padding: 0 10px 0 0;height: 32px;line-height: 32px;border-top: 1px solid #ccc;background: #eee;overflow: hidden;}
|
||||
.replyfloor_popup_tedtbar span{float: left;display:block;width:32px;height: 32px;line-height: 32px;text-align:center;overflow: hidden;text-indent: -9999px;cursor: pointer;}
|
||||
.replyfloor_popup_tedtbar span.replyfloor_popup_tedtbar_fbld{background:url("../../image/fbld.svg") no-repeat center center;}
|
||||
.replyfloor_popup_tedtbar span.replyfloor_popup_tedtbar_fclr{background:url("../../image/fclr.svg") no-repeat center center;}
|
||||
.replyfloor_popup_tedtbar span.replyfloor_popup_tedtbar_fsml{background:url("../../image/fsml.svg") no-repeat center center;}
|
||||
.replyfloor_popup_tedtbar span.replyfloor_popup_tedtbar_fmg{background:url("../../image/fmg.svg") no-repeat center center;}
|
||||
.replyfloor_popup_tedtarea {padding:3px;}
|
||||
.replyfloor_popup_tedtarea textarea {width: 100%;box-sizing:border-box;border: 0 none;display:block;resize: none;}
|
||||
.replyfloor_popup_seccode {padding-top:10px;overflow: hidden;}
|
||||
.replyfloor_popup_seccodeverify {float:left;width:100px;height:24px;line-height:24px;border:1px solid #ddd;padding:0 5px;margin-right: 5px;}
|
||||
.replyfloor_popup_seccodeimg {float:left;height: 26px;margin: 0;}
|
||||
.replyfloor_popup_info{padding-top:10px;font-size: 14px;overflow: hidden;}
|
||||
.replyfloor_popup_notice{float:left;}
|
||||
.replyfloor_popup_btntip{float:right;}
|
||||
.replyfloor_popup_btn{}
|
||||
.replyfloor_popup_btn button{width: 100%;font-size: 16px;height: 42px;line-height: 42px;text-align: center;font-weight: 400;background: #38F;color: #FFF;border:0 none;padding:0;margin:0;}
|
||||
.replyfloor_popup_reportarea{width:100%;line-height: 24px;border: 1px solid #D3D4D4;padding:4px 5px;font-size:14px;vertical-align:baseline;box-sizing:border-box;}
|
||||
.replyfloor_popup_reportbtn{}
|
||||
.replyfloor_popup_reportbtn button{width: 100%;font-size: 16px;height: 42px;line-height: 42px;text-align: center;font-weight: 400;background: #38F;color: #FFF;border:0 none;padding:0;margin:0;}
|
||||
.replyfloor_showcolorbox {overflow: hidden;display: flex;flex-wrap: wrap;}
|
||||
.replyfloor_showcolorbox span{width:12.5%;display:block;text-align:center;padding:5px 0;}
|
||||
.replyfloor_showcolorbox button{display:block;margin: 0 auto;padding: 0;width: 24px;height: 24px;border: 0;cursor: pointer;}
|
||||
.replyfloor_showsmilebox {overflow: hidden;}
|
||||
.replyfloor_showsmilebox_tab{overflow: hidden;}
|
||||
.replyfloor_showsmilebox_tab ul{overflow: hidden;overflow-x: auto;padding:10px 0;white-space:nowrap;}
|
||||
.replyfloor_showsmilebox_tab ul li{display:inline-block;padding:0 5px;height:20px;line-height:20px;margin:0 5px;background: #E5EDF2;color:#999;font-size:12px;border: 1px solid #CDCDCD;}
|
||||
.replyfloor_showsmilebox_tab ul li.current{background:#999;color:#fff;}
|
||||
.replyfloor_showsmilebox_data{overflow: hidden;overflow-y: auto;max-height:120px;display: flex;flex-wrap: wrap;}
|
||||
.replyfloor_showsmilebox_data span{width:12.5%;display:block;text-align:center;padding:5px 0;}
|
||||
.replyfloor_upimage {width: 100%;overflow: hidden;}
|
||||
.replyfloor_upimage_li {float:left;position:relative;margin:5px 5px 0 0;width:50px;height:50px;}
|
||||
.replyfloor_upimage_img {width:50px;height:50px;}
|
||||
.replyfloor_upimage_img img {display:block;width:50px;height:50px;object-fit:cover;}
|
||||
.replyfloor_upimage_del {position:absolute;top:-3px;right:-3px;}
|
||||
.replyfloor_upimage_del a {display:block;width:13px;height:11px;background: url("../../image/icon_close.png");}
|
102
source/plugin/replyfloor/static/css/touch/style4.css
Normal file
@@ -0,0 +1,102 @@
|
||||
.replyfloor_box{margin-top:30px;margin-bottom: 10px;}
|
||||
.replyfloor_hd{padding-bottom:10px;line-height: 20px;font-size: 12px;}
|
||||
.replyfloor_tail_time{display: inline-block;margin: 0 4px;color: #999;}
|
||||
.replyfloor_tail_reply{display: inline-block;margin: 0 4px;color: #666;}
|
||||
.replyfloor_fd{padding-top:10px;line-height: 20px;font-size: 12px;display:none;}
|
||||
.replyfloor_fd span{text-decoration: none;color: #aaa;font-size: 12px;padding-left:18px;background-image:url("../../image/icon_reply.png");background-repeat:no-repeat;background-position:left center;background-size:auto 12px;display:inline-block;cursor: pointer;}
|
||||
.replyfloor_bd{margin-top: -1px;display:none;}
|
||||
.replyfloor_content{}
|
||||
.replyfloor_content_li {padding: 6px 0;font-size:14px;overflow: hidden;}
|
||||
.replyfloor_content_avatar {float: left;width: 24px;height: 24px;overflow: hidden;}
|
||||
.replyfloor_content_avatar a {display:block;}
|
||||
.replyfloor_content_avatar img {width: 100%;height: 100%;margin:0 !important;border-radius: 50% !important;}
|
||||
.replyfloor_content_cnt {margin-left: 30px;zoom: 1;word-wrap: break-word;word-break: break-all;}
|
||||
.replyfloor_content_head {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;}
|
||||
.replyfloor_content_head_z {float:left;}
|
||||
.replyfloor_content_head_y {float:right;}
|
||||
.replyfloor_content_main {margin-top:4px;}
|
||||
.replyfloor_content_locked {overflow: hidden;padding: 6px 6px 6px 24px;border: 1px dashed #FF9A9A;background: url("../../image/locked.gif") no-repeat 6px 50%;font-size: 12px; zoom:1;}
|
||||
.replyfloor_content_text {line-height: 20px;font-size:14px;}
|
||||
.replyfloor_content_text a {color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_text img {height: 20px;vertical-align: middle;margin:0 !important;border-radius:0 !important;}
|
||||
.replyfloor_content_image {overflow: hidden;}
|
||||
.replyfloor_content_image_li {float:left;width: 120px;height: 120px;margin:5px 5px 0 0;}
|
||||
.replyfloor_content_image_li img {width: 120px;height: 120px;object-fit:cover;}
|
||||
.replyfloor_content_user {color: #999;}
|
||||
.replyfloor_content_user a{color: #2d64b3;}
|
||||
.replyfloor_content_moderating {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_location {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_time {font-size:12px;color: #aaa;}
|
||||
.replyfloor_content_from {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_from a{color: #999;}
|
||||
.replyfloor_content_toreply {margin:0 5px;display:inline-block;width:12px;height:16px;position: relative;text-indent:-9999px;overflow:hidden;vertical-align:middle;}
|
||||
.replyfloor_content_toreply:after {content: "";position: absolute;border:6px solid transparent;border-left-color:#2d64b3;left: 3px;top: 1px;}
|
||||
.replyfloor_content_foot {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;margin-top:4px;}
|
||||
.replyfloor_content_foot_z {float:left;}
|
||||
.replyfloor_content_foot_y {float:left;margin-left:5px;}
|
||||
.replyfloor_content_rpbtn {cursor: pointer;color: #666;margin-left: 5px;}
|
||||
.replyfloor_content_reportbtn {cursor: pointer;color: #666;margin-left: 5px;}
|
||||
.replyfloor_content_delbtn {cursor: pointer;color: #666;margin-left: 5px;}
|
||||
.replyfloor_content_pager {padding-top: 10px;overflow: hidden;}
|
||||
.replyfloor_content_more {float:left;font-size:12px;line-height: 28px;overflow: hidden;}
|
||||
.replyfloor_content_more a{color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_hrmore{float:left;margin-right:6px;position: relative;width: 24px;height: 28px;}
|
||||
.replyfloor_content_hrmore:before {content: "";position: absolute;left: 0;width: 24px;height: 1px;top: 13px;background: #ccc;}
|
||||
.replyfloor_content_showmore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_showmore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_showmore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -6px;position: absolute;right: 3px;top: 50%;transform: rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);-o-transform:rotate(-45deg);width: 6px;}
|
||||
.replyfloor_content_hidemore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_hidemore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_hidemore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -1px;position: absolute;right: 3px;top: 50%;transform: rotate(135deg);-ms-transform:rotate(135deg);-moz-transform:rotate(135deg);-webkit-transform:rotate(135deg);-o-transform:rotate(135deg);width: 6px;}
|
||||
.replyfloor_content_pg {float:left;font-size:12px;line-height:26px;}
|
||||
.replyfloor_content_pg a,.replyfloor_content_pg strong,.replyfloor_content_pg label { float:left; display:inline; margin-right:4px; padding:0 8px; height:26px; border:1px solid; border-color:#C2D5E3; background-color:#FFF; background-repeat:no-repeat; color:#333; overflow:hidden; text-decoration:none;}
|
||||
.replyfloor_content_pg a.nxt { padding:0 10px;}
|
||||
.replyfloor_content_pg a:hover { border-color:#369; color:#369;}
|
||||
.replyfloor_content_pg a.nxt {padding-right:25px;background-image:url("../../image/arw_r.gif");background-position:90% 50%;}
|
||||
.replyfloor_content_pg a.prev {background-image:url("../../image/arw_l.gif");background-position:50% 50%;}
|
||||
.replyfloor_content_pg strong {background-color:#E5EDF2;}
|
||||
.replyfloor_content_btn {float:right;}
|
||||
.replyfloor_content_btn a {padding: 0px 8px;font-size: 12px;background-color: #fff;color: #333;border-radius: 2px;border: 1px solid #ccc;display: block;line-height: 26px;text-decoration: none;}
|
||||
.replyfloor_content_btn a:hover {color: #38F;border: 1px solid #38F;}
|
||||
.replyfloor_popup_mask{position: fixed;bottom: 0px;top: 0px;left: 0px;right: 0px;background-color: rgba(0, 0, 0, 0.4);z-index: 99;}
|
||||
.replyfloor_popup_box{position: fixed;left: 0px;right: 0px;bottom: 0px;background:#fff;z-index: 99;}
|
||||
.replyfloor_popup_close{position:absolute;top: 10px;right: 10px;height:20px;width:20px;overflow: hidden;background:url("../../image/close.png") no-repeat center center;cursor: pointer;}
|
||||
.replyfloor_popup_area{padding: 10px;}
|
||||
.replyfloor_popup_title {padding:0 0 10px;font-size:16px;font-weight:bold;}
|
||||
.replyfloor_popup_replyto {font-size:12px;line-height:2;padding:0 4px;}
|
||||
.replyfloor_popup_tedt {width: 100%;box-sizing:border-box;border: 1px solid #ccc;border-radius: 3px;overflow: hidden;}
|
||||
.replyfloor_popup_tedtbar {padding: 0 10px 0 0;height: 32px;line-height: 32px;border-top: 1px solid #ccc;background: #eee;overflow: hidden;}
|
||||
.replyfloor_popup_tedtbar span{float: left;display:block;width:32px;height: 32px;line-height: 32px;text-align:center;overflow: hidden;text-indent: -9999px;cursor: pointer;}
|
||||
.replyfloor_popup_tedtbar span.replyfloor_popup_tedtbar_fbld{background:url("../../image/fbld.svg") no-repeat center center;}
|
||||
.replyfloor_popup_tedtbar span.replyfloor_popup_tedtbar_fclr{background:url("../../image/fclr.svg") no-repeat center center;}
|
||||
.replyfloor_popup_tedtbar span.replyfloor_popup_tedtbar_fsml{background:url("../../image/fsml.svg") no-repeat center center;}
|
||||
.replyfloor_popup_tedtbar span.replyfloor_popup_tedtbar_fmg{background:url("../../image/fmg.svg") no-repeat center center;}
|
||||
.replyfloor_popup_tedtarea {padding:3px;}
|
||||
.replyfloor_popup_tedtarea textarea {width: 100%;box-sizing:border-box;border: 0 none;display:block;resize: none;}
|
||||
.replyfloor_popup_seccode {padding-top:10px;overflow: hidden;}
|
||||
.replyfloor_popup_seccodeverify {float:left;width:100px;height:24px;line-height:24px;border:1px solid #ddd;padding:0 5px;margin-right: 5px;}
|
||||
.replyfloor_popup_seccodeimg {float:left;height: 26px;margin: 0;}
|
||||
.replyfloor_popup_info{padding-top:10px;font-size: 14px;overflow: hidden;}
|
||||
.replyfloor_popup_notice{float:left;}
|
||||
.replyfloor_popup_btntip{float:right;}
|
||||
.replyfloor_popup_btn{}
|
||||
.replyfloor_popup_btn button{width: 100%;font-size: 16px;height: 42px;line-height: 42px;text-align: center;font-weight: 400;background: #38F;color: #FFF;border:0 none;padding:0;margin:0;}
|
||||
.replyfloor_popup_reportarea{width:100%;line-height: 24px;border: 1px solid #D3D4D4;padding:4px 5px;font-size:14px;vertical-align:baseline;box-sizing:border-box;}
|
||||
.replyfloor_popup_reportbtn{}
|
||||
.replyfloor_popup_reportbtn button{width: 100%;font-size: 16px;height: 42px;line-height: 42px;text-align: center;font-weight: 400;background: #38F;color: #FFF;border:0 none;padding:0;margin:0;}
|
||||
.replyfloor_showcolorbox {overflow: hidden;display: flex;flex-wrap: wrap;}
|
||||
.replyfloor_showcolorbox span{width:12.5%;display:block;text-align:center;padding:5px 0;}
|
||||
.replyfloor_showcolorbox button{display:block;margin: 0 auto;padding: 0;width: 24px;height: 24px;border: 0;cursor: pointer;}
|
||||
.replyfloor_showsmilebox {overflow: hidden;}
|
||||
.replyfloor_showsmilebox_tab{overflow: hidden;}
|
||||
.replyfloor_showsmilebox_tab ul{overflow: hidden;overflow-x: auto;padding:10px 0;white-space:nowrap;}
|
||||
.replyfloor_showsmilebox_tab ul li{display:inline-block;padding:0 5px;height:20px;line-height:20px;margin:0 5px;background: #E5EDF2;color:#999;font-size:12px;border: 1px solid #CDCDCD;}
|
||||
.replyfloor_showsmilebox_tab ul li.current{background:#999;color:#fff;}
|
||||
.replyfloor_showsmilebox_data{overflow: hidden;overflow-y: auto;max-height:120px;display: flex;flex-wrap: wrap;}
|
||||
.replyfloor_showsmilebox_data span{width:12.5%;display:block;text-align:center;padding:5px 0;}
|
||||
.replyfloor_upimage {width: 100%;overflow: hidden;}
|
||||
.replyfloor_upimage_li {float:left;position:relative;margin:5px 5px 0 0;width:50px;height:50px;}
|
||||
.replyfloor_upimage_img {width:50px;height:50px;}
|
||||
.replyfloor_upimage_img img {display:block;width:50px;height:50px;object-fit:cover;}
|
||||
.replyfloor_upimage_del {position:absolute;top:-3px;right:-3px;}
|
||||
.replyfloor_upimage_del a {display:block;width:13px;height:11px;background: url("../../image/icon_close.png");}
|
103
source/plugin/replyfloor/static/css/touch/style5.css
Normal file
@@ -0,0 +1,103 @@
|
||||
.replyfloor_box{margin-top:30px;margin-bottom: 10px;}
|
||||
.replyfloor_hd{overflow: hidden;padding-bottom:10px;line-height: 20px;font-size: 12px;}
|
||||
.replyfloor_hd .replyfloor_tail_time{float:left;text-decoration: none;color: #aaa;}
|
||||
.replyfloor_hd .replyfloor_tail_reply{float:right;text-decoration: none;color: #aaa;font-size: 12px;padding-left:18px;background-image:url("../../image/fastreply.svg");background-repeat:no-repeat;background-position:left center;background-size:auto 16px;display:inline-block;cursor: pointer;}
|
||||
.replyfloor_fd{text-align: right;padding-top:10px;line-height: 20px;font-size: 12px;display:none;}
|
||||
.replyfloor_fd span{text-decoration: none;color: #aaa;font-size: 12px;padding-left:18px;background-image:url("../../image/fastreply.svg");background-repeat:no-repeat;background-position:left center;background-size:auto 16px;display:inline-block;cursor: pointer;}
|
||||
.replyfloor_bd{background: #f7f8fa;border: 1px solid #f0f1f2;margin-top: -1px;padding: 4px 10px 4px;display:none;}
|
||||
.replyfloor_content{}
|
||||
.replyfloor_content_li {padding: 6px 0;border-bottom:1px dashed #d6d6d6;font-size:14px;overflow: hidden;}
|
||||
.replyfloor_content_avatar {float: left;width: 32px;height: 32px;padding: 1px;overflow: hidden;}
|
||||
.replyfloor_content_avatar a {display:block;}
|
||||
.replyfloor_content_avatar img {width: 100%;height: 100%;margin:0 !important;border-radius: 50% !important;}
|
||||
.replyfloor_content_cnt {margin-left: 45px;zoom: 1;word-wrap: break-word;word-break: break-all;}
|
||||
.replyfloor_content_head {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;}
|
||||
.replyfloor_content_head_z {float:left;}
|
||||
.replyfloor_content_head_y {float:right;}
|
||||
.replyfloor_content_main {margin-top:4px;}
|
||||
.replyfloor_content_locked {overflow: hidden;padding: 6px 6px 6px 24px;border: 1px dashed #FF9A9A;background: url("../../image/locked.gif") no-repeat 6px 50%;font-size: 12px; zoom:1;}
|
||||
.replyfloor_content_text {line-height: 20px;font-size:14px;}
|
||||
.replyfloor_content_text a {color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_text img {height: 20px;vertical-align: middle;margin:0 !important;border-radius:0 !important;}
|
||||
.replyfloor_content_image {overflow: hidden;}
|
||||
.replyfloor_content_image_li {float:left;width: 120px;height: 120px;margin:5px 5px 0 0;}
|
||||
.replyfloor_content_image_li img {width: 120px;height: 120px;object-fit:cover;}
|
||||
.replyfloor_content_user {color: #999;}
|
||||
.replyfloor_content_user a{color: #2d64b3;}
|
||||
.replyfloor_content_moderating {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_location {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_time {font-size:12px;color: #aaa;}
|
||||
.replyfloor_content_from {font-size:12px;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_from a{color: #999;}
|
||||
.replyfloor_content_toreply {margin:0 5px;}
|
||||
.replyfloor_content_foot {text-align: left;font-size:12px;line-height:18px;height:18px;overflow: hidden;color: #999;margin-top:4px;}
|
||||
.replyfloor_content_foot_z {float:left;}
|
||||
.replyfloor_content_foot_y {float:right;}
|
||||
.replyfloor_content_rpbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_reportbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_delbtn {cursor: pointer;color: #999;margin-left: 5px;}
|
||||
.replyfloor_content_pager {padding-top: 10px;overflow: hidden;}
|
||||
.replyfloor_content_more {float:left;font-size:12px;line-height: 28px;}
|
||||
.replyfloor_content_more a{color: #2d64b3;text-decoration: none;}
|
||||
.replyfloor_content_hrmore{float:left;margin-right:6px;position: relative;width: 24px;height: 28px;}
|
||||
.replyfloor_content_hrmore:before {content: "";position: absolute;left: 0;width: 24px;height: 1px;top: 13px;background: #ccc;}
|
||||
.replyfloor_content_showmore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_showmore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_showmore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -6px;position: absolute;right: 3px;top: 50%;transform: rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);-o-transform:rotate(-45deg);width: 6px;}
|
||||
.replyfloor_content_hidemore{float:left;margin-right:10px;}
|
||||
.replyfloor_content_hidemore a{display:block;padding-right:16px;position: relative;}
|
||||
.replyfloor_content_hidemore a:after{content: "";border-bottom: 1px solid #2d64b3;border-left: 1px solid #2d64b3;height: 6px;margin-top: -1px;position: absolute;right: 3px;top: 50%;transform: rotate(135deg);-ms-transform:rotate(135deg);-moz-transform:rotate(135deg);-webkit-transform:rotate(135deg);-o-transform:rotate(135deg);width: 6px;}
|
||||
.replyfloor_content_pg {float:left;font-size:12px;line-height:26px;}
|
||||
.replyfloor_content_pg a,.replyfloor_content_pg strong,.replyfloor_content_pg label { float:left; display:inline; margin-right:4px; padding:0 8px; height:26px; border:1px solid; border-color:#C2D5E3; background-color:#FFF; background-repeat:no-repeat; color:#333; overflow:hidden; text-decoration:none;}
|
||||
.replyfloor_content_pg a.nxt { padding:0 10px;}
|
||||
.replyfloor_content_pg a:hover { border-color:#369; color:#369;}
|
||||
.replyfloor_content_pg a.nxt {padding-right:25px;background-image:url("../../image/arw_r.gif");background-position:90% 50%;}
|
||||
.replyfloor_content_pg a.prev {background-image:url("../../image/arw_l.gif");background-position:50% 50%;}
|
||||
.replyfloor_content_pg strong {background-color:#E5EDF2;}
|
||||
.replyfloor_content_btn {float:right;}
|
||||
.replyfloor_content_btn a {padding: 0px 8px;font-size: 12px;background-color: #fff;color: #333;border-radius: 2px;border: 1px solid #ccc;display: block;line-height: 26px;text-decoration: none;}
|
||||
.replyfloor_content_btn a:hover {color: #38F;border: 1px solid #38F;}
|
||||
.replyfloor_popup_mask{position: fixed;bottom: 0px;top: 0px;left: 0px;right: 0px;background-color: rgba(0, 0, 0, 0.4);z-index: 99;}
|
||||
.replyfloor_popup_box{position: fixed;left: 0px;right: 0px;bottom: 0px;background:#fff;z-index: 99;}
|
||||
.replyfloor_popup_close{position:absolute;top: 10px;right: 10px;height:20px;width:20px;overflow: hidden;background:url("../../image/close.png") no-repeat center center;cursor:pointer;}
|
||||
.replyfloor_popup_area{padding: 10px;}
|
||||
.replyfloor_popup_title {padding:0 0 10px;font-size:16px;font-weight:bold;}
|
||||
.replyfloor_popup_tonotice {overflow: hidden;}
|
||||
.replyfloor_popup_replyto {float:left;font-size:12px;line-height:3;}
|
||||
.replyfloor_popup_notice{float:right;font-size:12px;line-height:3;}
|
||||
.replyfloor_popup_noticez{float:left;font-size:12px;line-height:3;}
|
||||
.replyfloor_popup_tedtbox {overflow: hidden;display:flex;align-items:flex-end;}
|
||||
.replyfloor_popup_tedtarea {border: 1px solid #999;border-radius:5px;overflow: hidden;flex: 1;padding:10px;}
|
||||
.replyfloor_popup_tedtarea textarea {width: 100%;box-sizing:border-box;border: 0 none;display:block;resize: none;height: 20px;line-height:20px;max-height:120px;}
|
||||
.replyfloor_popup_tedtbar {float:left;padding: 0 10px 0 0;height: 32px;line-height: 32px;overflow: hidden;}
|
||||
.replyfloor_popup_tedtbar span{float: left;display:block;width:32px;height: 32px;line-height: 32px;text-align:center;overflow: hidden;text-indent: -9999px;cursor: pointer;}
|
||||
.replyfloor_popup_tedtbar span.replyfloor_popup_tedtbar_fbld{background:url("../../image/fbld.svg") no-repeat center center;}
|
||||
.replyfloor_popup_tedtbar span.replyfloor_popup_tedtbar_fclr{background:url("../../image/fclr.svg") no-repeat center center;}
|
||||
.replyfloor_popup_tedtbar span.replyfloor_popup_tedtbar_fsml{background:url("../../image/fsml.svg") no-repeat center center;}
|
||||
.replyfloor_popup_tedtbar span.replyfloor_popup_tedtbar_fmg{background:url("../../image/fmg.svg") no-repeat center center;}
|
||||
.replyfloor_popup_seccode {padding-top:10px;overflow: hidden;}
|
||||
.replyfloor_popup_seccodeverify {float:left;width:100px;height:24px;line-height:24px;border:1px solid #ddd;padding:0 5px;margin-right: 5px;}
|
||||
.replyfloor_popup_seccodeimg {float:left;height: 26px;margin: 0;}
|
||||
.replyfloor_popup_infobar{font-size: 12px;overflow: hidden;}
|
||||
.replyfloor_popup_btntip{float:right;line-height: 32px;}
|
||||
.replyfloor_popup_btn{width:80px;margin-left:10px;}
|
||||
.replyfloor_popup_btn button{border-radius:5px;width: 100%;font-size: 16px;height: 42px;line-height: 42px;text-align: center;font-weight: 400;background: #38F;color: #FFF;border:0 none;padding:0;margin:0;}
|
||||
.replyfloor_popup_reportarea{width:100%;line-height: 24px;border: 1px solid #D3D4D4;padding:4px 5px;font-size:14px;vertical-align:baseline;box-sizing:border-box;}
|
||||
.replyfloor_popup_reportbtn{}
|
||||
.replyfloor_popup_reportbtn button{width: 100%;font-size: 16px;height: 42px;line-height: 42px;text-align: center;font-weight: 400;background: #38F;color: #FFF;border:0 none;padding:0;margin:0;}
|
||||
.replyfloor_showcolorbox {overflow: hidden;display: flex;flex-wrap: wrap;}
|
||||
.replyfloor_showcolorbox span{width:12.5%;display:block;text-align:center;padding:5px 0;}
|
||||
.replyfloor_showcolorbox button{display:block;margin: 0 auto;padding: 0;width: 24px;height: 24px;border: 0;cursor: pointer;}
|
||||
.replyfloor_showsmilebox {overflow: hidden;}
|
||||
.replyfloor_showsmilebox_tab{overflow: hidden;}
|
||||
.replyfloor_showsmilebox_tab ul{overflow: hidden;overflow-x: auto;padding:10px 0;white-space:nowrap;}
|
||||
.replyfloor_showsmilebox_tab ul li{display:inline-block;padding:0 5px;height:20px;line-height:20px;margin:0 5px;background: #E5EDF2;color:#999;font-size:12px;border: 1px solid #CDCDCD;}
|
||||
.replyfloor_showsmilebox_tab ul li.current{background:#999;color:#fff;}
|
||||
.replyfloor_showsmilebox_data{overflow: hidden;overflow-y: auto;max-height:120px;display: flex;flex-wrap: wrap;}
|
||||
.replyfloor_showsmilebox_data span{width:12.5%;display:block;text-align:center;padding:5px 0;}
|
||||
.replyfloor_upimage {width: 100%;overflow: hidden;}
|
||||
.replyfloor_upimage_li {float:left;position:relative;margin:5px 5px 0 0;width:50px;height:50px;}
|
||||
.replyfloor_upimage_img {width:50px;height:50px;}
|
||||
.replyfloor_upimage_img img {display:block;width:50px;height:50px;object-fit:cover;}
|
||||
.replyfloor_upimage_del {position:absolute;top:-3px;right:-3px;}
|
||||
.replyfloor_upimage_del a {display:block;width:13px;height:11px;background: url("../../image/icon_close.png");}
|
@@ -0,0 +1,9 @@
|
||||
.cwebuploader-container {
|
||||
position: relative;
|
||||
}
|
||||
.cwebuploader-element-invisible {
|
||||
position: absolute !important;
|
||||
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
|
||||
clip: rect(1px,1px,1px,1px);
|
||||
}
|
||||
|
8255
source/plugin/replyfloor/static/cwebuploader/cwebuploader.js
Normal file
BIN
source/plugin/replyfloor/static/image/agree.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
source/plugin/replyfloor/static/image/arw_l.gif
Normal file
After Width: | Height: | Size: 844 B |
BIN
source/plugin/replyfloor/static/image/arw_r.gif
Normal file
After Width: | Height: | Size: 65 B |
BIN
source/plugin/replyfloor/static/image/close.png
Normal file
After Width: | Height: | Size: 205 B |
BIN
source/plugin/replyfloor/static/image/digg.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
source/plugin/replyfloor/static/image/fastreply.gif
Normal file
After Width: | Height: | Size: 608 B |
1
source/plugin/replyfloor/static/image/fastreply.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1731490084279" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18708" width="20" height="20"><path d="M835.113514 279.109189H799.827027a92.851892 92.851892 0 0 0-92.16-83.027027H244.376216A92.99027 92.99027 0 0 0 152.216216 289.487568v324.358918a92.99027 92.99027 0 0 0 92.851892 92.851892h35.286487a92.713514 92.713514 0 0 0 92.16 83.027027h95.065946a29.751351 29.751351 0 0 1 17.297297 5.673514l77.353513 57.15027a69.881081 69.881081 0 0 0 83.857298 0l77.353513-57.15027a29.612973 29.612973 0 0 1 16.467027-6.642162h95.204325a92.99027 92.99027 0 0 0 92.851891-92.851892V371.822703a92.99027 92.99027 0 0 0-92.851891-92.713514zM193.72973 613.846486V289.487568a51.476757 51.476757 0 0 1 51.338378-51.338379h462.598919a51.338378 51.338378 0 0 1 50.231351 41.513514h-386.075675a92.99027 92.99027 0 0 0-92.851892 92.713513v293.362162h-34.594595A51.476757 51.476757 0 0 1 193.72973 613.846486z m693.414054 83.027028A51.476757 51.476757 0 0 1 835.113514 747.243243h-95.204325a70.572973 70.572973 0 0 0-41.513513 13.837838l-77.353514 57.15027a28.921081 28.921081 0 0 1-34.456216 0L508.817297 761.081081a70.157838 70.157838 0 0 0-41.513513-13.837838h-95.481081a51.338378 51.338378 0 0 1-51.338379-51.338378V371.822703a51.338378 51.338378 0 0 1 51.338379-51.2h463.290811a51.338378 51.338378 0 0 1 51.338378 51.2z" fill="#666666" p-id="18709"></path><path d="M781.007568 435.2H425.79027a20.756757 20.756757 0 1 0 0 41.513514h355.217298a20.756757 20.756757 0 0 0 0-41.513514zM781.007568 591.429189H425.79027a20.756757 20.756757 0 0 0 0 41.513514h355.217298a20.756757 20.756757 0 0 0 0-41.513514z" fill="#666666" p-id="18710"></path></svg>
|
After Width: | Height: | Size: 1.6 KiB |
BIN
source/plugin/replyfloor/static/image/fbld.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
1
source/plugin/replyfloor/static/image/fbld.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1731488367315" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4255" width="16" height="16"><path d="M768.96 575.072c-22.144-34.112-54.816-56.8-97.984-68.032v-2.176c22.88-10.88 42.112-23.04 57.696-36.48 15.616-12.704 27.584-26.144 35.936-40.288 16.32-29.76 24.128-60.96 23.392-93.632 0-63.872-19.776-115.232-59.328-154.08-39.2-38.464-97.824-58.048-175.84-58.784H215.232v793.728H579.52c62.432 0 114.496-20.864 156.256-62.624 42.112-39.936 63.52-94.176 64.224-162.752 0-41.376-10.336-79.68-31.04-114.88zM344.32 228.832h194.912c43.904 0.736 76.224 11.424 96.896 32.128 21.056 22.144 31.584 49.184 31.584 81.12s-10.528 58.432-31.584 79.488c-20.672 22.848-52.992 34.304-96.896 34.304H344.32V228.832z m304.352 536.256c-20.672 23.584-53.344 35.744-97.984 36.48H344.32v-238.432h206.336c44.64 0.704 77.312 12.512 97.984 35.392 20.672 23.232 31.04 51.168 31.04 83.84 0 31.904-10.336 59.488-31.008 82.72z" p-id="4256"></path></svg>
|
After Width: | Height: | Size: 972 B |
BIN
source/plugin/replyfloor/static/image/fclr.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
1
source/plugin/replyfloor/static/image/fclr.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1731489144090" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12186" width="16" height="16"><path d="M455.68 0L163.84 768h138.24l61.44-179.2h296.96l66.56 179.2h138.24L573.44 0H455.68zM512 163.84l107.52 317.44H399.36L512 163.84zM102.4 870.4v153.6h819.2v-153.6H102.4z m0 0" p-id="12187"></path></svg>
|
After Width: | Height: | Size: 351 B |
BIN
source/plugin/replyfloor/static/image/fmg.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
1
source/plugin/replyfloor/static/image/fmg.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1731488995790" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10745" width="16" height="16"><path d="M896 626.592a16 16 0 0 0-7.68-13.664l-172.448-105.088a16 16 0 0 0-20.704 3.52l-76 92.608-1.024 1.152a16 16 0 0 1-22.624 0.032l-252.832-252.064a16.032 16.032 0 0 0-22.08-0.512l-187.36 170.656a15.936 15.936 0 0 0-5.248 11.84V800h768v-173.408z" p-id="10746"></path><path d="M800 320m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z" p-id="10747"></path><path d="M32 128v768h960V128H32z m896 704H96V192h832v640z" p-id="10748"></path></svg>
|
After Width: | Height: | Size: 583 B |
BIN
source/plugin/replyfloor/static/image/fsml.png
Normal file
After Width: | Height: | Size: 16 KiB |
1
source/plugin/replyfloor/static/image/fsml.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1731488917226" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9556" width="16" height="16"><path d="M511.488 118.670222a398.222222 398.222222 0 1 0 0 796.444445 398.222222 398.222222 0 0 0 0-796.444445z m0-85.333333a483.555556 483.555556 0 1 1 0 967.111111 483.555556 483.555556 0 0 1 0-967.111111zM292.067556 378.709333a69.063111 69.063111 0 1 1 138.126222 0 69.063111 69.063111 0 0 1-138.126222 0z m300.657777 0a69.063111 69.063111 0 1 1 138.183111 0 69.063111 69.063111 0 0 1-138.183111 0zM275.626667 545.336889h475.249777c0 108.828444-100.067556 239.502222-240.355555 239.502222-140.231111 0-234.894222-130.673778-234.894222-239.502222z" fill="#333333" p-id="9557"></path></svg>
|
After Width: | Height: | Size: 735 B |
BIN
source/plugin/replyfloor/static/image/icon_close.png
Normal file
After Width: | Height: | Size: 255 B |
BIN
source/plugin/replyfloor/static/image/icon_reply.png
Normal file
After Width: | Height: | Size: 191 B |
BIN
source/plugin/replyfloor/static/image/locked.gif
Normal file
After Width: | Height: | Size: 319 B |
BIN
source/plugin/replyfloor/static/image/settop.png
Normal file
After Width: | Height: | Size: 376 B |
BIN
source/plugin/replyfloor/static/image/share_btn.png
Normal file
After Width: | Height: | Size: 476 B |
BIN
source/plugin/replyfloor/static/image/share_inputEdit.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
source/plugin/replyfloor/static/image/xcp-like.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
source/plugin/replyfloor/static/image/xcp-reply.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
2349
source/plugin/replyfloor/static/js/Sortable.js
Normal file
257
source/plugin/replyfloor/static/js/common.js
Normal file
@@ -0,0 +1,257 @@
|
||||
function replyfloor_postid(url) {
|
||||
url = url.replace(/&/, "&");
|
||||
var urlarr = new Array();
|
||||
urlarr = url.split("&");
|
||||
var value = new Array();
|
||||
var postid = 0;
|
||||
for (var i = 0, L = urlarr.length; i < L; i++) {
|
||||
value = urlarr[i].split("=");
|
||||
if(value[0] == "repquote"){
|
||||
postid = value[1];
|
||||
return postid;
|
||||
}
|
||||
}
|
||||
return postid;
|
||||
}
|
||||
function replyfloor_leftshow(postid) {
|
||||
if(document.getElementById('replyfloor_content_ul_' + postid)){
|
||||
document.getElementById('replyfloor_content_ul_' + postid).style.display = 'block';
|
||||
}
|
||||
if(document.getElementById('replyfloor_content_more_' + postid)){
|
||||
document.getElementById('replyfloor_content_more_' + postid).style.display = 'none';
|
||||
}
|
||||
if(document.getElementById('replyfloor_content_pg_' + postid)){
|
||||
document.getElementById('replyfloor_content_pg_' + postid).style.display = 'block';
|
||||
}
|
||||
}
|
||||
function replyfloor_seccodeimg(obj) {
|
||||
document.getElementById('replyfloor_seccodeverify').value = '';
|
||||
var tmprandom = 'S' + Math.floor(Math.random() * 1000);
|
||||
obj.src = 'misc.php?mod=seccode&update='+ tmprandom+'&idhash=replyfloor';
|
||||
}
|
||||
function replyfloor_replace() {
|
||||
var fastre = document.getElementsByClassName('fastre');
|
||||
for (var i = 0, L = fastre.length; i < L; i++) {
|
||||
var postid = replyfloor_postid(fastre[i].href);
|
||||
if(postid){
|
||||
fastre[i].onclick = function(e) {
|
||||
replyfloor_reply(this.href);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function replyfloor_collapse(obj, postid, type) {
|
||||
document.getElementById('replyfloor_content_more_'+postid).innerHTML = '';
|
||||
if(type == 1){
|
||||
var nextpageurl = obj.getAttribute('rel').valueOf();
|
||||
var x = new Ajax();
|
||||
x.get(nextpageurl + '&inajax=1', function(s){
|
||||
s = s.replace(/\n|\r/g, ' ');
|
||||
var nexts = s.match(/\<div class="replyfloor_content_li" id="replyfloor_content_li_(\d+)"\>(.+?)\<div>\<\/div>\<\/div>/g);
|
||||
for(i in nexts) {
|
||||
var insertid = nexts[i].match(/<div class="replyfloor_content_li" id="replyfloor_content_li_(\d+)"\>/);
|
||||
if(!document.getElementById('replyfloor_content_li_' + insertid[1])) {
|
||||
var div = document.createElement('div');
|
||||
document.getElementById('replyfloor_newbox_'+postid).appendChild(div);
|
||||
div.outerHTML = nexts[i].replace(/\<div>\<\/div>/g, '');
|
||||
}
|
||||
}
|
||||
var moreinfo = s.match(/\<div class="replyfloor_content_more" id="replyfloor_content_more_(\d+)"\>(.+?)\<div>\<\/div>\<\/div\>/);
|
||||
if(document.getElementById('replyfloor_content_more_'+postid)){
|
||||
document.getElementById('replyfloor_content_more_'+postid).innerHTML = moreinfo[2];
|
||||
}
|
||||
});
|
||||
}else{
|
||||
document.getElementById('replyfloor_newbox_'+postid).innerHTML = '';
|
||||
var nextpageurl = obj.getAttribute('rel').valueOf();
|
||||
var x = new Ajax();
|
||||
x.get(nextpageurl + '&inajax=1', function(s){
|
||||
if(document.getElementById('replyfloor_content_'+postid)){
|
||||
document.getElementById('replyfloor_content_'+postid).innerHTML = s;
|
||||
}
|
||||
var replyfloor_box_sxy = fetchOffset(document.getElementById("replyfloor_box_"+postid));
|
||||
if(Math.max(document.documentElement.scrollTop, document.body.scrollTop) > replyfloor_box_sxy['top']){
|
||||
window.scrollTo('0',replyfloor_box_sxy['top']);
|
||||
}
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function replyfloor_uploadimage(userSettings) {
|
||||
replyfloor_webupload(userSettings);
|
||||
}
|
||||
function replyfloor_uploadattach(userSettings) {
|
||||
replyfloor_webupload(userSettings);
|
||||
}
|
||||
function replyfloor_webupload(userSettings) {
|
||||
var settings = {};
|
||||
var ensureDefault = function(settingName, defaultValue) {
|
||||
var setting = userSettings[settingName];
|
||||
if (setting != undefined) {
|
||||
settings[settingName] = setting;
|
||||
} else {
|
||||
settings[settingName] = defaultValue;
|
||||
}
|
||||
};
|
||||
ensureDefault("auto", false);
|
||||
ensureDefault("compress", false);
|
||||
ensureDefault("upload_url", "");
|
||||
ensureDefault("pick", undefined);
|
||||
ensureDefault("dnd", undefined);
|
||||
ensureDefault("paste", undefined);
|
||||
ensureDefault("accept", null);
|
||||
ensureDefault("fileVal", "file");
|
||||
ensureDefault("chunked", false);
|
||||
ensureDefault("chunkSize", 5242880);
|
||||
ensureDefault("post_params", {});
|
||||
ensureDefault("threads", 1);
|
||||
ensureDefault("fileNumLimit", undefined);
|
||||
ensureDefault("fileSingleSizeLimit", undefined);
|
||||
|
||||
var getBasePath = function() {
|
||||
var els = document.getElementsByTagName('script'), src;
|
||||
for (var i = 0, len = els.length; i < len; i++) {
|
||||
src = els[i].src || '';
|
||||
if (/cwebuploader[\w\-\.]*\.js/.test(src)) {
|
||||
return src.substring(0, src.lastIndexOf('/') + 1);
|
||||
}
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
var uploader = CWebUploader.create({
|
||||
auto: false,
|
||||
swf: getBasePath() + 'Uploader.swf',
|
||||
compress: settings.compress,
|
||||
server: settings.upload_url,
|
||||
pick: settings.pick,
|
||||
dnd: settings.dnd,
|
||||
paste: settings.paste,
|
||||
accept: settings.accept,
|
||||
fileVal: settings.fileVal,
|
||||
chunked: settings.chunked,
|
||||
chunkSize: settings.chunkSize,
|
||||
formData: settings.post_params,
|
||||
threads: settings.threads,
|
||||
fileNumLimit: settings.fileNumLimit,
|
||||
fileSingleSizeLimit: settings.fileSingleSizeLimit,
|
||||
duplicate: true,
|
||||
disableWidgets: 'log'
|
||||
});
|
||||
uploader.on('beforeFileQueued', function(file) {
|
||||
|
||||
});
|
||||
uploader.on('fileQueued', function( file ) {
|
||||
var eles = document.getElementById('replyfloor_upimage').getElementsByClassName('replyfloor_upimage_li');
|
||||
if (settings.fileNumLimit && eles.length >= settings.fileNumLimit) {
|
||||
showDialog('最多只能上传' + settings.fileNumLimit + '张', 'alert');
|
||||
return false;
|
||||
} else {
|
||||
var div = document.createElement("div");
|
||||
div.id = 'replyfloor_upimage_li_'+file.id;
|
||||
div.className = 'replyfloor_upimage_li';
|
||||
document.getElementById('replyfloor_upimage').appendChild(div);
|
||||
uploader.upload(file);
|
||||
}
|
||||
});
|
||||
uploader.on('uploadStart', function( file ) {
|
||||
uploader.options.formData['filetype'] = file.ext;
|
||||
});
|
||||
uploader.on('uploadSuccess', function( file, response ) {
|
||||
var obj = document.getElementById('replyfloor_upimage_li_'+file.id);
|
||||
if(response['status'] == 0) {
|
||||
obj.parentNode.removeChild(obj);
|
||||
showDialog(response['message'], 'alert');
|
||||
} else {
|
||||
obj.innerHTML = '<div class="replyfloor_upimage_del"><a id="replyfloor_upimage_del_'+response['aid']+'" href="javascript:;" onclick="replyfloor_delimage('+response['aid']+')" title="删除"></a></div><div class="replyfloor_upimage_img"><img src="'+response['attachment']+'" border="0" alt="'+response['filename']+'"/></div><input type="hidden" name="attach[]" value="'+response['aid']+'" />';
|
||||
}
|
||||
});
|
||||
uploader.on("uploadError", function (file, response) {
|
||||
var obj = document.getElementById('replyfloor_upimage_li_'+file.id);
|
||||
obj.parentNode.removeChild(obj);
|
||||
});
|
||||
uploader.on("uploadFinished", function () {
|
||||
uploader.reset();
|
||||
});
|
||||
uploader.on('error', function (code) {
|
||||
var err = '';
|
||||
switch (code) {
|
||||
case 'F_EXCEED_SIZE':
|
||||
err += '单张图片大小不得超过' + Base.formatSize(uploader.option('fileSingleSizeLimit')) + '!';
|
||||
break;
|
||||
case 'Q_EXCEED_NUM_LIMIT':
|
||||
err += '最多只能上传' + settings.fileNumLimit + '张!';
|
||||
break;
|
||||
case 'Q_EXCEED_SIZE_LIMIT':
|
||||
err += '上传图片总大小超出' + Base.formatSize(uploader.option('fileSizeLimit')) + '!';
|
||||
break;
|
||||
case 'Q_TYPE_DENIED':
|
||||
err += '无效图片类型,请上传正确的图片格式!';
|
||||
break;
|
||||
case 'F_DUPLICATE':
|
||||
err += '请不要重复上传相同图片!';
|
||||
break;
|
||||
default:
|
||||
err += '上传错误,请刷新重试!'+code;
|
||||
break;
|
||||
}
|
||||
showDialog(err, 'alert');
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function replyfloor_plupload(userSettings) {
|
||||
var settings = {};
|
||||
var ensureDefault = function(settingName, defaultValue) {
|
||||
var setting = userSettings[settingName];
|
||||
if (setting != undefined) {
|
||||
settings[settingName] = setting;
|
||||
} else {
|
||||
settings[settingName] = defaultValue;
|
||||
}
|
||||
};
|
||||
ensureDefault("auto", false);
|
||||
ensureDefault("upload_url", "");
|
||||
ensureDefault("pick", undefined);
|
||||
ensureDefault("accept", null);
|
||||
ensureDefault("fileVal", "file");
|
||||
ensureDefault("post_params", {});
|
||||
|
||||
var pluploader = new plupload.Uploader({
|
||||
browse_button : settings.pick,
|
||||
url : settings.upload_url,
|
||||
file_data_name: settings.fileVal,
|
||||
multi_selection: false,
|
||||
multipart_params: settings.post_params,
|
||||
filters:settings.accept
|
||||
});
|
||||
pluploader.init();
|
||||
pluploader.bind('FilesAdded',function(uploader,files){
|
||||
pluploader.start();
|
||||
});
|
||||
pluploader.bind('FileUploaded', function(uploader,file, res){
|
||||
var response = eval('(' + res.response + ')');
|
||||
if(response['status'] == 0) {
|
||||
showDialog(response['message'], 'alert');
|
||||
} else {
|
||||
var div = document.createElement("div");
|
||||
div.id = 'replyfloor_upimage_li_'+response['aid'];
|
||||
div.className = 'replyfloor_upimage_li';
|
||||
div.innerHTML = '<div class="replyfloor_upimage_del"><a href="javascript:;" id="replyfloor_upimage_del_'+response['aid']+'" onclick="replyfloor_delimage('+response['aid']+')" title="删除"></a></div><div class="replyfloor_upimage_img"><img src="'+response['attachment']+'" border="0" alt="'+response['filename']+'"/></div><input type="hidden" name="attach[]" value="'+response['aid']+'" />';
|
||||
document.getElementById('replyfloor_upimage').appendChild(div);
|
||||
}
|
||||
});
|
||||
pluploader.bind('Error', function(uploader,error){
|
||||
showDialog('上传错误,请刷新重试!', 'alert');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
function replyfloor_delimage(aid) {
|
||||
var obj = document.getElementById('replyfloor_upimage_del_'+aid).parentNode.parentNode;
|
||||
if(obj) {
|
||||
obj.parentNode.removeChild(obj);
|
||||
var x = new Ajax();
|
||||
x.get('plugin.php?id=replyfloor:attachment&operation=delete&aid='+aid + '&inajax=1', function(s){
|
||||
|
||||
});
|
||||
}
|
||||
}
|
11002
source/plugin/replyfloor/static/js/cquery.js
Normal file
5
source/plugin/replyfloor/static/js/jquery.min.js
vendored
Normal file
536
source/plugin/replyfloor/static/js/mobile.js
Normal file
@@ -0,0 +1,536 @@
|
||||
function replyfloor_seccodeimg(obj) {
|
||||
document.getElementById('replyfloor_seccodeverify').value = '';
|
||||
var tmprandom = 'S' + Math.floor(Math.random() * 1000);
|
||||
obj.src = 'misc.php?mod=seccode&update='+ tmprandom+'&idhash=replyfloor';
|
||||
}
|
||||
function replyfloor_strLenCalc(obj, checklen, maxlen) {
|
||||
var v = obj.value, charlen = 0, maxlen = !maxlen ? 200 : maxlen, curlen = maxlen, len = v.length;
|
||||
for(var i = 0; i < v.length; i++) {
|
||||
if(v.charCodeAt(i) < 0 || v.charCodeAt(i) > 255) {
|
||||
curlen -= charset == 'utf-8' ? 2 : 1;
|
||||
}
|
||||
}
|
||||
if(curlen >= len) {
|
||||
document.getElementById(checklen).innerHTML = curlen - len;
|
||||
} else {
|
||||
len = 0;
|
||||
var ret = '';
|
||||
for(var i = 0; i < v.length; i++) {
|
||||
len += v.charCodeAt(i) < 0 || v.charCodeAt(i) > 255 ? (charset == 'utf-8' ? 3 : 2) : 1;
|
||||
if(len > maxlen) {
|
||||
break;
|
||||
}
|
||||
ret += v.substr(i, 1);
|
||||
}
|
||||
obj.value = ret;
|
||||
}
|
||||
}
|
||||
function replyfloor_insertunit(key, text, textend, moveend, selappend) {
|
||||
if(document.getElementById(key + 'message')) {
|
||||
document.getElementById(key + 'message').focus();
|
||||
}
|
||||
textend = isUndefined(textend) ? '' : textend;
|
||||
moveend = isUndefined(textend) ? 0 : moveend;
|
||||
selappend = isUndefined(selappend) ? 1 : selappend;
|
||||
startlen = text.length;
|
||||
endlen = textend.length;
|
||||
if(!isUndefined(document.getElementById(key + 'message').selectionStart)) {
|
||||
if(selappend) {
|
||||
var opn = document.getElementById(key + 'message').selectionStart + 0;
|
||||
if(textend != '') {
|
||||
text = text + document.getElementById(key + 'message').value.substring(document.getElementById(key + 'message').selectionStart, document.getElementById(key + 'message').selectionEnd) + textend;
|
||||
}
|
||||
document.getElementById(key + 'message').value = document.getElementById(key + 'message').value.substr(0, document.getElementById(key + 'message').selectionStart) + text + document.getElementById(key + 'message').value.substr(document.getElementById(key + 'message').selectionEnd);
|
||||
if(!moveend) {
|
||||
document.getElementById(key + 'message').selectionStart = opn + text.length - endlen;
|
||||
document.getElementById(key + 'message').selectionEnd = opn + text.length - endlen;
|
||||
}
|
||||
} else {
|
||||
text = text + textend;
|
||||
document.getElementById(key + 'message').value = document.getElementById(key + 'message').value.substr(0, document.getElementById(key + 'message').selectionStart) + text + document.getElementById(key + 'message').value.substr(document.getElementById(key + 'message').selectionEnd);
|
||||
}
|
||||
} else if(document.selection && document.selection.createRange) {
|
||||
var sel = document.selection.createRange();
|
||||
if(!sel.text.length && document.getElementById(key + 'message').sel) {
|
||||
sel = document.getElementById(key + 'message').sel;
|
||||
document.getElementById(key + 'message').sel = null;
|
||||
}
|
||||
if(selappend) {
|
||||
if(textend != '') {
|
||||
text = text + sel.text + textend;
|
||||
}
|
||||
sel.text = text.replace(/\r?\n/g, '\r\n');
|
||||
if(!moveend) {
|
||||
sel.moveStart('character', -endlen);
|
||||
sel.moveEnd('character', -endlen);
|
||||
}
|
||||
sel.select();
|
||||
} else {
|
||||
sel.text = text + textend;
|
||||
}
|
||||
} else {
|
||||
document.getElementById(key + 'message').value += text;
|
||||
}
|
||||
if(document.getElementById(key + 'message').onchange){
|
||||
document.getElementById(key + 'message').onchange();
|
||||
}
|
||||
}
|
||||
function replyfloor_showcolorbox(key, bgcolor) {
|
||||
var tag1 = !bgcolor ? 'color' : 'backcolor', tag2 = !bgcolor ? 'forecolor' : 'backcolor';
|
||||
var coloroptions = ['Black', 'Sienna', 'DarkOliveGreen', 'DarkGreen', 'DarkSlateBlue', 'Navy', 'Indigo', 'DarkSlateGray', 'DarkRed', 'DarkOrange', 'Olive', 'Green', 'Teal', 'Blue', 'SlateGray', 'DimGray', 'Red', 'SandyBrown', 'YellowGreen', 'SeaGreen', 'MediumTurquoise', 'RoyalBlue', 'Purple', 'Gray', 'Magenta', 'Orange', 'Yellow', 'Lime', 'Cyan', 'DeepSkyBlue', 'DarkOrchid', 'Silver', 'Pink', 'Wheat', 'LemonChiffon', 'PaleGreen', 'PaleTurquoise', 'LightBlue', 'Plum', 'White'];
|
||||
var colortexts = ['黑色', '赭色', '暗橄榄绿色', '暗绿色', '暗灰蓝色', '海军色', '靛青色', '墨绿色', '暗红色', '暗桔黄色', '橄榄色', '绿色', '水鸭色', '蓝色', '灰石色', '暗灰色', '红色', '沙褐色', '黄绿色', '海绿色', '间绿宝石', '皇家蓝', '紫色', '灰色', '红紫色', '橙色', '黄色', '酸橙色', '青色', '深天蓝色', '暗紫色', '银色', '粉色', '浅黄色', '柠檬绸色', '苍绿色', '苍宝石绿', '亮蓝色', '洋李色', '白色'];
|
||||
var str = '';
|
||||
for(var i = 0; i < 40; i++) {
|
||||
str += '<span><button type="button" style="background-color: ' + coloroptions[i] + '" onclick="'
|
||||
+ 'replyfloor_insertunit(\'' + key + '\', \'[' + tag1 + '=' + coloroptions[i] + ']\', \'[/' + tag1 + ']\')'
|
||||
+ '" title="' + colortexts[i] + '"></button></span>';
|
||||
}
|
||||
if(document.getElementById(key + 'attribute').className == key + 'showcolorbox'){
|
||||
if(document.getElementById(key + 'attribute').innerHTML){
|
||||
document.getElementById(key + 'attribute').innerHTML = '';
|
||||
}else{
|
||||
document.getElementById(key + 'attribute').innerHTML = str;
|
||||
}
|
||||
}else{
|
||||
document.getElementById(key + 'attribute').className = key + 'showcolorbox';
|
||||
document.getElementById(key + 'attribute').innerHTML = str;
|
||||
}
|
||||
}
|
||||
function replyfloor_showsmilebox(key) {
|
||||
if(typeof smilies_type == 'undefined') {
|
||||
var scriptNode = document.createElement("script");
|
||||
scriptNode.type = "text/javascript";
|
||||
scriptNode.charset = charset ? charset : (navigator.userAgent.toLowerCase().indexOf('firefox') != -1 ? document.characterSet : document.charset);
|
||||
scriptNode.src = 'data/cache/common_smilies_var.js?' + VERHASH;
|
||||
document.getElementsByTagName('head')[0].appendChild(scriptNode);
|
||||
scriptNode.onload = function() {
|
||||
replyfloor_smilies_onload(key);
|
||||
};
|
||||
} else {
|
||||
replyfloor_smilies_onload(key);
|
||||
}
|
||||
}
|
||||
function replyfloor_smilies_onload(key) {
|
||||
if(typeof smilies_type == 'object') {
|
||||
for(i in smilies_array) {
|
||||
type = i;break;
|
||||
}
|
||||
str = '<div id="' + key + 'showsmilebox_tab" class="' + key + 'showsmilebox_tab"><ul>';
|
||||
for(i in smilies_type) {
|
||||
if(smilies_type[i][0]) {
|
||||
str += '<li id="'+key+'showsmilebox_tab'+i+'" onclick="replyfloor_smilies_switch(\'' + key + '\', \'' + i.substring(1) + '\');">'+smilies_type[i][0]+'</li>';
|
||||
}
|
||||
}
|
||||
str += '</ul></div><div id="' + key + 'showsmilebox_data" class="' + key + 'showsmilebox_data"></div>';
|
||||
if(document.getElementById(key + 'attribute').className == key + 'showsmilebox'){
|
||||
if(document.getElementById(key + 'attribute').innerHTML){
|
||||
document.getElementById(key + 'attribute').innerHTML = '';
|
||||
}else{
|
||||
document.getElementById(key + 'attribute').innerHTML = str;
|
||||
replyfloor_smilies_switch(key, type);
|
||||
}
|
||||
}else{
|
||||
document.getElementById(key + 'attribute').className = key + 'showsmilebox';
|
||||
document.getElementById(key + 'attribute').innerHTML = str;
|
||||
replyfloor_smilies_switch(key, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
function replyfloor_smilies_switch(key, type) {
|
||||
if(!smilies_array[type]) return;
|
||||
smiliesdata = '';
|
||||
j = k = 0;
|
||||
img = [];
|
||||
for(i in smilies_type) {
|
||||
if(smilies_type[i][0]) {
|
||||
if(type == i.substring(1)) {
|
||||
document.getElementById(key + 'showsmilebox_tab'+i).className = 'current';
|
||||
}else{
|
||||
document.getElementById(key + 'showsmilebox_tab'+i).className = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
for(page in smilies_array[type]) {
|
||||
for(var i = 0; i < smilies_array[type][page].length; i++) {
|
||||
s = smilies_array[type][page][i];
|
||||
smilieimg = STATICURL + 'image/smiley/' + smilies_type['_' + type][1] + '/' + s[2];
|
||||
img[k] = new Image();
|
||||
img[k].src = smilieimg;
|
||||
smiliesdata += s && s[0] ? '<span><img class="'+key + 'showsmilebox_img" style="margin:0;" width="' + s[3] +'" height="' + s[4] +'" src="' + smilieimg + '" alt="' + s[1] + '" onclick="replyfloor_insertunit(\'' + key + '\', \'' + s[1].replace(/'/, '\\\'') + '\')" /></span>' : '';
|
||||
j++;k++;
|
||||
}
|
||||
}
|
||||
document.getElementById(key + 'showsmilebox_data').innerHTML = smiliesdata;
|
||||
}
|
||||
|
||||
function replyfloor_collapse(obj, postid, type) {
|
||||
document.getElementById('replyfloor_content_more_'+postid).innerHTML = '';
|
||||
if(type == 1){
|
||||
var nextpageurl = obj.getAttribute('rel').valueOf();
|
||||
$.get(nextpageurl + '&inajax=1', function(s){
|
||||
s = s.lastChild.firstChild.nodeValue;
|
||||
s = s.replace(/\n|\r/g, ' ');
|
||||
var nexts = s.match(/\<div class="replyfloor_content_li" id="replyfloor_content_li_(\d+)"\>(.+?)\<div>\<\/div>\<\/div>/g);
|
||||
for(i in nexts) {
|
||||
var insertid = nexts[i].match(/<div class="replyfloor_content_li" id="replyfloor_content_li_(\d+)"\>/);
|
||||
if(!document.getElementById('replyfloor_content_li_' + insertid[1])) {
|
||||
var div = document.createElement('div');
|
||||
document.getElementById('replyfloor_newbox_'+postid).appendChild(div);
|
||||
div.outerHTML = nexts[i].replace(/\<div>\<\/div>/g, '');
|
||||
}
|
||||
}
|
||||
var moreinfo = s.match(/\<div class="replyfloor_content_more" id="replyfloor_content_more_(\d+)"\>(.+?)\<div>\<\/div>\<\/div\>/);
|
||||
if(document.getElementById('replyfloor_content_more_'+postid)){
|
||||
document.getElementById('replyfloor_content_more_'+postid).innerHTML = moreinfo[2];
|
||||
}
|
||||
}, "xml");
|
||||
}else{
|
||||
document.getElementById('replyfloor_newbox_'+postid).innerHTML = '';
|
||||
var nextpageurl = obj.getAttribute('rel').valueOf();
|
||||
$.get(nextpageurl + '&inajax=1', function(s){
|
||||
s = s.lastChild.firstChild.nodeValue;
|
||||
if(document.getElementById('replyfloor_content_'+postid)){
|
||||
document.getElementById('replyfloor_content_'+postid).innerHTML = s;
|
||||
}
|
||||
var current = $('#replyfloor_box_'+postid).offset().top;
|
||||
if($("html,body").scrollTop() > current){
|
||||
$("html,body").stop().animate({
|
||||
scrollTop: current
|
||||
}, 300);
|
||||
}
|
||||
}, "xml");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function replyfloor_uploadimage(userSettings) {
|
||||
replyfloor_webupload(userSettings);
|
||||
}
|
||||
function replyfloor_uploadattach(userSettings) {
|
||||
replyfloor_webupload(userSettings);
|
||||
}
|
||||
function replyfloor_webupload(userSettings) {
|
||||
var settings = {};
|
||||
var ensureDefault = function(settingName, defaultValue) {
|
||||
var setting = userSettings[settingName];
|
||||
if (setting != undefined) {
|
||||
settings[settingName] = setting;
|
||||
} else {
|
||||
settings[settingName] = defaultValue;
|
||||
}
|
||||
};
|
||||
ensureDefault("auto", false);
|
||||
ensureDefault("compress", false);
|
||||
ensureDefault("upload_url", "");
|
||||
ensureDefault("pick", undefined);
|
||||
ensureDefault("dnd", undefined);
|
||||
ensureDefault("paste", undefined);
|
||||
ensureDefault("accept", null);
|
||||
ensureDefault("fileVal", "file");
|
||||
ensureDefault("chunked", false);
|
||||
ensureDefault("chunkSize", 5242880);
|
||||
ensureDefault("post_params", {});
|
||||
ensureDefault("threads", 1);
|
||||
ensureDefault("fileNumLimit", undefined);
|
||||
ensureDefault("fileSingleSizeLimit", undefined);
|
||||
|
||||
var getBasePath = function() {
|
||||
var els = document.getElementsByTagName('script'), src;
|
||||
for (var i = 0, len = els.length; i < len; i++) {
|
||||
src = els[i].src || '';
|
||||
if (/cwebuploader[\w\-\.]*\.js/.test(src)) {
|
||||
return src.substring(0, src.lastIndexOf('/') + 1);
|
||||
}
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
var uploader = CWebUploader.create({
|
||||
auto: false,
|
||||
swf: getBasePath() + 'Uploader.swf',
|
||||
compress: settings.compress,
|
||||
server: settings.upload_url,
|
||||
pick: settings.pick,
|
||||
dnd: settings.dnd,
|
||||
paste: settings.paste,
|
||||
accept: settings.accept,
|
||||
fileVal: settings.fileVal,
|
||||
chunked: settings.chunked,
|
||||
chunkSize: settings.chunkSize,
|
||||
formData: settings.post_params,
|
||||
threads: settings.threads,
|
||||
fileNumLimit: settings.fileNumLimit,
|
||||
fileSingleSizeLimit: settings.fileSingleSizeLimit,
|
||||
duplicate: true,
|
||||
disableWidgets: 'log'
|
||||
});
|
||||
uploader.on('beforeFileQueued', function(file) {
|
||||
|
||||
});
|
||||
uploader.on('fileQueued', function( file ) {
|
||||
var eles = document.getElementById('replyfloor_upimage').getElementsByClassName('replyfloor_upimage_li');
|
||||
if (settings.fileNumLimit && eles.length >= settings.fileNumLimit) {
|
||||
popup.open('最多只能上传' + settings.fileNumLimit + '张', 'alert');
|
||||
return false;
|
||||
} else {
|
||||
var div = document.createElement("div");
|
||||
div.id = 'replyfloor_upimage_li_'+file.id;
|
||||
div.className = 'replyfloor_upimage_li';
|
||||
document.getElementById('replyfloor_upimage').appendChild(div);
|
||||
uploader.upload(file);
|
||||
}
|
||||
});
|
||||
uploader.on('uploadSuccess', function( file, response ) {
|
||||
var obj = document.getElementById('replyfloor_upimage_li_'+file.id);
|
||||
if(response['status'] == 0) {
|
||||
obj.parentNode.removeChild(obj);
|
||||
popup.open(response['message'], 'alert');
|
||||
} else {
|
||||
obj.innerHTML = '<div class="replyfloor_upimage_del"><a id="replyfloor_upimage_del_'+response['aid']+'" href="javascript:;" onclick="replyfloor_delimage('+response['aid']+')" title="删除"></a></div><div class="replyfloor_upimage_img"><img src="'+response['attachment']+'" border="0" alt="'+response['filename']+'"/></div><input type="hidden" name="attach[]" value="'+response['aid']+'" />';
|
||||
}
|
||||
});
|
||||
uploader.on("uploadError", function (file, response) {
|
||||
var obj = document.getElementById('replyfloor_upimage_li_'+file.id);
|
||||
obj.parentNode.removeChild(obj);
|
||||
});
|
||||
uploader.on("uploadFinished", function () {
|
||||
uploader.reset();
|
||||
});
|
||||
uploader.on('error', function (code) {
|
||||
var err = '';
|
||||
switch (code) {
|
||||
case 'F_EXCEED_SIZE':
|
||||
err += '单张图片大小不得超过' + Base.formatSize(uploader.option('fileSingleSizeLimit')) + '!';
|
||||
break;
|
||||
case 'Q_EXCEED_NUM_LIMIT':
|
||||
err += '最多只能上传' + settings.fileNumLimit + '张!';
|
||||
break;
|
||||
case 'Q_EXCEED_SIZE_LIMIT':
|
||||
err += '上传图片总大小超出' + Base.formatSize(uploader.option('fileSizeLimit')) + '!';
|
||||
break;
|
||||
case 'Q_TYPE_DENIED':
|
||||
err += '无效图片类型,请上传正确的图片格式!';
|
||||
break;
|
||||
case 'F_DUPLICATE':
|
||||
err += '请不要重复上传相同图片!';
|
||||
break;
|
||||
default:
|
||||
err += '上传错误,请刷新重试!'+code;
|
||||
break;
|
||||
}
|
||||
popup.open(err, 'alert');
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function replyfloor_plupload(userSettings) {
|
||||
var settings = {};
|
||||
var ensureDefault = function(settingName, defaultValue) {
|
||||
var setting = userSettings[settingName];
|
||||
if (setting != undefined) {
|
||||
settings[settingName] = setting;
|
||||
} else {
|
||||
settings[settingName] = defaultValue;
|
||||
}
|
||||
};
|
||||
ensureDefault("auto", false);
|
||||
ensureDefault("upload_url", "");
|
||||
ensureDefault("pick", undefined);
|
||||
ensureDefault("accept", null);
|
||||
ensureDefault("fileVal", "file");
|
||||
ensureDefault("post_params", {});
|
||||
|
||||
var pluploader = new plupload.Uploader({
|
||||
browse_button : settings.pick,
|
||||
url : settings.upload_url,
|
||||
file_data_name: settings.fileVal,
|
||||
multi_selection: false,
|
||||
multipart_params: settings.post_params,
|
||||
filters:settings.accept
|
||||
});
|
||||
pluploader.init();
|
||||
pluploader.bind('FilesAdded',function(uploader,files){
|
||||
pluploader.start();
|
||||
});
|
||||
pluploader.bind('FileUploaded', function(uploader,file, res){
|
||||
var response = eval('(' + res.response + ')');
|
||||
if(response['status'] == 0) {
|
||||
showDialog(response['message'], 'alert');
|
||||
} else {
|
||||
var div = document.createElement("div");
|
||||
div.id = 'replyfloor_upimage_li_'+response['aid'];
|
||||
div.className = 'replyfloor_upimage_li';
|
||||
div.innerHTML = '<div class="replyfloor_upimage_del"><a href="javascript:;" id="replyfloor_upimage_del_'+response['aid']+'" onclick="replyfloor_delimage('+response['aid']+')" title="删除"></a></div><div class="replyfloor_upimage_img"><img src="'+response['attachment']+'" border="0" alt="'+response['filename']+'"/></div><input type="hidden" name="attach[]" value="'+response['aid']+'" />';
|
||||
document.getElementById('replyfloor_upimage').appendChild(div);
|
||||
}
|
||||
});
|
||||
pluploader.bind('Error', function(uploader,error){
|
||||
showDialog('上传错误,请刷新重试!', 'alert');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
function replyfloor_delimage(aid) {
|
||||
var obj = document.getElementById('replyfloor_upimage_del_'+aid).parentNode.parentNode;
|
||||
if(obj) {
|
||||
obj.parentNode.removeChild(obj);
|
||||
$.get('plugin.php?id=replyfloor:attachment&operation=delete&aid='+aid + '&inajax=1', function(s){
|
||||
|
||||
}, "xml");
|
||||
}
|
||||
}
|
||||
function replyfloor_autotextarea(obj) {
|
||||
obj.style.height = '20px';
|
||||
obj.style.height = obj.scrollHeight + 'px';
|
||||
}
|
||||
|
||||
function replyfloor_bbcode2html(str) {
|
||||
if(str == '') {
|
||||
return '';
|
||||
}
|
||||
str = str.replace(/</g, '<');
|
||||
str = str.replace(/>/g, '>');
|
||||
if(typeof smilies_type == 'object') {
|
||||
for(var typeid in smilies_array) {
|
||||
for(var page in smilies_array[typeid]) {
|
||||
for(var i in smilies_array[typeid][page]) {
|
||||
re = new RegExp(preg_quote(smilies_array[typeid][page][i][1]), "g");
|
||||
str = str.replace(re, '<img src="' + STATICURL + 'image/smiley/' + smilies_type['_' + typeid][1] + '/' + smilies_array[typeid][page][i][2] + '" border="0" smilieid="' + smilies_array[typeid][page][i][0] + '" alt="' + smilies_array[typeid][page][i][1] + '" />');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
str = str.replace(/\[color=([\w#\(\),\s]+?)\]/ig, '<font color="$1">');
|
||||
str = preg_replace([
|
||||
'\\\[\\\/color\\\]', '\\\[b\\\]', '\\\[\\\/b\\\]'
|
||||
], [
|
||||
'</font>', '<b>', '</b>'
|
||||
], str, 'g');
|
||||
str = str.replace(/(^|>)([^<]+)(?=<|$)/ig, function($1, $2, $3) {
|
||||
return $2 + preg_replace(['\t', ' ', ' ', '(\r\n|\n|\r)'], [' ', ' ', ' ', '<br />'], $3);
|
||||
});
|
||||
return str;
|
||||
}
|
||||
|
||||
function replyfloor_html2bbcode(str) {
|
||||
if(str == '') {
|
||||
return '';
|
||||
}
|
||||
str = preg_replace(['<style.*?>[\\\s\\\S]*?<\/style>', '<script.*?>[\\\s\\\S]*?<\/script>', '<noscript.*?>[\\\s\\\S]*?<\/noscript>', '<select.*?>[\s\S]*?<\/select>', '<object.*?>[\s\S]*?<\/object>', '<!--[\\\s\\\S]*?-->', ' on[a-zA-Z]{3,16}\\\s?=\\\s?"[\\\s\\\S]*?"'], '', str);
|
||||
str= str.replace(/(\r\n|\n|\r)/ig, '');
|
||||
str= str.replace(/&((#(32|127|160|173))|shy|nbsp);/ig, ' ');
|
||||
str = str.replace(/<br\s+?style=(["']?)clear: both;?(\1)[^\>]*>/ig, '');
|
||||
str = str.replace(/<br[^\>]*>/ig, "\n");
|
||||
str = str.replace(/<img[^>]+smilieid=(["']?)(\d+)(\1)[^>]*>/ig, function($1, $2, $3) {return replyfloor_smileycode($3);});
|
||||
str = replyfloor_recursion('b', str, 'replyfloor_simpletag', 'b');
|
||||
str = replyfloor_recursion('strong', str, 'replyfloor_simpletag', 'b');
|
||||
str = str.replace(/<[\/\!]*?[^<>]*?>/ig, '');
|
||||
return preg_replace([' ', '<', '>', '&'], [' ', '<', '>', '&'], str);
|
||||
}
|
||||
|
||||
function replyfloor_recursion(tagname, text, dofunction, extraargs) {
|
||||
if(extraargs == null) {
|
||||
extraargs = '';
|
||||
}
|
||||
tagname = tagname.toLowerCase();
|
||||
|
||||
var open_tag = '<' + tagname;
|
||||
var open_tag_len = open_tag.length;
|
||||
var close_tag = '</' + tagname + '>';
|
||||
var close_tag_len = close_tag.length;
|
||||
var beginsearchpos = 0;
|
||||
|
||||
do {
|
||||
var textlower = text.toLowerCase();
|
||||
var tagbegin = textlower.indexOf(open_tag, beginsearchpos);
|
||||
if(tagbegin == -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
var strlen = text.length;
|
||||
|
||||
var inquote = '';
|
||||
var found = false;
|
||||
var tagnameend = false;
|
||||
var optionend = 0;
|
||||
var t_char = '';
|
||||
|
||||
for(optionend = tagbegin; optionend <= strlen; optionend++) {
|
||||
t_char = text.charAt(optionend);
|
||||
if((t_char == '"' || t_char == "'") && inquote == '') {
|
||||
inquote = t_char;
|
||||
} else if((t_char == '"' || t_char == "'") && inquote == t_char) {
|
||||
inquote = '';
|
||||
} else if(t_char == '>' && !inquote) {
|
||||
found = true;
|
||||
break;
|
||||
} else if((t_char == '=' || t_char == ' ') && !tagnameend) {
|
||||
tagnameend = optionend;
|
||||
}
|
||||
}
|
||||
|
||||
if(!found) {
|
||||
break;
|
||||
}
|
||||
if(!tagnameend) {
|
||||
tagnameend = optionend;
|
||||
}
|
||||
|
||||
var offset = optionend - (tagbegin + open_tag_len);
|
||||
var tagoptions = text.substr(tagbegin + open_tag_len, offset);
|
||||
var acttagname = textlower.substr(tagbegin * 1 + 1, tagnameend - tagbegin - 1);
|
||||
|
||||
if(acttagname != tagname) {
|
||||
beginsearchpos = optionend;
|
||||
continue;
|
||||
}
|
||||
|
||||
var tagend = textlower.indexOf(close_tag, optionend);
|
||||
if(tagend == -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
var nestedopenpos = textlower.indexOf(open_tag, optionend);
|
||||
while(nestedopenpos != -1 && tagend != -1) {
|
||||
if(nestedopenpos > tagend) {
|
||||
break;
|
||||
}
|
||||
tagend = textlower.indexOf(close_tag, tagend + close_tag_len);
|
||||
nestedopenpos = textlower.indexOf(open_tag, nestedopenpos + open_tag_len);
|
||||
}
|
||||
|
||||
if(tagend == -1) {
|
||||
beginsearchpos = optionend;
|
||||
continue;
|
||||
}
|
||||
|
||||
var localbegin = optionend + 1;
|
||||
var localtext = eval(dofunction)(tagoptions, text.substr(localbegin, tagend - localbegin), tagname, extraargs);
|
||||
|
||||
text = text.substring(0, tagbegin) + localtext + text.substring(tagend + close_tag_len);
|
||||
|
||||
beginsearchpos = tagbegin + localtext.length;
|
||||
|
||||
} while(tagbegin != -1);
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
function replyfloor_simpletag(options, text, tagname, parseto) {
|
||||
if(trim(text) == '') {
|
||||
return '';
|
||||
}
|
||||
text = replyfloor_recursion(tagname, text, 'replyfloor_simpletag', parseto);
|
||||
return '[' + parseto + ']' + text + '[/' + parseto + ']';
|
||||
}
|
||||
|
||||
function replyfloor_smileycode(smileyid) {
|
||||
if(typeof smilies_type != 'object') return;
|
||||
for(var typeid in smilies_array) {
|
||||
for(var page in smilies_array[typeid]) {
|
||||
for(var i in smilies_array[typeid][page]) {
|
||||
if(smilies_array[typeid][page][i][0] == smileyid) {
|
||||
return smilies_array[typeid][page][i][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
29
source/plugin/replyfloor/static/js/plupload.js
Normal file
119
source/plugin/replyfloor/table/table_replyfloor_attachment.php
Normal file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
class table_replyfloor_attachment extends discuz_table {
|
||||
|
||||
public function __construct() {
|
||||
$this->_table = 'plugin_replyfloor_attachment';
|
||||
$this->_pk = 'id';
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function count_by_search_where($wherearr) {
|
||||
$wheresql = empty($wherearr) ? '' : implode(' AND ', $wherearr);
|
||||
return DB::result_first('SELECT COUNT(*) FROM '.DB::table($this->_table).($wheresql ? ' WHERE '.$wheresql : ''));
|
||||
}
|
||||
|
||||
public function fetch_all_by_search_where($wherearr, $ordersql = '', $start = 0, $limit = 0) {
|
||||
$wheresql = empty($wherearr) ? '' : implode(' AND ', $wherearr);
|
||||
return DB::fetch_all('SELECT * FROM '.DB::table($this->_table).($wheresql ? ' WHERE '.$wheresql : '').' '.$ordersql.DB::limit($start, $limit), null, 'id');
|
||||
}
|
||||
|
||||
public function fetch_by_id($id) {
|
||||
return DB::fetch_first('SELECT * FROM %t WHERE id=%d', array($this->_table, $id));
|
||||
}
|
||||
|
||||
public function fetch_all_by_id($ids, $ordersql = '') {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
return DB::fetch_all('SELECT * FROM %t WHERE id IN(%n) '.$ordersql, array($this->_table, $ids), 'id');
|
||||
}
|
||||
}
|
||||
|
||||
public function fetch_all_by_msgid($ids, $ordersql = '') {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
return DB::fetch_all('SELECT * FROM %t WHERE msgid IN(%n) '.$ordersql, array($this->_table, $ids), 'id');
|
||||
}
|
||||
}
|
||||
|
||||
public function fetch_all_by_tid($ids, $ordersql = '') {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
return DB::fetch_all('SELECT * FROM %t WHERE tid IN(%n) '.$ordersql, array($this->_table, $ids), 'id');
|
||||
}
|
||||
}
|
||||
|
||||
public function fetch_all_by_pid($ids, $ordersql = '') {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
return DB::fetch_all('SELECT * FROM %t WHERE pid IN(%n) '.$ordersql, array($this->_table, $ids), 'id');
|
||||
}
|
||||
}
|
||||
|
||||
public function fetch_all_by_authorid($ids, $ordersql = '') {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
return DB::fetch_all('SELECT * FROM %t WHERE uid IN(%n) '.$ordersql, array($this->_table, $ids), 'id');
|
||||
}
|
||||
}
|
||||
|
||||
public function update_by_ids($ids, $data) {
|
||||
if(($id = dintval((array)$id, true)) && $data && is_array($data)) {
|
||||
DB::update($this->_table, $data, DB::field($this->_pk, $id), true);
|
||||
}
|
||||
}
|
||||
|
||||
public function update_by_id($id, $data) {
|
||||
if(($id = dintval($id, true)) && $data && is_array($data)) {
|
||||
DB::update($this->_table, $data, DB::field($this->_pk, $id), true);
|
||||
}
|
||||
}
|
||||
|
||||
public function delete_by_id($ids) {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
DB::query('DELETE FROM %t WHERE id IN(%n)', array($this->_table, $ids), false, true);
|
||||
}
|
||||
}
|
||||
|
||||
public function delete_by_msgid($ids) {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
DB::query('DELETE FROM %t WHERE msgid IN(%n)', array($this->_table, $ids), false, true);
|
||||
}
|
||||
}
|
||||
|
||||
public function delete_by_pid($ids) {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
DB::query('DELETE FROM %t WHERE pid IN(%n)', array($this->_table, $ids), false, true);
|
||||
}
|
||||
}
|
||||
|
||||
public function delete_by_tid($ids) {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
DB::query('DELETE FROM %t WHERE tid IN(%n)', array($this->_table, $ids), false, true);
|
||||
}
|
||||
}
|
||||
|
||||
public function delete_by_authorid($ids) {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
DB::query('DELETE FROM %t WHERE uid IN(%n)', array($this->_table, $ids), false, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
class table_replyfloor_attachment_unused extends discuz_table {
|
||||
|
||||
public function __construct() {
|
||||
$this->_table = 'plugin_replyfloor_attachment_unused';
|
||||
$this->_pk = 'id';
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function count_by_search_where($wherearr) {
|
||||
$wheresql = empty($wherearr) ? '' : implode(' AND ', $wherearr);
|
||||
return DB::result_first('SELECT COUNT(*) FROM '.DB::table($this->_table).($wheresql ? ' WHERE '.$wheresql : ''));
|
||||
}
|
||||
|
||||
public function fetch_all_by_search_where($wherearr, $ordersql = '', $start = 0, $limit = 0) {
|
||||
$wheresql = empty($wherearr) ? '' : implode(' AND ', $wherearr);
|
||||
return DB::fetch_all('SELECT * FROM '.DB::table($this->_table).($wheresql ? ' WHERE '.$wheresql : '').' '.$ordersql.DB::limit($start, $limit), null, 'id');
|
||||
}
|
||||
|
||||
public function fetch_by_id($id) {
|
||||
return DB::fetch_first('SELECT * FROM %t WHERE id=%d', array($this->_table, $id));
|
||||
}
|
||||
|
||||
public function fetch_all_by_id($ids, $ordersql = '') {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
return DB::fetch_all('SELECT * FROM %t WHERE id IN(%n) '.$ordersql, array($this->_table, $ids), 'id');
|
||||
}
|
||||
}
|
||||
|
||||
public function update_by_ids($ids, $data) {
|
||||
if(($id = dintval((array)$id, true)) && $data && is_array($data)) {
|
||||
DB::update($this->_table, $data, DB::field($this->_pk, $id), true);
|
||||
}
|
||||
}
|
||||
|
||||
public function update_by_id($id, $data) {
|
||||
if(($id = dintval($id, true)) && $data && is_array($data)) {
|
||||
DB::update($this->_table, $data, DB::field($this->_pk, $id), true);
|
||||
}
|
||||
}
|
||||
|
||||
public function delete_by_id($ids) {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
DB::query('DELETE FROM %t WHERE id IN(%n)', array($this->_table, $ids), false, true);
|
||||
}
|
||||
}
|
||||
|
||||
public function delete_by_authorid($ids) {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
DB::query('DELETE FROM %t WHERE uid IN(%n)', array($this->_table, $ids), false, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
179
source/plugin/replyfloor/table/table_replyfloor_message.php
Normal file
@@ -0,0 +1,179 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
class table_replyfloor_message extends discuz_table {
|
||||
|
||||
public function __construct() {
|
||||
$this->_table = 'plugin_replyfloor_message';
|
||||
$this->_pk = 'id';
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function count_by_search_where($wherearr) {
|
||||
$wheresql = empty($wherearr) ? '' : implode(' AND ', $wherearr);
|
||||
return DB::result_first('SELECT COUNT(*) FROM '.DB::table($this->_table).($wheresql ? ' WHERE '.$wheresql : ''));
|
||||
}
|
||||
|
||||
public function count_by_authorid($authorid) {
|
||||
return DB::result_first('SELECT COUNT(*) FROM %t WHERE uid=%d', array($this->_table, $authorid));
|
||||
}
|
||||
|
||||
public function fetch_all_by_search_where($wherearr, $ordersql = '', $start = 0, $limit = 0) {
|
||||
$wheresql = empty($wherearr) ? '' : implode(' AND ', $wherearr);
|
||||
return DB::fetch_all('SELECT * FROM '.DB::table($this->_table).($wheresql ? ' WHERE '.$wheresql : '').' '.$ordersql.DB::limit($start, $limit), null, 'id');
|
||||
}
|
||||
|
||||
public function fetch_by_id($id) {
|
||||
return DB::fetch_first('SELECT * FROM %t WHERE id=%d', array($this->_table, $id));
|
||||
}
|
||||
|
||||
public function fetch_all_by_id($ids, $ordersql = '') {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
return DB::fetch_all('SELECT * FROM %t WHERE id IN(%n) '.$ordersql, array($this->_table, $ids), false, true);
|
||||
}
|
||||
}
|
||||
|
||||
public function fetch_message_by_pid($pids, $perpage, $ordersql = '', $setconfig = array()) {
|
||||
global $_G;
|
||||
$date_convert = $_G['setting']['dateconvert'];
|
||||
$_G['setting']['dateconvert'] = $setconfig['date_convert'];
|
||||
$wherearr = array();
|
||||
if($_G['uid']){
|
||||
$wherearr[] = "(status = '0' or (status = '-1' and uid = '".$_G['uid']."'))";
|
||||
}else{
|
||||
$wherearr[] = "status = '0'";
|
||||
}
|
||||
$wherearr[] = DB::field('pid', $pids, 'in');
|
||||
$wheresql = empty($wherearr) ? '' : implode(' AND ', $wherearr);
|
||||
$query = DB::query("SELECT * FROM ".DB::table($this->_table).($wheresql ? ' WHERE '.$wheresql : '').' '.$ordersql);
|
||||
$messageinfo = $messagecount = $messagelist = array();
|
||||
require_once libfile('function/common', 'plugin/replyfloor');
|
||||
$uids = array();
|
||||
while($message = DB::fetch($query)) {
|
||||
$messagecount[$message['pid']]++;
|
||||
if(!isset($messagelist[$message['pid']])) {
|
||||
$messagelist[$message['pid']] = array();
|
||||
}
|
||||
if(count($messagelist[$message['pid']]) < $perpage) {
|
||||
$message['avatar'] = avatar($message['uid'], 'small');
|
||||
$message['message'] = replyfloor_discuzcode($message['message']);
|
||||
if(file_exists(DISCUZ_ROOT.'./source/plugin/replyfloor/extend/extend_hidenum.php')){
|
||||
require_once libfile('extend/hidenum', 'plugin/replyfloor');
|
||||
$message['message'] = replyfloor_extend_hidenum($message['message']);
|
||||
}
|
||||
if($setconfig['show_br']) {
|
||||
$message['message'] = nl2br($message['message']);
|
||||
}
|
||||
if($setconfig['show_location']) {
|
||||
$message['location'] = replyfloor_location($message['postip']);
|
||||
}else{
|
||||
$message['location'] = '';
|
||||
}
|
||||
$message['createtime'] = $setconfig['date_convert'] ? dgmdate($message['createtime'], 'u', 9999, $setconfig['time_format']) : dgmdate($message['createtime'], $setconfig['time_format']);
|
||||
$messagelist[$message['pid']][] = $message;
|
||||
$uids[] = $message['uid'];
|
||||
if($message['ruid']){
|
||||
$uids[] = $message['ruid'];
|
||||
}
|
||||
}
|
||||
$messageinfo[$message['pid']]['count'] = $messagecount[$message['pid']];
|
||||
$messageinfo[$message['pid']]['list'] = $messagelist[$message['pid']];
|
||||
}
|
||||
if($uids) {
|
||||
loadcache('usergroups');
|
||||
foreach(C::t('common_member')->fetch_all($uids) as $uid => $postuser) {
|
||||
foreach ($messageinfo as $key => $value) {
|
||||
foreach ($value['list'] as $k => $val) {
|
||||
if($val['uid'] == $uid) {
|
||||
$val['groupcolor'] = $_G['cache']['usergroups'][$postuser['groupid']]['color'];
|
||||
}
|
||||
if($val['ruid'] == $uid) {
|
||||
$val['rgroupcolor'] = $_G['cache']['usergroups'][$postuser['groupid']]['color'];
|
||||
}
|
||||
$messageinfo[$key]['list'][$k] = $val;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$_G['setting']['dateconvert'] = $date_convert;
|
||||
return $messageinfo;
|
||||
}
|
||||
|
||||
public function update_by_id($id, $data) {
|
||||
if(($id = dintval($id, true)) && $data && is_array($data)) {
|
||||
DB::update($this->_table, $data, DB::field($this->_pk, $id), true);
|
||||
}
|
||||
}
|
||||
|
||||
public function update_reportnum($id, $num = 1) {
|
||||
return DB::query('UPDATE %t SET reportnum = reportnum + \'%d\' WHERE id = %d', array($this->_table, $num, $id));
|
||||
}
|
||||
|
||||
public function restore_by_id($ids) {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
DB::update($this->_table, array('status'=>0), DB::field('id', $ids, 'in'), true);
|
||||
}
|
||||
}
|
||||
|
||||
public function delete_by_id($ids, $recycle = 0) {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
if($recycle) {
|
||||
DB::update($this->_table, array('status'=>1), DB::field('id', $ids, 'in'), true);
|
||||
}else{
|
||||
DB::query('DELETE FROM %t WHERE id IN(%n)', array($this->_table, $ids), false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function delete_by_pid($ids, $recycle = 0) {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
if($recycle) {
|
||||
DB::update($this->_table, array('status'=>1), DB::field('pid', $ids, 'in'), true);
|
||||
}else{
|
||||
DB::query('DELETE FROM %t WHERE pid IN(%n)', array($this->_table, $ids), false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function delete_by_tid($ids, $recycle = 0) {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
if($recycle) {
|
||||
DB::update($this->_table, array('status'=>1), DB::field('tid', $ids, 'in'), true);
|
||||
}else{
|
||||
DB::query('DELETE FROM %t WHERE tid IN(%n)', array($this->_table, $ids), false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function delete_by_authorid($ids, $recycle = 0) {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
if($recycle) {
|
||||
DB::update($this->_table, array('status'=>1), DB::field('uid', $ids, 'in'), true);
|
||||
}else{
|
||||
DB::query('DELETE FROM %t WHERE uid IN(%n)', array($this->_table, $ids), false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
83
source/plugin/replyfloor/table/table_replyfloor_report.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
class table_replyfloor_report extends discuz_table {
|
||||
|
||||
public function __construct() {
|
||||
$this->_table = 'plugin_replyfloor_report';
|
||||
$this->_pk = 'id';
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function count_by_search_where($wherearr) {
|
||||
$wheresql = empty($wherearr) ? '' : implode(' AND ', $wherearr);
|
||||
return DB::result_first('SELECT COUNT(*) FROM '.DB::table($this->_table).($wheresql ? ' WHERE '.$wheresql : ''));
|
||||
}
|
||||
|
||||
public function fetch_all_by_search_where($wherearr, $ordersql = '', $start = 0, $limit = 0) {
|
||||
$wheresql = empty($wherearr) ? '' : implode(' AND ', $wherearr);
|
||||
return DB::fetch_all('SELECT * FROM '.DB::table($this->_table).($wheresql ? ' WHERE '.$wheresql : '').' '.$ordersql.DB::limit($start, $limit), null, 'id');
|
||||
}
|
||||
|
||||
public function fetch_by_id($id) {
|
||||
return DB::fetch_first('SELECT * FROM %t WHERE id=%d', array($this->_table, $id));
|
||||
}
|
||||
|
||||
public function fetch_all_by_id($ids, $ordersql = '') {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
return DB::fetch_all('SELECT * FROM %t WHERE id IN(%n) '.$ordersql, array($this->_table, $ids), 'id');
|
||||
}
|
||||
}
|
||||
|
||||
public function fetch_all_by_msgid($ids, $ordersql = '') {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
return DB::fetch_all('SELECT * FROM %t WHERE msgid IN(%n) '.$ordersql, array($this->_table, $ids), 'id');
|
||||
}
|
||||
}
|
||||
|
||||
public function update_by_ids($ids, $data) {
|
||||
if(($id = dintval((array)$id, true)) && $data && is_array($data)) {
|
||||
DB::update($this->_table, $data, DB::field($this->_pk, $id), true);
|
||||
}
|
||||
}
|
||||
|
||||
public function update_by_id($id, $data) {
|
||||
if(($id = dintval($id, true)) && $data && is_array($data)) {
|
||||
DB::update($this->_table, $data, DB::field($this->_pk, $id), true);
|
||||
}
|
||||
}
|
||||
|
||||
public function delete_by_id($ids) {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
DB::query('DELETE FROM %t WHERE id IN(%n)', array($this->_table, $ids), false, true);
|
||||
}
|
||||
}
|
||||
|
||||
public function delete_by_msgid($ids) {
|
||||
if(($ids = dintval((array)$ids, true))) {
|
||||
DB::query('DELETE FROM %t WHERE msgid IN(%n)', array($this->_table, $ids), false, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
36
source/plugin/replyfloor/template/delete.htm
Normal file
@@ -0,0 +1,36 @@
|
||||
<!--{template common/header}-->
|
||||
<!--{if empty($_GET['infloat'])}-->
|
||||
<div id="pt" class="bm cl">
|
||||
<div class="z"><a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a> <em>›</em> $navigation</div>
|
||||
</div>
|
||||
<div id="ct" class="wp cl">
|
||||
<div class="mn">
|
||||
<div class="bm bw0">
|
||||
<!--{/if}-->
|
||||
|
||||
<div class="tm_c" id="floatlayout_topicadmin">
|
||||
<h3 class="flb">
|
||||
<em id="return_mods">{lang replyfloor:title_tip}</em>
|
||||
<span>
|
||||
<a href="javascript:;" class="flbc" onclick="hideWindow('messagemod')" title="{lang close}">{lang close}</a>
|
||||
</span>
|
||||
</h3>
|
||||
<form id="messagemodform" method="post" autocomplete="off" action="plugin.php?id=replyfloor:index&ac=delete&modsubmit=yes&infloat=yes" onsubmit="ajaxpost('messagemodform', 'return_messagemod', 'return_messagemod', 'onerror');return false;">
|
||||
<input type="hidden" name="formhash" value="{FORMHASH}" />
|
||||
<input type="hidden" name="tid" value="$msginfo[tid]" />
|
||||
<input type="hidden" name="pid" value="$msginfo[pid]" />
|
||||
<input type="hidden" name="msgid" value="$msginfo[id]" />
|
||||
<!--{if !empty($_GET['infloat'])}--><input type="hidden" name="handlekey" value="$_GET['handlekey']" /><!--{/if}-->
|
||||
<div class="c altw"><div class="alert_info"><p>{lang replyfloor:admin_delpost_confirm}</p></div></div>
|
||||
<div class="o pns">
|
||||
<button type="submit" name="modsubmit" id="modsubmit" value="ture" class="pn pnc"><span>{lang confirms}</span></button>
|
||||
<button value="true" class="pn" onclick="hideWindow('messagemod')"><strong>{lang cancel}</strong></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!--{if empty($_GET['infloat'])}-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{template common/footer}-->
|
265
source/plugin/replyfloor/template/js.htm
Normal file
@@ -0,0 +1,265 @@
|
||||
<!--{block return}-->
|
||||
<!--{if $setconfig['upload_image'] > 0}-->
|
||||
<script type="text/javascript" src="source/plugin/replyfloor/static/js/cquery.js?{VERHASH}"></script>
|
||||
<link rel="stylesheet" type="text/css" href="source/plugin/replyfloor/static/cwebuploader/cwebuploader.css?{VERHASH}">
|
||||
<script type="text/javascript" src="source/plugin/replyfloor/static/cwebuploader/cwebuploader.js?{VERHASH}"></script>
|
||||
<!--{/if}-->
|
||||
<script type="text/javascript" src="source/plugin/replyfloor/static/js/common.js?{VERHASH}" charset="utf-8"></script>
|
||||
<!--{if $setconfig['style_pc'] != 3}-->
|
||||
<script type="text/javascript" src="{$_G[setting][jspath]}seditor.js?{VERHASH}"></script>
|
||||
<script type='text/template' id="replyfloor_editorbox">
|
||||
<div class="replyfloor_editor">
|
||||
<form id="replyfloor_messageform" name="replyfloor_messageform" onsubmit="replyfloor_onsubmit();return false;" action='plugin.php?id=replyfloor:index&ac=post&tid=$_G[tid]' method="post" autocomplete="off">
|
||||
<input type="hidden" name="formhash" value="{FORMHASH}">
|
||||
<input type="hidden" name="savesubmit" value="true" />
|
||||
<input type="hidden" name="pid" value="0" id="replyfloor_pid" />
|
||||
<input type="hidden" name="msgid" value="0" id="replyfloor_msgid" />
|
||||
<input type="hidden" name="handlekey" value="messagepost" />
|
||||
<div class="replyfloor_replyto" id="replyfloor_replyto"></div>
|
||||
<div id="replyfloor_extratedt"></div>
|
||||
<div class="tedt">
|
||||
<div class="bar">
|
||||
<div class="fpd">
|
||||
<a href="javascript:;" title="{lang e_bold}" class="fbld" onclick="seditor_insertunit('replyfloor_', '[b]', '[/b]');doane(event);">B</a>
|
||||
<a href="javascript:;" title="{lang e_forecolor}" class="fclr" id="replyfloor_forecolor" onclick="showColorBox(this.id, 2, 'replyfloor_');doane(event);">Color</a>
|
||||
<a href="javascript:;" class="fsml" id="replyfloor_sml" onclick="showMenu({'ctrlid':this.id,'evt':'click','layer':2});return false;">Smilies</a>
|
||||
<!--{if $setconfig['upload_image'] > 0}-->
|
||||
<a href="javascript:;" class="fmg" id="replyfloor_img">uploadImage</a>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="area">
|
||||
<textarea name="message" placeholder="{$setconfig['editor_placeholder']}" rows="3" cols="80" class="pt replyfloor_editor_textarea" id="replyfloor_message" onKeyUp="strLenCalc(this, 'replyfloor_checklen', $setconfig['message_maxsize'])" onKeyDown="seditor_ctlent(event, '$(\'replyfloor_submit\').click();')"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="replyfloor_upimage" id="replyfloor_upimage"></div>
|
||||
<div class="ptm pnpost">
|
||||
<!--{eval $seccodecheck = in_array($_G['groupid'], $setconfig['open_seccheck']) ? 1 : 0;}-->
|
||||
<!--{eval $ran = random(5, 1);}-->
|
||||
<!--{if $seccodecheck}-->
|
||||
<div class="replyfloor_editor_left">
|
||||
<div id="seccode_replyfloor">
|
||||
<input name="seccodehash" type="hidden" value="replyfloor" />
|
||||
<input name="seccodemodid" type="hidden" value="{$_G[basescript]}::{CURMODULE}" />
|
||||
<input type="text" class="replyfloor_seccodeverify" id="replyfloor_seccodeverify" name="seccodeverify" placeholder="{lang seccode}">
|
||||
<img src="misc.php?mod=seccode&update={$ran}&idhash=replyfloor" class="replyfloor_seccodeimg" id="replyfloor_seccodeimg" onclick="replyfloor_seccodeimg(this)"/>
|
||||
</div>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<div class="replyfloor_editor_right">
|
||||
<button id="replyfloor_submit" class="replyfloor_editor_btn" type="submit"><strong>{lang replyfloor:message_btn}</strong></button>
|
||||
<!--{if $setconfig['notice_author'] == 2}-->
|
||||
<span class="replyfloor_editor_notice"><label for="replyfloor_notice_author"><input type="checkbox" name="notice_author" id="replyfloor_notice_author" value="1" class="pc" checked="checked">{lang replyfloor:message_pm}</label></span>
|
||||
<!--{/if}-->
|
||||
<span class="replyfloor_editor_btntip">{lang replyfloor:message_tip1} <strong id="replyfloor_checklen">$setconfig['message_maxsize']</strong> {lang replyfloor:message_tip2}</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/javascript">smilies_show('replyfloor_smiliesdiv', $_G['setting']['smcols'], 'replyfloor_');</script>
|
||||
<!--{/if}-->
|
||||
<script type="text/javascript">
|
||||
<!--{if ($_G['forum']['ismoderator'] && $_G['group']['allowdelpost']) || ($setconfig['allow_delete'] && $_G['uid'] && $_G['uid'] == $_G['thread']['authorid']) || ($setconfig['self_delete'] && $_G['uid'])}-->
|
||||
function replyfloor_delete(postid, msgid) {
|
||||
showWindow('messagemod', 'plugin.php?id=replyfloor:index&ac=delete&tid=$_G[tid]&pid='+postid+'&msgid='+msgid, 'get');
|
||||
return false;
|
||||
}
|
||||
function succeedhandle_messagemod(url, msg, values) {
|
||||
ajaxget('plugin.php?id=replyfloor:index&tid='+values['tid']+'&pid='+values['pid'], 'replyfloor_content_'+values['pid'], 'replyfloor_content_'+values['pid'], '', '', function() {
|
||||
if(document.getElementById('replyfloor_content_' + values['pid']).getElementsByClassName("replyfloor_content_li").length == 0){
|
||||
if(document.getElementById('replyfloor_link_unfold_' + values['pid'])){
|
||||
document.getElementById('replyfloor_link_unfold_' + values['pid']).style.display = 'inline-block';
|
||||
}
|
||||
if(document.getElementById('replyfloor_link_fold_' + values['pid'])){
|
||||
document.getElementById('replyfloor_link_fold_' + values['pid']).style.display = 'none';
|
||||
}
|
||||
document.getElementById('replyfloor_bd_' + values['pid']).style.display = 'none';
|
||||
if(document.getElementById('replyfloor_editor')){
|
||||
document.getElementById('replyfloor_editor').parentNode.removeChild(document.getElementById('replyfloor_editor'));
|
||||
}
|
||||
}
|
||||
if(document.getElementById('replyfloor_count_' + values['pid'])){
|
||||
var count = document.getElementById('replyfloor_count_' + values['pid']).innerHTML;
|
||||
count = parseInt(count) - 1;
|
||||
if(count < 1){
|
||||
document.getElementById('replyfloor_count_' + values['pid']).parentNode.style.display='none';
|
||||
}
|
||||
document.getElementById('replyfloor_count_' + values['pid']).innerHTML = count;
|
||||
}
|
||||
hideWindow('messagemod');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
<!--{/if}-->
|
||||
<!--{if $setconfig['open_report']}-->
|
||||
function replyfloor_report(postid, msgid) {
|
||||
showWindow('reportmod', 'plugin.php?id=replyfloor:index&ac=report&tid=$_G[tid]&pid='+postid+'&msgid='+msgid, 'get');
|
||||
return false;
|
||||
}
|
||||
<!--{/if}-->
|
||||
function replyfloor_fold(postid, type) {
|
||||
if(type == 1){
|
||||
<!--{if $_G['uid']}-->
|
||||
<!--{if $allowpostreply}-->
|
||||
document.getElementById('replyfloor_link_unfold_' + postid).style.display = 'none';
|
||||
document.getElementById('replyfloor_link_fold_' + postid).style.display = 'inline-block';
|
||||
document.getElementById('replyfloor_bd_' + postid).style.display = 'block';
|
||||
replyfloor_editor(postid, 0, '');
|
||||
<!--{else}-->
|
||||
showDialog('{lang replyfloor:no_permission_to_post}', 'alert');
|
||||
<!--{/if}-->
|
||||
<!--{else}-->
|
||||
showWindow('login', 'member.php?mod=logging&action=login&guestmessage=yes');
|
||||
<!--{/if}-->
|
||||
}else{
|
||||
document.getElementById('replyfloor_link_unfold_' + postid).style.display = 'inline-block';
|
||||
document.getElementById('replyfloor_link_fold_' + postid).style.display = 'none';
|
||||
document.getElementById('replyfloor_bd_' + postid).style.display = 'none';
|
||||
if(document.getElementById('replyfloor_editor')){
|
||||
document.getElementById('replyfloor_editor').parentNode.removeChild(document.getElementById('replyfloor_editor'));
|
||||
}
|
||||
}
|
||||
}
|
||||
function replyfloor_reply(url) {
|
||||
var postid = replyfloor_postid(url);
|
||||
if(postid){
|
||||
<!--{if $setconfig['style_pc'] == 3}-->
|
||||
showWindow('messagepost', 'plugin.php?id=replyfloor:index&ac=post&tid=$_G[tid]&pid='+postid);
|
||||
<!--{else}-->
|
||||
if(document.getElementById('replyfloor_editor_' + postid).style.display == 'block'){
|
||||
replyfloor_fold(postid, 0);
|
||||
}else{
|
||||
replyfloor_fold(postid, 1);
|
||||
}
|
||||
doane();
|
||||
<!--{/if}-->
|
||||
}else{
|
||||
showWindow('reply', url);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function replyfloor_editor(postid, msgid, reply) {
|
||||
<!--{if $_G['uid']}-->
|
||||
<!--{if $allowpostreply}-->
|
||||
<!--{if $setconfig['style_pc'] == 3}-->
|
||||
showWindow('messagepost', 'plugin.php?id=replyfloor:index&ac=post&tid=$_G[tid]&pid='+postid+'&msgid='+msgid);
|
||||
<!--{else}-->
|
||||
if(document.getElementById('replyfloor_editor_'+postid).innerHTML == '' || reply != '' || document.getElementById('replyfloor_replyto').innerHTML != ''){
|
||||
if(document.getElementById('replyfloor_editor')){
|
||||
document.getElementById('replyfloor_editor').parentNode.removeChild(document.getElementById('replyfloor_editor'));
|
||||
}
|
||||
var replyfloor_editor = document.createElement("div");
|
||||
replyfloor_editor.id = "replyfloor_editor";
|
||||
replyfloor_editor.innerHTML = document.getElementById('replyfloor_editorbox').innerHTML;
|
||||
document.getElementById('replyfloor_editor_'+postid).appendChild(replyfloor_editor);
|
||||
document.getElementById('replyfloor_pid').value = postid;
|
||||
document.getElementById('replyfloor_msgid').value = msgid;
|
||||
document.getElementById('replyfloor_replyto').innerHTML = reply;
|
||||
document.getElementById('replyfloor_message').focus();
|
||||
if(document.getElementById('replyfloor_seccodeimg')){
|
||||
replyfloor_seccodeimg(document.getElementById('replyfloor_seccodeimg'));
|
||||
}
|
||||
//upload image
|
||||
<!--{if $setconfig['upload_image'] > 0}-->
|
||||
replyfloor_uploadimage({
|
||||
auto: true,
|
||||
upload_url: "{$_G[siteurl]}plugin.php?id=replyfloor:attachment&operation=upload",
|
||||
post_params : {"uid" : "$_G[uid]", "hash":"$swfconfig[hash]"},
|
||||
paste: document.getElementById('replyfloor_message'),
|
||||
pick: '#replyfloor_img',
|
||||
accept: {
|
||||
title: 'Images',
|
||||
extensions: 'gif,jpg,jpeg,bmp,png,webp',
|
||||
mimeTypes: 'image/*'
|
||||
},
|
||||
fileVal: 'Filedata',
|
||||
fileNumLimit: $setconfig['upload_image'],
|
||||
});
|
||||
<!--{/if}-->
|
||||
if(typeof replyfloor_allowreply == 'function') {
|
||||
replyfloor_allowreply();
|
||||
}
|
||||
}else{
|
||||
if(document.getElementById('replyfloor_editor')){
|
||||
document.getElementById('replyfloor_editor').parentNode.removeChild(document.getElementById('replyfloor_editor'));
|
||||
}
|
||||
}
|
||||
var eles = document.getElementsByClassName("replyfloor_box");
|
||||
for (var i = 0, L = eles.length; i < L; i++) {
|
||||
var floorpid = eles[i].id.replace(/replyfloor_box_/, "");
|
||||
if (floorpid != postid) {
|
||||
if(document.getElementById('replyfloor_content_' + floorpid).getElementsByClassName("replyfloor_content_li").length == 0){
|
||||
if(document.getElementById('replyfloor_link_unfold_' + floorpid)){
|
||||
document.getElementById('replyfloor_link_unfold_' + floorpid).style.display = 'inline-block';
|
||||
}
|
||||
if(document.getElementById('replyfloor_link_fold_' + floorpid)){
|
||||
document.getElementById('replyfloor_link_fold_' + floorpid).style.display = 'none';
|
||||
}
|
||||
document.getElementById('replyfloor_bd_' + floorpid).style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
<!--{/if}-->
|
||||
<!--{else}-->
|
||||
showDialog('{lang replyfloor:no_permission_to_post}', 'alert');
|
||||
<!--{/if}-->
|
||||
<!--{else}-->
|
||||
showWindow('login', 'member.php?mod=logging&action=login&guestmessage=yes');
|
||||
<!--{/if}-->
|
||||
}
|
||||
function replyfloor_onsubmit() {
|
||||
<!--{if $_G['uid']}-->
|
||||
<!--{if $allowpostreply}-->
|
||||
if(document.getElementById('replyfloor_message').value == '' && document.getElementById('replyfloor_upimage').innerHTML == ''){
|
||||
showError('{lang replyfloor:message_message_empty}');
|
||||
return false;
|
||||
}
|
||||
ajaxpost('replyfloor_messageform', 'return_messagepost', 'return_messagepost', 'onerror', $('replyfloor_submit'));
|
||||
<!--{else}-->
|
||||
showDialog('{lang replyfloor:no_permission_to_post}', 'alert');
|
||||
<!--{/if}-->
|
||||
<!--{else}-->
|
||||
showWindow('login', 'member.php?mod=logging&action=login');
|
||||
<!--{/if}-->
|
||||
return false;
|
||||
}
|
||||
function succeedhandle_messagepost(url, msg, values) {
|
||||
<!--{if $setconfig['style_pc'] == 3}-->
|
||||
hideWindow('messagepost');
|
||||
<!--{else}-->
|
||||
document.getElementById('replyfloor_content_btn_' + values['pid']).parentNode.style.display='';
|
||||
if(document.getElementById('replyfloor_editor')){
|
||||
document.getElementById('replyfloor_message').value = '';
|
||||
document.getElementById('replyfloor_upimage').innerHTML = '';
|
||||
strLenCalc(document.getElementById('replyfloor_message'), 'replyfloor_checklen', $setconfig['message_maxsize']);
|
||||
document.getElementById('replyfloor_message').focus();
|
||||
if(document.getElementById('replyfloor_seccodeimg')){
|
||||
replyfloor_seccodeimg(document.getElementById('replyfloor_seccodeimg'));
|
||||
}
|
||||
if(typeof replyfloor_allowreply_submit == 'function') {
|
||||
replyfloor_allowreply_submit();
|
||||
}
|
||||
}
|
||||
<!--{/if}-->
|
||||
var x = new Ajax();
|
||||
x.get('plugin.php?id=replyfloor:index&tid='+values['tid']+'&pid='+values['pid']+'&msgid='+values['msgid'] + '&inajax=1', function(s) {
|
||||
document.getElementById('replyfloor_bd_' + values['pid']).style.display = 'block';
|
||||
var div = document.createElement('div');
|
||||
document.getElementById('replyfloor_newbox_'+values['pid']).appendChild(div);
|
||||
div.outerHTML = s;
|
||||
if(document.getElementById('replyfloor_count_' + values['pid'])){
|
||||
var count = document.getElementById('replyfloor_count_' + values['pid']).innerHTML;
|
||||
document.getElementById('replyfloor_count_' + values['pid']).parentNode.style.display='';
|
||||
count = parseInt(count) + 1;
|
||||
document.getElementById('replyfloor_count_' + values['pid']).innerHTML = count;
|
||||
}
|
||||
});
|
||||
showCreditPrompt();
|
||||
return false;
|
||||
}
|
||||
<!--{if $setconfig['replace_pc'] == 2}-->
|
||||
replyfloor_replace();
|
||||
<!--{/if}-->
|
||||
</script>
|
||||
<!--{/block}-->
|
160
source/plugin/replyfloor/template/message.htm
Normal file
@@ -0,0 +1,160 @@
|
||||
<!--{template common/header}-->
|
||||
|
||||
<!--{if $msginfo}-->
|
||||
<div class="replyfloor_content_li">
|
||||
<!--{eval $avatarimg = avatar($msginfo['uid'], 'small');}-->
|
||||
<div class="replyfloor_content_avatar"><a href="home.php?mod=space&uid=$msginfo[uid]" c="1">$avatarimg</a></div>
|
||||
<div class="replyfloor_content_cnt">
|
||||
<div class="replyfloor_content_head">
|
||||
<div class="replyfloor_content_head_z">
|
||||
<span class="replyfloor_content_user"><a href="home.php?mod=space&uid=$msginfo[uid]" c="1"{if $msginfo['groupcolor']} style="color: $msginfo[groupcolor]"{/if}>$msginfo[username]</a><!--{if $msginfo['ruid']}--><span class="replyfloor_content_toreply">{lang replyfloor:post_reply}</span><a href="home.php?mod=space&uid=$msginfo[ruid]" c="1"{if $msginfo['rgroupcolor']} style="color: $msginfo[rgroupcolor]"{/if}>$msginfo[rusername]</a><!--{/if}--></span>
|
||||
<!--{if $msginfo[status] == -1}--><span class="replyfloor_content_moderating">{lang replyfloor:moderating}</span><!--{/if}-->
|
||||
<span class="replyfloor_content_time">$msginfo['createtime']</span>
|
||||
<!--{if $msginfo[location]}--><span class="replyfloor_content_location">{lang replyfloor:location}{$msginfo[location]}</span><!--{/if}-->
|
||||
</div>
|
||||
<div class="replyfloor_content_head_y">
|
||||
<span class="replyfloor_content_rpbtn" onclick="replyfloor_editor('$post[pid]', $msginfo[id], '{lang replyfloor:post_reply} $msginfo[username] :');">{lang replyfloor:post_reply}</span>
|
||||
<!--{if $setconfig['open_report'] && $_G['uid'] != $msginfo['uid']}-->
|
||||
<span class="replyfloor_content_reportbtn" onclick="replyfloor_report('$post[pid]', $msginfo[id]);">{lang replyfloor:post_report}</span>
|
||||
<!--{/if}-->
|
||||
<!--{if ($_G['forum']['ismoderator'] && $_G['group']['allowdelpost']) || ($setconfig['allow_delete'] && $_G['uid'] && $_G['uid'] == $_G['thread']['authorid']) || ($setconfig['self_delete'] && $_G['uid'] && $_G['uid'] == $msginfo['uid'])}-->
|
||||
<span class="replyfloor_content_delbtn" onclick="replyfloor_delete('$post[pid]', $msginfo[id]);">{lang replyfloor:post_delete}</span>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="replyfloor_content_main">
|
||||
<!--{if getstatus($_G['forum_thread']['status'], 2) && $msginfo['uid'] != $_G['uid'] && $post['authorid'] != $_G['uid'] && $_G['thread']['authorid'] != $_G['uid'] && !$_G['forum']['ismoderator']}-->
|
||||
<div class="replyfloor_content_locked">{lang replyfloor:message_ishidden_hiddenreplies}</div>
|
||||
<!--{else}-->
|
||||
<div class="replyfloor_content_text">$msginfo['message']</div>
|
||||
<!--{if $msginfo['attachment']}-->
|
||||
<!--{eval $attachlist = explode("\t", $msginfo['attachment']);}-->
|
||||
<!--{eval $attachcount = count($attachlist);}-->
|
||||
<div class="replyfloor_content_image replyfloor_content_image{$attachcount}">
|
||||
<!--{loop $attachlist $attach}-->
|
||||
<div class="replyfloor_content_image_li"><img onclick="zoom(this, this.src)" class="zoom" src="$attach" border="0" alt="" style="margin:0" /></div>
|
||||
<!--{/loop}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" reload="1">
|
||||
if(typeof showusercard != 'undefined' && showusercard == 1) {
|
||||
cardInit();
|
||||
}
|
||||
</script>
|
||||
<!--{else}-->
|
||||
<!--{if $list}-->
|
||||
<!--{eval $showkey = 1;}-->
|
||||
<div class="replyfloor_content_ul">
|
||||
<!--{loop $list $value}-->
|
||||
<div class="replyfloor_content_li" id="replyfloor_content_li_$value[id]">
|
||||
<!--{eval $avatarimg = avatar($value['uid'], 'small');}-->
|
||||
<div class="replyfloor_content_avatar"><a href="home.php?mod=space&uid=$value[uid]" c="1">$avatarimg</a></div>
|
||||
<div class="replyfloor_content_cnt">
|
||||
<div class="replyfloor_content_head">
|
||||
<div class="replyfloor_content_head_z">
|
||||
<span class="replyfloor_content_user"><a href="home.php?mod=space&uid=$value[uid]" c="1"{if $value['groupcolor']} style="color: $value[groupcolor]"{/if}>$value[username]</a><!--{if $value['ruid']}--><span class="replyfloor_content_toreply">{lang replyfloor:post_reply}</span><a href="home.php?mod=space&uid=$value[ruid]" c="1"{if $value['rgroupcolor']} style="color: $value[rgroupcolor]"{/if}>$value[rusername]</a><!--{/if}--></span>
|
||||
<!--{if $value[status] == -1}--><span class="replyfloor_content_moderating">{lang replyfloor:moderating}</span><!--{/if}-->
|
||||
<span class="replyfloor_content_time">$value['createtime']</span>
|
||||
<!--{if $value[location]}--><span class="replyfloor_content_location">{lang replyfloor:location}{$value[location]}</span><!--{/if}-->
|
||||
<!--{if $value['mobile'] && $setconfig['mobile_comefrom']}-->
|
||||
<span class="replyfloor_content_from">{$setconfig['mobile_comefrom']}</span>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<div class="replyfloor_content_head_y">
|
||||
<span class="replyfloor_content_rpbtn" onclick="replyfloor_editor('$post[pid]', $value[id], '{lang replyfloor:post_reply} $value[username] :');">{lang replyfloor:post_reply}</span>
|
||||
<!--{if $setconfig['open_report'] && $_G['uid'] != $value['uid']}-->
|
||||
<span class="replyfloor_content_reportbtn" onclick="replyfloor_report('$post[pid]', $value[id]);">{lang replyfloor:post_report}</span>
|
||||
<!--{/if}-->
|
||||
<!--{if ($_G['forum']['ismoderator'] && $_G['group']['allowdelpost']) || ($setconfig['allow_delete'] && $_G['uid'] && $_G['uid'] == $_G['thread']['authorid']) || ($setconfig['self_delete'] && $_G['uid'] && $_G['uid'] == $value['uid'])}-->
|
||||
<span class="replyfloor_content_delbtn" onclick="replyfloor_delete('$post[pid]', $value[id]);">{lang replyfloor:post_delete}</span>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="replyfloor_content_main">
|
||||
<!--{if getstatus($_G['forum_thread']['status'], 2) && $value['uid'] != $_G['uid'] && $post['authorid'] != $_G['uid'] && !$_G['forum']['ismoderator']}-->
|
||||
<div class="replyfloor_content_locked">{lang replyfloor:message_ishidden_hiddenreplies}</div>
|
||||
<!--{else}-->
|
||||
<div class="replyfloor_content_text">$value[message]</div>
|
||||
<!--{if $value['attachment']}-->
|
||||
<!--{eval $attachlist = explode("\t", $value['attachment']);}-->
|
||||
<!--{eval $attachcount = count($attachlist);}-->
|
||||
<div class="replyfloor_content_image replyfloor_content_image{$attachcount}">
|
||||
<!--{loop $attachlist $attach}-->
|
||||
<div class="replyfloor_content_image_li"><img onclick="zoom(this, this.src)" class="zoom" src="$attach" border="0" alt="" style="margin:0" /></div>
|
||||
<!--{/loop}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
</div>
|
||||
<!--{if $setconfig['pagemode_pc']}--><div></div><!--{/if}-->
|
||||
</div>
|
||||
<!--{if $_GET['default'] && $page == 1 && $shownum == $showkey && $shownum < count($list)}-->
|
||||
</div>
|
||||
<div class="replyfloor_content_ul" style="display:none" id="replyfloor_content_ul_$post[pid]">
|
||||
<!--{/if}-->
|
||||
<!--{eval $showkey++;}-->
|
||||
<!--{/loop}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<div id="replyfloor_newbox_$post[pid]" class="replyfloor_content_ul"></div>
|
||||
<!--{if $list}-->
|
||||
<div class="replyfloor_content_pager">
|
||||
<!--{if (($_GET['default'] && $shownum < $perpage) || $setconfig['pagemode_pc']) && $shownum < $count}-->
|
||||
<div class="replyfloor_content_more" id="replyfloor_content_more_$post[pid]">
|
||||
<!--{if $setconfig['pagemode_pc']}-->
|
||||
<!--{eval $leftshownum = $count - $perpage - $start;}-->
|
||||
<div class="replyfloor_content_hrmore"></div>
|
||||
<!--{if $leftshownum > 0}-->
|
||||
<div class="replyfloor_content_showmore"><a href="javascript:;" rel="plugin.php?id=replyfloor:index&tid=$post[tid]&pid=$post[pid]&page={echo $page+1;}" onclick="replyfloor_collapse(this, '$post[pid]', 1);">{lang replyfloor:collapse_open}</a></div>
|
||||
<!--{/if}-->
|
||||
<!--{if $page > 1}-->
|
||||
<div class="replyfloor_content_hidemore"><a href="javascript:;" rel="plugin.php?id=replyfloor:index&tid=$post[tid]&pid=$post[pid]&page=1" onclick="replyfloor_collapse(this, '$post[pid]', 0);">{lang replyfloor:collapse_close}</a></div>
|
||||
<!--{/if}-->
|
||||
<!--{else}-->
|
||||
<!--{eval $leftshownum = $count - $shownum;}-->
|
||||
{lang replyfloor:leftshowtip} <a href="javascript:;" onclick="replyfloor_leftshow('$post[pid]');">{lang replyfloor:leftshowview}</a>
|
||||
<!--{/if}-->
|
||||
<!--{if $setconfig['pagemode_pc']}--><div></div><!--{/if}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{if !$setconfig['pagemode_pc']}-->
|
||||
<div class="replyfloor_content_pg" id="replyfloor_content_pg_$post[pid]"{if $_GET['default'] && $page == 1 && $shownum < count($list)} style="display:none;"{/if}>
|
||||
<!--{if $multipage}-->
|
||||
$multipage
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{if $setconfig['style_pc'] != 3}-->
|
||||
<div class="replyfloor_content_btn" id="replyfloor_content_btn_$post[pid]">
|
||||
<a href="javascript:;" onclick="replyfloor_editor('$post[pid]', 0, '');">{lang replyfloor:link_unfold}</a>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{else}-->
|
||||
<div class="replyfloor_content_pager" style="display:none;">
|
||||
<!--{if $setconfig['style_pc'] != 3}-->
|
||||
<div class="replyfloor_content_btn" id="replyfloor_content_btn_$post[pid]">
|
||||
<a href="javascript:;" onclick="replyfloor_editor('$post[pid]', 0, '');">{lang replyfloor:link_unfold}</a>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<script type="text/javascript" reload="1">
|
||||
if(typeof showusercard != 'undefined' && showusercard == 1) {
|
||||
cardInit();
|
||||
}
|
||||
<!--{if !$setconfig['pagemode_pc']}-->
|
||||
var replyfloor_box_sxy = fetchOffset(document.getElementById("replyfloor_box_$post[pid]"));
|
||||
if(Math.max(document.documentElement.scrollTop, document.body.scrollTop) > replyfloor_box_sxy['top']){
|
||||
window.scrollTo('0',replyfloor_box_sxy['top']);
|
||||
}
|
||||
<!--{/if}-->
|
||||
</script>
|
||||
<!--{/if}-->
|
||||
|
||||
<!--{template common/footer}-->
|
4
source/plugin/replyfloor/template/mobile/delete.htm
Normal file
@@ -0,0 +1,4 @@
|
||||
<!--{template common/header}-->
|
||||
|
||||
|
||||
<!--{template common/footer}-->
|
3
source/plugin/replyfloor/template/mobile/js.htm
Normal file
@@ -0,0 +1,3 @@
|
||||
<!--{block return}-->
|
||||
|
||||
<!--{/block}-->
|
4
source/plugin/replyfloor/template/mobile/message.htm
Normal file
@@ -0,0 +1,4 @@
|
||||
<!--{template common/header}-->
|
||||
|
||||
|
||||
<!--{template common/footer}-->
|
4
source/plugin/replyfloor/template/mobile/post.htm
Normal file
@@ -0,0 +1,4 @@
|
||||
<!--{template common/header}-->
|
||||
|
||||
|
||||
<!--{template common/footer}-->
|
3
source/plugin/replyfloor/template/mobile/report.htm
Normal file
@@ -0,0 +1,3 @@
|
||||
<!--{template common/header}-->
|
||||
|
||||
<!--{template common/footer}-->
|
3
source/plugin/replyfloor/template/mobile/style.htm
Normal file
@@ -0,0 +1,3 @@
|
||||
<!--{block return}-->
|
||||
|
||||
<!--{/block}-->
|
3
source/plugin/replyfloor/template/mobile/viewthread.htm
Normal file
@@ -0,0 +1,3 @@
|
||||
<!--{block return}-->
|
||||
|
||||
<!--{/block}-->
|
83
source/plugin/replyfloor/template/post.htm
Normal file
@@ -0,0 +1,83 @@
|
||||
<!--{template common/header}-->
|
||||
<!--{if empty($_GET['infloat'])}-->
|
||||
<div id="ct" class="wp cl">
|
||||
<div class="mn">
|
||||
<div class="bm bw0">
|
||||
<!--{/if}-->
|
||||
<form method="post" autocomplete="off" id="replyfloor_messageform" name="replyfloor_messageform" action="plugin.php?id=replyfloor:index&ac=post&tid=$post[tid]&pid=$post[pid]&infloat=yes" onsubmit="{if !empty($_GET['infloat'])}ajaxpost('replyfloor_messageform', 'return_$_GET['handlekey']', 'return_$_GET['handlekey']', 'onerror', $('replyfloor_submit'));return false;{/if}">
|
||||
<div class="f_c">
|
||||
<h3 class="flb">
|
||||
<em id="return_$_GET['handlekey']">{lang replyfloor:link_unfold}</em>
|
||||
<span>
|
||||
<!--{if !empty($_GET['infloat'])}--><a href="javascript:;" class="flbc" onclick="hideWindow('$_GET['handlekey']')" title="{lang close}">{lang close}</a><!--{/if}-->
|
||||
</span>
|
||||
</h3>
|
||||
<input type="hidden" name="formhash" id="formhash" value="{FORMHASH}" />
|
||||
<input type="hidden" name="handlekey" value="$_GET['handlekey']" />
|
||||
<input type="hidden" name="msgid" value="$_GET['msgid']" />
|
||||
<input type="hidden" name="savesubmit" value="true" />
|
||||
<div class="c">
|
||||
<!--{if $rusername}--><div class="replyfloor_replyto" id="replyfloor_replyto">{lang replyfloor:post_reply} $rusername :</div><!--{/if}-->
|
||||
<!--{hook/replyfloor_infloat_top}-->
|
||||
<div class="tedt">
|
||||
<div class="bar">
|
||||
<!--{eval $seditor = array('replyfloor_', $setconfig['upload_image'] > 0 ? array('bold', 'color', 'smilies', 'img') : array('bold', 'color', 'smilies'), 0, '');}-->
|
||||
<!--{subtemplate common/seditor}-->
|
||||
</div>
|
||||
<div class="area">
|
||||
<textarea name="message" placeholder="{$setconfig['editor_placeholder']}" rows="3" cols="80" class="pt" id="replyfloor_message" onKeyUp="strLenCalc(this, 'replyfloor_checklen', $setconfig['message_maxsize'])" onKeyDown="seditor_ctlent(event, '$(\'replyfloor_submit\').click();')"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="replyfloor_upimage" id="replyfloor_upimage"></div>
|
||||
</div>
|
||||
<!--{eval $seccodecheck = in_array($_G['groupid'], $setconfig['open_seccheck']) ? 1 : 0;}-->
|
||||
<!--{eval $ran = random(5, 1);}-->
|
||||
<!--{if $seccodecheck}-->
|
||||
<div class="c">
|
||||
<div id="seccode_replyfloor">
|
||||
<input name="seccodehash" type="hidden" value="replyfloor" />
|
||||
<input name="seccodemodid" type="hidden" value="{$_G[basescript]}::{CURMODULE}" />
|
||||
<input type="text" class="replyfloor_editor_seccodeverify" id="replyfloor_seccodeverify" name="seccodeverify" placeholder="{lang seccode}">
|
||||
<img src="misc.php?mod=seccode&update={$ran}&idhash=replyfloor" style="margin: 0;" class="replyfloor_editor_seccodeimg" id="replyfloor_seccodeimg" onclick="replyfloor_seccodeimg(this)"/>
|
||||
</div>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<div class="o pns cl{if empty($_GET['infloat'])} mtm{/if}">
|
||||
<button type="submit" id="replyfloor_submit" class="replyfloor_editor_btn" value="true" name="replyfloorsubmit" tabindex="3"><strong>{lang replyfloor:message_btn}</strong></button>
|
||||
<!--{if $setconfig['notice_author'] == 2}-->
|
||||
<span class="replyfloor_editor_notice"><label for="notice_author"><input type="checkbox" name="notice_author" id="notice_author" value="1" class="pc" checked="checked">{lang replyfloor:message_pm}</label></span>
|
||||
<!--{/if}-->
|
||||
<span class="replyfloor_editor_btntip">{lang replyfloor:message_tip1} <strong id="replyfloor_checklen">$setconfig['message_maxsize']</strong> {lang replyfloor:message_tip2}</span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!--{if $setconfig['upload_image'] > 0}-->
|
||||
<script type="text/javascript" reload="1">
|
||||
document.getElementById('replyfloor_img').onclick = null;
|
||||
replyfloor_uploadimage({
|
||||
auto: true,
|
||||
upload_url: "{$_G[siteurl]}plugin.php?id=replyfloor:attachment&operation=upload",
|
||||
post_params : {"uid" : "$_G[uid]", "hash":"$swfconfig[hash]"},
|
||||
paste: document.getElementById('replyfloor_message'),
|
||||
pick: {
|
||||
id: '#replyfloor_img',
|
||||
multiple: false
|
||||
},
|
||||
accept: {
|
||||
title: 'Images',
|
||||
extensions: 'gif,jpg,jpeg,bmp,png',
|
||||
mimeTypes: 'image/*'
|
||||
},
|
||||
fileVal: 'Filedata',
|
||||
fileNumLimit: $setconfig['upload_image'],
|
||||
});
|
||||
</script>
|
||||
<!--{/if}-->
|
||||
|
||||
<!--{if empty($_GET['infloat'])}-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{template common/footer}-->
|
59
source/plugin/replyfloor/template/report.htm
Normal file
@@ -0,0 +1,59 @@
|
||||
<!--{template common/header}-->
|
||||
<!--{if empty($_GET['infloat'])}-->
|
||||
<div id="pt" class="bm cl">
|
||||
<div class="z"><a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a> <em>›</em> {lang replyfloor:report_title}</div>
|
||||
</div>
|
||||
<div class="container mbw">
|
||||
<div class="bm">
|
||||
<div class="bm_h">
|
||||
<h2 class="z">{lang replyfloor:report_title}</h2>
|
||||
</div>
|
||||
<div class="bm_c">
|
||||
<!--{/if}-->
|
||||
<form method="post" autocomplete="off" id="report_form" name="report_form" action="plugin.php?id=replyfloor:index&ac=report&infloat=yes" enctype="multipart/form-data" onsubmit="{if !empty($_GET['infloat'])}ajaxpost('report_form', 'return_$_GET['handlekey']', 'return_$_GET['handlekey']', 'onerror');return false;{/if}">
|
||||
<div class="f_c">
|
||||
<!--{if !empty($_GET['infloat'])}-->
|
||||
<h3 class="flb">
|
||||
<em id="return_$_GET['handlekey']">{lang replyfloor:report_title}</em>
|
||||
<span>
|
||||
<!--{if !empty($_GET['infloat'])}--><a href="javascript:;" class="flbc" onclick="hideWindow('$_GET['handlekey']')" title="{lang close}">{lang close}</a><!--{/if}-->
|
||||
</span>
|
||||
</h3>
|
||||
<!--{/if}-->
|
||||
<input type="hidden" name="formhash" id="formhash" value="{FORMHASH}" />
|
||||
<input type="hidden" name="handlekey" value="$_GET['handlekey']" />
|
||||
<input type="hidden" name="tid" value="$msginfo[tid]" />
|
||||
<input type="hidden" name="pid" value="$msginfo[pid]" />
|
||||
<input type="hidden" name="msgid" value="$msginfo[id]" />
|
||||
<input type="hidden" name="savesubmit" value="true" />
|
||||
<div class="c">
|
||||
<textarea name="message" rows="8" cols="80" class="pt"></textarea>
|
||||
</div>
|
||||
<div class="c">
|
||||
<button type="button" style="border: 1px solid #CDCDCD;" onclick="replyfloor_report_image()">{lang replyfloor:report_addimage}</button>
|
||||
</div>
|
||||
<div id="replyfloor_report_image">
|
||||
<div class="c">
|
||||
{lang replyfloor:report_image} <input type='file' name='filedata[]' accept=".jpg,.jpeg,.gif,.png,.bmp,image/jpeg,image/gif,image/png,image/bmp" size='80' style="border: 1px solid #CDCDCD;"/> <button type="button" style="border: 1px solid #CDCDCD;" onclick="this.parentNode.parentNode.removeChild(this.parentNode)">{lang replyfloor:report_delimage}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o pns cl{if empty($_GET['infloat'])} mtm{/if}">
|
||||
<button type="submit" class="pn pnc" value="true"><span>{lang submit}</span></button>
|
||||
</div>
|
||||
</form>
|
||||
<!--{if empty($_GET['infloat'])}-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<script type="text/javascript">
|
||||
function replyfloor_report_image(){
|
||||
var uploadObj = document.createElement('div');
|
||||
uploadObj.className = 'c';
|
||||
uploadObj.innerHTML += '{lang replyfloor:report_image} <input type="file" name="filedata[]" accept=".jpg,.jpeg,.gif,.png,.bmp,image/jpeg,image/gif,image/png,image/bmp" size="80" style="border: 1px solid #CDCDCD;"/> <button type="button" style="border: 1px solid #CDCDCD;" onclick="this.parentNode.parentNode.removeChild(this.parentNode)">{lang replyfloor:report_delimage}</button>';
|
||||
document.getElementById('replyfloor_report_image').appendChild(uploadObj);
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--{template common/footer}-->
|
8
source/plugin/replyfloor/template/style.htm
Normal file
@@ -0,0 +1,8 @@
|
||||
<!--{block return}-->
|
||||
<link rel="stylesheet" type="text/css" href="source/plugin/replyfloor/static/css/style{$setconfig['style_pc']}.css?{VERHASH}" />
|
||||
<!--{if $setconfig['css_pc']}-->
|
||||
<style>
|
||||
$setconfig['css_pc']
|
||||
</style>
|
||||
<!--{/if}-->
|
||||
<!--{/block}-->
|
18
source/plugin/replyfloor/template/touch/delete.htm
Normal file
@@ -0,0 +1,18 @@
|
||||
<!--{template common/header}-->
|
||||
<div style="width:300px;border-radius:5px;background:#fff;margin:0 auto;overflow:hidden;">
|
||||
<form id="topicadminform" method="post" autocomplete="off" action="plugin.php?id=replyfloor:index&ac=delete&modsubmit=yes&loc=$_GET[loc]&mobile=2" >
|
||||
<input type="hidden" name="formhash" value="{FORMHASH}" />
|
||||
<input type="hidden" name="tid" value="$msginfo[tid]" />
|
||||
<input type="hidden" name="pid" value="$msginfo[pid]" />
|
||||
<input type="hidden" name="msgid" value="$msginfo[id]" />
|
||||
<input type="hidden" name="handlekey" value="$_GET[handlekey]" />
|
||||
<div style="padding:30px 20px;height:75px;font-size:16px;text-align:center;">{lang replyfloor:admin_delpost_confirm}</div>
|
||||
<div style="border-top:1px solid #D7D7D7;overflow:hidden;position: relative;">
|
||||
<button type="button" style="float:left;width:50%;display:block;height:48px;line-height:48px;text-align:center;border:none 0;background:#fff;color:#333;" onclick="replyfloor_delsubmit(this);">{lang confirms}</button>
|
||||
<button type="button" style="float:left;width:50%;display:block;height:48px;line-height:48px;text-align:center;border:none 0;background:#fff;color:#333;" onclick="popup.close();" >{lang cancel}</button>
|
||||
<div style="position: absolute;left: 0;top: 0;width: 1px;height:48px;bottom: 0;right:0;background:#D7D7D7;overflow:hidden;margin:auto;"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!--{template common/footer}-->
|
438
source/plugin/replyfloor/template/touch/js.htm
Normal file
@@ -0,0 +1,438 @@
|
||||
<!--{block return}-->
|
||||
<!--{if $setconfig['upload_image'] > 0}-->
|
||||
<script type="text/javascript" src="source/plugin/replyfloor/static/js/cquery.js?{VERHASH}"></script>
|
||||
<link rel="stylesheet" type="text/css" href="source/plugin/replyfloor/static/cwebuploader/cwebuploader.css?{VERHASH}">
|
||||
<script type="text/javascript" src="source/plugin/replyfloor/static/cwebuploader/cwebuploader.js?{VERHASH}"></script>
|
||||
<!--{/if}-->
|
||||
<script type="text/javascript" src="source/plugin/replyfloor/static/js/mobile.js?{VERHASH}" charset="utf-8"></script>
|
||||
<!--{if $setconfig['style_mobile'] != 3 && $setconfig['style_mobile'] != 4 && $setconfig['style_mobile'] != 5}-->
|
||||
<script type='text/template' id="replyfloor_editorbox">
|
||||
<div class="replyfloor_editor">
|
||||
<form id="replyfloor_messageform" name="replyfloor_messageform" action='plugin.php?id=replyfloor:index&ac=post&tid=$_G[tid]' method="post" autocomplete="off">
|
||||
<input type="hidden" name="formhash" value="{FORMHASH}">
|
||||
<input type="hidden" name="savesubmit" value="true" />
|
||||
<input type="hidden" name="pid" value="0" id="replyfloor_pid" />
|
||||
<input type="hidden" name="msgid" value="0" id="replyfloor_msgid" />
|
||||
<input type="hidden" name="handlekey" value="messagepost" />
|
||||
<div class="replyfloor_replyto" id="replyfloor_replyto"></div>
|
||||
<div id="replyfloor_extratedt"></div>
|
||||
<div class="replyfloor_tedt">
|
||||
<div class="replyfloor_tedtarea">
|
||||
<textarea name="message" placeholder="{$setconfig['editor_placeholder']}" rows="3" cols="80" class="replyfloor_editor_textarea" id="replyfloor_message" onKeyUp="replyfloor_strLenCalc(this, 'replyfloor_checklen', $setconfig['message_maxsize'])" onChange="replyfloor_strLenCalc(this, 'replyfloor_checklen', $setconfig['message_maxsize'])"></textarea>
|
||||
</div>
|
||||
<div class="replyfloor_tedtbar">
|
||||
<div class="replyfloor_tedtfpd">
|
||||
<span title="{lang e_bold}" class="replyfloor_tedtbar_fbld" onclick="replyfloor_insertunit('replyfloor_', '[b]', '[/b]');">B</span>
|
||||
<span title="{lang e_forecolor}" class="replyfloor_tedtbar_fclr" id="replyfloor_forecolor" onclick="replyfloor_showcolorbox('replyfloor_');">Color</span>
|
||||
<span title="{lang e_smilies}" class="replyfloor_tedtbar_fsml" id="replyfloor_fsml" onclick="replyfloor_showsmilebox('replyfloor_');">Smilies</span>
|
||||
<!--{if $setconfig['upload_image'] > 0}-->
|
||||
<span class="replyfloor_tedtbar_fmg" id="replyfloor_img">uploadImage</span>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
</div>
|
||||
<div id="replyfloor_attribute"></div>
|
||||
</div>
|
||||
<div class="replyfloor_upimage" id="replyfloor_upimage"></div>
|
||||
<div class="replyfloor_pnpost">
|
||||
<!--{eval $seccodecheck = in_array($_G['groupid'], $setconfig['open_seccheck']) ? 1 : 0;}-->
|
||||
<!--{eval $ran = random(5, 1);}-->
|
||||
<!--{if $seccodecheck}-->
|
||||
<div class="replyfloor_editor_left">
|
||||
<div id="seccode_replyfloor">
|
||||
<input name="seccodehash" type="hidden" value="replyfloor" />
|
||||
<input name="seccodemodid" type="hidden" value="{$_G[basescript]}::{CURMODULE}" />
|
||||
<input type="text" class="replyfloor_seccodeverify" id="replyfloor_seccodeverify" name="seccodeverify" placeholder="{lang seccode}">
|
||||
<img src="misc.php?mod=seccode&update={$ran}&idhash=replyfloor" style="margin: 0;" class="replyfloor_seccodeimg" id="replyfloor_seccodeimg" onclick="replyfloor_seccodeimg(this)"/>
|
||||
</div>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<div class="replyfloor_editor_right">
|
||||
<button id="replyfloor_submit" class="replyfloor_editor_btn" type="button" onclick="replyfloor_onsubmit();"><strong>{lang replyfloor:message_btn}</strong></button>
|
||||
<!--{if $setconfig['notice_author'] == 2}-->
|
||||
<span class="replyfloor_editor_notice"><label for="replyfloor_notice_author"><input type="checkbox" name="notice_author" id="replyfloor_notice_author" value="1" class="pc" checked="checked">{lang replyfloor:message_pm}</label></span>
|
||||
<!--{/if}-->
|
||||
<span class="replyfloor_editor_btntip">{lang replyfloor:message_tip1} <strong id="replyfloor_checklen">$setconfig['message_maxsize']</strong> {lang replyfloor:message_tip2}</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</script>
|
||||
<!--{/if}-->
|
||||
<script type="text/javascript">
|
||||
<!--{if ($_G['forum']['ismoderator'] && $_G['group']['allowdelpost']) || ($setconfig['allow_delete'] && $_G['uid'] && $_G['uid'] == $_G['thread']['authorid']) || ($setconfig['self_delete'] && $_G['uid'])}-->
|
||||
function replyfloor_delete(postid, msgid) {
|
||||
$.get('plugin.php?id=replyfloor:index&ac=delete&tid=$_G[tid]&pid='+postid+'&msgid='+msgid + '&handlekey=messagemod&loc=1&inajax=1', function(s){
|
||||
popup.open(s.lastChild.firstChild.nodeValue);
|
||||
//evalscript(s.lastChild.firstChild.nodeValue);
|
||||
}, "xml");
|
||||
return false;
|
||||
}
|
||||
function replyfloor_delsubmit(obj) {
|
||||
var form = $(obj.form);
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:form.attr('action') + '&loc=1&inajax=1',
|
||||
data:form.serialize(),
|
||||
dataType:'xml'
|
||||
})
|
||||
.success(function(s) {
|
||||
evalscript(s.lastChild.firstChild.nodeValue);
|
||||
})
|
||||
.error(function() {
|
||||
popup.close();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
function succeedhandle_messagemod(url, msg, values) {
|
||||
popup.close();
|
||||
$.get('plugin.php?id=replyfloor:index&tid='+values['tid']+'&pid='+values['pid'] + '&inajax=1', function(s){
|
||||
$('#replyfloor_content_'+values['pid']).html(s.lastChild.firstChild.nodeValue);
|
||||
if(document.getElementById('replyfloor_content_' + values['pid']).getElementsByClassName("replyfloor_content_li").length == 0){
|
||||
if(document.getElementById('replyfloor_link_unfold_' + values['pid'])){
|
||||
document.getElementById('replyfloor_link_unfold_' + values['pid']).style.display = 'inline-block';
|
||||
}
|
||||
if(document.getElementById('replyfloor_link_fold_' + values['pid'])){
|
||||
document.getElementById('replyfloor_link_fold_' + values['pid']).style.display = 'none';
|
||||
}
|
||||
document.getElementById('replyfloor_bd_' + values['pid']).style.display = 'none';
|
||||
if(document.getElementById('replyfloor_editor')){
|
||||
document.getElementById('replyfloor_editor').parentNode.removeChild(document.getElementById('replyfloor_editor'));
|
||||
}
|
||||
}
|
||||
if(document.getElementById('replyfloor_count_' + values['pid'])){
|
||||
var count = document.getElementById('replyfloor_count_' + values['pid']).innerHTML;
|
||||
count = parseInt(count) - 1;
|
||||
if(count < 1){
|
||||
document.getElementById('replyfloor_count_' + values['pid']).parentNode.style.display='none';
|
||||
}
|
||||
document.getElementById('replyfloor_count_' + values['pid']).innerHTML = count;
|
||||
}
|
||||
}, "xml");
|
||||
return false;
|
||||
}
|
||||
<!--{/if}-->
|
||||
<!--{if $setconfig['open_report']}-->
|
||||
function replyfloor_report(postid, msgid) {
|
||||
$.get('plugin.php?id=replyfloor:index&ac=report&tid=$_G[tid]&pid='+postid+'&msgid='+msgid + '&handlekey=reportmod&loc=1&inajax=1', function(s){
|
||||
var content = s.lastChild.firstChild.nodeValue;
|
||||
if (content.indexOf('loginform') > 0) {
|
||||
popup.open('{lang nologin_tip}', 'confirm', 'member.php?mod=logging&action=login');
|
||||
}else if (content.indexOf('errorhandle_messagepost') === -1) {
|
||||
var replyfloor_popup = document.getElementById('replyfloor_popup');
|
||||
if (!replyfloor_popup) {
|
||||
replyfloor_popup = document.createElement('div');
|
||||
replyfloor_popup.id = 'replyfloor_popup';
|
||||
document.body.appendChild(replyfloor_popup);
|
||||
}
|
||||
replyfloor_popup.innerHTML = content;
|
||||
document.getElementById('replyfloor_report_message').focus();
|
||||
evalscript(content);
|
||||
$('#mask').hide();
|
||||
$('.replyfloor_popup_mask, .replyfloor_popup_close').off().on('click', function() {
|
||||
$('#replyfloor_popup').remove();
|
||||
});
|
||||
}else{
|
||||
popup.open(content);
|
||||
evalscript(content);
|
||||
}
|
||||
}, "xml");
|
||||
return false;
|
||||
}
|
||||
function succeedhandle_reportmod(url, msg, values) {
|
||||
$('#replyfloor_popup').remove();
|
||||
setTimeout(function (){popup.close();},3000);
|
||||
return false;
|
||||
}
|
||||
function replyfloor_report_image(){
|
||||
var uploadObj = document.createElement('div');
|
||||
uploadObj.style.marginTop = '10px';
|
||||
uploadObj.innerHTML += '{lang replyfloor:report_image} <input type="file" name="filedata[]" accept=".jpg,.jpeg,.gif,.png,.bmp,image/jpeg,image/gif,image/png,image/bmp" style="width:210px;border: 1px solid #CDCDCD;"/> <button type="button" style="border: 1px solid #CDCDCD;padding:3px 10px;" onclick="this.parentNode.parentNode.removeChild(this.parentNode)">{lang replyfloor:report_delimage}</button>';
|
||||
document.getElementById('replyfloor_report_image').appendChild(uploadObj);
|
||||
}
|
||||
<!--{/if}-->
|
||||
function replyfloor_fold(postid, type) {
|
||||
if(type == 1){
|
||||
<!--{if $_G['uid']}-->
|
||||
<!--{if $allowpostreply}-->
|
||||
document.getElementById('replyfloor_link_unfold_' + postid).style.display = 'none';
|
||||
document.getElementById('replyfloor_link_fold_' + postid).style.display = 'inline-block';
|
||||
document.getElementById('replyfloor_bd_' + postid).style.display = 'block';
|
||||
replyfloor_editor(postid, 0, '');
|
||||
<!--{else}-->
|
||||
popup.open('{lang replyfloor:no_permission_to_post}', 'alert');
|
||||
<!--{/if}-->
|
||||
<!--{else}-->
|
||||
popup.open('{lang nologin_tip}', 'confirm', 'member.php?mod=logging&action=login');
|
||||
<!--{/if}-->
|
||||
}else{
|
||||
document.getElementById('replyfloor_link_unfold_' + postid).style.display = 'inline-block';
|
||||
document.getElementById('replyfloor_link_fold_' + postid).style.display = 'none';
|
||||
document.getElementById('replyfloor_bd_' + postid).style.display = 'none';
|
||||
if(document.getElementById('replyfloor_editor')){
|
||||
document.getElementById('replyfloor_editor').parentNode.removeChild(document.getElementById('replyfloor_editor'));
|
||||
}
|
||||
}
|
||||
}
|
||||
function replyfloor_postid(url) {
|
||||
url = url.replace(/&/, "&");
|
||||
var urlarr = new Array();
|
||||
urlarr = url.split("&");
|
||||
var value = new Array();
|
||||
var postid = 0;
|
||||
for (var i = 0, L = urlarr.length; i < L; i++) {
|
||||
value = urlarr[i].split("=");
|
||||
if(value[0] == "repquote"){
|
||||
postid = value[1];
|
||||
return postid;
|
||||
}
|
||||
}
|
||||
return postid;
|
||||
}
|
||||
function replyfloor_reply(url) {
|
||||
var postid = replyfloor_postid(url);
|
||||
if(postid){
|
||||
<!--{if $setconfig['style_mobile'] == 3 || $setconfig['style_mobile'] == 4 || $setconfig['style_mobile'] == 5}-->
|
||||
replyfloor_editor(postid, 0, '');
|
||||
<!--{else}-->
|
||||
if(document.getElementById('replyfloor_editor_'+postid).innerHTML == ''){
|
||||
replyfloor_fold(postid, 1);
|
||||
}else{
|
||||
replyfloor_fold(postid, 0);
|
||||
}
|
||||
<!--{/if}-->
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function replyfloor_leftshow(postid) {
|
||||
if(document.getElementById('replyfloor_content_ul_' + postid)){
|
||||
document.getElementById('replyfloor_content_ul_' + postid).style.display = 'block';
|
||||
}
|
||||
if(document.getElementById('replyfloor_content_more_' + postid)){
|
||||
document.getElementById('replyfloor_content_more_' + postid).style.display = 'none';
|
||||
}
|
||||
if(document.getElementById('replyfloor_content_pg_' + postid)){
|
||||
document.getElementById('replyfloor_content_pg_' + postid).style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
function replyfloor_editor(postid, msgid, reply) {
|
||||
<!--{if $_G['uid']}-->
|
||||
<!--{if $allowpostreply}-->
|
||||
<!--{if $setconfig['style_mobile'] == 3 || $setconfig['style_mobile'] == 4 || $setconfig['style_mobile'] == 5}-->
|
||||
<!--{if $setconfig['style_mobile'] == 5}-->
|
||||
$.get('plugin.php?id=replyfloor:index&ac=post&tid=$_G[tid]&pid='+postid+'&msgid='+msgid + '&style=1&handlekey=messagepost&loc=1&inajax=1', function(s){
|
||||
<!--{else}-->
|
||||
$.get('plugin.php?id=replyfloor:index&ac=post&tid=$_G[tid]&pid='+postid+'&msgid='+msgid + '&handlekey=messagepost&loc=1&inajax=1', function(s){
|
||||
<!--{/if}-->
|
||||
var content = s.lastChild.firstChild.nodeValue;
|
||||
if (content.indexOf('loginform') > 0) {
|
||||
popup.open('{lang nologin_tip}', 'confirm', 'member.php?mod=logging&action=login');
|
||||
}else if (content.indexOf('errorhandle_messagepost') === -1) {
|
||||
var replyfloor_popup = document.getElementById('replyfloor_popup');
|
||||
if (!replyfloor_popup) {
|
||||
replyfloor_popup = document.createElement('div');
|
||||
replyfloor_popup.id = 'replyfloor_popup';
|
||||
document.body.appendChild(replyfloor_popup);
|
||||
}
|
||||
replyfloor_popup.innerHTML = content;
|
||||
document.getElementById('replyfloor_message').focus();
|
||||
evalscript(content);
|
||||
$('#mask').hide();
|
||||
$('.replyfloor_popup_mask, .replyfloor_popup_close').off().on('click', function() {
|
||||
$('#replyfloor_popup').remove();
|
||||
});
|
||||
}else{
|
||||
popup.open(content);
|
||||
evalscript(content);
|
||||
}
|
||||
}, "xml");
|
||||
<!--{else}-->
|
||||
if(document.getElementById('replyfloor_editor_'+postid).innerHTML == '' || reply != '' || document.getElementById('replyfloor_replyto').innerHTML != ''){
|
||||
if(document.getElementById('replyfloor_editor')){
|
||||
document.getElementById('replyfloor_editor').parentNode.removeChild(document.getElementById('replyfloor_editor'));
|
||||
}
|
||||
var replyfloor_editor = document.createElement("div");
|
||||
replyfloor_editor.id = "replyfloor_editor";
|
||||
replyfloor_editor.innerHTML = document.getElementById('replyfloor_editorbox').innerHTML;
|
||||
document.getElementById('replyfloor_editor_'+postid).appendChild(replyfloor_editor);
|
||||
document.getElementById('replyfloor_pid').value = postid;
|
||||
document.getElementById('replyfloor_msgid').value = msgid;
|
||||
document.getElementById('replyfloor_replyto').innerHTML = reply;
|
||||
document.getElementById('replyfloor_message').focus();
|
||||
if(document.getElementById('replyfloor_seccodeimg')){
|
||||
replyfloor_seccodeimg(document.getElementById('replyfloor_seccodeimg'));
|
||||
}
|
||||
//upload image
|
||||
<!--{if $setconfig['upload_image'] > 0}-->
|
||||
replyfloor_uploadimage({
|
||||
auto: true,
|
||||
upload_url: "{$_G[siteurl]}plugin.php?id=replyfloor:attachment&operation=upload",
|
||||
post_params : {"uid" : "$_G[uid]", "hash":"$swfconfig[hash]"},
|
||||
paste: document.getElementById('replyfloor_message'),
|
||||
pick: '#replyfloor_img',
|
||||
accept: {
|
||||
title: 'Images',
|
||||
extensions: 'gif,jpg,jpeg,bmp,png,webp',
|
||||
mimeTypes: 'image/*'
|
||||
},
|
||||
fileVal: 'Filedata',
|
||||
fileNumLimit: $setconfig['upload_image'],
|
||||
});
|
||||
<!--{/if}-->
|
||||
if(typeof replyfloor_allowreply == 'function') {
|
||||
replyfloor_allowreply();
|
||||
}
|
||||
}else{
|
||||
if(document.getElementById('replyfloor_editor')){
|
||||
document.getElementById('replyfloor_editor').parentNode.removeChild(document.getElementById('replyfloor_editor'));
|
||||
}
|
||||
}
|
||||
var eles = document.getElementsByClassName("replyfloor_box");
|
||||
for (var i = 0, L = eles.length; i < L; i++) {
|
||||
var floorpid = eles[i].id.replace(/replyfloor_box_/, "");
|
||||
if (floorpid != postid) {
|
||||
if(document.getElementById('replyfloor_content_' + floorpid).getElementsByClassName("replyfloor_content_li").length == 0){
|
||||
if(document.getElementById('replyfloor_link_unfold_' + floorpid)){
|
||||
document.getElementById('replyfloor_link_unfold_' + floorpid).style.display = 'inline-block';
|
||||
}
|
||||
if(document.getElementById('replyfloor_link_fold_' + floorpid)){
|
||||
document.getElementById('replyfloor_link_fold_' + floorpid).style.display = 'none';
|
||||
}
|
||||
document.getElementById('replyfloor_bd_' + floorpid).style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
<!--{/if}-->
|
||||
<!--{else}-->
|
||||
popup.open('{lang replyfloor:no_permission_to_post}', 'alert');
|
||||
<!--{/if}-->
|
||||
<!--{else}-->
|
||||
popup.open('{lang nologin_tip}', 'confirm', 'member.php?mod=logging&action=login');
|
||||
<!--{/if}-->
|
||||
}
|
||||
|
||||
function replyfloor_onsubmit() {
|
||||
<!--{if $_G['uid']}-->
|
||||
<!--{if $allowpostreply}-->
|
||||
if(document.getElementById('replyfloor_message').value == '' && document.getElementById('replyfloor_upimage').innerHTML == ''){
|
||||
popup.open('{lang replyfloor:message_message_empty}', 'alert');
|
||||
return false;
|
||||
}
|
||||
if(document.getElementById('replyfloor_submit')){
|
||||
document.getElementById('replyfloor_submit').disabled = true;
|
||||
}
|
||||
var form = $('#replyfloor_messageform');
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:form.attr('action') + '&loc=1&inajax=1',
|
||||
data:form.serialize(),
|
||||
dataType:'xml'
|
||||
})
|
||||
.success(function(s) {
|
||||
if(document.getElementById('replyfloor_submit')){
|
||||
document.getElementById('replyfloor_submit').disabled = false;
|
||||
}
|
||||
evalscript(s.lastChild.firstChild.nodeValue);
|
||||
})
|
||||
.error(function() {
|
||||
if(document.getElementById('replyfloor_submit')){
|
||||
document.getElementById('replyfloor_submit').disabled = false;
|
||||
}
|
||||
popup.close();
|
||||
});
|
||||
<!--{else}-->
|
||||
popup.open('{lang replyfloor:no_permission_to_post}', 'alert');
|
||||
<!--{/if}-->
|
||||
<!--{else}-->
|
||||
popup.open('{lang nologin_tip}', 'confirm', 'member.php?mod=logging&action=login');
|
||||
<!--{/if}-->
|
||||
return false;
|
||||
}
|
||||
function succeedhandle_messagepost(url, msg, values) {
|
||||
if(typeof values == 'undefined' || !values['pid']){
|
||||
setTimeout(function() {window.location.href=url;}, 1500);
|
||||
return false;
|
||||
}
|
||||
if(document.getElementById('replyfloor_content_btn_' + values['pid'])){
|
||||
document.getElementById('replyfloor_content_btn_' + values['pid']).parentNode.style.display='';
|
||||
}
|
||||
if(document.getElementById('replyfloor_editor')){
|
||||
document.getElementById('replyfloor_message').value = '';
|
||||
document.getElementById('replyfloor_upimage').innerHTML = '';
|
||||
replyfloor_strLenCalc(document.getElementById('replyfloor_message'), 'replyfloor_checklen', $setconfig['message_maxsize']);
|
||||
document.getElementById('replyfloor_message').focus();
|
||||
if(document.getElementById('replyfloor_seccodeimg')){
|
||||
replyfloor_seccodeimg(document.getElementById('replyfloor_seccodeimg'));
|
||||
}
|
||||
if(typeof replyfloor_allowreply_submit == 'function') {
|
||||
replyfloor_allowreply_submit();
|
||||
}
|
||||
}
|
||||
$.get('plugin.php?id=replyfloor:index&tid='+values['tid']+'&pid='+values['pid']+'&msgid='+values['msgid'] + '&inajax=1', function(s){
|
||||
document.getElementById('replyfloor_bd_' + values['pid']).style.display = 'block';
|
||||
var div = document.createElement('div');
|
||||
document.getElementById('replyfloor_newbox_'+values['pid']).appendChild(div);
|
||||
div.outerHTML = s.lastChild.firstChild.nodeValue;
|
||||
if(document.getElementById('replyfloor_count_' + values['pid'])){
|
||||
var count = document.getElementById('replyfloor_count_' + values['pid']).innerHTML;
|
||||
document.getElementById('replyfloor_count_' + values['pid']).parentNode.style.display='';
|
||||
count = parseInt(count) + 1;
|
||||
document.getElementById('replyfloor_count_' + values['pid']).innerHTML = count;
|
||||
}
|
||||
if(document.getElementById('replyfloor_popup')){
|
||||
$('#replyfloor_popup').remove();
|
||||
}
|
||||
}, "xml");
|
||||
if(typeof _showCreditPrompt == 'function') _showCreditPrompt();
|
||||
return false;
|
||||
}
|
||||
function errorhandle_messagepost(msg, values) {
|
||||
popup.open(msg, 'alert');
|
||||
return false;
|
||||
}
|
||||
$(".replyfloor_content_pg a").each(function(){
|
||||
var href = $(this).attr("href");
|
||||
if(href != "javascript:;"){
|
||||
$(this).attr("href", "javascript:;").data("url", href);
|
||||
}
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$(document).on("click", ".replyfloor_content_pg a", function(){
|
||||
var self = $(this);
|
||||
var url = $(this).attr("href");
|
||||
if(url == "javascript:;"){
|
||||
url = $(this).data("url");
|
||||
}else{
|
||||
$(this).attr("href", "javascript:;").data("url", url);
|
||||
}
|
||||
$.get(url + '&inajax=1', function(s){
|
||||
var replyfloor_box = self.parents(".replyfloor_box");
|
||||
replyfloor_box.find(".replyfloor_content").html(s.lastChild.firstChild.nodeValue);
|
||||
$(".replyfloor_content_pg a").each(function(){
|
||||
var href = $(this).attr("href");
|
||||
if(href != "javascript:;"){
|
||||
$(this).attr("href", "javascript:;").data("url", href);
|
||||
}
|
||||
});
|
||||
var current = replyfloor_box.offset().top;
|
||||
if($("html,body").scrollTop() > current){
|
||||
$("html,body").stop().animate({
|
||||
scrollTop: current
|
||||
}, 300);
|
||||
}
|
||||
}, "xml");
|
||||
return false;
|
||||
});
|
||||
});
|
||||
<!--{if $setconfig['replace_mobile']}-->
|
||||
$(document).on("click", ".replybtn input, .replybtn a", function(){
|
||||
var href = $(this).attr('href');
|
||||
if(href != 'javascript:;'){
|
||||
$(this).attr('href', 'javascript:;');
|
||||
$(this).attr('data-href', href);
|
||||
}
|
||||
replyfloor_reply($(this).attr('data-href'));
|
||||
});
|
||||
<!--{/if}-->
|
||||
</script>
|
||||
<!--{/block}-->
|
154
source/plugin/replyfloor/template/touch/message.htm
Normal file
@@ -0,0 +1,154 @@
|
||||
<!--{template common/header}-->
|
||||
|
||||
<!--{if $msginfo}-->
|
||||
|
||||
<div class="replyfloor_content_li" id="replyfloor_content_li_$msginfo[id]">
|
||||
<!--{eval $avatarimg = avatar($msginfo['uid'], 'small');}-->
|
||||
<div class="replyfloor_content_avatar"><a href="home.php?mod=space&uid=$msginfo[uid]&do=profile" c="1">$avatarimg</a></div>
|
||||
<div class="replyfloor_content_cnt">
|
||||
<div class="replyfloor_content_head">
|
||||
<span class="replyfloor_content_user"><a href="home.php?mod=space&uid=$msginfo[uid]&do=profile" c="1"{if $msginfo['groupcolor']} style="color: $msginfo[groupcolor]"{/if}>$msginfo[username]</a><!--{if $msginfo['ruid']}--><span class="replyfloor_content_toreply">{lang replyfloor:post_reply}</span><a href="home.php?mod=space&uid=$msginfo[ruid]&do=profile" c="1"{if $msginfo['rgroupcolor']} style="color: $msginfo[rgroupcolor]"{/if}>$msginfo[rusername]</a><!--{/if}--></span>
|
||||
<!--{if $msginfo[status] == -1}--><span class="replyfloor_content_moderating">{lang replyfloor:moderating}</span><!--{/if}-->
|
||||
<!--{if $msginfo[location]}--><span class="replyfloor_content_location">{lang replyfloor:location}{$msginfo[location]}</span><!--{/if}-->
|
||||
<!--{if $msginfo['mobile'] && $setconfig['mobile_comefrom']}-->
|
||||
<span class="replyfloor_content_from">{$setconfig['mobile_comefrom']}</span>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<div class="replyfloor_content_main">
|
||||
<!--{if getstatus($_G['forum_thread']['status'], 2) && $msginfo['uid'] != $_G['uid'] && $post['authorid'] != $_G['uid'] && $_G['thread']['authorid'] != $_G['uid'] && !$_G['forum']['ismoderator']}-->
|
||||
<div class="replyfloor_content_locked">{lang replyfloor:message_ishidden_hiddenreplies}</div>
|
||||
<!--{else}-->
|
||||
<div class="replyfloor_content_text">$msginfo[message]</div>
|
||||
<!--{if $msginfo['attachment']}-->
|
||||
<!--{eval $attachlist = explode("\t", $msginfo['attachment']);}-->
|
||||
<!--{eval $attachcount = count($attachlist);}-->
|
||||
<div class="replyfloor_content_image replyfloor_content_image{$attachcount}">
|
||||
<!--{loop $attachlist $attach}-->
|
||||
<div class="replyfloor_content_image_li"><a href="$attach"><img src="$attach" border="0" alt="" style="margin:0" /></a></div>
|
||||
<!--{/loop}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<div class="replyfloor_content_foot">
|
||||
<span class="replyfloor_content_foot_z">
|
||||
<span class="replyfloor_content_time">$msginfo['createtime']</span>
|
||||
</span>
|
||||
<span class="replyfloor_content_foot_y">
|
||||
<span class="replyfloor_content_rpbtn" onclick="replyfloor_editor('$post[pid]', $msginfo[id], '{lang replyfloor:post_reply} $msginfo[username] :');">{lang replyfloor:post_reply}</span>
|
||||
<!--{if $setconfig['open_report'] && $_G['uid'] != $msginfo['uid']}-->
|
||||
<span class="replyfloor_content_reportbtn" onclick="replyfloor_report('$post[pid]', $msginfo[id]);">{lang replyfloor:post_report}</span>
|
||||
<!--{/if}-->
|
||||
<!--{if ($_G['forum']['ismoderator'] && $_G['group']['allowdelpost']) || ($setconfig['allow_delete'] && $_G['uid'] && $_G['uid'] == $_G['thread']['authorid']) || ($setconfig['self_delete'] && $_G['uid'] && $_G['uid'] == $msginfo['uid'])}-->
|
||||
<span class="replyfloor_content_delbtn" onclick="replyfloor_delete('$post[pid]', $msginfo[id]);">{lang replyfloor:post_delete}</span>
|
||||
<!--{/if}-->
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--{else}-->
|
||||
<!--{if $list}-->
|
||||
<!--{eval $showkey = 1;}-->
|
||||
<div class="replyfloor_content_ul">
|
||||
<!--{loop $list $value}-->
|
||||
<div class="replyfloor_content_li" id="replyfloor_content_li_$value[id]">
|
||||
<!--{eval $avatarimg = avatar($value['uid'], 'small');}-->
|
||||
<div class="replyfloor_content_avatar"><a href="home.php?mod=space&uid=$value[uid]&do=profile" c="1">$avatarimg</a></div>
|
||||
<div class="replyfloor_content_cnt">
|
||||
<div class="replyfloor_content_head">
|
||||
<span class="replyfloor_content_user"><a href="home.php?mod=space&uid=$value[uid]&do=profile" c="1"{if $value['groupcolor']} style="color: $value[groupcolor]"{/if}>$value[username]</a><!--{if $value['ruid']}--><span class="replyfloor_content_toreply">{lang replyfloor:post_reply}</span><a href="home.php?mod=space&uid=$value[ruid]&do=profile" c="1"{if $value['rgroupcolor']} style="color: $value[rgroupcolor]"{/if}>$value[rusername]</a><!--{/if}--></span>
|
||||
<!--{if $value[status] == -1}--><span class="replyfloor_content_moderating">{lang replyfloor:moderating}</span><!--{/if}-->
|
||||
<!--{if $value[location]}--><span class="replyfloor_content_location">{lang replyfloor:location}{$value[location]}</span><!--{/if}-->
|
||||
<!--{if $value['mobile'] && $setconfig['mobile_comefrom']}-->
|
||||
<span class="replyfloor_content_from">{$setconfig['mobile_comefrom']}</span>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<div class="replyfloor_content_main">
|
||||
<!--{if getstatus($_G['forum_thread']['status'], 2) && $value['uid'] != $_G['uid'] && $post['authorid'] != $_G['uid'] && $_G['thread']['authorid'] != $_G['uid'] && !$_G['forum']['ismoderator']}-->
|
||||
<div class="replyfloor_content_locked">{lang replyfloor:message_ishidden_hiddenreplies}</div>
|
||||
<!--{else}-->
|
||||
<div class="replyfloor_content_text">$value[message]</div>
|
||||
<!--{if $value['attachment']}-->
|
||||
<!--{eval $attachlist = explode("\t", $value['attachment']);}-->
|
||||
<!--{eval $attachcount = count($attachlist);}-->
|
||||
<div class="replyfloor_content_image replyfloor_content_image{$attachcount}">
|
||||
<!--{loop $attachlist $attach}-->
|
||||
<div class="replyfloor_content_image_li"><a href="$attach"><img src="$attach" border="0" alt="" style="margin:0" /></a></div>
|
||||
<!--{/loop}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<div class="replyfloor_content_foot">
|
||||
<span class="replyfloor_content_foot_z">
|
||||
<span class="replyfloor_content_time">$value['createtime']</span>
|
||||
</span>
|
||||
<span class="replyfloor_content_foot_y">
|
||||
<span class="replyfloor_content_rpbtn" onclick="replyfloor_editor('$post[pid]', $value[id], '{lang replyfloor:post_reply} $value[username] :');">{lang replyfloor:post_reply}</span>
|
||||
<!--{if $setconfig['open_report'] && $_G['uid'] != $value['uid']}-->
|
||||
<span class="replyfloor_content_reportbtn" onclick="replyfloor_report('$post[pid]', $value[id]);">{lang replyfloor:post_report}</span>
|
||||
<!--{/if}-->
|
||||
<!--{if ($_G['forum']['ismoderator'] && $_G['group']['allowdelpost']) || ($setconfig['allow_delete'] && $_G['uid'] && $_G['uid'] == $_G['thread']['authorid']) || ($setconfig['self_delete'] && $_G['uid'] && $_G['uid'] == $value['uid'])}-->
|
||||
<span class="replyfloor_content_delbtn" onclick="replyfloor_delete('$post[pid]', $value[id]);">{lang replyfloor:post_delete}</span>
|
||||
<!--{/if}-->
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!--{if $setconfig['pagemode_mobile']}--><div></div><!--{/if}-->
|
||||
</div>
|
||||
<!--{if $_GET['default'] && $page == 1 && $shownum == $showkey && $shownum < count($list)}-->
|
||||
</div>
|
||||
<div id="replyfloor_content_ul_$post[pid]" class="replyfloor_content_ul" style="display:none">
|
||||
<!--{/if}-->
|
||||
<!--{eval $showkey++;}-->
|
||||
<!--{/loop}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<div id="replyfloor_newbox_$post[pid]" class="replyfloor_content_ul"></div>
|
||||
<!--{if $list}-->
|
||||
<div class="replyfloor_content_pager">
|
||||
<!--{if (($_GET['default'] && $shownum < $perpage) || $setconfig['pagemode_mobile']) && $shownum < $count}-->
|
||||
<div class="replyfloor_content_more" id="replyfloor_content_more_$post[pid]">
|
||||
<!--{if $setconfig['pagemode_mobile']}-->
|
||||
<!--{eval $leftshownum = $count - $perpage - $start;}-->
|
||||
<div class="replyfloor_content_hrmore"></div>
|
||||
<!--{if $leftshownum > 0}-->
|
||||
<div class="replyfloor_content_showmore"><a href="javascript:;" rel="plugin.php?id=replyfloor:index&tid=$post[tid]&pid=$post[pid]&page={echo $page+1;}" onclick="replyfloor_collapse(this, '$post[pid]', 1);">{lang replyfloor:collapse_open}</a></div>
|
||||
<!--{/if}-->
|
||||
<!--{if $page > 1}-->
|
||||
<div class="replyfloor_content_hidemore"><a href="javascript:;" rel="plugin.php?id=replyfloor:index&tid=$post[tid]&pid=$post[pid]&page=1" onclick="replyfloor_collapse(this, '$post[pid]', 0);">{lang replyfloor:collapse_close}</a></div>
|
||||
<!--{/if}-->
|
||||
<!--{else}-->
|
||||
<!--{eval $leftshownum = $count - $shownum;}-->
|
||||
{lang replyfloor:leftshowtip} <a href="javascript:;" onclick="replyfloor_leftshow('$post[pid]');">{lang replyfloor:leftshowview}</a>
|
||||
<!--{/if}-->
|
||||
<!--{if $setconfig['pagemode_mobile']}--><div></div><!--{/if}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{if !$setconfig['pagemode_mobile']}-->
|
||||
<div class="replyfloor_content_pg" id="replyfloor_content_pg_$post[pid]"{if $_GET['default'] && $page == 1 && $shownum < count($list)} style="display:none;"{/if}>
|
||||
<!--{if $multipage}-->
|
||||
<!--{eval $multipage = str_replace('<div class="pg">', '<div class="replyfloor_content_pgs">', $multipage);}-->
|
||||
$multipage
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{if $setconfig['style_mobile'] != 3 && $setconfig['style_mobile'] != 4}-->
|
||||
<div class="replyfloor_content_btn" id="replyfloor_content_btn_$post[pid]">
|
||||
<a href="javascript:;" onclick="replyfloor_editor('$post[pid]', 0, '');">{lang replyfloor:link_unfold}</a>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{else}-->
|
||||
<div class="replyfloor_content_pager" style="display:none;">
|
||||
<!--{if $setconfig['style_mobile'] != 3 && $setconfig['style_mobile'] != 4}-->
|
||||
<div class="replyfloor_content_btn" id="replyfloor_content_btn_$post[pid]">
|
||||
<a href="javascript:;" onclick="replyfloor_editor('$post[pid]', 0, '');">{lang replyfloor:link_unfold}</a>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{/if}-->
|
||||
|
||||
<!--{template common/footer}-->
|
134
source/plugin/replyfloor/template/touch/post.htm
Normal file
@@ -0,0 +1,134 @@
|
||||
<!--{template common/header}-->
|
||||
<!--{if $_GET['style'] == 1}-->
|
||||
<div class="replyfloor_popup_mask"></div>
|
||||
<div class="replyfloor_popup_box">
|
||||
<form method="post" autocomplete="off" id="replyfloor_messageform" name="replyfloorform" action="plugin.php?id=replyfloor:index&ac=post&tid=$post[tid]&pid=$post[pid]&infloat=yes">
|
||||
<input type="hidden" name="formhash" id="formhash" value="{FORMHASH}" />
|
||||
<input type="hidden" name="handlekey" value="$_GET['handlekey']" />
|
||||
<input type="hidden" name="msgid" value="$_GET['msgid']" />
|
||||
<input type="hidden" name="savesubmit" value="true" />
|
||||
<div class="replyfloor_popup_close"></div>
|
||||
<div class="replyfloor_popup_area">
|
||||
<div class="replyfloor_popup_title">{lang replyfloor:link_unfold}</div>
|
||||
<div class="replyfloor_popup_tonotice">
|
||||
<!--{if $rusername}--><span class="replyfloor_popup_replyto" id="replyfloor_replyto">{lang replyfloor:post_reply} $rusername :</span><!--{/if}-->
|
||||
<!--{if $setconfig['notice_author'] == 2}-->
|
||||
<span class="{if $rusername}replyfloor_popup_notice{else}replyfloor_popup_noticez{/if}"><label for="notice_author"><input type="checkbox" name="notice_author" id="notice_author" value="1" class="pc" checked="checked">{lang replyfloor:message_pm}</label></span>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{hook/replyfloor_infloat_top_mobile}-->
|
||||
<div class="replyfloor_popup_tedtbox">
|
||||
<div class="replyfloor_popup_tedtarea">
|
||||
<textarea name="message" placeholder="{$setconfig['editor_placeholder']}" rows="5" cols="80" class="replyfloor_editor_textarea" id="replyfloor_message" onInput="replyfloor_autotextarea(this);" onKeyUp="replyfloor_autotextarea(this);replyfloor_strLenCalc(this, 'replyfloor_checklen', $setconfig['message_maxsize'])" onChange="replyfloor_autotextarea(this);replyfloor_strLenCalc(this, 'replyfloor_checklen', $setconfig['message_maxsize'])"></textarea>
|
||||
</div>
|
||||
<div class="replyfloor_popup_btn">
|
||||
<button type="button" id="replyfloor_submit" onclick="replyfloor_onsubmit();">{lang replyfloor:message_btn}</button>
|
||||
</div>
|
||||
</div>
|
||||
<!--{eval $seccodecheck = in_array($_G['groupid'], $setconfig['open_seccheck']) ? 1 : 0;}-->
|
||||
<!--{eval $ran = random(5, 1);}-->
|
||||
<!--{if $seccodecheck}-->
|
||||
<div class="replyfloor_popup_seccode">
|
||||
<div id="seccode_replyfloor">
|
||||
<input name="seccodehash" type="hidden" value="replyfloor" />
|
||||
<input name="seccodemodid" type="hidden" value="{$_G[basescript]}::{CURMODULE}" />
|
||||
<input type="text" class="replyfloor_popup_seccodeverify" id="replyfloor_seccodeverify" name="seccodeverify" placeholder="{lang seccode}">
|
||||
<img src="misc.php?mod=seccode&update={$ran}&idhash=replyfloor" style="margin: 0;" class="replyfloor_popup_seccodeimg" id="replyfloor_seccodeimg" onclick="replyfloor_seccodeimg(this)"/>
|
||||
</div>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<div class="replyfloor_upimage" id="replyfloor_upimage"></div>
|
||||
<div class="replyfloor_popup_infobar">
|
||||
<div class="replyfloor_popup_tedtbar">
|
||||
<div class="replyfloor_popup_tedtfpd">
|
||||
<span title="{lang e_bold}" class="replyfloor_popup_tedtbar_fbld" onclick="replyfloor_insertunit('replyfloor_', '[b]', '[/b]');">B</span>
|
||||
<span title="{lang e_forecolor}" class="replyfloor_popup_tedtbar_fclr" id="replyfloor_forecolor" onclick="replyfloor_showcolorbox('replyfloor_');">Color</span>
|
||||
<span title="{lang e_smilies}" class="replyfloor_popup_tedtbar_fsml" id="replyfloor_fsml" onclick="replyfloor_showsmilebox('replyfloor_');">Smilies</span>
|
||||
<!--{if $setconfig['upload_image'] > 0}-->
|
||||
<span class="replyfloor_popup_tedtbar_fmg" id="replyfloor_img">uploadImage</span>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="replyfloor_popup_btntip">{lang replyfloor:message_tip1} <strong id="replyfloor_checklen">$setconfig['message_maxsize']</strong> {lang replyfloor:message_tip2}</div>
|
||||
</div>
|
||||
<div id="replyfloor_attribute"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!--{else}-->
|
||||
<div class="replyfloor_popup_mask"></div>
|
||||
<div class="replyfloor_popup_box">
|
||||
<form method="post" autocomplete="off" id="replyfloor_messageform" name="replyfloorform" action="plugin.php?id=replyfloor:index&ac=post&tid=$post[tid]&pid=$post[pid]&infloat=yes">
|
||||
<input type="hidden" name="formhash" id="formhash" value="{FORMHASH}" />
|
||||
<input type="hidden" name="handlekey" value="$_GET['handlekey']" />
|
||||
<input type="hidden" name="msgid" value="$_GET['msgid']" />
|
||||
<input type="hidden" name="savesubmit" value="true" />
|
||||
<div class="replyfloor_popup_close"></div>
|
||||
<div class="replyfloor_popup_area">
|
||||
<div class="replyfloor_popup_title">{lang replyfloor:link_unfold}</div>
|
||||
<!--{if $rusername}--><div class="replyfloor_popup_replyto" id="replyfloor_replyto">{lang replyfloor:post_reply} $rusername :</div><!--{/if}-->
|
||||
<!--{hook/replyfloor_infloat_top_mobile}-->
|
||||
<div class="replyfloor_popup_tedt">
|
||||
<div class="replyfloor_popup_tedtarea">
|
||||
<textarea name="message" placeholder="{$setconfig['editor_placeholder']}" rows="5" cols="80" class="replyfloor_editor_textarea" id="replyfloor_message" onKeyUp="replyfloor_strLenCalc(this, 'replyfloor_checklen', $setconfig['message_maxsize'])" onChange="replyfloor_strLenCalc(this, 'replyfloor_checklen', $setconfig['message_maxsize'])"></textarea>
|
||||
</div>
|
||||
<div class="replyfloor_popup_tedtbar">
|
||||
<div class="replyfloor_popup_tedtfpd">
|
||||
<span title="{lang e_bold}" class="replyfloor_popup_tedtbar_fbld" onclick="replyfloor_insertunit('replyfloor_', '[b]', '[/b]');">B</span>
|
||||
<span title="{lang e_forecolor}" class="replyfloor_popup_tedtbar_fclr" id="replyfloor_forecolor" onclick="replyfloor_showcolorbox('replyfloor_');">Color</span>
|
||||
<span title="{lang e_smilies}" class="replyfloor_popup_tedtbar_fsml" id="replyfloor_fsml" onclick="replyfloor_showsmilebox('replyfloor_');">Smilies</span>
|
||||
<!--{if $setconfig['upload_image'] > 0}-->
|
||||
<span class="replyfloor_popup_tedtbar_fmg" id="replyfloor_img">uploadImage</span>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
</div>
|
||||
<div id="replyfloor_attribute"></div>
|
||||
</div>
|
||||
<div class="replyfloor_upimage" id="replyfloor_upimage"></div>
|
||||
<!--{eval $seccodecheck = in_array($_G['groupid'], $setconfig['open_seccheck']) ? 1 : 0;}-->
|
||||
<!--{eval $ran = random(5, 1);}-->
|
||||
<!--{if $seccodecheck}-->
|
||||
<div class="replyfloor_popup_seccode">
|
||||
<div id="seccode_replyfloor">
|
||||
<input name="seccodehash" type="hidden" value="replyfloor" />
|
||||
<input name="seccodemodid" type="hidden" value="{$_G[basescript]}::{CURMODULE}" />
|
||||
<input type="text" class="replyfloor_popup_seccodeverify" id="replyfloor_seccodeverify" name="seccodeverify" placeholder="{lang seccode}">
|
||||
<img src="misc.php?mod=seccode&update={$ran}&idhash=replyfloor" style="margin: 0;" class="replyfloor_popup_seccodeimg" id="replyfloor_seccodeimg" onclick="replyfloor_seccodeimg(this)"/>
|
||||
</div>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<div class="replyfloor_popup_info">
|
||||
<!--{if $setconfig['notice_author'] == 2}-->
|
||||
<span class="replyfloor_popup_notice"><label for="notice_author"><input type="checkbox" name="notice_author" id="notice_author" value="1" class="pc" checked="checked">{lang replyfloor:message_pm}</label></span>
|
||||
<!--{/if}-->
|
||||
<span class="replyfloor_popup_btntip">{lang replyfloor:message_tip1} <strong id="replyfloor_checklen">$setconfig['message_maxsize']</strong> {lang replyfloor:message_tip2}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="replyfloor_popup_btn">
|
||||
<button type="button" id="replyfloor_submit" onclick="replyfloor_onsubmit();">{lang replyfloor:message_btn}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{if $setconfig['upload_image'] > 0}-->
|
||||
<script type="text/javascript" reload="1">
|
||||
replyfloor_uploadimage({
|
||||
auto: true,
|
||||
upload_url: "{$_G[siteurl]}plugin.php?id=replyfloor:attachment&operation=upload",
|
||||
post_params : {"uid" : "$_G[uid]", "hash":"$swfconfig[hash]"},
|
||||
paste: document.getElementById('replyfloor_message'),
|
||||
pick: {
|
||||
id: '#replyfloor_img',
|
||||
multiple: false
|
||||
},
|
||||
accept: {
|
||||
title: 'Images',
|
||||
extensions: 'gif,jpg,jpeg,bmp,png',
|
||||
mimeTypes: 'image/*'
|
||||
},
|
||||
fileVal: 'Filedata',
|
||||
fileNumLimit: $setconfig['upload_image'],
|
||||
});
|
||||
</script>
|
||||
<!--{/if}-->
|
||||
<!--{template common/footer}-->
|
106
source/plugin/replyfloor/template/touch/report.htm
Normal file
@@ -0,0 +1,106 @@
|
||||
<!--{template common/header}-->
|
||||
<!--{if $_GET['inajax']}-->
|
||||
<div class="replyfloor_popup_mask"></div>
|
||||
<div class="replyfloor_popup_box">
|
||||
<form method="post" autocomplete="off" id="replyfloorform" name="replyfloorform" enctype="multipart/form-data" action="plugin.php?id=replyfloor:index&ac=report&loc=1&infloat=yes{if !empty($_GET['from'])}&from=$_GET['from']{/if}">
|
||||
<input type="hidden" name="formhash" value="{FORMHASH}" />
|
||||
<input type="hidden" name="referer" value="{echo dreferer()}" />
|
||||
<input type="hidden" name="tid" value="$msginfo[tid]" />
|
||||
<input type="hidden" name="pid" value="$msginfo[pid]" />
|
||||
<input type="hidden" name="msgid" value="$msginfo[id]" />
|
||||
<input type="hidden" name="handlekey" value="$_GET[handlekey]" />
|
||||
<input type="hidden" name="savesubmit" value="true" />
|
||||
<div class="replyfloor_popup_close"></div>
|
||||
<div class="replyfloor_popup_area">
|
||||
<div class="replyfloor_popup_title">{lang replyfloor:report_title}</div>
|
||||
<div style="">
|
||||
<textarea rows="6" cols="80" name="message" id="replyfloor_report_message" class="replyfloor_popup_reportarea"></textarea>
|
||||
</div>
|
||||
<div style="margin-top:10px;">
|
||||
<button type="button" style="border: 1px solid #CDCDCD;padding:3px 10px;" onclick="replyfloor_report_image()">{lang replyfloor:report_addimage}</button>
|
||||
</div>
|
||||
<div id="replyfloor_report_image">
|
||||
<div style="margin-top:10px;">
|
||||
{lang replyfloor:report_image} <input type='file' name='filedata[]' accept=".jpg,.jpeg,.gif,.png,.bmp,image/jpeg,image/gif,image/png,image/bmp" style="width:210px;border: 1px solid #CDCDCD;"/> <button type="button" style="border: 1px solid #CDCDCD;padding:3px 10px;" onclick="this.parentNode.parentNode.removeChild(this.parentNode)">{lang replyfloor:report_delimage}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="replyfloor_popup_reportbtn">
|
||||
<button type="submit" name="paysubmit" class="formdialog" value="true">{lang submit}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!--{else}-->
|
||||
<style>
|
||||
.replyfloor_header{background:#f6f6f6;height: 44px;text-align: center;font-size:16px;position: relative;border-bottom:1px solid #cecece;}
|
||||
.replyfloor_header a{position: absolute;top:0;left:0;height:20px;margin:12px 10px;}
|
||||
.replyfloor_header span{padding: 0 10px;display: inline-block;width: 50%;color:#333;height: 44px;line-height:44px;overflow: hidden;white-space: nowrap;}
|
||||
.replyfloor_reportform{background:#fff;padding:10px;}
|
||||
.replyfloor_reportform th {padding: 5px 2px;border-bottom: 1px dashed #CDCDCD;font-size:14px;}
|
||||
.replyfloor_reportform td {padding: 5px 2px;border-bottom: 1px dashed #CDCDCD;font-size:14px;}
|
||||
.replyfloor_reportform textarea{width:100%;line-height: 24px;border: 1px solid #D3D4D4;padding:4px 5px;font-size:14px;vertical-align:baseline;box-sizing:border-box;}
|
||||
.replyfloor_reportform .upload_report_formdialog{height:42px;line-height:42px;font-size:14px;background:#eb3331;color:#fff;border-radius: 5px;width:100%;border:0 none;}
|
||||
</style>
|
||||
<!-- header start -->
|
||||
<div class="replyfloor_header">
|
||||
<div class="replyfloor_nav">
|
||||
<a href="javascript:history.go(-1)" class="z"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NzRCQTEyN0IzOTcwMTFFODk1OEZCOEVCMEE2QUU1NkUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NzRCQTEyN0MzOTcwMTFFODk1OEZCOEVCMEE2QUU1NkUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NEJBMTI3OTM5NzAxMUU4OTU4RkI4RUIwQTZBRTU2RSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NEJBMTI3QTM5NzAxMUU4OTU4RkI4RUIwQTZBRTU2RSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PulQWg8AAAF/SURBVHja7Ni9SsRAEAfwnd1wldiIlqK1td4LiL7CFQaFCHZWgmVqH+GK4FejryA+gPcA9vZ2YnVkd5yAcBLOYJKZ3UWyRbIchPsxSzb/HUBEFfPQKvIxAP89MGn7wPHpuTLOtXoGMdl1WF4rUBug9cX25tpdnufRVHBssXxGhTu0Y6yjs1P6bRTLEo9Lp56ohquLasKcbk5sifvgAMBRRc5oWoau4FIcfRJOaPoQ+i1uwt2H3mZYcdxAdhwnUATHBRTDcQBFcX2B4rg+QC+4rsA9X7gunzpQ1j7S3QuudQWz7HKFjjBbNXNR4QhaYcMCi+LqkwxvtbSX0SWNJVGjAZhQ1T4W8Qk11e2GpkexRP5ZotVBHUmXWwlk122mCZnGAPwV+b3caQxAL0iOsCCK5IpbYkjOwCqC5I787EiJQxMrUurY2YScxNI8Woq0qKZtUpR062NmQB/+RALgqM3/+mgevRhI9imMvVIcewdtqtbH/M8BdOhRD8DA40uAAQDL2thNJDxLvAAAAABJRU5ErkJggg==" width="20" height="20" /></a>
|
||||
<span>{lang replyfloor:report_title}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- header end -->
|
||||
<form class="replyfloor_reportform" id="reportform" method="post" autocomplete="off" enctype="multipart/form-data" action="plugin.php?id=replyfloor:index&ac=report&infloat=yes{if !empty($_GET['from'])}&from=$_GET['from']{/if}">
|
||||
<div class="">
|
||||
<input type="hidden" name="formhash" value="{FORMHASH}" />
|
||||
<input type="hidden" name="referer" value="{echo dreferer()}" />
|
||||
<input type="hidden" name="tid" value="$msginfo[tid]" />
|
||||
<input type="hidden" name="pid" value="$msginfo[pid]" />
|
||||
<input type="hidden" name="msgid" value="$msginfo[id]" />
|
||||
<input type="hidden" name="savesubmit" value="true" />
|
||||
<div style="">
|
||||
<textarea rows="7" cols="80" name="message" class="pt"></textarea>
|
||||
</div>
|
||||
<div style="margin-top:10px;">
|
||||
<button type="button" style="border: 1px solid #CDCDCD;padding:3px 10px;" onclick="replyfloor_report_image()">{lang replyfloor:report_addimage}</button>
|
||||
</div>
|
||||
<div id="replyfloor_report_image">
|
||||
<div style="margin-top:10px;">
|
||||
{lang replyfloor:report_image} <input type='file' name='filedata[]' accept=".jpg,.jpeg,.gif,.png,.bmp,image/jpeg,image/gif,image/png,image/bmp" style="width:210px;border: 1px solid #CDCDCD;"/> <button type="button" style="border: 1px solid #CDCDCD;padding:3px 10px;" onclick="this.parentNode.parentNode.removeChild(this.parentNode)">{lang replyfloor:report_delimage}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top:10px;">
|
||||
<button type="submit" class="upload_report_formdialog" value="true"><span>{lang submit}</span></button>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function replyfloor_report_image(){
|
||||
var uploadObj = document.createElement('div');
|
||||
uploadObj.style.marginTop = '10px';
|
||||
uploadObj.innerHTML += '{lang replyfloor:report_image} <input type="file" name="filedata[]" accept=".jpg,.jpeg,.gif,.png,.bmp,image/jpeg,image/gif,image/png,image/bmp" style="width:210px;border: 1px solid #CDCDCD;"/> <button type="button" style="border: 1px solid #CDCDCD;padding:3px 10px;" onclick="this.parentNode.parentNode.removeChild(this.parentNode)">{lang replyfloor:report_delimage}</button>';
|
||||
document.getElementById('replyfloor_report_image').appendChild(uploadObj);
|
||||
}
|
||||
jQuery(document).on('click', '.upload_report_formdialog', function() {
|
||||
var obj = jQuery(this);
|
||||
var formobj = jQuery(this.form);
|
||||
var isFormData = formobj.find("input[type='file']").length > 0;
|
||||
jQuery.ajax({
|
||||
type:'POST',
|
||||
url:formobj.attr('action') + '&handlekey='+ formobj.attr('id') +'&inajax=1',
|
||||
data:isFormData ? new FormData(formobj[0]) : formobj.serialize(),
|
||||
dataType:'xml',
|
||||
processData:isFormData ? false : true,
|
||||
contentType:isFormData ? false : 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
})
|
||||
.success(function(s) {
|
||||
popup.open(s.lastChild.firstChild.nodeValue);
|
||||
evalscript(s.lastChild.firstChild.nodeValue);
|
||||
})
|
||||
.error(function() {
|
||||
popup.open('error', 'alert');
|
||||
});
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
<!--{/if}-->
|
||||
<!--{template common/footer}-->
|
8
source/plugin/replyfloor/template/touch/style.htm
Normal file
@@ -0,0 +1,8 @@
|
||||
<!--{block return}-->
|
||||
<link rel="stylesheet" type="text/css" href="source/plugin/replyfloor/static/css/touch/style{$setconfig['style_mobile']}.css?{VERHASH}" media="all">
|
||||
<!--{if $setconfig['css_mobile']}-->
|
||||
<style>
|
||||
$setconfig['css_mobile']
|
||||
</style>
|
||||
<!--{/if}-->
|
||||
<!--{/block}-->
|
158
source/plugin/replyfloor/template/touch/viewthread.htm
Normal file
@@ -0,0 +1,158 @@
|
||||
<!--{block return}-->
|
||||
<div class="replyfloor_box" id="replyfloor_box_$post[pid]">
|
||||
<!--{if $setconfig['style_mobile'] == 1}-->
|
||||
<div class="replyfloor_hd">
|
||||
<span class="replyfloor_link_unfold" id="replyfloor_link_unfold_$post[pid]" onclick="replyfloor_fold('$post[pid]', 1);" title=""{if $list} style="display:none;"{/if}>{lang replyfloor:link_unfold}<span class="replyfloor_count"{if !$count} style="display:none;"{/if}>(<span id="replyfloor_count_$post[pid]">$count</span>)</span></span>
|
||||
<span class="replyfloor_link_fold" id="replyfloor_link_fold_$post[pid]" onclick="replyfloor_fold('$post[pid]', 0);"{if $list} style="display:inline-block;"{/if}>{lang replyfloor:link_fold}</span>
|
||||
</div>
|
||||
<!--{elseif $setconfig['style_mobile'] == 2}-->
|
||||
<div class="replyfloor_hd">
|
||||
<!--{if $post['status'] && 0}-->
|
||||
<span class="replyfloor_tail_from"><!--{if $_G['setting']['mobile']['mobilecomefrom']}-->{$_G['setting']['mobile']['mobilecomefrom']}<!--{else}-->{lang from_mobile}<!--{/if}--></span>
|
||||
<!--{/if}-->
|
||||
<span class="replyfloor_tail_floor">
|
||||
<!--{if isset($post[isstick])}-->
|
||||
<img src ="{$_G[siteurl]}source/plugin/replyfloor/static/image/settop.png" title="{lang replyfloor:replystick}" class="vm" /> {lang replyfloor:from} {$post[number]}{$postnostick}
|
||||
<!--{elseif $post[number] == -1}-->
|
||||
{lang replyfloor:recommend}
|
||||
<!--{else}-->
|
||||
<!--{if !empty($postno[$post[number]])}-->
|
||||
$postno[$post[number]]
|
||||
<!--{else}-->
|
||||
<em>{$post[number]}</em>{$postno[0]}
|
||||
<!--{/if}-->
|
||||
<!--{/if}-->
|
||||
</span>
|
||||
<span class="replyfloor_tail_time">$post[dateline]</span>
|
||||
<span class="replyfloor_link_unfold" id="replyfloor_link_unfold_$post[pid]" onclick="replyfloor_fold('$post[pid]', 1);" title=""{if $list} style="display:none;"{/if}>{lang replyfloor:post_reply}<span class="replyfloor_count"{if !$count} style="display:none;"{/if}>(<span id="replyfloor_count_$post[pid]">$count</span>)</span></span>
|
||||
<span class="replyfloor_link_fold" id="replyfloor_link_fold_$post[pid]" onclick="replyfloor_fold('$post[pid]', 0);"{if $list} style="display:inline-block;"{/if}>{lang replyfloor:link_fold}</span>
|
||||
</div>
|
||||
<!--{elseif $setconfig['style_mobile'] == 3}-->
|
||||
<div class="replyfloor_hd">
|
||||
<span onclick="replyfloor_editor('$post[pid]', 0, '');" title="{lang replyfloor:post_reply}">{lang replyfloor:post_reply}</span>
|
||||
</div>
|
||||
<!--{elseif $setconfig['style_mobile'] == 4}-->
|
||||
<div class="replyfloor_hd">
|
||||
<span class="replyfloor_tail_time">$post[dateline]</span>
|
||||
<span class="replyfloor_tail_reply" onclick="replyfloor_editor('$post[pid]', 0, '');" title="{lang replyfloor:post_reply}">{lang replyfloor:post_reply}</span>
|
||||
</div>
|
||||
<!--{elseif $setconfig['style_mobile'] == 5}-->
|
||||
<div class="replyfloor_hd">
|
||||
<span class="replyfloor_tail_time">$post[dateline]</span>
|
||||
<span class="replyfloor_tail_reply" onclick="replyfloor_editor('$post[pid]', 0, '');" title="{lang replyfloor:post_reply}">{lang replyfloor:post_reply}</span>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<div class="replyfloor_bd" id="replyfloor_bd_$post[pid]"{if $list} style="display:block;"{/if}>
|
||||
<div class="replyfloor_content" id="replyfloor_content_$post[pid]">
|
||||
<!--{if $list}-->
|
||||
<!--{eval $showkey = 1;}-->
|
||||
<div class="replyfloor_content_ul">
|
||||
<!--{loop $list $value}-->
|
||||
<div class="replyfloor_content_li" id="replyfloor_content_li_$value[id]">
|
||||
<!--{eval $avatarimg = avatar($value['uid'], 'small');}-->
|
||||
<div class="replyfloor_content_avatar"><a href="home.php?mod=space&uid=$value[uid]&do=profile" c="1">$avatarimg</a></div>
|
||||
<div class="replyfloor_content_cnt">
|
||||
<div class="replyfloor_content_head">
|
||||
<span class="replyfloor_content_user"><a href="home.php?mod=space&uid=$value[uid]&do=profile" c="1"{if $value['groupcolor']} style="color: $value[groupcolor]"{/if}>$value[username]</a><!--{if $value['ruid']}--><span class="replyfloor_content_toreply">{lang replyfloor:post_reply}</span><a href="home.php?mod=space&uid=$value[ruid]&do=profile" c="1"{if $value['rgroupcolor']} style="color: $value[rgroupcolor]"{/if}>$value[rusername]</a><!--{/if}--></span>
|
||||
<!--{if $value[status] == -1}--><span class="replyfloor_content_moderating">{lang replyfloor:moderating}</span><!--{/if}-->
|
||||
<!--{if $value[location]}--><span class="replyfloor_content_location">{lang replyfloor:location}{$value[location]}</span><!--{/if}-->
|
||||
<!--{if $value['mobile'] && $setconfig['mobile_comefrom']}-->
|
||||
<span class="replyfloor_content_from">{$setconfig['mobile_comefrom']}</span>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<div class="replyfloor_content_main">
|
||||
<!--{if getstatus($_G['forum_thread']['status'], 2) && $value['uid'] != $_G['uid'] && $post['authorid'] != $_G['uid'] && $_G['thread']['authorid'] != $_G['uid'] && !$_G['forum']['ismoderator']}-->
|
||||
<div class="replyfloor_content_locked">{lang replyfloor:message_ishidden_hiddenreplies}</div>
|
||||
<!--{else}-->
|
||||
<div class="replyfloor_content_text">$value[message]</div>
|
||||
<!--{if $value['attachment']}-->
|
||||
<!--{eval $attachlist = explode("\t", $value['attachment']);}-->
|
||||
<!--{eval $attachcount = count($attachlist);}-->
|
||||
<div class="replyfloor_content_image replyfloor_content_image{$attachcount}">
|
||||
<!--{loop $attachlist $attach}-->
|
||||
<div class="replyfloor_content_image_li"><a href="$attach"><img src="$attach" border="0" alt="" style="margin:0" /></a></div>
|
||||
<!--{/loop}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<div class="replyfloor_content_foot">
|
||||
<span class="replyfloor_content_foot_z">
|
||||
<span class="replyfloor_content_time">$value['createtime']</span>
|
||||
</span>
|
||||
<span class="replyfloor_content_foot_y">
|
||||
<span class="replyfloor_content_rpbtn" onclick="replyfloor_editor('$post[pid]', $value[id], '{lang replyfloor:post_reply} $value[username] :');">{lang replyfloor:post_reply}</span>
|
||||
<!--{if $setconfig['open_report'] && $_G['uid'] != $value['uid']}-->
|
||||
<span class="replyfloor_content_reportbtn" onclick="replyfloor_report('$post[pid]', $value[id]);">{lang replyfloor:post_report}</span>
|
||||
<!--{/if}-->
|
||||
<!--{if ($_G['forum']['ismoderator'] && $_G['group']['allowdelpost']) || ($setconfig['allow_delete'] && $_G['uid'] && $_G['uid'] == $_G['thread']['authorid']) || ($setconfig['self_delete'] && $_G['uid'] && $_G['uid'] == $value['uid'])}-->
|
||||
<span class="replyfloor_content_delbtn" onclick="replyfloor_delete('$post[pid]', $value[id]);">{lang replyfloor:post_delete}</span>
|
||||
<!--{/if}-->
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--{if $setconfig['shownum_mobile'] == $showkey && $setconfig['shownum_mobile'] < $count}-->
|
||||
<!--{if $setconfig['pagemode_mobile']}--><!--{eval break;}--><!--{/if}-->
|
||||
</div>
|
||||
<div id="replyfloor_content_ul_$post[pid]" class="replyfloor_content_ul" style="display:none">
|
||||
<!--{/if}-->
|
||||
<!--{eval $showkey++;}-->
|
||||
<!--{/loop}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<div id="replyfloor_newbox_$post[pid]" class="replyfloor_content_ul"></div>
|
||||
<!--{if $list}-->
|
||||
<div class="replyfloor_content_pager">
|
||||
<!--{if $setconfig['shownum_mobile'] < $setconfig['perpage_mobile'] && $setconfig['shownum_mobile'] < $count}-->
|
||||
<div class="replyfloor_content_more" id="replyfloor_content_more_$post[pid]">
|
||||
<!--{eval $leftshownum = $count - $setconfig['shownum_mobile'];}-->
|
||||
<!--{if $setconfig['pagemode_mobile']}-->
|
||||
<div class="replyfloor_content_hrmore"></div>
|
||||
<div class="replyfloor_content_showmore"><a href="javascript:;" rel="plugin.php?id=replyfloor:index&tid=$post[tid]&pid=$post[pid]&page=2" onclick="replyfloor_collapse(this, '$post[pid]', 1);">{lang replyfloor:collapse_open}</a></div>
|
||||
<!--{else}-->
|
||||
{lang replyfloor:leftshowtip} <a href="javascript:;" onclick="replyfloor_leftshow('$post[pid]');">{lang replyfloor:leftshowview}</a>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{if !$setconfig['pagemode_mobile'] && $multipage}-->
|
||||
<div class="replyfloor_content_pg" id="replyfloor_content_pg_$post[pid]"{if $setconfig['shownum_mobile'] < $setconfig['perpage_mobile'] && $setconfig['shownum_mobile'] < $count} style="display:none;"{/if}>
|
||||
<!--{eval $multipage = str_replace('<div class="pg">', '<div class="replyfloor_content_pgs">', $multipage);}-->
|
||||
$multipage
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{if $setconfig['style_mobile'] != 3 && $setconfig['style_mobile'] != 4 && $setconfig['style_mobile'] != 5}-->
|
||||
<div class="replyfloor_content_btn" id="replyfloor_content_btn_$post[pid]">
|
||||
<a href="javascript:;" onclick="replyfloor_editor('$post[pid]', 0, '');">{lang replyfloor:link_unfold}</a>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{else}-->
|
||||
<div class="replyfloor_content_pager" style="display:none;">
|
||||
<!--{if $setconfig['style_mobile'] != 3 && $setconfig['style_mobile'] != 4 && $setconfig['style_mobile'] != 5}-->
|
||||
<div class="replyfloor_content_btn" id="replyfloor_content_btn_$post[pid]">
|
||||
<a href="javascript:;" onclick="replyfloor_editor('$post[pid]', 0, '');">{lang replyfloor:link_unfold}</a>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{if $setconfig['style_mobile'] != 3 && $setconfig['style_mobile'] != 4 && $setconfig['style_mobile'] != 5}-->
|
||||
<div id="replyfloor_editor_{$post[pid]}"></div>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{if $setconfig['style_mobile'] == 3}-->
|
||||
<div class="replyfloor_fd">
|
||||
<span onclick="replyfloor_editor('$post[pid]', 0, '');" title="{lang replyfloor:post_reply}">{lang replyfloor:post_reply}</span>
|
||||
</div>
|
||||
<!--{elseif $setconfig['style_mobile'] == 4}-->
|
||||
<div class="replyfloor_fd">
|
||||
<span onclick="replyfloor_editor('$post[pid]', 0, '');" title="{lang replyfloor:post_reply}">{lang replyfloor:post_reply}</span>
|
||||
</div>
|
||||
<!--{elseif $setconfig['style_mobile'] == 5}-->
|
||||
<div class="replyfloor_fd">
|
||||
<span onclick="replyfloor_editor('$post[pid]', 0, '');" title="{lang replyfloor:post_reply}">{lang replyfloor:post_reply}</span>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{/block}-->
|
133
source/plugin/replyfloor/template/viewthread.htm
Normal file
@@ -0,0 +1,133 @@
|
||||
<!--{block return}-->
|
||||
<div class="replyfloor_box" id="replyfloor_box_$post[pid]">
|
||||
<!--{if $setconfig['style_pc'] == 1}-->
|
||||
<div class="replyfloor_hd">
|
||||
<span class="replyfloor_link_unfold" id="replyfloor_link_unfold_$post[pid]" onclick="replyfloor_fold('$post[pid]', 1);" title=""{if $list} style="display:none;"{/if}>{lang replyfloor:link_unfold}<span class="replyfloor_count"{if !$count} style="display:none;"{/if}>(<span id="replyfloor_count_$post[pid]">$count</span>)</span></span>
|
||||
<span class="replyfloor_link_fold" id="replyfloor_link_fold_$post[pid]" onclick="replyfloor_fold('$post[pid]', 0);"{if $list} style="display:inline-block;"{/if}>{lang replyfloor:link_fold}</span>
|
||||
</div>
|
||||
<!--{elseif $setconfig['style_pc'] == 2}-->
|
||||
<div class="replyfloor_hd">
|
||||
<!--{if $post['status'] && 0}-->
|
||||
<span class="replyfloor_tail_from"><!--{if $_G['setting']['mobile']['mobilecomefrom']}-->{$_G['setting']['mobile']['mobilecomefrom']}<!--{else}-->{lang from_mobile}<!--{/if}--></span>
|
||||
<!--{/if}-->
|
||||
<span class="replyfloor_tail_floor">
|
||||
<!--{if isset($post[isstick])}-->
|
||||
<img src ="{$_G[siteurl]}source/plugin/replyfloor/static/image/settop.png" title="{lang replyfloor:replystick}" class="vm" /> {lang replyfloor:from} {$post[number]}{$postnostick}
|
||||
<!--{elseif $post[number] == -1}-->
|
||||
{lang replyfloor:recommend}
|
||||
<!--{else}-->
|
||||
<!--{if !empty($postno[$post[number]])}-->
|
||||
$postno[$post[number]]
|
||||
<!--{else}-->
|
||||
<em>{$post[number]}</em>{$postno[0]}
|
||||
<!--{/if}-->
|
||||
<!--{/if}-->
|
||||
</span>
|
||||
<span class="replyfloor_tail_time">$post[dateline]</span>
|
||||
<span class="replyfloor_link_unfold" id="replyfloor_link_unfold_$post[pid]" onclick="replyfloor_fold('$post[pid]', 1);" title=""{if $list} style="display:none;"{/if}>{lang replyfloor:post_reply}<span class="replyfloor_count"{if !$count} style="display:none;"{/if}>(<span id="replyfloor_count_$post[pid]">$count</span>)</span></span>
|
||||
<span class="replyfloor_link_fold" id="replyfloor_link_fold_$post[pid]" onclick="replyfloor_fold('$post[pid]', 0);"{if $list} style="display:inline-block;"{/if}>{lang replyfloor:link_fold}</span>
|
||||
</div>
|
||||
<!--{elseif $setconfig['style_pc'] == 3}-->
|
||||
<div class="replyfloor_hd">
|
||||
<span onclick="replyfloor_editor('$post[pid]', 0, '');" title="{lang replyfloor:post_reply}">{lang replyfloor:post_reply}</span>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<div class="replyfloor_bd" id="replyfloor_bd_$post[pid]"{if $list} style="display:block;"{/if}>
|
||||
<div class="replyfloor_content" id="replyfloor_content_$post[pid]">
|
||||
<!--{if $list}-->
|
||||
<!--{eval $showkey = 1;}-->
|
||||
<div class="replyfloor_content_ul">
|
||||
<!--{loop $list $value}-->
|
||||
<div class="replyfloor_content_li" id="replyfloor_content_li_$value[id]">
|
||||
<!--{eval $avatarimg = avatar($value['uid'], 'small');}-->
|
||||
<div class="replyfloor_content_avatar"><a href="home.php?mod=space&uid=$value[uid]" c="1">$avatarimg</a></div>
|
||||
<div class="replyfloor_content_cnt">
|
||||
<div class="replyfloor_content_head">
|
||||
<div class="replyfloor_content_head_z">
|
||||
<span class="replyfloor_content_user"><a href="home.php?mod=space&uid=$value[uid]" c="1"{if $value['groupcolor']} style="color: $value[groupcolor]"{/if}>$value[username]</a><!--{if $value['ruid']}--><span class="replyfloor_content_toreply">{lang replyfloor:post_reply}</span><a href="home.php?mod=space&uid=$value[ruid]" c="1"{if $value['rgroupcolor']} style="color: $value[rgroupcolor]"{/if}>$value[rusername]</a><!--{/if}--></span>
|
||||
<!--{if $value[status] == -1}--><span class="replyfloor_content_moderating">{lang replyfloor:moderating}</span><!--{/if}-->
|
||||
<span class="replyfloor_content_time">$value['createtime']</span>
|
||||
<!--{if $value[location]}--><span class="replyfloor_content_location">{lang replyfloor:location}{$value[location]}</span><!--{/if}-->
|
||||
<!--{if $value['mobile'] && $setconfig['mobile_comefrom']}-->
|
||||
<span class="replyfloor_content_from">{$setconfig['mobile_comefrom']}</span>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<div class="replyfloor_content_head_y">
|
||||
<span class="replyfloor_content_rpbtn" onclick="replyfloor_editor('$post[pid]', $value[id], '{lang replyfloor:post_reply} $value[username] :');">{lang replyfloor:post_reply}</span>
|
||||
<!--{if $setconfig['open_report'] && $_G['uid'] != $value['uid']}-->
|
||||
<span class="replyfloor_content_reportbtn" onclick="replyfloor_report('$post[pid]', $value[id]);">{lang replyfloor:post_report}</span>
|
||||
<!--{/if}-->
|
||||
<!--{if ($_G['forum']['ismoderator'] && $_G['group']['allowdelpost']) || ($setconfig['allow_delete'] && $_G['uid'] && $_G['uid'] == $_G['thread']['authorid']) || ($setconfig['self_delete'] && $_G['uid'] && $_G['uid'] == $value['uid'])}-->
|
||||
<span class="replyfloor_content_delbtn" onclick="replyfloor_delete('$post[pid]', $value[id]);">{lang replyfloor:post_delete}</span>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="replyfloor_content_main">
|
||||
<!--{if getstatus($_G['forum_thread']['status'], 2) && $value['uid'] != $_G['uid'] && $post['authorid'] != $_G['uid'] && $_G['thread']['authorid'] != $_G['uid'] && !$_G['forum']['ismoderator']}-->
|
||||
<div class="replyfloor_content_locked">{lang replyfloor:message_ishidden_hiddenreplies}</div>
|
||||
<!--{else}-->
|
||||
<div class="replyfloor_content_text">$value[message]</div>
|
||||
<!--{if $value['attachment']}-->
|
||||
<!--{eval $attachlist = explode("\t", $value['attachment']);}-->
|
||||
<!--{eval $attachcount = count($attachlist);}-->
|
||||
<div class="replyfloor_content_image replyfloor_content_image{$attachcount}">
|
||||
<!--{loop $attachlist $attach}-->
|
||||
<div class="replyfloor_content_image_li"><img onclick="zoom(this, this.src)" class="zoom" src="$attach" border="0" alt="" style="margin:0" /></div>
|
||||
<!--{/loop}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--{if $setconfig['shownum_pc'] == $showkey && $setconfig['shownum_pc'] < $count}-->
|
||||
<!--{if $setconfig['pagemode_pc']}--><!--{eval break;}--><!--{/if}-->
|
||||
</div>
|
||||
<div class="replyfloor_content_ul" style="display:none" id="replyfloor_content_ul_$post[pid]">
|
||||
<!--{/if}-->
|
||||
<!--{eval $showkey++;}-->
|
||||
<!--{/loop}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<div id="replyfloor_newbox_$post[pid]" class="replyfloor_content_ul"></div>
|
||||
<!--{if $list}-->
|
||||
<div class="replyfloor_content_pager">
|
||||
<!--{if $setconfig['shownum_pc'] < $setconfig['perpage_pc'] && $setconfig['shownum_pc'] < $count}-->
|
||||
<div class="replyfloor_content_more" id="replyfloor_content_more_$post[pid]">
|
||||
<!--{eval $leftshownum = $count - $setconfig['shownum_pc'];}-->
|
||||
<!--{if $setconfig['pagemode_pc']}-->
|
||||
<div class="replyfloor_content_hrmore"></div>
|
||||
<div class="replyfloor_content_showmore"><a href="javascript:;" rel="plugin.php?id=replyfloor:index&tid=$post[tid]&pid=$post[pid]&page=2" onclick="replyfloor_collapse(this, '$post[pid]', 1);">{lang replyfloor:collapse_open}</a></div>
|
||||
<!--{else}-->
|
||||
{lang replyfloor:leftshowtip} <a href="javascript:;" onclick="replyfloor_leftshow('$post[pid]');">{lang replyfloor:leftshowview}</a>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
<!--{if !$setconfig['pagemode_pc'] && $multipage}-->
|
||||
<div class="replyfloor_content_pg" id="replyfloor_content_pg_$post[pid]"{if $setconfig['shownum_pc'] < $setconfig['perpage_pc'] && $setconfig['shownum_pc'] < $count} style="display:none;"{/if}>
|
||||
$multipage
|
||||
</div>
|
||||
<script type="text/javascript">ajaxupdateevents($("replyfloor_content_$post[pid]"));</script>
|
||||
<!--{/if}-->
|
||||
<!--{if $setconfig['style_pc'] != 3}-->
|
||||
<div class="replyfloor_content_btn" id="replyfloor_content_btn_$post[pid]">
|
||||
<a href="javascript:;" onclick="replyfloor_editor('$post[pid]', 0, '');">{lang replyfloor:link_unfold}</a>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{else}-->
|
||||
<div class="replyfloor_content_pager" style="display:none;">
|
||||
<!--{if $setconfig['style_pc'] != 3}-->
|
||||
<div class="replyfloor_content_btn" id="replyfloor_content_btn_$post[pid]">
|
||||
<a href="javascript:;" onclick="replyfloor_editor('$post[pid]', 0, '');">{lang replyfloor:link_unfold}</a>
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
<!--{if $setconfig['style_pc'] != 3}-->
|
||||
<div id="replyfloor_editor_{$post[pid]}"></div>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
</div>
|
||||
<!--{/block}-->
|
60
source/plugin/replyfloor/uninstall.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This is NOT a freeware, use is subject to license terms
|
||||
* Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>¥<EFBFBD><C2A5>¥<EFBFBD>ظ<EFBFBD> 9.0
|
||||
* <20><><EFBFBD>ص<EFBFBD>ַ: https://addon.dismall.com/plugins/replyfloor.html
|
||||
* Ӧ<>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QQ: 594433766
|
||||
* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 202505310549
|
||||
* <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: www.shitangsweet.com
|
||||
* <20><>Ȩ<EFBFBD><C8A8>: 2025053105b89RrI3R9n
|
||||
* δ<><CEB4>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><F2BFAAB7><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ý<EFBFBD><C3BD>з<EFBFBD><D0B7>̡<F2B9A4B3><CCA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ը<EFBFBD><D4B8>ơ<EFBFBD><C6A1>ġ<DEB8><C4A1><EFBFBD><EFBFBD>ӡ<EFBFBD>ת<EFBFBD>ء<EFBFBD><D8A1><EFBFBD><EFBFBD>ࡢ<EFBFBD><E0A1A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>桢<EFBFBD><E6A1A2>չ<EFBFBD><D5B9>֮<EFBFBD>йص<D0B9><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ʒ<EFBFBD><C6B7>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* $author: <20><><EFBFBD><EFBFBD> $
|
||||
*/
|
||||
|
||||
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
delDirAndFile(getglobal('setting/attachdir').'./replyfloor');
|
||||
|
||||
$sql = <<<EOF
|
||||
DROP TABLE IF EXISTS `cdb_plugin_replyfloor_message`;
|
||||
DROP TABLE IF EXISTS `cdb_plugin_replyfloor_attachment`;
|
||||
DROP TABLE IF EXISTS `cdb_plugin_replyfloor_attachment_unused`;
|
||||
EOF;
|
||||
|
||||
runquery($sql);
|
||||
|
||||
$finish = TRUE;
|
||||
|
||||
function delDirAndFile($path, $delDir = true) {
|
||||
if (is_array($path)) {
|
||||
foreach ($path as $subPath)
|
||||
delDirAndFile($subPath, $delDir);
|
||||
}
|
||||
if (is_dir($path)) {
|
||||
$handle = opendir($path);
|
||||
if ($handle) {
|
||||
while (false !== ( $item = readdir($handle) )) {
|
||||
if ($item != "." && $item != "..")
|
||||
is_dir("$path/$item") ? delDirAndFile("$path/$item", $delDir) : unlink("$path/$item");
|
||||
}
|
||||
closedir($handle);
|
||||
if ($delDir)
|
||||
return rmdir($path);
|
||||
}
|
||||
} else {
|
||||
if (file_exists($path)) {
|
||||
return unlink($path);
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
clearstatcache();
|
||||
}
|