Ejemplo n.º 1
0
 if (G_VERSIONTYPE != 'community') {
     #cpp#ifndef COMMUNITY
     if (G_VERSIONTYPE != 'standard') {
         #cpp#ifndef STANDARD
         $versionUsers = (int) $GLOBALS['configuration']['version_users'];
         if ($users[0]['count'] >= $versionUsers && $versionUsers > 0) {
             eF_redirect(basename($_SERVER['PHP_SELF']) . "?ctg=contact&limit_reached=1&message=" . urlencode(_MAXIMUMUSERSLIMITREACHEDCONTACTUS) . "&message_type=failure");
         }
     }
     #cpp#endif
 }
 #cpp#endif
 $smarty->assign("T_CTG", "signup");
 // SMS: 7/23/2014 Changed to support vLab
 // $form = new HTML_QuickForm("signup_register_personal_form", "post", basename($_SERVER['PHP_SELF'])."?ctg=signup".(isset($_GET['ldap']) ? '&ldap=1' : ''), "", "class = 'indexForm'", true);
 $form = new HTML_QuickForm_vLab("signup_register_personal_form", "post", basename($_SERVER['PHP_SELF']) . "?ctg=signup" . (isset($_GET['ldap']) ? '&ldap=1' : ''), "", "class = 'indexForm'", true);
 $form->setIsSignupForm(true);
 $form->setIsProfileForm(false);
 // SMS End Change
 $form->removeAttribute('name');
 // SMS: 7/23/2014 Changed to support vLab
 // $form -> registerRule('checkParameter', 'callback', 'eF_checkParameter');           //Register this rule for checking user input with our function, eF_checkParameter
 $form->registerRule('checkParameter', 'callback', 'eF_checkParameter_vLab');
 //Register this rule for checking user input with our function, eF_checkParameter_vLab
 $form->registerRule('checkNotExist', 'callback', 'eF_checkNotExist');
 //This rule is using our function, eF_checkNotExist, to ensure that no duplicate values are inserted in unique fields, such as login and email
 $form->registerRule('checkRule', 'callback', 'eF_checkRule');
 //Register this rule for checking user input with our function, eF_checkParameter
 $form->addElement('text', 'login', _LOGIN, isset($_GET['ldap']) ? 'class = "inputText inactiveElement" readonly' : 'class = "inputText"');
 $form->addRule('login', _THEFIELD . ' ' . _LOGIN . ' ' . _ISMANDATORY, 'required', null, 'client');
 $form->addRule('login', _THEFIELD . ' "' . _LOGIN . '" ' . _MUSTBESMALLERTHAN . ' 50 ' . mb_strtolower(_CHARACTERS), 'maxlength', 50, 'client');
Ejemplo n.º 2
0
                        $contrainAllButPassword = true;
                        $constrainAccess[] = 'file_upload';
                    } else {
                        if (!EfrontUser::isOptionVisible('change_pass')) {
                            $constrainAccess[] = 'password';
                        }
                    }
                }
            }
        }
    }
}
// Modified by Masoud Sadjadi on June 30, 2014 to allow a Company field with just one line input
// $form = new HTML_QuickForm("user_form", "post", basename($_SERVER['PHP_SELF'])."?ctg=personal&user="******"&op=profile".(isset($_GET['add_user']) ? '&add_user=1' : ''), "", null, true);
// require_once('');
$form = new HTML_QuickForm_vLab("user_form", "post", basename($_SERVER['PHP_SELF']) . "?ctg=personal&user="******"&op=profile" . (isset($_GET['add_user']) ? '&add_user=1' : ''), "", null, true);
// End modification by Masoud Sadjadi
$form->addElement('static', '', '<img src = "view_file.php?file=' . urlencode($avatar['path']) . '" alt = "' . $editedUser->user['login'] . '" title = "' . $editedUser->user['login'] . '"/>');
if (!in_array('file_upload', $constrainAccess) && $constrainAccess != 'all') {
    $form->addElement('file', 'file_upload', _IMAGEFILE, 'class = "inputText"');
    $form->addElement("static", "file_upload_text", _EACHFILESIZEMUSTBESMALLERTHAN . ' <b>' . FileSystemTree::getUploadMaxSize() . '</b> ' . _KB);
    $form->addElement("static", "sidenote", '(<a href = "' . basename($_SERVER['PHP_SELF']) . '?ctg=personal&user='******'login'] . '&op=profile&show_avatars_list=1&popup=1" target = "POPUP_FRAME" onclick = "eF_js_showDivPopup(event, \'' . _VIEWLIST . '\', 2)">' . _VIEWLIST . '</a>)');
    $form->addElement('select', 'system_avatar', _ORSELECTONEFROMLIST, $systemAvatars, "id = 'select_avatar'");
}
$form->addElement('text', 'login', _LOGIN, 'class = "inputText"');
if (!in_array('password', $constrainAccess) && $constrainAccess != 'all') {
    $form->addElement("static", "sidenote", _BLANKTOLEAVEUNCHANGED);
    $passwordElement = $form->addElement('password', 'password', _PASSWORD, 'autocomplete="off" class = "inputText"');
    $form->addElement("static", "", str_replace("%x", $GLOBALS['configuration']['password_length'], _PASSWORDMUSTBE6CHARACTERS));
    $passrepeatElement = $form->addElement('password', 'passrepeat', _REPEATPASSWORD, 'class = "inputText "');
}