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