Пример #1
0
function dbDateTime()
{
    // deprecated
    return dbNow();
}
Пример #2
0
 if (lg_debug) {
     $dbMsg .= "oldpassword hash matches stored password hash<br />\n";
 }
 $passhash = sha1($password . $_SESSION["userid"]);
 cp_changePassword($passhash, $_SESSION["userid"]);
 if (lg_debug) {
     $dbMsg .= "Executed change password command: numAffected = " . $numAffected . "<br />";
 }
 if ($numAffected == 1) {
     /*******************************************************************************************************************
      * Notify account holder of password change
      *******************************************************************************************************************/
     $mailBody .= '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
     $mailBody .= '<HTML><HEAD><META http-equiv=Content-Type content="text/html; charset=UTF-8">';
     $mailBody .= '</HEAD><BODY><DIV><FONT face=Arial size=2>' . lg_term_to . ' ' . $name . '<br><br>';
     $mailBody .= lg_phrase_password_changed_pre . lg_domain . lg_phrase_password_changed_post . ' ' . dbNow() . '<br><br>';
     $mailBody .= lg_phrase_password_change_authorized;
     $mailBody .= lg_term_via_email . ' ' . lg_webmaster_email_link . ' ' . lg_term_immediately . '<br>';
     $mailBody .= lg_term_or . ' ' . lg_term_at . '&nbsp;the <a href="' . 'hhttp://' . lg_domain . lg_contact_form . '">' . lg_term_contact_form . '</a><br>';
     $mailBody .= '</FONT></DIV>';
     $mailBody .= '</div></BODY></HTML>';
     if (lg_debug) {
         $dbMsg .= "Sending Notification Mail To Owner<br>" . $mailBody . "<br>\n";
     }
     $headers = "MIME-Version: 1.0\r\n";
     $headers .= "Content-type: text/html; charset=UTF-8\r\n";
     $headers .= "From: " . lg_webmaster_email . "\r\n";
     $headers .= "Reply-To: " . lg_webmaster_email . "\r\n";
     $subject = "=?UTF-8?B?" . base64_encode(lg_phrase_password_changed) . "?=";
     $subject1 = "=?UTF-8?B?" . base64_encode(lg_phrase_attention_webmaster . ' ' . lg_phrase_password_changed) . "?=";
     $result = mail($name . "<" . $email . ">", $subject, $mailBody, $headers);
* Declare all page variables and initialize default values
*******************************************************************************************************************/
$resettoken = "";
$timePassed = "";
$id = "";
$userid = "";
$email = "";
$message = "Enter you password reset token in the field provided and press the Submit button.";
$locked = "";
$dateLocked = "";
$mailBody = "";
$password = "";
$confirm = "";
$passhash = "";
$name = "";
$now = dbNow();
$destination = "";
$changePassword = "";
if (lg_debug) {
    $dbMsg = "Debugging Enabled<br />\n";
}
$entropy = "";
$lowLetters = "";
$upLetters = "";
$symbols = "";
$digits = "";
$totalChars = "";
$lowLettersChars = "";
$upLettersChars = "";
$symbolChars = "";
$digitChars = "";
Пример #4
0
     $dbMsg .= "country = " . $country . "<br />\n";
 }
 if (lg_debug) {
     $dbMsg .= "region = " . $region . "<br />\n";
 }
 if (lg_debug) {
     $dbMsg .= "city = " . $city . "<br />\n";
 }
 /******************************************************************************************************************
  * Set $locked, $dateLocked and unlock $token
  ******************************************************************************************************************/
 $locked = "1";
 if (lg_debug) {
     $dbMsg .= "locked = 1<br />\n";
 }
 $dateLocked = dbNow();
 if (lg_debug) {
     $dbMsg .= "dateLocked = " . $dateLocked . "<br />\n";
 }
 $token = strtoupper(sha1(getGUID()));
 if (lg_debug) {
     $dbMsg .= "token = " . $token . "<br />\n";
 }
 /******************************************************************************************************************
  * Write new account to user's table in database
  ******************************************************************************************************************/
 addUser($dateRegistered, $userid, $passhash, $name, $email, $ip, $region, $city, $country, $useragent, $website, $news, $locked, $dateLocked, $token);
 if (lg_debug) {
     $dbMsg .= "Database insert occurred. Result = " . $numAffected . "<br />\n";
 }
 if ($numAffected == 1) {
Пример #5
0
******************************************************************************************************************/
/*******************************************************************************************************************
* Declare all page variables and initialize their default values
*******************************************************************************************************************/
$dbMsg = "";
$redirected = "";
$destination = "";
$password = "";
$passhash = "";
$userid = "";
$useridValue = "";
$name = "";
$remember = "";
$message = lg_term_please_login;
$ip = $_SERVER["REMOTE_ADDR"];
$date = dbNow();
$useragent = htmlentities(substr($_SERVER["HTTP_USER_AGENT"], 1, 255));
$locked = "";
if ($_SERVER["REQUEST_METHOD"] == "GET") {
    if (lg_debug) {
        $dbMsg .= "METHOD GET<br />\n";
    }
    /*******************************************************************************************************************
     * On entry determine if we have a destination page
     *******************************************************************************************************************/
    if (lg_debug) {
        $dbMsg .= "Checking for destination parameter <br />\n";
    }
    $destination = getField("p,urlpath,get");
    if ($destination == "") {
        $destination = lg_success_page;
Пример #6
0
* If SSL required and not using SSL, redirect to https
*******************************************************************************************************************/
if (lg_useSSL && $_SERVER["SERVER_PORT_SECURE"] == "0") {
    header("Location: https://" . lg_domain . lg_loginPath . $lg_filename);
}
/*******************************************************************************************************************
* Declare all page variables and initialize default values
*******************************************************************************************************************/
$deleted = "1";
$userid = "";
$password = "";
$message = lg_term_enter_information;
$passhash = "";
$dbPasshash = "";
$dbId = "";
$dateDeleted = dbNow();
if (lg_debug) {
    $dbMsg = "DEBUG BEGIN<br />Check for Session(login)<br />";
}
/*******************************************************************************************************************
* If the form was posted, process the form
*******************************************************************************************************************/
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (lg_debug) {
        $dbMsg = "REQUEST METHO = POST, check form token<br />\n";
    }
    checkToken();
    if (lg_debug) {
        $dbMsg = "check form token = OKAY<br />\n";
    }
    $message = "";