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


PHP log_moderator_action函数代码示例

本文整理汇总了PHP中log_moderator_action函数的典型用法代码示例。如果您正苦于以下问题:PHP log_moderator_action函数的具体用法?PHP log_moderator_action怎么用?PHP log_moderator_action使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: array

     }
     $attachcount++;
     if (!$foruminfo['allowposting']) {
         $error = $vbphrase['this_forum_is_not_accepting_new_attachments'];
         $errors[] = array('filename' => $attachment['name'], 'error' => $error);
     } else {
         if ($vbulletin->options['attachlimit'] and $attachcount > $vbulletin->options['attachlimit']) {
             $error = construct_phrase($vbphrase['you_may_only_attach_x_files_per_post'], $vbulletin->options['attachlimit']);
             $errors[] = array('filename' => $attachment['name'], 'error' => $error);
         } else {
             if ($attachmentid = $upload->process_upload($attachment)) {
                 if ($vbulletin->userinfo['userid'] != $postinfo['userid'] and can_moderate($threadinfo['forumid'], 'caneditposts')) {
                     $postinfo['attachmentid'] =& $attachmentid;
                     $postinfo['forumid'] =& $foruminfo['forumid'];
                     require_once DIR . '/includes/functions_log_error.php';
                     log_moderator_action($postinfo, 'attachment_uploaded');
                 }
             } else {
                 $attachcount--;
             }
             if ($error = $upload->fetch_error()) {
                 $errors[] = array('filename' => is_array($attachment) ? $attachment['name'] : $attachment, 'error' => $error);
             }
         }
     }
 }
 ($hook = vBulletinHook::fetch_hook('newattachment_attach')) ? eval($hook) : false;
 if (!empty($errors)) {
     $errorlist = '';
     foreach ($errors as $error) {
         $filename = htmlspecialchars_uni($error['filename']);
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:newattachment.php

示例2: ON

    // Validate Messages
    $messages = $db->query_read_slave("\n\t\tSELECT gm.gmid, gm.state, gm.groupid, gm.dateline, gm.postuserid, gm.postusername,\n\t\t\tsocialgroup.name AS group_name, socialgroup.creatoruserid\n\t\tFROM " . TABLE_PREFIX . "groupmessage AS gm\n\t\tLEFT JOIN " . TABLE_PREFIX . "socialgroup AS socialgroup ON (socialgroup.groupid = gm.groupid)\n\t\tWHERE gmid IN ({$messageids})\n\t\t\tAND state = 'deleted'\n\t");
    while ($message = $db->fetch_array($messages)) {
        $message['is_group_owner'] = $message['creatoruserid'] == $vbulletin->userinfo['userid'];
        $messagearray["{$message['gmid']}"] = $message;
        $grouplist["{$message['groupid']}"] = true;
    }
    if (empty($messagearray)) {
        standard_error(fetch_error('you_did_not_select_any_valid_messages'));
    }
    $db->query_write("\n\t\tDELETE FROM " . TABLE_PREFIX . "deletionlog\n\t\tWHERE type = 'groupmessage' AND\n\t\t\tprimaryid IN(" . implode(',', array_keys($messagearray)) . ")\n\t");
    $db->query_write("\n\t\tUPDATE " . TABLE_PREFIX . "groupmessage\n\t\tSET state = 'visible'\n\t\tWHERE gmid IN(" . implode(',', array_keys($messagearray)) . ")\n\t");
    foreach ($grouplist as $groupid => $foo) {
        build_group_counters($groupid);
    }
    foreach ($messagearray as $message) {
        if (!$message['is_group_owner']) {
            log_moderator_action($message, 'gm_by_x_for_y_undeleted', array($message['postusername'], $message['group_name']));
        }
    }
    // empty cookie
    setcookie('vbulletin_inlinegmessage', '', TIMENOW - 3600, '/');
    ($hook = vBulletinHook::fetch_hook('group_inlinemod_undelete')) ? eval($hook) : false;
    eval(print_standard_redirect('redirect_inline_undeletedmessages', true, $forceredirect));
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 09:39, Wed Nov 5th 2008
|| # SVN: $Revision: 27889 $
|| ####################################################################
\*======================================================================*/
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:group_inlinemod.php

示例3: insert_moderator_log

 function insert_moderator_log()
 {
     if ($this->modlog) {
         require_once DIR . '/includes/functions_log_error.php';
         $threadid = intval(($tid = $this->fetch_field('threadid')) ? $tid : $this->info['thread']['threadid']);
         $forumid = intval(($fid = $this->fetch_field('forumid')) ? $fid : $this->info['forum']['forumid']);
         if (can_moderate($forumid)) {
             foreach ($this->modlog as $entry) {
                 $entry['forumid'] = $forumid;
                 $entry['threadid'] = $threadid;
                 log_moderator_action($entry, $entry['type'], $entry['action']);
             }
         }
         $this->modlog = array();
     }
 }
开发者ID:benyamin20,项目名称:vbregistration,代码行数:16,代码来源:class_dm_threadpost.php

示例4: verify_post_check

    // Verify incoming POST request
    verify_post_check($mybb->get_input('my_post_key'));
    // Fetch the existing reputation for this user given by our current user if there is one.
    $query = $db->query("\n\t\tSELECT r.*, u.username\n\t\tFROM " . TABLE_PREFIX . "reputation r\n\t\tLEFT JOIN " . TABLE_PREFIX . "users u ON (u.uid=r.adduid)\n\t\tWHERE rid = '" . $mybb->get_input('rid', MyBB::INPUT_INT) . "'\n\t");
    $existing_reputation = $db->fetch_array($query);
    // Only administrators, super moderators, as well as users who gave a specifc vote can delete one.
    if ($mybb->usergroup['issupermod'] != 1 && ($mybb->usergroup['candeletereputations'] != 1 || $existing_reputation['adduid'] != $mybb->user['uid'] || $mybb->user['uid'] == 0)) {
        error_no_permission();
    }
    // Delete the specified reputation
    $db->delete_query("reputation", "uid='{$uid}' AND rid='" . $mybb->get_input('rid', MyBB::INPUT_INT) . "'");
    // Recount the reputation of this user - keep it in sync.
    $query = $db->simple_select("reputation", "SUM(reputation) AS reputation_count", "uid='{$uid}'");
    $reputation_value = $db->fetch_field($query, "reputation_count");
    // Create moderator log
    log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->sprintf($lang->delete_reputation_log, $existing_reputation['username'], $existing_reputation['adduid']));
    $db->update_query("users", array('reputation' => (int) $reputation_value), "uid='{$uid}'");
    redirect("reputation.php?uid={$uid}", $lang->vote_deleted_message);
}
// Otherwise, show a listing of reputations for the given user.
if (!$mybb->input['action']) {
    if ($mybb->usergroup['canviewprofiles'] == 0) {
        // Reputation page is a part of a profile
        error_no_permission();
    }
    // Set display group to their user group if they don't have a display group.
    if (!$user['displaygroup']) {
        $user['displaygroup'] = $user['usergroup'];
    }
    // Fetch display group properties.
    $displaygroupfields = array('title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image', 'usereputationsystem');
开发者ID:styv300,项目名称:ToRepublic2.5,代码行数:31,代码来源:reputation.php

示例5: array

        if ($existing_ban) {
            $update_array = array('gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'dateline' => TIME_NOW, 'bantime' => $db->escape_string($mybb->get_input('liftafter')), 'lifted' => $db->escape_string($lifted), 'reason' => $db->escape_string($banreason));
            $db->update_query('banned', $update_array, "uid='{$user['uid']}'");
        } else {
            $insert_array = array('uid' => $user['uid'], 'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'oldgroup' => (int) $user['usergroup'], 'oldadditionalgroups' => (string) $user['additionalgroups'], 'olddisplaygroup' => (int) $user['displaygroup'], 'admin' => (int) $mybb->user['uid'], 'dateline' => TIME_NOW, 'bantime' => $db->escape_string($mybb->get_input('liftafter')), 'lifted' => $db->escape_string($lifted), 'reason' => $db->escape_string($banreason));
            $db->insert_query('banned', $insert_array);
        }
        // Move the user to the banned group
        $update_array = array('usergroup' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'displaygroup' => 0, 'additionalgroups' => '');
        $db->update_query('users', $update_array, "uid = {$user['uid']}");
        $cache->update_banned();
        // Log edit or add ban
        if ($existing_ban) {
            log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user_ban);
        } else {
            log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->banned_user);
        }
        $plugins->run_hooks("modcp_do_banuser_end");
        if ($existing_ban) {
            redirect("modcp.php?action=banning", $lang->redirect_banuser_updated);
        } else {
            redirect("modcp.php?action=banning", $lang->redirect_banuser);
        }
    } else {
        $mybb->input['action'] = "banuser";
    }
}
if ($mybb->input['action'] == "banuser") {
    add_breadcrumb($lang->mcp_nav_banning, "modcp.php?action=banning");
    if ($mybb->usergroup['canbanusers'] == 0) {
        error_no_permission();
开发者ID:olada,项目名称:mybbintegrator,代码行数:31,代码来源:modcp.php

示例6: datamanager_init

        $socialgroupmemberdm = datamanager_init('SocialGroupMember', $vbulletin);
        $vbulletin->GPC['ids'][] = 0;
        $ids = implode(', ', $vbulletin->GPC['ids']);
        $invites = $vbulletin->db->query_read("\n\t\t\tSELECT * FROM " . TABLE_PREFIX . "socialgroupmember\n\t\t\tWHERE groupid = " . $group['groupid'] . " AND userid IN({$ids})" . ($_POST['do'] == 'cancelinvites' ? " AND type = 'invited'" : ''));
        while ($invite = $vbulletin->db->fetch_array($invites)) {
            ($hook = vBulletinHook::fetch_hook('group_kickmember')) ? eval($hook) : false;
            if ($invite['userid'] != $group['creatoruserid']) {
                $socialgroupmemberdm->set_existing($invite);
                $socialgroupmemberdm->delete();
            }
        }
        unset($socialgroupmemberdm);
    }
    if (!$group['is_owner'] and can_moderate(0, 'candeletesocialgroups')) {
        require_once DIR . '/includes/functions_log_error.php';
        log_moderator_action($group, 'social_group_x_members_managed', array($group['name']));
    }
    if ($group['members'] - sizeof($ids) <= 1 and $_REQUEST['do'] == 'kickmembers') {
        $vbulletin->url = 'group.php?' . $vbulletin->session->vars['sessionurl'] . 'groupid=' . $group['groupid'];
    } else {
        $vbulletin->url = 'group.php?' . $vbulletin->session->vars['sessionurl'] . 'do=manage' . ($_REQUEST['do'] == 'kickmembers' ? 'members' : '') . '&amp;groupid=' . $group['groupid'];
    }
    ($hook = vBulletinHook::fetch_hook('group_kickmember_complete')) ? eval($hook) : false;
    $phrase = $_POST['do'] == 'cancelinvites' ? 'successfully_removed_invites' : 'successfully_kicked_members';
    eval(print_standard_redirect($phrase));
}
// #######################################################################
if ($_POST['do'] == 'pendingmembers') {
    if (!fetch_socialgroup_modperm('caninvitemoderatemembers', $group)) {
        print_no_permission();
    }
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:group.php

示例7: eval

    if (TIMENOW + $vbulletin->GPC['timeout'] * 86400 >= 2147483647) {
        // maximuim size of a 32 bit integer
        eval(standard_error(fetch_error('maxpolltimeout')));
    }
    $poll->set('question', $vbulletin->GPC['pollquestion']);
    $poll->set('active', $vbulletin->GPC['closepoll'] ? 0 : 1);
    $poll->set('timeout', $vbulletin->GPC['timeout']);
    // only let a poll go from public to private, not the other way about
    if ($pollinfo['public']) {
        $poll->set('public', $vbulletin->GPC['public']);
    }
    ($hook = vBulletinHook::fetch_hook('poll_update_process')) ? eval($hook) : false;
    $poll->save();
    $pollinfo['threadid'] = $threadinfo['threadid'];
    require_once DIR . '/includes/functions_log_error.php';
    log_moderator_action($pollinfo, 'poll_edited');
    ($hook = vBulletinHook::fetch_hook('poll_update_complete')) ? eval($hook) : false;
    $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadinfo['threadid']}";
    eval(print_standard_redirect('redirect_editthanks'));
}
// ############################### start show results without vote ###############################
if ($_REQUEST['do'] == 'showresults') {
    if (!$pollinfo['pollid']) {
        eval(standard_error(fetch_error('invalidid', $vbphrase['poll'], $vbulletin->options['contactuslink'])));
    }
    ($hook = vBulletinHook::fetch_hook('poll_results_start')) ? eval($hook) : false;
    $counter = 1;
    $pollbits = '';
    $bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
    $pollinfo['question'] = $bbcode_parser->parse(unhtmlspecialchars($pollinfo['question']), $foruminfo['forumid'], 1);
    $splitoptions = explode('|||', $pollinfo['options']);
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:poll.php

示例8: datamanager_init

        } else {
            $hard_delete = false;
        }
        $dataman =& datamanager_init('PictureComment', $vbulletin, ERRTYPE_STANDARD);
        $dataman->set_existing($commentinfo);
        if ($pictureuser = fetch_userinfo($pictureinfo['userid'])) {
            $dataman->set_info('pictureuser', $pictureuser);
        }
        $dataman->set_info('pictureinfo', $pictureinfo);
        $dataman->set_info('hard_delete', $hard_delete);
        $dataman->set_info('reason', $vbulletin->GPC['reason']);
        $dataman->delete();
        unset($dataman);
        if ($comentinfo['postuserid'] != $vbulletin->userinfo['userid'] and (can_moderate(0, 'candeletepicturecomments') or can_moderate(0, 'canremovepicturecomments'))) {
            require_once DIR . '/includes/functions_log_error.php';
            log_moderator_action($pictureinfo, $hard_delete ? 'pc_by_x_on_y_removed' : 'pc_by_x_on_y_soft_deleted', array($commentinfo['postusername'], fetch_trimmed_title($pictureinfo['caption'], 50)));
        }
        print_standard_redirect('picturecomment_deleted');
    } else {
        print_standard_redirect('picturecomment_nodelete');
    }
}
// ############################### start retrieve ip ###############################
if ($_REQUEST['do'] == 'viewip') {
    // check moderator permissions for getting ip
    if (!can_moderate(0, 'canviewips')) {
        print_no_permission();
    }
    if (!$commentinfo['commentid']) {
        standard_error(fetch_error('invalidid', $vbphrase['comment'], $vbulletin->options['contactuslink']));
    }
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:picturecomment.php

示例9: delete_thread

     $modlogdata['tid'] = $tid;
     if ($firstpost) {
         if ($forumpermissions['candeletethreads'] == 1 || is_moderator($fid, "candeletethreads")) {
             delete_thread($tid);
             mark_reports($tid, "thread");
             log_moderator_action($modlogdata, $lang->thread_deleted);
             redirect(get_forum_link($fid), $lang->redirect_threaddeleted);
         } else {
             error_no_permission();
         }
     } else {
         if ($forumpermissions['candeleteposts'] == 1 || is_moderator($fid, "candeleteposts")) {
             // Select the first post before this
             delete_post($pid, $tid);
             mark_reports($pid, "post");
             log_moderator_action($modlogdata, $lang->post_deleted);
             $query = $db->simple_select("posts", "pid", "tid='{$tid}' AND dateline <= '{$post['dateline']}'", array("limit" => 1, "order_by" => "dateline", "order_dir" => "desc"));
             $next_post = $db->fetch_array($query);
             if ($next_post['pid']) {
                 $redirect = get_post_link($next_post['pid'], $tid) . "#pid{$next_post['pid']}";
             } else {
                 $redirect = get_thread_link($tid);
             }
             redirect($redirect, $lang->redirect_postdeleted);
         } else {
             error_no_permission();
         }
     }
 } else {
     error($lang->redirect_nodelete);
 }
