public function check_email($email) { $user = $this->users->get_by_email($email); if (!empty($user->id)) { return true; } else { $this->form_validation->set_message('check_email', invalid_email()); return false; } }
<?php $member_profile_errors = array(); $inputted_email = isset($_POST['member_profile_email']) ? $_POST['member_profile_email'] : load_member()['email']; $inputted_fullname = isset($_POST['member_profile_fullname']) ? $_POST['member_profile_fullname'] : load_member()['fullname']; $inputted_dob = isset($_POST['member_profile_dob']) ? $_POST['member_profile_dob'] : load_member()['dob']; if (isset($_POST['member_profile_submit'])) { if (!$_POST['member_profile_email'] || !$_POST['member_profile_fullname'] || !$_POST['member_profile_dob']) { $member_profile_errors[] = translate_error('not_filled'); } else { if (invalid_email($_POST['member_profile_email'])) { $member_profile_errors[] = translate_error('invalid_email'); } if (invalid_dob($_POST['member_profile_dob'])) { $member_profile_errors[] = translate_error('invalid_dob'); } if ($_POST['member_profile_password']) { if (short_pass($_POST['member_profile_password'])) { $member_profile_errors[] = translate_error('short_pass'); } if (long_pass($_POST['member_profile_password'])) { $member_profile_errors[] = translate_error('long_pass'); } if (no_number_pass($_POST['member_profile_password'])) { $member_profile_errors[] = translate_error('no_number_pass'); } if (no_letter_pass($_POST['member_profile_password'])) { $member_profile_errors[] = translate_error('no_letter_pass'); } /* if (no_caps_pass($_POST['member_profile_password'])) {
<?php if (isset($_COOKIE['NSH:member']) && !invalid_email($_COOKIE['NSH:member'])) { header('Location: http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://nhipsinhhoc.vn/member/' . $_COOKIE['NSH:member'] . '/'); } $member_login_errors = array(); $inputted_email = isset($_POST['member_login_email']) ? $_POST['member_login_email'] : ''; if (isset($_POST['member_login_submit'])) { if (!$_POST['member_login_email'] || !$_POST['member_login_password']) { $member_login_errors[] = translate_error('not_filled'); } else { if (invalid_member($_POST['member_login_email'], $_POST['member_login_password'])) { $member_login_errors[] = translate_error('invalid_member'); } } if (!count($member_login_errors)) { setrawcookie('NSH:member', $_POST['member_login_email'], time() + 10 * 365 * 24 * 60 * 60, '/'); header('Location: http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://nhipsinhhoc.vn/member/' . $_POST['member_login_email'] . '/'); } } ?> <form id="login_form" method="POST" action=""> <div class="m-input-prepend"> <span class="add-on"><?php echo translate_span('email'); ?> </span> <input class="m-wrap translate required" size="20" type="text" name="member_login_email" data-lang-ja="<?php echo $input_interfaces['email']['ja']; ?> " data-lang-zh="<?php
<?php if (isset($_COOKIE['NSH:member']) && !invalid_email($_COOKIE['NSH:member'])) { header('Location: http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://nhipsinhhoc.vn/member/' . $_COOKIE['NSH:member'] . '/'); } $member_register_errors = array(); $inputted_email = isset($_POST['member_register_email']) ? $_POST['member_register_email'] : ''; $inputted_fullname = isset($_POST['member_register_fullname']) ? $_POST['member_register_fullname'] : (isset($_COOKIE['NSH:remembered_fullname']) ? $_COOKIE['NSH:remembered_fullname'] : ''); $inputted_dob = isset($_POST['member_register_dob']) ? $_POST['member_register_dob'] : (isset($_COOKIE['NSH:remembered_dob']) ? $_COOKIE['NSH:remembered_dob'] : ''); if (isset($_POST['member_register_submit'])) { if (!$_POST['member_register_email'] || !$_POST['member_register_fullname'] || !$_POST['member_register_password'] || !$_POST['member_register_repeat_password'] || !$_POST['member_register_dob']) { $member_register_errors[] = translate_error('not_filled'); } else { if (invalid_email($_POST['member_register_email'])) { $member_register_errors[] = translate_error('invalid_email'); } else { if (taken_email($_POST['member_register_email'])) { $member_register_errors[] = translate_error('taken_email'); } } if (short_pass($_POST['member_register_password'])) { $member_register_errors[] = translate_error('short_pass'); } if (long_pass($_POST['member_register_password'])) { $member_register_errors[] = translate_error('long_pass'); } if (no_number_pass($_POST['member_register_password'])) { $member_register_errors[] = translate_error('no_number_pass'); } if (no_letter_pass($_POST['member_register_password'])) { $member_register_errors[] = translate_error('no_letter_pass');