本文整理汇总了PHP中checkIsManageLock函数的典型用法代码示例。如果您正苦于以下问题:PHP checkIsManageLock函数的具体用法?PHP checkIsManageLock怎么用?PHP checkIsManageLock使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了checkIsManageLock函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
<?php
$share_id = intval($_FANWE['request']['id']);
if ($share_id == 0) {
exit;
}
if (!checkAuthority('share', 'edit')) {
exit;
}
$share = FS("Share")->getShareById($share_id);
if (empty($share)) {
deleteManageLock('share', $share_id);
exit;
}
$manage_lock = checkIsManageLock('share', $share_id);
if ($manage_lock === false) {
createManageLock('share', $share_id);
} else {
exit;
}
$share['share_tags'] = FDB::resultFirst("select group_concat(tag_name SEPARATOR ' ') from " . FDB::table("share_tags") . " where share_id = " . $share['share_id']);
$share_category = FDB::fetchAll("select c.cate_id,c.cate_name from " . FDB::table("share_category") . " as sc left join " . FDB::table("goods_category") . " as c on sc.cate_id = c.cate_id where sc.share_id = " . $share['share_id']);
$fanwe->cache->loadCache("goods_category");
include template('manage/share/edit');
display();
示例2: array
<?php
$result = array('status' => 1, 'msg' => '');
$id = intval($_FANWE['request']['id']);
if ($id == 0) {
$result['status'] = 0;
outputJson($result);
}
if (!checkAuthority('album', 'best')) {
$result['status'] = 0;
outputJson($result);
}
$manage_lock = checkIsManageLock('album', $id);
if ($manage_lock !== false) {
$result['status'] = 1;
$result['msg'] = $manage_lock['user_name'] . ',' . sprintf(lang('manage', 'manage_lock'), fToDate($manage_lock['time']));
outputJson($result);
}
$album = FS('Album')->getAlbumById($id, false);
if (empty($album)) {
$result['status'] = 0;
outputJson($result);
}
$result['status'] = 1;
if ($album['is_best'] == 0) {
$result['msg'] = lang('manage', 'manage_best_success');
$album['is_best'] = 1;
} else {
$result['msg'] = lang('manage', 'manage_unbest_success');
$album['is_best'] = 0;
}
示例3: intval
<?php
$id = intval($_FANWE['request']['tid']);
if ($id == 0) {
exit;
}
if (!checkAuthority('ask', 'edit')) {
exit;
}
$manage_lock = checkIsManageLock('ask', $id);
if ($manage_lock !== false) {
exit;
}
$old = FS('Ask')->getTopicById($id);
if (empty($old)) {
deleteManageLock('ask', $id);
exit;
}
$share_id = $old['share_id'];
$topic = array('title' => htmlspecialchars(trim($_FANWE['request']['title'])), 'content' => htmlspecialchars(trim($_FANWE['request']['content'])), 'aid' => $_FANWE['request']['aid'], 'is_best' => isset($_FANWE['request']['is_best']) ? intval($_FANWE['request']['is_best']) : 0, 'is_top' => isset($_FANWE['request']['is_top']) ? intval($_FANWE['request']['is_top']) : 0);
FDB::update('ask_thread', $topic, 'tid = ' . $id);
FS('Share')->updateShare($share_id, $topic['title'], $topic['content']);
createManageLog('ask', 'edit', $id, lang('manage', 'manage_edit_success'));
deleteManageLock('ask', $id);
$msg = lang('manage', 'manage_edit_success');
include template('manage/tooltip');
display();
示例4: strtolower
<?php
$id = (int) $_FANWE['request']['id'];
$module = strtolower(trim($_FANWE['request']['module']));
if ($id == 0 || empty($module)) {
exit;
}
$old_module = $module;
if ($module == 'dapei') {
$module = 'share';
}
if (!getIsManage($module)) {
exit;
}
$tpl = 'manage/menu/common';
$manage_lock = checkIsManageLock($module, $id);
switch ($module) {
case 'share':
$manage_object = FDB::fetchFirst('SELECT * FROM ' . FDB::table('share') . ' WHERE share_id = ' . $id);
break;
case 'club':
$manage_object = FDB::fetchFirst('SELECT * FROM ' . FDB::table('forum_thread') . ' WHERE tid = ' . $id);
break;
case 'ask':
$manage_object = FDB::fetchFirst('SELECT * FROM ' . FDB::table('ask_thread') . ' WHERE tid = ' . $id);
break;
case 'shop':
$manage_object = FDB::fetchFirst('SELECT * FROM ' . FDB::table('shop') . ' WHERE shop_id = ' . $id);
break;
case 'event':
$manage_object = FDB::fetchFirst('SELECT * FROM ' . FDB::table('event') . ' WHERE id = ' . $id);
示例5: array
<?php
$result = array('status' => 1, 'msg' => '');
$id = intval($_FANWE['request']['id']);
if ($id == 0) {
$result['status'] = 0;
outputJson($result);
}
if (!checkAuthority('daren', 'index')) {
$result['status'] = 0;
outputJson($result);
}
$manage_lock = checkIsManageLock('daren', $id);
if ($manage_lock !== false) {
$result['status'] = 1;
$result['msg'] = $manage_lock['user_name'] . ',' . sprintf(lang('manage', 'manage_lock'), fToDate($manage_lock['time']));
outputJson($result);
}
$daren = FDB::fetchFirst("select * from " . FDB::table("user_daren") . " where id =" . $id);
if (empty($daren)) {
$result['status'] = 0;
outputJson($result);
}
$result['status'] = 1;
if ($daren['is_index'] == 0) {
$result['msg'] = lang('manage', 'manage_index_success');
$daren['is_index'] = 1;
} else {
$result['msg'] = lang('manage', 'manage_unindex_success');
$daren['is_index'] = 0;
}
示例6: array
<?php
$result = array('status' => 1, 'msg' => '');
$id = intval($_FANWE['request']['id']);
if ($id == 0) {
$result['status'] = 0;
outputJson($result);
}
if (!checkAuthority('event', 'hot')) {
$result['status'] = 0;
outputJson($result);
}
$manage_lock = checkIsManageLock('event', $id);
if ($manage_lock !== false) {
$result['status'] = 1;
$result['msg'] = $manage_lock['user_name'] . ',' . sprintf(lang('manage', 'manage_lock'), fToDate($manage_lock['time']));
outputJson($result);
}
$event = FDB::fetchFirst("select * from " . FDB::table("event") . " where id =" . $id);
if (empty($event)) {
$result['status'] = 0;
outputJson($result);
}
$result['status'] = 1;
if ($event['is_hot'] == 0) {
$result['msg'] = lang('manage', 'manage_top_success');
$event['is_hot'] = 1;
} else {
$result['msg'] = lang('manage', 'manage_untop_success');
$event['is_top'] = 0;
}