示例#1
0
function ihc_register_form($attr = false)
{
    $str = '';
    $user_type = ihc_get_user_type();
    if ($user_type == 'unreg') {
        ///////ONLY UNREGISTERED CAN SEE THE REGISTER FORM
        if (isset($_GET['ihc_register'])) {
            return;
        }
        $template = get_option('ihc_register_template');
        $str .= '<style>' . get_option('ihc_register_custom_css') . '</style>';
        include_once IHC_PATH . 'classes/UserAddEdit.class.php';
        $args = array('user_id' => false, 'type' => 'create', 'tos' => true, 'captcha' => true, 'action' => '', 'is_public' => true, 'register_template' => $template);
        $obj_form = new UserAddEdit();
        $obj_form->setVariable($args);
        //setting the object variables
        $str .= '<div class="iump-register-form ' . $template . '">' . $obj_form->form() . '</div>';
        //print the Errors
        global $ihc_error_register;
        if (!empty($ihc_error_register)) {
            $str .= '<div class="ihc-wrapp-the-errors">' . $ihc_error_register . '</div>';
        }
    }
    return $str;
}
示例#2
0
} else {
    if (isset($_REQUEST['Submit'])) {
        //create
        $args = array('user_id' => false, 'type' => 'create', 'tos' => false, 'captcha' => false, 'action' => $url . '&tab=users', 'is_public' => false);
        $obj->setVariable($args);
        //setting the object variables
        $obj->save_update_user();
    }
}
$obj_form = new UserAddEdit();
if (isset($_REQUEST['ihc-edit-user'])) {
    ///EDIT USER FORM
    $args = array('user_id' => $_REQUEST['ihc-edit-user'], 'type' => 'edit', 'tos' => false, 'captcha' => false, 'action' => $url . '&tab=users', 'is_public' => false);
    $obj_form->setVariable($args);
    //setting the object variables
    $form = $obj_form->form();
} else {
    /// CREATE USER FORM
    $args = array('user_id' => false, 'type' => 'create', 'tos' => false, 'captcha' => false, 'action' => $url . '&tab=users', 'is_public' => false);
    $obj_form->setVariable($args);
    //setting the object variables
    $form = $obj_form->form();
}
global $ihc_error_register;
echo $ihc_error_register;
//set default pages message
echo ihc_check_default_pages_set();
if (isset($_REQUEST['ihc-edit-user']) || isset($_REQUEST['ihc-new-user'])) {
    //add edit user
    if (isset($_REQUEST['ihc-edit-user'])) {
        ?>
示例#3
0
function ihc_register_preview_ajax()
{
    include_once IHC_PATH . 'classes/UserAddEdit.class.php';
    $args = array('user_id' => false, 'type' => 'create', 'tos' => true, 'captcha' => true, 'action' => '', 'is_public' => true, 'disabled_submit_form' => 'disabled', 'register_template' => $_REQUEST['template']);
    $obj_form = new UserAddEdit();
    $obj_form->setVariable($args);
    //setting the object variables
    $str = '';
    $str .= '<style>' . $_REQUEST['custom_css'] . '</style>';
    $str .= '<div class="iump-register-form  ' . $_REQUEST['template'] . '">' . $obj_form->form() . '</div>';
    echo $str;
    die;
}