當前位置: 首頁>>代碼示例>>PHP>>正文


PHP magicthreadmod函數代碼示例

本文整理匯總了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;未經允許,請勿轉載。