Example #1
0
                    uploadAuth($_POST['path']);
                }
                break;
            case "fileExists":
                if (isset($_POST['path'])) {
                    fileExists($_POST['path']);
                }
                break;
            case "thumbnail":
                if (isset($_POST['fileid'])) {
                    thumbnail($_POST['fileid']);
                }
                break;
            case "newPassword":
                if (isset($_POST['currentPassword'], $_POST['newPassword'])) {
                    newPassword($_POST['currentPassword'], $_POST['newPassword']);
                }
                break;
            case "getThumb":
                if (isset($_GET['path'], $_GET['filename'])) {
                    getThumb($_GET['path'], $_GET['filename']);
                }
                break;
        }
    }
}
// Utility Methods
// ***************************************************************************
// Takes an array of paths and returns a condensed array of paths, removing
// any nested folders
//
Example #2
0
<?php

include '../../settings.php';
include '../../inc/login_functions.php';
if (isset($_POST['submit'])) {
    $result = newPassword($mysqli);
}
$logedIn = access($mysqli, false);
/* Falls eingelogt soll er sich nicht nochmal hier anmelden können */
if ($logedIn === true) {
    header("Location: ../Account/account.php");
    exit;
}
include "../../inc/head.php";
?>

<section id="Content" role="main">
      <div class="container">

          <!-- SECTION EMPHASIS 1 -->
          <!-- FULL WIDTH -->
      </div><!-- !container -->
      <div class="full-width section-emphasis-1 page-header">
          <div class="container">
              <header class="row">
                  <div class="col-md-12">
                      <h1 class="strong-header pull-left">
                          Passwort vergessen
                      </h1>
                      <!-- BREADCRUMBS -->
                      <ul class="breadcrumbs list-inline pull-right">
Example #3
0
<?php

