Esempio n. 1
0
<?php

###########################################################################
# Copyright Jamit Software 2012, http://www.jamit.com
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
###########################################################################
require "../config.php";
$page_title = $label['c_forgot_head'] . " - " . jb_escape_HTML(JB_SITE_NAME);
JB_template_candidates_outside_header($page_title);
JB_template_candidates_forget_pass_form();
$submit = $_REQUEST['submit'];
$email = $_REQUEST['email'];
function make_password()
{
    while (strlen($pass) < 5) {
        $pass .= chr(rand(97, 122));
    }
    return $pass;
}
if ($_REQUEST['email'] != '') {
    $sql = "select * from users where `Email`='" . jb_escape_sql($email) . "'";
    //echo $sql;
    $result = JB_mysql_query($sql);
    $row = mysql_fetch_array($result, MYSQL_ASSOC);
    if ($row['Email'] != '') {
        if ($_SESSION['PASS_SENT_TO'] != $_REQUEST['email']) {
            // password was not sent.
            //echo "email found";
            $pass = make_password();
Esempio n. 2
0
<?php

###########################################################################
# Copyright Jamit Software 2012, http://www.jamit.com
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
###########################################################################
require "../config.php";
$submit = $_REQUEST['submit'];
$email = $_REQUEST['email'];
$page_title = $label["employer_forgot_title"] . " - " . jb_escape_HTML(JB_SITE_NAME);
JB_template_employers_outside_header($page_title);
JB_template_employers_forget_pass_form();
function make_password()
{
    while (strlen($pass) < 5) {
        $pass .= chr(rand(97, 122));
    }
    return $pass;
}
if ($_REQUEST['email'] != '') {
    $sql = "select * from employers where `Email`='" . jb_escape_sql($email) . "'";
    $result = JB_mysql_query($sql);
    $row = mysql_fetch_array($result, MYSQL_ASSOC);
    if ($row['Email'] != '') {
        if ($row['Validated'] == '0') {
            $label["employer_forgot_error1"] = str_replace("%SITE_CONTACT_EMAIL%", JB_SITE_CONTACT_EMAIL, $label["employer_forgot_error1"]);
            echo "<center>" . $label["employer_forgot_error1"] . "</center>";
        } else {
            if ($_SESSION['PASS_SENT_TO'] != $_REQUEST['email']) {