当前位置: 首页>>代码示例>>PHP>>正文


PHP Dashboard::verifyAuthor方法代码示例

本文整理汇总了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
开发者ID:Avik-B,项目名称:musicbee-website,代码行数:31,代码来源:dashboard.tasks.php

示例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'];
开发者ID:Avik-B,项目名称:musicbee-website,代码行数:31,代码来源:dashboard.submit.template.php


注:本文中的Dashboard::verifyAuthor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。