include '../../settings.php';
include '../../inc/login_functions.php';
// normale Login Prozedur
if (isset($_POST['submit'])) {
    $result = checkLogin($mysqli);
    /* Hier zu Account umleiten */
    if ($result === true) {
        header("Location: ../Account/account.php");
        exit;
    }
}
// PasswortRegeneration
if (isset($_POST['PwRegSubmit'])) {
    $resultPwReg = newPassword($mysqli);
}
// Falls eingelogt soll er sich nicht nochmal hier anmelden können
$logedIn = access($mysqli, false);
if ($logedIn === true) {
    header("Location: ../Account/account.php");
    exit;
}
// text
if (isset($_GET['code'])) {
    if ($_GET['code'] == 1) {
        $update = $mysqli->query("UPDATE indexviews SET views = views - 1 WHERE id = '1' ");
    }
    if ($_GET['code'] == 2) {
        $update = $mysqli->query("UPDATE indexviews SET views = views - 1 WHERE id = '2' ");
    }
Example #4
0
        $captchaError = "";
    } else {
        $captchaError = "Please complete the captcha to register.";
    }
    /**
     * If there are no errors, then send email to user, and confirm
     * that an e-mail has been sent.
     */
    if ($_POST['email'] && checkError($captchaError, $emailError)) {
        $msg = "An email has been sent to your email.";
        function newPassword($length)
        {
            $characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#\$%*()_+{}|<>?/.,;[]\\=-";
            return substr(str_shuffle($characters), 0, $length);
        }
        $password = newPassword(10);
        $to = $email;
        $subject = "Duke's Herald - Account Recovery";
        $headers = "MIME-Version: 1.0" . "\r\n";
        $headers .= "From: admin@dukesherald.com \r\n";
        $headers .= "Reply-To: admin@dukesherald.com \r\n";
        $headers .= "Content-Type:text/html;charset=UTF-8" . "\r\n";
        $message = "\n    <html>\n    <head>\n    <title>Account Recovery></title>\n    </head>\n    <body>\n    <div>\n    <h1>Account Recovery</h1>\n    <div>\n    <p>Hello  {$username}, someone has requested the login info of your Duke's Herald account.<br /> <br />\n    Username: {$username}<br /><br />\n    Password: {$password}</p>\n    </div>\n    </div>\n    </body>\n    </html>\n    ";
        mail($to, $subject, $message, $headers);
        // Hash the newly generated password and update the user's password.
        $hash = password_hash($password, PASSWORD_DEFAULT);
        $res = dbquery("UPDATE users SET passwd='{$hash}' WHERE email='{$email}'");
    } else {
        $msg = "Something has gone wrong, please try again.";
    }
} else {
Example #5
0
 *   http://www.intelliants.com/
 *
 ***************************************************************************/
require_once 'header.php';
if ($_POST['recover']) {
    $email = get_magic_quotes_gpc() ? stripslashes($_POST['email']) : $_POST['email'];
    if (!$email) {
        $error = true;
        $msg = 'Email incorrect. Please try again.';
    } else {
        $account = $gXpDb->getAffiliateByEmail($_POST['email']);
        if (!$account) {
            $error = true;
            $msg .= 'No account registered with this email.';
        } else {
            $new_pass = newPassword();
            $gXpDb->setNewPass(array("id" => $account['id'], "password" => $new_pass));
            $subject = 'Password recovery request!';
            $body = "Dear {$account['username']},\n\n";
            $body .= "You should use the following credentials to get access\n";
            $body .= "to eLitius Affiliate Member area:\n\n";
            $body .= "username: {$account['username']}\n";
            $body .= "password: {$new_pass}\n";
            $body .= "____________________________\n";
            $body .= "eLitius Support Team\n";
            $body .= "http://www.elitius.com/\n";
            $body .= "mailto:support@elitius.com";
            if (mail($_POST['email'], $subject, $body, "From: support@elitius.com\r\nReply-To: support@elitius.com\r\n")) {
                $msg = 'New password has just been sent to your email.';
            } else {
                $error = true;
Example #6
0
<?php

function newPassword($pass)
{
    $salt = rand(0, 9) . rand(0, 9) . rand(0, 9) . rand(0, 9);
    return md5(md5($pass) . $salt) . " " . $salt . " " . $pass;
}
echo newPassword("okmqaz11");
Example #7
0
<?php

// Include the API system
include "./API.php";
protectFile("password.php", "", __LINE__);
if (isset($_POST['pass'])) {
    $pass = newPassword($_POST['pass']);
    echo "Encrypted: " . $pass[0] . "<br />" . "Salt: " . $pass[1] . "<br />" . "Original: " . $pass[2];
} else {
    echo "<form action=\"\" method=\"post\">Password: <input name=\"pass\" type=\"password\"><input type=\"submit\" value=\"Submit!\"></form>";
}
Example #8
0
  displayAccountInfo($CustomerID, $FName, $LName, $MName, $Address1,
                   $Address2, $City, $State, $Zip, $Phone1, $Phone2,
                   $Email, $Username, "");
  endContentBox();
  exit;
}

if ($action == "newpass")
{
  generateGenericLayout($dblogin, $dbpass, $db, "<B>Account Settings</B>");
  beginContentBox();
  $OldPassword = trim(strtoupper($_POST['Password']));
  $NewPassword = trim(strtoupper($_POST['NewPassword']));
  $NewPasswordVerify = trim(strtoupper($_POST['NewPasswordVerify']));

  newPassword($CustomerID, $Email, $Password, $OldPassword, $NewPassword,   
              $NewPasswordVerify, $dblogin, $dbpass, $database);
  displayAccountInfo($CustomerID, $FName, $LName, $MName, $Address1,
                   $Address2, $City, $State, $Zip, $Phone1, $Phone2,
                   $Email, $Username, "");
  endContentBox();
  exit;
}

if ($action == "update")
{
  
  $NewFName    = trim($_POST['FName']);
  $NewLName    = trim($_POST['LName']);
  $NewMName    = trim($_POST['MName']);
  $NewAddress1 = trim($_POST['Address1']);
  $NewAddress2 = trim($_POST['Address2']);