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


PHP magic_check_idtype函數代碼示例

本文整理匯總了PHP中magic_check_idtype函數的典型用法代碼示例。如果您正苦於以下問題:PHP magic_check_idtype函數的具體用法?PHP magic_check_idtype怎麽用?PHP magic_check_idtype使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了magic_check_idtype函數的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: show

 function show()
 {
     $id = intval($_GET['id']);
     $idtype = $_GET['idtype'];
     magic_check_idtype($id, $idtype);
     magicshowtips(lang('magic/call', 'call_info'));
     $op = 'use';
     include template('home/magic_call');
 }
開發者ID:MCHacker,項目名稱:discuz-docker,代碼行數:9,代碼來源:magic_call.php

示例2: show

 function show()
 {
     global $_G;
     $id = intval($_GET['id']);
     $idtype = $_GET['idtype'];
     magic_check_idtype($id, $idtype);
     magicshowtips(lang('magic/updateline', 'updateline_info'));
     echo '<p><input type="hidden" name="id" value="' . $id . '" /><input type="hidden" name="idtype" value="' . $idtype . '" /></p>';
 }
開發者ID:tang86,項目名稱:discuz-utf8,代碼行數:9,代碼來源:magic_updateline.php

示例3: show

 function show()
 {
     $id = intval($_GET['id']);
     $idtype = $_GET['idtype'];
     $blog = magic_check_idtype($id, $idtype);
     magicshowtips(lang('magic/downdateline', 'downdateline_info'));
     $time = dgmdate($blog['dateline'], 'Y-m-d H:i');
     $op = 'use';
     include template('home/magic_downdateline');
 }
開發者ID:softhui,項目名稱:discuz,代碼行數:10,代碼來源:magic_downdateline.php

示例4: show

    function show()
    {
        global $_G;
        $id = intval($_GET['id']);
        $idtype = $_GET['idtype'];
        $blog = magic_check_idtype($id, $idtype);
        if (DB::result(DB::query('SELECT COUNT(*) FROM ' . DB::table('common_magiclog') . " WHERE action='2' AND uid = '{$_G['uid']}' AND targetid = '{$id}' AND idtype = '{$idtype}' AND magicid = '{$this->magic[magicid]}'"), 0)) {
            showmessage("magicuse_object_once_limit");
        }
        $num = !empty($_G['setting']['feedhotmin']) ? intval($_G['setting']['feedhotmin']) : 3;
        magicshowtips(lang('magic/hot', 'hot_info', array('num' => $num)));
        echo <<<HTML
<p>
\t<input type="hidden" name="id" value="'.{$id}.'" />
\t<input type="hidden" name="idtype" value="'.{$idtype}.'" />
</p>
HTML;
    }
開發者ID:Kingson4Wu,項目名稱:php_demo,代碼行數:18,代碼來源:magic_hot.php

示例5: show

    function show()
    {
        global $_G;
        $id = intval($_GET['id']);
        $idtype = $_GET['idtype'];
        $blog = magic_check_idtype($id, $idtype);
        if (C::t('common_magiclog')->count_by_action_uid_targetid_idtype_magicid(2, $_G['uid'], $id, $idtype, $this->magic['magicid'])) {
            showmessage('magicuse_object_once_limit');
        }
        $num = !empty($_G['setting']['feedhotmin']) ? intval($_G['setting']['feedhotmin']) : 3;
        magicshowtips(lang('magic/hot', 'hot_info', array('num' => $num)));
        echo <<<HTML
<p>
\t<input type="hidden" name="id" value="'.{$id}.'" />
\t<input type="hidden" name="idtype" value="'.{$idtype}.'" />
</p>
HTML;
    }
開發者ID:MCHacker,項目名稱:discuz-docker,代碼行數:18,代碼來源:magic_hot.php

示例6: exit

<?php

if (!defined('iBUAA')) {
    exit('Access Denied');
}
//idtype到含有magiccolor字段的表映射
$mapping = array('blogid' => 'blogfield', 'tid' => 'thread');
if (!isset($mapping[$idtype])) {
    showmessage('magicuse_bad_object');
}
magic_check_idtype($id, $idtype);
//彩色燈
if (submitcheck("usesubmit")) {
    //顏色代號
    $tablename = $mapping[$idtype];
    $_POST['color'] = intval($_POST['color']);
    updatetable($tablename, array('magiccolor' => $_POST['color']), array($idtype => $id, 'uid' => $_SGLOBAL['supe_uid']));
    //feed也加上顏色
    $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('feed') . " WHERE id='{$id}' AND idtype='{$idtype}' AND uid='{$_SGLOBAL['supe_uid']}'");
    $feed = $_SGLOBAL['db']->fetch_array($query);
    if ($feed) {
        $feed['body_data'] = unserialize($feed['body_data']);
        $feed['body_data'] = is_array($feed['body_data']) ? $feed['body_data'] : array();
        $feed['body_data']['magic_color'] = $_POST['color'];
        $feed['body_data'] = serialize($feed['body_data']);
        updatetable('feed', array('body_data' => $feed['body_data']), array('feedid' => $feed['feedid']));
    }
    magic_use($mid, array('id' => $id, 'idtype' => $idtype), true);
    showmessage('magicuse_success', $_POST['refer'], 0);
}
開發者ID:shiyake,項目名稱:php-ihome,代碼行數:30,代碼來源:magic_color.php

示例7: exit

<?php

if (!defined('iBUAA')) {
    exit('Access Denied');
}
$idtype = 'tid';
$thread = magic_check_idtype($id, $idtype);
if ($thread['magicegg'] >= 8) {
    showmessage('magicuse_object_count_limit', '', '', array(8));
    //此道具對同一目標最多使用 \\1 次
}
//彩虹蛋
if (submitcheck('usesubmit')) {
    $_SGLOBAL['db']->query('UPDATE ' . tname('thread') . " SET magicegg = magicegg + 1 WHERE tid = '{$id}' AND uid = '{$_SGLOBAL['supe_uid']}'");
    magic_use($mid, array('id' => $id, 'idtype' => $idtype), true);
    showmessage('magicuse_success', $_POST['refer'], 0);
}
開發者ID:shiyake,項目名稱:php-ihome,代碼行數:17,代碼來源:magic_icon.php


注:本文中的magic_check_idtype函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。