开发者ID:slothly,项目名称:mybb,代码行数:31,代码来源:editpost.php

示例10: unset

        $merge_thread->save();
        if ($vbulletin->GPC['redirect'] == 'expires') {
            $db->query_write("\n\t\t\t\tINSERT INTO " . TABLE_PREFIX . "threadredirect\n\t\t\t\t\t(threadid, expires)\n\t\t\t\tVALUES\n\t\t\t\t\t({$mergethreadinfo['threadid']}, {$expires})\n\t\t\t");
        }
    } else {
        // remove remnants of merge thread
        $merge_thread->delete(false, true, NULL, false);
    }
    unset($merge_thread);
    build_thread_counters($threadinfo['threadid']);
    build_forum_counters($threadinfo['forumid']);
    if ($mergethreadinfo['forumid'] != $threadinfo['forumid']) {
        build_forum_counters($mergethreadinfo['forumid']);
    }
    vB_ActivityStream_Populate_Forum_Thread::rebuild_thread(array($threadinfo['threadid'], $mergethreadinfo['threadid']));
    log_moderator_action($threadinfo, 'thread_merged_with_x', $mergethreadinfo['title']);
    ($hook = vBulletinHook::fetch_hook('threadmanage_merge_complete')) ? eval($hook) : false;
    $vbulletin->url = fetch_seo_url('thread', $threadinfo);
    print_standard_redirect('redirect_mergethread');
}
// ############################### start stick / unstick thread ###############################
if ($_POST['do'] == 'stick') {
    if ($threadinfo['isdeleted'] and !can_moderate($threadinfo['forumid'], 'candeleteposts') or !$threadinfo['visible'] and !can_moderate($threadinfo['forumid'], 'canmoderateposts')) {
        if (can_moderate($threadinfo['forumid'])) {
            print_no_permission();
        } else {
            eval(standard_error(fetch_error('invalidid', $idname, $vbulletin->options['contactuslink'])));
        }
    }
    if (!can_moderate($threadinfo['forumid'], 'canmanagethreads')) {
        print_no_permission();
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:postings.php

示例11: IN

    $db->query_write("\n\t\tUPDATE " . TABLE_PREFIX . "groupmessage\n\t\tSET state = 'visible'\n\t\tWHERE gmid IN(" . implode(',', array_keys($messagearray)) . ")\n\t");
    foreach (array_keys($messagearray) as $gmid) {
        vB_Search_Indexcontroller_Queue::indexQueue('vBForum', 'SocialGroupMessage', 'index', $gmid, null, null);
    }
    foreach (array_keys($discussionlist) as $discussionid) {
        build_discussion_counters($discussionid);
    }
    foreach (array_keys($grouplist) as $groupid) {
        build_group_counters($groupid);
    }
    foreach ($messagearray as $message) {
        if (!$message['is_group_owner']) {
            if ($message['firstpost']) {
                log_moderator_action($message, 'discussion_by_x_for_y_undeleted', array($message['postusername'], $message['group_name']));
            } else {
                log_moderator_action($message, 'gm_by_x_in_y_for_z_undeleted', array($message['postusername'], $message['discussion_name'], $message['group_name']));
            }
        }
    }
    // empty cookie
    setcookie($inline_cookie, '', TIMENOW - 3600, '/');
    ($hook = vBulletinHook::fetch_hook('group_inlinemod_undelete')) ? eval($hook) : false;
    if ($inline_discussion) {
        print_standard_redirect('redirect_inline_undeleteddiscussions', true, $forceredirect);
    } else {
        print_standard_redirect('redirect_inline_undeletedmessages', true, $forceredirect);
    }
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:group_inlinemod.php

示例12: pre_delete

	/**
	* pre_delete function - extend if the contenttype needs to do anything
	*
	* @param	array		list of deleted attachment ids to delete
	* @param	boolean	verify permission to delete
	*
	* @return	boolean
	*/
	public function pre_delete($list, $checkperms = true)
	{
		@ignore_user_abort(true);

		// init lists
		$this->lists = array(
			'grouplist'   => array(),
		);

		if ($checkperms)
		{
			// Verify that we have permission to view these attachmentids
			$attachmultiple = new vB_Attachment_Display_Multiple($this->registry);
			$attachments = $attachmultiple->fetch_results("a.attachmentid IN (" . implode(", ", $list) . ")");

			if (count($list) != count($attachments))
			{
				return false;
			}
		}
		$ids = $this->registry->db->query_read("
			SELECT
				a.attachmentid, a.userid, IF(a.contentid = 0, 1, 0) AS inprogress, a.caption,
				sg.name, sg.groupid, IF(sg.creatoruserid = {$this->registry->userinfo['userid']}, 1, 0) AS is_owner,
				user.username
			FROM " . TABLE_PREFIX . "attachment AS a
			LEFT JOIN " . TABLE_PREFIX . "socialgroup AS sg ON (a.contentid = sg.groupid)
			LEFT JOIN " . TABLE_PREFIX . "user AS user ON (a.userid = user.userid)
			WHERE
				a.attachmentid IN (" . implode(", ", $list) . ")
		");
		while ($id = $this->registry->db->fetch_array($ids))
		{
			if ($checkperms AND !$id['inprogress'] AND $id['userid'] != $this->registry->userinfo['userid'] AND !fetch_socialgroup_modperm('canremovepicture', $id))
			{
				return false;
			}

			if ($id['groupid'])
			{
				$this->lists['grouplist']["{$id['groupid']}"]["{$id['attachmentid']}"] = 1;

				if ($this->log)
				{
					if (!$id['is_owner'] AND $id['userid'] != $this->registry->userinfo['userid'])
					{
						// TODO : What does $picture want and fix modlog display in the admincp as it does not filter attachmentid properly on contenttype
						$picture = array();
						require_once(DIR . '/includes/functions_log_error.php');
						log_moderator_action($picture, 'social_group_picture_x_in_y_removed', array(fetch_trimmed_title($id['caption'], 50), $id['name']));
					}
				}
			}
		}
		return true;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:64,代码来源:socialgroup.php

示例13: shoutboxUnban

/**
 * Delete ban
 */
function shoutboxUnban()
{
    global $mybb, $db, $lang;
    if (isset($mybb->input['id']) && isset($mybb->input['token'])) {
        $lang->load('dvz_reports');
        verify_post_check($mybb->input['token']);
        $id = $db->escape_string($mybb->input['id']);
        $data = $db->write_query("select " . TABLE_PREFIX . "dvz_reports_banned.uid, " . TABLE_PREFIX . "dvz_reports_banned.id, " . TABLE_PREFIX . "users.username\r\n                from " . TABLE_PREFIX . "dvz_reports_banned\r\n                JOIN " . TABLE_PREFIX . "users ON " . TABLE_PREFIX . "dvz_reports_banned.uid = " . TABLE_PREFIX . "users.uid\r\n                WHERE " . TABLE_PREFIX . "dvz_reports_banned.id = '{$id}';");
        //Validate ban existance
        if ($data->num_rows === 0) {
            redirect('modcp.php?action=shoutbox_banned');
            die;
        }
        $data = $data->fetch_assoc();
        //Delete ban and log action
        $db->delete_query('dvz_reports_banned', 'id=' . $id);
        //Log action
        $logdata = array('uid' => htmlspecialchars_uni($data['uid']), 'username' => htmlspecialchars_uni($data['username']));
        log_moderator_action($logdata, $lang->unban_user);
        redirect('modcp.php?action=shoutbox_banned');
        die;
    }
    //Redirect
    redirect('modcp.php?action=shoutbox_banned');
    die;
}
开发者ID:noxwyll,项目名称:dvz_shoutbox_pvt,代码行数:29,代码来源:dvz_reports.php

示例14: pre_delete

	/**
	* pre_delete function - extend if the contenttype needs to do anything
	*
	* @param	array		list of deleted attachment ids to delete
	* @param	boolean	verify permission to delete
	*
	* @return	boolean
	*/
	public function pre_delete($list, $checkperms = true)
	{
		@ignore_user_abort(true);

		// init lists
		$this->lists = array(
			'bloglist'   => array(),
		);

		if ($checkperms)
		{
			// Verify that we have permission to view these attachmentids
			$attachmultiple = new vB_Attachment_Display_Multiple($this->registry);
			$attachments = $attachmultiple->fetch_results("a.attachmentid IN (" . implode(", ", $list) . ")");

			if (count($list) != count($attachments))
			{
				return false;
			}
		}

		$replaced = array();
		$ids = $this->registry->db->query_read("
			SELECT
				a.attachmentid, a.userid, IF(a.contentid = 0, 1, 0) AS inprogress,
				blog.blogid, blog.firstblogtextid, blog.dateline AS blog_dateline, blog.state, blog.postedby_userid,
				bu.memberids, bu.memberblogids,
				gm.permissions AS grouppermissions,
				user.membergroupids, user.usergroupid, user.infractiongroupids,
				blog_deletionlog.moddelete AS del_moddelete, blog_deletionlog.userid AS del_userid, blog_deletionlog.username AS del_username, blog_deletionlog.reason AS del_reason
			FROM " . TABLE_PREFIX . "attachment AS a
			LEFT JOIN " . TABLE_PREFIX . "blog AS blog ON (blog.blogid = a.contentid)
			LEFT JOIN " . TABLE_PREFIX . "blog_user AS bu ON (bu.bloguserid = blog.userid)
			LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = blog.userid)
			LEFT JOIN " . TABLE_PREFIX . "blog_groupmembership AS gm ON (blog.userid = gm.bloguserid AND gm.userid = " . $this->registry->userinfo['userid'] . ")
			LEFT JOIN " . TABLE_PREFIX . "blog_deletionlog AS blog_deletionlog ON (blog.blogid = blog_deletionlog.primaryid AND blog_deletionlog.type = 'blogid')
			WHERE
				a.attachmentid IN (" . implode(", ", $list) . ")
		");
		while ($id = $this->registry->db->fetch_array($ids))
		{
			cache_permissions($id, false);
			if ($checkperms AND !$id['inprogress'] AND !fetch_entry_perm('edit', $id))
			{
				return false;
			}

			if ($id['blogid'])
			{
				$this->lists['bloglist']["{$id['blogid']}"]++;

				if ($this->log)
				{
					if (($this->registry->userinfo['permissions']['genericoptions'] & $this->registry->bf_ugp_genericoptions['showeditedby']) AND $id['p_dateline'] < (TIMENOW - ($this->registry->options['noeditedbytime'] * 60)))
					{
						if (empty($replaced["$id[firstblogtextid]"]))
						{
							/*insert query*/
							$this->registry->db->query_write("
								REPLACE INTO " . TABLE_PREFIX . "blog_editlog
										(blogtextid, userid, username, dateline)
								VALUES
									(
										$id[firstblogtextid],
										" . $this->registry->userinfo['userid'] . ",
										'" . $this->registry->db->escape_string($this->registry->userinfo['username']) . "',
										" . TIMENOW . "
									)
							");
							$replaced["$id[firstblogtextid]"] = true;
						}
					}
					if (!is_member_of_blog($this->registry->userinfo, $id) AND can_moderate_blog('caneditentries'))
					{
						$bloginfo = array(
							'blogid'       => $id['blogid'],
							'attachmentid' => $id['attachmentid'],
						);
						require_once(DIR . '/includes/blog_functions_log_error.php');
						log_moderator_action($bloginfo, 'attachment_removed');
					}
				}
			}
		}
		return true;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:94,代码来源:blogentry.php

示例15: error

 if (count($pids) < 1) {
     error($lang->error_inline_nopostsselected);
 }
 if (!is_moderator_by_pids($pids)) {
     error_no_permission();
 }
 // Get threads which are associated with the posts
 $tids = array();
 $options = array('order_by' => 'dateline', 'order_dir' => 'asc');
 $query = $db->simple_select("posts", "DISTINCT tid", "pid IN (" . implode(',', $pids) . ")", $options);
 while ($row = $db->fetch_array($query)) {
     $tids[] = $row['tid'];
 }
 $ret = $custommod->execute(intval($mybb->input['action']), $tids, $pids);
 $lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
 log_moderator_action($modlogdata, $lang->custom_tool);
 if ($mybb->input['inlinetype'] == 'search') {
     clearinline($mybb->input['searchid'], 'search');
     $lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']);
     $return_url = htmlspecialchars_uni($mybb->input['url']);
     redirect($return_url, $lang->redirect_customtool_search);
 } else {
     clearinline($tid, 'thread');
     if ($ret == 'forum') {
         $lang->redirect_customtool_forum = $lang->sprintf($lang->redirect_customtool_forum, $tool['name']);
         moderation_redirect(get_forum_link($fid), $lang->redirect_customtool_forum);
     } else {
         $lang->redirect_customtool_thread = $lang->sprintf($lang->redirect_customtool_thread, $tool['name']);
         moderation_redirect(get_thread_link($tid), $lang->redirect_customtool_thread);
     }
 }
开发者ID:ThinhNguyenVB,项目名称:Gradient-Studios-Website,代码行数:31,代码来源:moderation.php


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