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