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


PHP projects::SatisfyComplains方法代码示例

本文整理汇总了PHP中projects::SatisfyComplains方法的典型用法代码示例。如果您正苦于以下问题:PHP projects::SatisfyComplains方法的具体用法?PHP projects::SatisfyComplains怎么用?PHP projects::SatisfyComplains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在projects的用法示例。


在下文中一共展示了projects::SatisfyComplains方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: header

if (!defined('IS_SITE_ADMIN')) {
    header('Location: /404.php');
    exit;
}
$menu_item = 12;
$prj_obj = new projects();
$projects = $prj_obj->GetComplainPrjs($num_threads, $error, $page, $sort, $search, $admin, $log_pp, $group);
if ($action && $_SESSION['rand'] != $_POST['u_token_key']) {
    header('Location: /403.php');
    exit;
}
switch ($action) {
    case 'delcomplain':
        $prj_obj->DeleteComplains(intval($_GET['pid']));
        header("Location: /siteadmin/ban-razban/?mode={$mode}" . ($page ? "&p={$page}" : '') . ($search ? "&search={$search}" : '') . ($admin ? "&admin={$admin}" : '') . ($sort ? "&sort={$sort}" : '') . '#p' . $_GET['pid']);
        exit;
        break;
    case 'satisfycomplain':
        $prj_obj->SatisfyComplains(intval($_GET['pid']));
        header("Location: /siteadmin/ban-razban/?mode={$mode}" . ($page ? "&p={$page}" : '') . ($search ? "&search={$search}" : '') . ($admin ? "&admin={$admin}" : '') . ($sort ? "&sort={$sort}" : '') . '#p' . $_GET['pid']);
        exit;
        break;
    case 'not_satisfycomplain':
        $prj_obj->NotSatisfyComplains(intval($_GET['pid']));
        header("Location: /siteadmin/ban-razban/?mode={$mode}" . ($page ? "&p={$page}" : '') . ($search ? "&search={$search}" : '') . ($admin ? "&admin={$admin}" : '') . ($sort ? "&sort={$sort}" : '') . '#p' . $_GET['pid']);
        exit;
        break;
}
$css_file = array('moderation.css', 'nav.css');
include $rpath . 'template.php';
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:30,代码来源:index.php

示例2: BlockedProjectWithComplain

/**
 * Блокирование проекта с жалобами
 * 
 * @param integer $project_id    id проекта
 * @param string  $reason        причина
 * @param int     $reason_id     ID причины, если она выбрана из списка (таблица admin_reasons, где act_id = 9)
 * @param string  $reason_name   Краткое описание причины действия (из селекта) для лога админских действий
 */
function BlockedProjectWithComplain($project_id, $reason, $reason_id = null, $reason_name = '')
{
    global $DB;
    $objResponse = new xajaxResponse();
    $project_id = intval($project_id);
    session_start();
    if (hasPermissions('projects')) {
        require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php';
        if (is_string($reason) && $reason != '') {
            if (hasPermissions('projects')) {
                $count = $DB->val("SELECT COUNT(*) FROM projects WHERE id = ?", $project_id);
                if ($count) {
                    $projects = new projects();
                    $project = $projects->GetPrjCust($project_id);
                    $reason_id = $reason_id ? $reason_id : null;
                    $reason = str_replace('%USERNAME%', $project['uname'] . ' ' . $project['usurname'], $reason);
                    $reason = change_q_x($reason, FALSE, TRUE, "", false, false);
                    $projects->SatisfyComplains($project_id);
                    $sBlockId = $projects->Blocked($project_id, $reason, $reason_id, $_SESSION['uid']);
                    // пишем лог админских действий
                    $sObjLink = getFriendlyURL('project', $project_id);
                    admin_log::addLog(admin_log::OBJ_CODE_PROJ, 9, $project['user_id'], $project_id, $project['name'], $sObjLink, 0, '', $reason_id, $reason, $sBlockId);
                    //-----------------------------
                    $objResponse->script("project_banned({$project_id});");
                } else {
                    $objResponse->alert('Несуществующий проект');
                }
            }
        }
    }
    return $objResponse;
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:40,代码来源:banned.server.php


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