require_once libfile('function/post'); // /source/function/function_post.php
require_once libfile('post/newthread', 'include'); // insert 数据 , /source/include/post/post_newthread.php
$modthread = C::m('forum_thread'); // /source/class/model/model_forum_thread.php
C::t('forum_post')->insert($tableid, $data); // /source/class/table/table_forum_post.php
include template('diy:forum/viewthread:36260'); // 板块通用 ./data/diy/template/default/forum/viewthread.htm ;指定帖子(tid=36260)./data/diy/template/default/forum/viewthread_36260.htm ;默认模板 ./template/default/forum/viewthread.htm
include template('plugin1:module1/action1:36260'); //./source/plugin/plugin1/template/module1/action1.htm
include template('forum/viewthread_node'); // ./template/default/forum/viewthread_node.htm
class Helper{
function sizecount($size) {
if($size >= 1073741824) {
$size = round($size / 1073741824 * 100) / 100 . ' GB';
} elseif($size >= 1048576) {
$size = round($size / 1048576 * 100) / 100 . ' MB';
} elseif($size >= 1024) {
$size = round($size / 1024 * 100) / 100 . ' KB';
} else {
$size = intval($size) . ' Bytes';
}
return $size;
}
}