本文整理汇总了PHP中updatemagicthreadlog函数的典型用法代码示例。如果您正苦于以下问题:PHP updatemagicthreadlog函数的具体用法?PHP updatemagicthreadlog怎么用?PHP updatemagicthreadlog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了updatemagicthreadlog函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: usesubmit
function usesubmit()
{
global $_G;
$idtype = !empty($_GET['idtype']) ? $_GET['idtype'] : '';
if (!in_array($idtype, $this->idtypearray)) {
showmessage(lang('magic/highlight', 'highlight_info_notype'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => true));
}
if (empty($_GET['id'])) {
showmessage(lang('magic/highlight', 'highlight_info_nonexistence_' . $idtype));
}
if ($idtype == 'tid') {
$info = getpostinfo($_GET['id'], $idtype, array('fid', 'authorid', 'subject'));
$this->_check($info['fid']);
magicthreadmod($_GET['id']);
C::t('forum_thread')->update($_GET['id'], array('highlight' => $_GET['highlight_color'], 'moderated' => 1));
$this->parameters['expiration'] = $this->parameters['expiration'] ? intval($this->parameters['expiration']) : 24;
$expiration = TIMESTAMP + $this->parameters['expiration'] * 3600;
updatemagicthreadlog($_GET['id'], $this->magic['magicid'], $expiration > 0 ? 'EHL' : 'HLT', $expiration);
if ($info['authorid'] != $_G['uid']) {
notification_add($info['authorid'], 'magic', lang('magic/highlight', 'highlight_notification'), array('tid' => $_GET['id'], 'subject' => $info['subject'], 'magicname' => $this->magic['name']));
}
} elseif ($idtype == 'blogid') {
$info = getpostinfo($_GET['id'], $idtype, array('uid', 'subject'));
C::t('home_blogfield')->update($_GET['id'], array('magiccolor' => $_GET['highlight_color']));
if ($info['uid'] != $_G['uid']) {
notification_add($info['uid'], 'magic', lang('magic/highlight', 'highlight_notification_blogid'), array('blogid' => $_GET['id'], 'subject' => $info['subject'], 'magicname' => $this->magic['name']));
}
}
usemagic($this->magic['magicid'], $this->magic['num']);
updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, $idtype, $_GET['id']);
showmessage(lang('magic/highlight', 'highlight_succeed_' . $idtype), dreferer(), array(), array('alert' => 'right', 'showdialog' => 1, 'locationtime' => true));
}
开发者ID:tang86,项目名称:discuz-utf8,代码行数:32,代码来源:magic_highlight.php
示例2: usesubmit
function usesubmit()
{
global $_G;
if (empty($_G['gp_tid'])) {
showmessage(lang('magic/sofa', 'sofa_info_nonexistence'));
}
$thread = getpostinfo($_G['gp_tid'], 'tid', array('fid', 'authorid', 'dateline', 'subject'));
$this->_check($thread);
$firstsofa = DB::result_first("SELECT COUNT(*) FROM " . DB::table('forum_threadmod') . " WHERE magicid='" . $this->magic['magicid'] . "' AND tid='{$_G['gp_tid']}'");
if ($firstsofa >= 1) {
showmessage(lang('magic/sofa', 'sofa_info_sofaexistence'), '', array(), array('login' => 1));
}
$sofamessage = lang('magic/sofa', 'sofa_text', array('actor' => $_G['member']['username'], 'time' => dgmdate(TIMESTAMP), 'magicname' => $this->magic['name']));
$dateline = $thread['dateline'] + 1;
insertpost(array('fid' => $thread['fid'], 'tid' => $_G['gp_tid'], 'first' => '0', 'author' => $_G['username'], 'authorid' => $_G['uid'], 'dateline' => $dateline, 'message' => $sofamessage, 'useip' => $_G['clientip'], 'usesig' => '1'));
DB::query("UPDATE " . DB::table('forum_thread') . " SET replies=replies+1, moderated='1' WHERE tid='{$_G['tid']}'", 'UNBUFFERED');
DB::query("UPDATE " . DB::table('forum_forum') . " SET posts=posts+1, todayposts=todayposts+1 WHERE fid='{$post['fid']}'", 'UNBUFFERED');
usemagic($this->magic['magicid'], $this->magic['num']);
updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['gp_tid']);
updatemagicthreadlog($_G['gp_tid'], $this->magic['magicid']);
if ($thread['authorid'] != $_G['uid']) {
notification_add($thread['authorid'], 'magic', lang('magic/sofa', 'sofa_notification'), array('tid' => $_G['gp_tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
}
showmessage(lang('magic/sofa', 'sofa_succeed'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => 1));
}
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:25,代码来源:magic_sofa.php
示例3: usesubmit
function usesubmit()
{
global $_G;
if (empty($_GET['tid'])) {
showmessage(lang('magic/bump', 'bump_info_nonexistence'));
}
$thread = getpostinfo($_GET['tid'], 'tid', array('fid', 'authorid', 'subject'));
$this->_check($thread['fid']);
C::t('forum_thread')->update($_GET['tid'], array('moderated' => 1, 'lastpost' => TIMESTAMP));
usemagic($this->magic['magicid'], $this->magic['num']);
updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_GET['tid']);
updatemagicthreadlog($_GET['tid'], $this->magic['magicid'], 'BMP');
if ($thread['authorid'] != $_G['uid']) {
notification_add($thread['authorid'], 'magic', lang('magic/bump', 'bump_notification'), array('tid' => $_GET['tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
}
showmessage(lang('magic/bump', 'bump_succeed'), dreferer(), array(), array('alert' => 'right', 'showdialog' => 1, 'locationtime' => true));
}
开发者ID:tang86,项目名称:discuz-utf8,代码行数:17,代码来源:magic_bump.php
示例4: usesubmit
function usesubmit()
{
global $_G;
if (empty($_G['gp_tid'])) {
showmessage(lang('magic/bump', 'bump_info_nonexistence'));
}
$thread = getpostinfo($_G['gp_tid'], 'tid', array('fid', 'authorid', 'subject'));
$this->_check($thread['fid']);
DB::query("UPDATE " . DB::table('forum_thread') . " SET lastpost='" . TIMESTAMP . "', moderated='1' WHERE tid='{$_G['gp_tid']}'");
usemagic($this->magic['magicid'], $this->magic['num']);
updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['gp_tid']);
updatemagicthreadlog($_G['gp_tid'], $this->magic['magicid'], 'BMP');
if ($thread['authorid'] != $_G['uid']) {
notification_add($thread['authorid'], 'magic', lang('magic/bump', 'bump_notification'), array('tid' => $_G['gp_tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
}
showmessage(lang('magic/bump', 'bump_succeed'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => true));
}
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:17,代码来源:magic_bump.php
示例5: usesubmit
function usesubmit()
{
global $_G;
if (empty($_GET['tid'])) {
showmessage(lang('magic/close', 'close_info_nonexistence'));
}
$thread = getpostinfo($_GET['tid'], 'tid', array('fid', 'authorid', 'subject'));
$this->_check($thread);
magicthreadmod($_GET['tid']);
C::t('forum_thread')->update($_GET['tid'], array('closed' => 1, 'moderated' => 1));
$this->parameters['expiration'] = $this->parameters['expiration'] ? intval($this->parameters['expiration']) : 24;
$expiration = TIMESTAMP + $this->parameters['expiration'] * 3600;
usemagic($this->magic['magicid'], $this->magic['num']);
updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_GET['tid']);
updatemagicthreadlog($_GET['tid'], $this->magic['magicid'], $expiration > 0 ? 'ECL' : 'CLS', $expiration);
if ($thread['authorid'] != $_G['uid']) {
notification_add($thread['authorid'], 'magic', lang('magic/close', 'close_notification'), array('tid' => $_GET['tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
}
showmessage(lang('magic/close', 'close_succeed'), dreferer(), array(), array('alert' => 'right', 'showdialog' => 1, 'locationtime' => true));
}
开发者ID:softhui,项目名称:discuz,代码行数:20,代码来源:magic_close.php
示例6: usesubmit
function usesubmit()
{
global $_G;
if (empty($_G['gp_tid'])) {
showmessage(lang('magic/highlight', 'highlight_info_nonexistence'));
}
$thread = getpostinfo($_G['gp_tid'], 'tid', array('fid', 'authorid', 'subject'));
$this->_check($thread['fid']);
magicthreadmod($_G['gp_tid']);
DB::query("UPDATE " . DB::table('forum_thread') . " SET highlight='{$_G['gp_highlight_color']}', moderated='1' WHERE tid='{$_G['gp_tid']}'");
$this->parameters['expiration'] = $this->parameters['expiration'] ? intval($this->parameters['expiration']) : 24;
$expiration = TIMESTAMP + $this->parameters['expiration'] * 3600;
usemagic($this->magic['magicid'], $this->magic['num']);
updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_G['gp_tid']);
updatemagicthreadlog($_G['gp_tid'], $this->magic['magicid'], 'HLT', $expiration);
if ($thread['authorid'] != $_G['uid']) {
notification_add($thread['authorid'], 'magic', lang('magic/stick', 'highlight_notification'), array('tid' => $_G['gp_tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
}
showmessage(lang('magic/highlight', 'highlight_succeed'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => 1));
}
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:20,代码来源:magic_highlight.php
示例7: showmessage
if (!substr(sprintf('%04b', $forum['allowpostspecial']), -$thread['special'], 1)) {
showmessage('admin_move_nopermission');
}
}
$query = $db->query("SELECT postperm FROM {$tablepre}forumfields WHERE fid='{$moveto}'");
if ($forum = $db->fetch_array($query)) {
if (!$forum['postperm'] && !$allowpost) {
showmessage('group_nopermission');
} elseif ($forum['postperm'] && !forumperm($forum['postperm'])) {
showmessage('post_forum_newthread_nopermission');
}
}
$db->query("UPDATE {$tablepre}threads SET fid='{$moveto}', moderated='1' WHERE tid='{$tid}'");
$db->query("UPDATE {$tablepre}posts SET fid='{$moveto}' WHERE tid='{$tid}'");
require_once DISCUZ_ROOT . './include/post.func.php';
updateforumcount($moveto);
updateforumcount($thread['fid']);
usemagic($magicid, $magic['num']);
updatemagiclog($magicid, '2', '1', '0', $tid);
updatemagicthreadlog($tid, $magicid, $magic['identifier']);
showmessage('magics_operation_succeed', '', 1);
}
function showmagic()
{
global $tid, $lang;
require_once DISCUZ_ROOT . './include/forum.func.php';
magicshowtype($lang['option'], 'top');
magicshowsetting($lang['target_tid'], 'tid', $tid, 'text');
magicshowsetting($lang['MVK_target'], '', '', '<select name="moveto">' . forumselect() . '</select>');
magicshowtype('', 'bottom');
}
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:31,代码来源:magic_move.inc.php
示例8: showmessage
}
if (submitcheck('usesubmit')) {
if (empty($pid)) {
showmessage('magics_info_nonexistence');
}
$post = getpostinfo($pid, 'pid', array('p.tid', 'p.fid', 'p.author', 'p.authorid', 'first', 'p.dateline', 'anonymous'));
checkmagicperm($magicperm['forum'], $post['fid']);
if ($post['authorid'] != $discuz_uid) {
showmessage('magics_operation_nopermission');
}
$thread = getpostinfo($post['tid'], 'tid', array('tid', 'subject', 'author', 'replies', 'lastposter'));
if ($post['first']) {
$author = '';
$lastposter = $thread['replies'] > 0 ? $thread['lastposter'] : '';
$db->query("UPDATE {$tablepre}posts SET anonymous='1' WHERE tid='{$post['tid']}' AND first='1'");
updatemagicthreadlog($post['tid'], $magicid, $magic['identifier'], '0', '1');
} else {
$author = $thread['author'];
$lastposter = '';
$db->query("UPDATE {$tablepre}posts SET anonymous='1' WHERE pid='{$pid}'");
}
$query = $db->query("SELECT lastpost FROM {$tablepre}forums WHERE fid='{$post['fid']}'");
$forum['lastpost'] = explode("\t", $db->result($query, 0));
if ($post['dateline'] == $forum['lastpost'][2] && ($post['author'] == $forum['lastpost'][3] || $forum['lastpost'][3] == '' && $post['anonymous'])) {
$lastpost = "{$thread['tid']}\t{$thread['subject']}\t{$timestamp}\t{$lastposter}";
$db->query("UPDATE {$tablepre}forums SET lastpost='{$lastpost}' WHERE fid='{$post['fid']}'", 'UNBUFFERED');
}
$db->query("UPDATE {$tablepre}threads SET author='{$author}', lastposter='{$lastposter}', moderated='1' WHERE tid='{$post['tid']}'");
usemagic($magicid, $magic['num']);
updatemagiclog($magicid, '2', '1', '0', '0', $pid);
showmessage('magics_operation_succeed', 'magic.php?action=user');
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:magic_hidden.inc.php
示例9: exit
This is NOT a freeware, use is subject to license terms
$Id: magic_top.inc.php 19412 2009-08-29 01:48:51Z monkey $
*/
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
}
if (submitcheck('usesubmit')) {
if (empty($tid)) {
showmessage('magics_info_nonexistence');
}
$post = getpostinfo($tid, 'tid', array('fid'));
checkmagicperm($magicperm['forum'], $post['fid']);
magicthreadmod($tid);
$db->query("UPDATE {$tablepre}threads SET displayorder='1', moderated='1' WHERE tid='{$tid}'");
$expiration = $timestamp + 86400;
usemagic($magicid, $magic['num']);
updatemagiclog($magicid, '2', '1', '0', $tid);
updatemagicthreadlog($tid, $magicid, $magic['identifier'], $expiration);
if ($thread['authorid'] != $discuz_uid) {
sendnotice($thread['authorid'], 'magic_thread', 'systempm');
}
showmessage('magics_operation_succeed', '', 1);
}
function showmagic()
{
global $tid, $lang;
magicshowtype($lang['option'], 'top');
magicshowsetting($lang['target_tid'], 'tid', $tid, 'text');
magicshowtype('', 'bottom');
}
开发者ID:lilhorse,项目名称:cocoa,代码行数:31,代码来源:magic_top.inc.php
注:本文中的updatemagicthreadlog函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论