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


PHP banUser函数代码示例

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


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

示例1: pwSqlSingle

        }
        $db->update("UPDATE pw_cnalbum SET " . pwSqlSingle(array('aname' => $aname, 'aintro' => $aintro, 'private' => $private, 'albumpwd' => $pwd)) . ' WHERE aid=' . pwEscape($aid));
        refreshto("{$basename}a=own", 'operate_success');
    }
} elseif ($a == 'viewalbum') {
    define('AJAX', 1);
    define('F_M', true);
    InitGP(array('aid'));
    $aid = (int) $aid;
    empty($aid) && Showmsg('data_error');
    require_once PrintEot('m_ajax');
    ajax_footer();
} elseif ($a == 'createajax') {
    define('AJAX', 1);
    define('F_M', true);
    banUser();
    InitGP(array('job'));
    require_once PrintEot('m_ajax');
    ajax_footer();
} elseif ($a == 'getallowflash') {
    define('AJAX', 1);
    define('F_M', true);
    InitGP(array('aid'));
    $aid = (int) $aid;
    if ($aid) {
        $photonums = $db->get_value("SELECT photonum FROM pw_cnalbum WHERE atype='0' AND aid=" . pwEscape($aid));
        $o_maxphotonum && $photonums >= $o_maxphotonum && Showmsg('colony_photofull');
        if ($o_maxphotonum) {
            $allowmutinum = $o_maxphotonum - $photonums;
        } else {
            $allowmutinum = 'infinite';
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:index.php

示例2: showBanForm

function showBanForm($banid)
{
    global $DB;
    $unme = $DB->selectCell("SELECT username FROM account WHERE id='" . $banid . "'");
    echo "\r\n\t\t<div class=\"content\">\t\r\n\t\t\t<div class=\"content-header\">\r\n\t\t\t\t<h4><a href=\"?p=admin\">Main Menu</a> / <a href=\"?p=admin&sub=users\">Manage Users</a> / " . $unme . " / Ban</h4>\r\n\t\t\t</div> <!-- .content-header -->\t\t\t\t\r\n\t\t\t<div class=\"main-content\">\r\n\t";
    if (isset($_POST['ban_user'])) {
        banUser($_POST['ban_user'], $_POST['ban_reason']);
    }
    echo "\r\n\t\t<form method=\"POST\" action=\"?p=admin&sub=users&id=" . $banid . "&action=ban\" name=\"adminform\" class=\"form label-inline\">\r\n\t\t\t<input type='hidden' name='ban_user'  value='" . $banid . "' />\r\n\t\t\t<table>\r\n\t\t\t\t<thead>\r\n\t\t\t\t\t<th><center><b>Ban Account #" . $banid . " (" . $unme . ")</b></center></th>\r\n\t\t\t\t</thead>\r\n\t\t\t</table>\r\n\t\t\t<br />\r\n\t\t\t<div class='field'>\r\n\t\t\t\t<label for='Username'>Ban Reason: </label>\r\n\t\t\t\t<input id='Username' name='ban_reason' size='20' type='text' class='large' />\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<div class=\"buttonrow-border\">\t\t\t\t\t\t\t\t\r\n\t\t\t\t<center><button><span>Ban User</span></button></center>\t\t\t\r\n\t\t\t</div>\r\n\r\n\t\t</form>\r\n\t</div>\r\n\t";
}
开发者ID:louisnorthmore,项目名称:mangoswebv3,代码行数:10,代码来源:admin.users.php

示例3: ignore_user_abort

	case "reportUser":
	case "reportuser":
	$oldignoreuserabort = ignore_user_abort(true);
	reportUser($option,$form,$uid);
	break;

	case "processReports":
	case "processreports":
	$oldignoreuserabort = ignore_user_abort(true);
	processReports();
	break;

	case "banProfile":
	case "banprofile":
	$oldignoreuserabort = ignore_user_abort(true);
	banUser($option,$uid,$form,$act);
	break;

	case "viewReports":
	case "viewreports":
	viewReports($option,$uid,$act);
	break;

	case "emailUser":
	case "emailuser":
	emailUser($option,$uid);
	break;

	case "pendingApprovalUser":
	case "pendingapprovaluser":
	pendingApprovalUsers($option);
开发者ID:rkern21,项目名称:videoeditor,代码行数:31,代码来源:comprofiler.php

示例4: ob_start

<?php

ob_start();
require_once "functions.php";
if (!$isLoggedIn && !isAdmin) {
    header("Location:index.php");
    exit;
}
$ban = isset($_GET['ban']) ? $_GET['ban'] : false;
$userID = isset($_GET['id']) ? $_GET['id'] : false;
if ($userID) {
    if ($ban) {
        banUser($userID);
    } else {
        unbanUser($userID);
    }
}
开发者ID:Travelite,项目名称:Travelite,代码行数:17,代码来源:banUser.php

示例5: session_start

<?php

include "../util/DbUtil.php";
session_start();
$userid = $_POST['userid'];
$response = "";
$db_conn = getConnectedDb();
if (is_null($db_conn)) {
    $response = "Error connecting to database. Try again later.";
} elseif (isUserBanned($db_conn, $userid)) {
    $response = "User already banned.";
} elseif (!banUser($db_conn, $userid)) {
    $response = "Error banning user";
} else {
    $response = "Success";
}
echo $response;
开发者ID:ChayneThrash,项目名称:DCSP_Group_Project,代码行数:17,代码来源:banUser.php

示例6: postMedia

        postMedia($_GET['sid']);
        header("Location: mod.php");
    } elseif ($_GET['type'] == "1") {
        rejectImage($_GET['sid']);
        header("Location: mod.php");
    } elseif ($_GET['type'] == "2") {
        reportImage($_GET['sid']);
        header("Location: mod.php");
    } elseif ($_GET['type'] == "-1") {
        if (is_admin(mod_id())) {
            banUser($_GET['sid'], 0);
        }
        header("Location: mod.php");
    } elseif ($_GET['type'] == "-2") {
        if (is_admin(mod_id())) {
            banUser($_GET['sid'], 1);
        }
        header("Location: reports.php");
    } elseif ($_GET['type'] == "-3") {
        if (is_admin(mod_id())) {
            removeReport($_GET['sid']);
        }
        header("Location: reports.php");
    }
}
if ($_GET['type'] == "register") {
    if (!is_mod(mod_id())) {
        addModerator(mod_id());
        header("Location: mod.php");
    } else {
        header("Location: mod.php");
开发者ID:valknutcode,项目名称:storybot,代码行数:31,代码来源:action.php


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