本文整理匯總了PHP中kekezu::k_strpos方法的典型用法代碼示例。如果您正苦於以下問題:PHP kekezu::k_strpos方法的具體用法?PHP kekezu::k_strpos怎麽用?PHP kekezu::k_strpos使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類kekezu
的用法示例。
在下文中一共展示了kekezu::k_strpos方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: check_username
function check_username($reg_username)
{
global $_lang;
if (function_exists("filter_var")) {
if (filter_var($reg_username, FILTER_VALIDATE_EMAIL)) {
return $_lang['username_can_not_email'];
}
if (kekezu::is_mobile($reg_username)) {
return $_lang['username_can_not_phone_number'];
}
} else {
if (kekezu::is_email($reg_username)) {
return $_lang['username_can_not_email'];
}
if (kekezu::is_mobile($reg_username)) {
return $_lang['username_can_not_phone_number'];
}
}
$check_username = trim($reg_username);
if (empty($check_username)) {
return $_lang['username_is_empty'];
}
if (kekezu::k_strpos($check_username)) {
return $_lang['username_illegal'];
}
if (kekezu::check_user_by_name($check_username, 1)) {
return $_lang['user_has_exist'];
}
if ($this->_sys_config['user_intergration'] == 2) {
$result = keke_user_class::user_checkname($check_username);
if ($result == -1) {
return $_lang['username_illegal'];
} else {
if ($result == -2) {
return $_lang['contain_allow_register_words'];
} else {
if ($result == -3) {
return $_lang['username_has_exist'];
}
}
}
}
$limit_username = keke_user_class::user_getprotected();
if ($limit_username && in_array($check_username, $limit_username)) {
return $_lang['register_fail_limit_register'];
}
return true;
}
示例2: check_username
static function check_username($check_username)
{
global $basic_config, $_K, $handlekey;
global $_lang;
$check_username = trim($check_username);
if (empty($check_username)) {
return $_lang['username_is_empty'];
}
if ($basic_config['user_intergration'] == 1) {
if (kekezu::k_strpos($check_username)) {
return $_lang['username_illegal'];
}
$result = keke_user_class::user_checkname($check_username);
if ($result == 0) {
return $_lang['user_has_exist'];
}
} else {
if ($basic_config['user_intergration'] == 2) {
$result = keke_user_class::user_checkname($check_username);
if ($result == -1) {
return $_lang['username_illegal'];
} else {
if ($result == -2) {
return $_lang['contain_allow_register_words'];
} else {
if ($result == -3) {
return $_lang['user_has_exist'];
}
}
}
}
}
$limit_username = keke_user_class::user_getprotected();
if ($limit_username && in_array($check_username, $limit_username)) {
return $_lang['register_fail_limit_register'];
}
return true;
}