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


PHP Rank::countMembers方法代码示例

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


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

示例1: Member

$cID = $cOptObj->findConsoleIDByName("Manage Ranks");
$cOptObj->select($cID);
$member = new Member($mysqli);
$checkMember = $member->select($_SESSION['btUsername']);
if ($checkMember) {
    if ($member->authorizeLogin($_SESSION['btPassword'])) {
        //$cID = $cOptObj->findConsoleIDByName("Add New Rank");
        $memberInfo = $member->get_info();
        if ($member->hasAccess($cOptObj)) {
            $rank = new Rank($mysqli);
            if ($rank->select($_POST['rID'])) {
                $rankInfo = $rank->get_info_filtered();
                if (!isset($_POST['confirm']) || $_POST['confirm'] == "") {
                    echo "\n\t\t\t\t\t\tAre you sure you want to delete the rank <b>" . $rankInfo['name'] . "?</b>\n\t\t\t\t\t";
                } else {
                    if ($rank->countMembers() > 0) {
                        echo "\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\t\$('#deleteMessage').html('There are currently members with the rank of <b>" . $rankInfo['name'] . "</b>.  Please change all members with this rank before deleting it.');\n\t\t\t\t\t\t\t\t\$('#deleteDiv').dialog({\n\t\t\t\t\t\t\t\t\ttitle: 'Manage Ranks - Delete Rank',\n\t\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t\t\t'OK': function() { \$(this).dialog('close'); }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t</script>\n\t\t\t\t\t\t";
                    } else {
                        if ($rank->delete()) {
                            echo "";
                            echo "\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfunction refreshRanks() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\t\$('#deleteMessage').html('<b>" . $rankInfo['name'] . "</b> successfully deleted!');\n\t\t\t\t\t\t\t\t\$('#loadingSpiral').show();\n\t\t\t\t\t\t\t\t\$('#contentDiv').fadeOut(400);\n\t\t\t\t\t\t\t\t\$('#deleteDiv').dialog({\n\t\t\t\t\t\t\t\t\ttitle: 'Manage Ranks - Delete Rank',\n\t\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t\t\t'OK': function() {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\$.post('" . $MAIN_ROOT . "members/include/admin/manageranks/main.php', { }, function(data) {\n\t\t\t\t\t\t\t\t\t\t\t\t\$('#contentDiv').html(data).fadeIn(400);\n\t\t\t\t\t\t\t\t\t\t\t\t\$('#loadingSpiral').hide();\n\t\t\t\t\t\t\t\t\t\t\t});\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\$(this).dialog('close'); \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t\t";
                        } else {
                            echo "";
                            echo "\n\t\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\t\$('#deleteMessage').html('Unable to delete rank from the database.  Please contact the website administrator.');\n\t\t\t\t\t\t\t\t\$('#deleteDiv').dialog({\n\t\t\t\t\t\t\t\t\ttitle: 'Manage Ranks - Delete Rank',\n\t\t\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\t\t\tresizeable: false,\n\t\t\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t\t\t'OK': function() { \$(this).dialog('close'); }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t\t";
                        }
                    }
                }
            }
        }
    }
}
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:delete.php


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