本文整理汇总了PHP中sbr_meta::searchUsersPhone方法的典型用法代码示例。如果您正苦于以下问题:PHP sbr_meta::searchUsersPhone方法的具体用法?PHP sbr_meta::searchUsersPhone怎么用?PHP sbr_meta::searchUsersPhone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sbr_meta
的用法示例。
在下文中一共展示了sbr_meta::searchUsersPhone方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateSafetyPhone
/**
* Изменить данные привязки аккаунта к телефону.
*
* @param int $sUid UID пользователя
* @param string $sPhone телефон
* @param string $sPhoneOnly отправлять восстановление пароля только на телефон - 't' или 'f'
* @param string $sSafetyMob Входить в финансы только по СМС - 't' или 'f'
*
* @return object xajaxResponse
*/
function updateSafetyPhone($sUid = 0, $sPhone = '', $sPhoneOnly = 'f', $sSafetyMob = 'f')
{
session_start();
$objResponse = new xajaxResponse();
if (hasPermissions('users')) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/users.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/sbr.php';
$sPhone = '+' . str_replace('+', '', $sPhone);
$reqv = sbr_meta::getUserReqvs($sUid);
if ($reqv[$reqv['form_type']]['mob_phone'] != $sPhone) {
$nreqv['mob_phone'] = $sPhone;
$cnt = 0;
$filter = array('search_phone_exact' => true, 'search_phone' => $nreqv['mob_phone']);
sbr_meta::searchUsersPhone($cnt, $filter);
if ($cnt > 0) {
$res = "Телефон {$sPhone} уже зарегистрирован в системе.";
$objResponse->assign("safety_phone{$sUid}", 'value', $reqv[$reqv['form_type']]['mob_phone']);
} else {
sbr_meta::$reqv_fields[$reqv['form_type']]['mob_phone']['maxlength'] = 15;
$error = sbr_meta::setUserReqv($sUid, $reqv['rez_type'], $reqv['form_type'], $nreqv);
}
}
$res = users::ChangeSafetyPhone($sUid, $sPhone, $sPhoneOnly);
$error = sbr_meta::safetyMobPhone($sUid, $sSafetyMob);
if ($res) {
$objResponse->alert($res);
$objResponse->script("\$('safety_phone_show{$sUid}').setStyle('display', '');");
} else {
$sChecked = $sPhoneOnly == 't' ? 'true' : 'false';
$sDisplay = $sPhoneOnly == 't' ? '' : 'none';
$sSafetyMobDisplay = $sSafetyMob == 't' ? '' : 'none';
$objResponse->assign("safety_phone_value{$sUid}", 'innerHTML', $sPhone);
$objResponse->assign("safety_phone_hidden{$sUid}", 'value', $sPhone);
$objResponse->script("\$('safety_only_phone_show{$sUid}').setStyle('display', '{$sDisplay}');");
$objResponse->script("\$('is_safety_mob_show{$sUid}').setStyle('display', '{$sSafetyMobDisplay}');");
$sDisplay = trim($sPhone) ? '' : 'none';
$objResponse->script("\$('safety_phone_show{$sUid}').setStyle('display', '{$sDisplay}');");
}
$objResponse->script("\$('safety_phone_edit{$sUid}').setStyle('display', 'none');");
}
return $objResponse;
}
示例2: array
$js_file = array('zeroclipboard/ZeroClipboard.js', 'user_search.js', 'admin_log.js', 'banned.js');
$header = $rpath . 'header.php';
$inner_page = "index_inner.php";
$content = '../content22.php';
$footer = $rpath . 'footer.html';
$template = 'template2.php';
$filter = array();
$cmd = __paramInit('string', 'cmd', 'cmd', '');
$page = __paramInit('int', 'page', 'page', 1);
$search_phone = __paramInit('string', 'search_phone', 'search_phone', '');
$search_phone = clearInputText($search_phone);
$sbr_meta = new sbr_meta();
if (!$page) {
$page = 1;
} elseif ($page < 0) {
header_location_exit('/404.php');
exit;
}
$search_phone_exact = __paramInit('string', 'search_phone_exact', null, '');
if ($cmd == 'filter') {
$filter['search_phone'] = $search_phone;
$filter['search_phone_exact'] = $search_phone_exact;
$users = $sbr_meta->searchUsersPhone($count, $filter, $page);
$pages = ceil($count / 50);
if (!$users && $page > 1) {
$sHref = e_url('page', null);
header('Location: ' . $sHref);
exit;
}
}
include $rpath . $template;