• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP magicthreadmod函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中magicthreadmod函数的典型用法代码示例。如果您正苦于以下问题:PHP magicthreadmod函数的具体用法?PHP magicthreadmod怎么用?PHP magicthreadmod使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了magicthreadmod函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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/open', 'open_info_nonexistence'));
     }
     $thread = getpostinfo($_G['gp_tid'], 'tid', array('fid', 'authorid', 'subject'));
     $this->_check($thread);
     magicthreadmod($_G['gp_tid']);
     DB::query("UPDATE " . DB::table('forum_thread') . " SET closed='0', 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'], 'OPN');
     if ($thread['authorid'] != $_G['uid']) {
         notification_add($thread['authorid'], 'magic', lang('magic/open', 'open_notification'), array('tid' => $_G['gp_tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
     }
     showmessage(lang('magic/open', 'open_succeed'), dreferer(), array(), array('showdialog' => 1, 'locationtime' => true));
 }
开发者ID:pan289091315,项目名称:Discuz,代码行数:18,代码来源:magic_open.php


示例3: usesubmit

 function usesubmit()
 {
     global $_G;
     if (empty($_GET['tid'])) {
         showmessage(lang('magic/open', 'open_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' => 0, 'moderated' => 1));
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', 0, 'tid', $_GET['tid']);
     updatemagicthreadlog($_GET['tid'], $this->magic['magicid'], 'OPN');
     if ($thread['authorid'] != $_G['uid']) {
         notification_add($thread['authorid'], 'magic', lang('magic/open', 'open_notification'), array('tid' => $_GET['tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
     }
     showmessage(lang('magic/open', 'open_succeed'), dreferer(), array(), array('alert' => 'right', 'showdialog' => 1, 'locationtime' => true));
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:18,代码来源:magic_open.php


示例4: 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


示例5: 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


示例6: usesubmit

 function usesubmit()
 {
     global $_G;
     if (empty($_GET['tid'])) {
         showmessage(lang('magic/jack', 'jack_info_nonexistence'));
     }
     $thread = getpostinfo($_GET['tid'], 'tid', array('fid', 'authorid', 'subject', 'lastpost'));
     $this->_check($thread['fid']);
     magicthreadmod($_GET['tid']);
     $this->parameters['expiration'] = $this->parameters['expiration'] ? intval($this->parameters['expiration']) : 1;
     $magicnum = intval($_GET['magicnum']);
     if (empty($magicnum) || $magicnum > $this->magic['num']) {
         showmessage(lang('magic/jack', 'jack_num_not_enough'));
     }
     $expiration = ($thread['lastpost'] > TIMESTAMP ? $thread['lastpost'] : TIMESTAMP) + $this->parameters['expiration'] * $magicnum * 3600;
     C::t('forum_thread')->update($_GET['tid'], array('lastpost' => $expiration));
     usemagic($this->magic['magicid'], $this->magic['num'], $magicnum);
     updatemagiclog($this->magic['magicid'], '2', $magicnum, '0', 0, 'tid', $_GET['tid']);
     if ($thread['authorid'] != $_G['uid']) {
         notification_add($thread['authorid'], 'magic', lang('magic/jack', 'jack_notification'), array('tid' => $_GET['tid'], 'subject' => $thread['subject'], 'magicname' => $this->magic['name']));
     }
     showmessage(lang('magic/jack', 'jack_succeed'), dreferer(), array(), array('alert' => 'right', 'showdialog' => 1, 'locationtime' => true));
 }
开发者ID:dalinhuang,项目名称:healthshop,代码行数:23,代码来源:magic_jack.php


示例7: exit

/*
	[Discuz!] (C)2001-2009 Comsenz Inc.
	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');
开发者ID:lilhorse,项目名称:cocoa,代码行数:31,代码来源:magic_top.inc.php



注:本文中的magicthreadmod函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP magpie_error函数代码示例发布时间:2022-05-15
下一篇:
PHP magicshowtype函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap