Esempio n. 1
0
            if ($ob_user->user_id) {
                pa($ob_user);
                # if it exist but hasn't been activated yet, take it to the activation page that will allow to send a new message.
                # else, show alert and option to recover password.
            } else {
                # the user doesn't exist, insert it on to the database.
                $arr_data = array('first_name' => $_POST['first_name'], 'last_name' => $_POST['last_name'], 'pasapalabra' => $_POST['pass'], 'phone1' => $_POST['phone_1'], 'phone2' => $_POST['phone_2'], 'email' => $_POST['mail'], 'user_name' => $_POST['username'], 'address' => $_POST['address'], 'country' => $_POST['country'], 'id_num' => $_POST['id_num']);
                $user_id = user::create_user($arr_data);
                $ob_user = new user($user_id);
                $ob_user->add_default_modules();
                # send control_code e-mail
                $user_details = $ob_user->get_all_details();
                $enc_mail = encode($_POST['mail']);
                $arr_vars = array('check_code' => $user_details['control_code'], 'url' => $conf_main_url . $conf_main_page . '?mod=home&view=check_code&m=' . $enc_mail, 'url_link' => $conf_main_url . $conf_main_page . '?mod=home&view=check_code&m=' . $enc_mail . '&code=' . $user_details['control_code']);
                if ($_SERVER['SERVER_NAME'] != 'localhost') {
                    mail_templates::send_mail($_POST['mail'], 'check_code', $arr_vars);
                }
                jump_to($conf_main_page . '?mod=home&view=check_code&m=' . $enc_mail);
                exit;
            }
        }
    }
    ?>

<h5>
  <?php 
    echo ucfirst(new_user_form);
    ?>
</h5>
<p><a href="<?php 
    echo $conf_main_page;
Esempio n. 2
0
</script>
			<?php 
            write_log_db('REGISTRATION', 'NEW USER KO', 'User activation code wrong: ' . $_POST['check_code'] . ' mail: ' . decode($_GET['m']), 'check_code.php');
        }
    }
}
# Send e-mail from here
if ($_GET['se']) {
    $mail = decode($_GET['m']);
    $user = new user($mail);
    if ($user->user_id) {
        $arr_code = simple_select('users', 'user_id', $user->user_id, 'control_code');
        $enc_mail = $_GET['m'];
        $arr_vars = array('check_code' => $arr_code['control_code'], 'url' => $conf_main_url . $conf_main_page . '?mod=home&view=check_code&m=' . $enc_mail, 'url_link' => $conf_main_url . $conf_main_page . '?mod=home&view=check_code&m=' . $enc_mail . '&code=' . $arr_code['control_code']);
        if ($_SERVER['SERVER_NAME'] != 'localhost') {
            mail_templates::send_mail($mail, 'check_code', $arr_vars);
        }
    }
}
?>
<div style="padding-left:25px; padding-top:15px;">
  <form name="check_form" id="check_form" method="post" action="">
    <table cellpadding="10" cellspacing="4" border="0" class="default_text" align="center" width="75%">
      <tr>
        <td valign="top"><img src="<?php 
echo $conf_images_path;
?>
email_big.gif" /></td>
        <td colspan="2"><p>
            <?php 
echo check_code_txt_1;