本文整理汇总了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');
}
示例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>';
}
示例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');
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}