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


PHP account::setBlockMoney方法代码示例

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


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

示例1: trim

     if (!$search) {
         $search = trim(stripslashes($_GET['search']));
     }
     if (stripslashes($_POST['exact'])) {
         $ss = $DB->parse('?', $search);
         $additsql .= " AND (LOWER(uname) = LOWER({$ss}) OR LOWER(usurname) = LOWER({$ss}) OR LOWER(login) = LOWER({$ss}) OR LOWER(email) = LOWER({$ss}) OR LOWER(old_login) = LOWER({$ss}) OR users.uid IN (SELECT uid FROM users_change_emails_log WHERE LOWER(email) = LOWER({$ss})))";
     } else {
         $ss = $DB->parse('?', "%{$search}%");
         $additsql .= " AND (uname ILIKE {$ss} OR usurname ILIKE {$ss} OR login ILIKE {$ss} OR email ILIKE {$ss} OR icq ILIKE {$ss} OR old_login ILIKE {$ss} OR users.uid IN (SELECT uid FROM users_change_emails_log WHERE email ILIKE {$ss}))";
     }
     $no_more = 0;
     break;
 case 'unblock_money':
     $user_id = intval(stripslashes($_GET['id']));
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/account.php';
     account::setBlockMoney($user_id, false);
     $search = trim(stripslashes($_POST['search']));
     if (!$search) {
         $search = trim(stripslashes($_GET['search']));
     }
     if (stripslashes($_POST['exact'])) {
         $ss = $DB->parse('?', $search);
         $additsql .= " AND (LOWER(uname) = LOWER({$ss}) OR LOWER(usurname) = LOWER({$ss}) OR LOWER(login) = LOWER({$ss}) OR LOWER(email) = LOWER({$ss}) OR LOWER(old_login) = LOWER({$ss}) OR users.uid IN (SELECT uid FROM users_change_emails_log WHERE LOWER(email) = LOWER({$ss})))";
     } else {
         $ss = $DB->parse('?', "%{$search}%");
         $additsql .= " AND (uname ILIKE {$ss} OR usurname ILIKE {$ss} OR login ILIKE {$ss} OR email ILIKE {$ss} OR icq ILIKE {$ss} OR old_login ILIKE {$ss} OR users.uid IN (SELECT uid FROM users_change_emails_log WHERE email ILIKE {$ss}))";
     }
     $no_more = 0;
     break;
 case 'search':
     $search = trim(stripslashes($_POST['search']));
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:inner_index.php

示例2: updateMoneyBlock

/**
 * Устанавливает/снимает блокировку денег пользователя.
 * 
 * @param string $sUsers  JSON строка с массивом UID пользователей
 * @param string $sAction действие: block - устанавливает, unblock - снимает
 *
 * @return object xajaxResponse
 */
function updateMoneyBlock($sUsers = '', $sAction = 'block')
{
    session_start();
    $objResponse = new xajaxResponse();
    if (hasPermissions('payments')) {
        $aUsers = _jsonArray($sUsers);
        if ($aUsers) {
            require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/account.php';
            $bBlock = $sAction == 'block';
            $sTitle = $bBlock ? 'Разблокировать деньги' : 'Заблокировать деньги';
            $sAction = $bBlock ? 'unblock' : 'block';
            foreach ($aUsers as $sUid) {
                account::setBlockMoney($sUid, $bBlock);
                $objResponse->assign("money_{$sUid}", 'innerHTML', '<a onclick="if (confirm(\'Вы уверены, что хотите ' . mb_strtolower($sTitle) . '?\')) xajax_updateMoneyBlock(JSON.encode([' . $sUid . ']),\'' . $sAction . '\')" href="javascript:void(0);">' . $sTitle . '</a>');
            }
            $objResponse->script('adminLogCheckUsers(false)');
            $objResponse->script('$("chk_all").checked=false;');
        }
    }
    return $objResponse;
}
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:29,代码来源:admin_log.server.php


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