本文整理汇总了PHP中module_controller::packageblank方法的典型用法代码示例。如果您正苦于以下问题:PHP module_controller::packageblank方法的具体用法?PHP module_controller::packageblank怎么用?PHP module_controller::packageblank使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类module_controller
的用法示例。
在下文中一共展示了module_controller::packageblank方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CheckCreateForErrors
static function CheckCreateForErrors($username, $packageid, $groupid, $email, $password = "")
{
global $zdbh;
$username = strtolower(str_replace(' ', '', $username));
// Check to make sure the username is not blank or exists before we go any further...
if (!fs_director::CheckForEmptyValue($username)) {
$sql = "SELECT COUNT(*) FROM x_accounts WHERE UPPER(ac_user_vc)=:user AND ac_deleted_ts IS NULL";
$numrows = $zdbh->prepare($sql);
$user = strtoupper($username);
$numrows->bindParam(':user', $user);
if ($numrows->execute()) {
if ($numrows->fetchColumn() != 0) {
self::$alreadyexists = true;
return false;
}
}
if (!self::IsValidUserName($username)) {
self::$badname = true;
return false;
}
} else {
self::$userblank = true;
return false;
}
// Check to make sure the packagename is not blank and exists before we go any further...
if (!fs_director::CheckForEmptyValue($packageid)) {
$sql = "SELECT COUNT(*) FROM x_packages WHERE pk_id_pk=:packageid AND pk_deleted_ts IS NULL";
$numrows = $zdbh->prepare($sql);
$numrows->bindParam(':packageid', $packageid);
if ($numrows->execute()) {
if ($numrows->fetchColumn() == 0) {
self::$packageblank = true;
return false;
}
}
} else {
self::$packageblank = true;
return false;
}
// Check to make sure the groupname is not blank and exists before we go any further...
if (!fs_director::CheckForEmptyValue($groupid)) {
$sql = "SELECT COUNT(*) FROM x_groups WHERE ug_id_pk=:groupid";
$numrows = $zdbh->prepare($sql);
$numrows->bindParam(':groupid', $groupid);
if ($numrows->execute()) {
if ($numrows->fetchColumn() == 0) {
self::$groupblank = true;
return;
}
}
} else {
self::$groupblank = true;
return false;
}
// Check for invalid characters in the email and that it exists...
if (!fs_director::CheckForEmptyValue($email)) {
if (!self::IsValidEmail($email)) {
self::$bademail = true;
return false;
}
} else {
self::$emailblank = true;
return false;
}
// Check that the email address is unique to the user's table
if (!fs_director::CheckForEmptyValue($email)) {
if (ctrl_users::CheckUserEmailIsUnique($email)) {
self::$not_unique_email = false;
return true;
} else {
self::$not_unique_email = true;
return false;
}
} else {
self::$not_unique_email = true;
return false;
}
// Check for password length...
if (!fs_director::CheckForEmptyValue($password)) {
if (strlen($password) < ctrl_options::GetSystemOption('password_minlength')) {
self::$badpassword = true;
return false;
}
} else {
self::$passwordblank = true;
return false;
}
return true;
}