本文整理匯總了PHP中Dashboard::verifyAuthor方法的典型用法代碼示例。如果您正苦於以下問題:PHP Dashboard::verifyAuthor方法的具體用法?PHP Dashboard::verifyAuthor怎麽用?PHP Dashboard::verifyAuthor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Dashboard
的用法示例。
在下文中一共展示了Dashboard::verifyAuthor方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: die
//:S addon deletation failed! and we have no clue.... bummer
die('{"status": "0", "data": "' . $lang['dashboard_err_14'] . '"}');
}
} else {
//throw error if the author is different than the submitter itself
die('{"status": "0", "data": "' . $lang['dashboard_err_12'] . '"}');
}
}
//Soft delete won't delete it, but put it in to be deleted list, it will be deleted whenever the delete script executes!
if ($_POST['modify_type'] == "soft_delete") {
//You can not soft delete an addon that is already soft deleted
if ($dashboard->getAddonStatus($_POST['record_id']) == "3") {
die('{"status": "0", "data": "' . $lang['dashboard_msg_9'] . '"}');
}
//Mod/Admin/addon author will be able to soft delete and addon
if ($dashboard->verifyAuthor($mb['user']['id'], $_POST['record_id']) || $mb['user']['can_mod']) {
if ($dashboard->updateAddonStatus($_POST['record_id'], "3", $mb['user']['id'])) {
//@todo: now that the item is deleted, check if it is added to mail queue, if true remove it.
exit('
{
"status": "1",
"data": "' . $lang['dashboard_msg_8'] . '",
"callback_function": "remove_addon_record"
}
');
} else {
//:S addon deletation failed! and we have no clue.... bummer
die('{"status": "0", "data": "' . $lang['dashboard_err_14'] . '"}');
}
} else {
//throw error if the author is different than the submitter itself
示例2: Dashboard
*
* @Contributors:
* Created by AvikB for noncommercial MusicBee project.
* Spelling mistakes and fixes from community members.
*
*/
$no_guests = true;
//kick off the guests
require_once $_SERVER['DOCUMENT_ROOT'] . '/functions.php';
require_once $link['root'] . 'classes/Dashboard.php';
require_once $link['root'] . 'classes/Addon.php';
//check if edit GET request is made, if not we don't want UNDEFINED ERROR to pop up! so define the variable
if (isset($_GET['view'])) {
if ($_GET['view'] == "update" && isset($_GET['id'])) {
$dashboard = new Dashboard();
$is_author = $dashboard->verifyAuthor($user_info['id'], $_GET['id']);
//verify if the author can modify it.... or if user is mod/admin allow
if (!$is_author && !$mb['user']['can_mod']) {
?>
<div class="main_content_wrapper col_2_1">
<div class="sub_content_wrapper">
<div class="box_content">
<span class="show_info info_red custom">
<h3><?php
echo $lang['dashboard_err_18'];
?>
</h3>
</span>
<p class="info_text">
<?php
echo $lang['dashboard_err_12'];