Ejemplo n.º 1
0
function copyFiles($files)
{
    for ($x = 0; $x < count($files); $x++) {
        $file = $files[$x];
        $this_error = 0;
        @unlink($file->copy_dest);
        $copy = copy($file->download_dest, $file->copy_dest);
        if (!$copy) {
            setError("Copy error: {$file->copy_dest}");
            $this_error++;
        }
        $size = filesize($file->copy_dest);
        if ($size != $file->git_size) {
            setError("Copy file size check error {$file->copy_dest}");
            $this_error++;
        }
        if ($this_error == 0) {
            setSuccess("Success: {$file->name}");
        }
    }
}
                } elseif (containsInvalidCharacters(strtolower($password, 'abcdefghijklmnopqrstuvwxyz1234567890@~#!-_£$&*()^%}{()'))) {
                    setError(t("password_contains_illegal_characters", "Password contains invalid characters, please choose another."));
                }
            }
        }
    }
    // update the account
    if (!isErrors()) {
        $db = Database::getDatabase(true);
        $rs = $db->query('UPDATE users SET title = :title, firstname = :firstname, lastname = :lastname, email = :email WHERE id = :id', array('title' => $title, 'firstname' => $firstname, 'lastname' => $lastname, 'email' => $emailAddress, 'id' => $Auth->id));
        if ($rs) {
            // do password
            if (strlen($password)) {
                $rs = $db->query('UPDATE users SET password = :password WHERE id = :id', array('password' => MD5($password), 'id' => $Auth->id));
            }
            setSuccess(t("account_updated_success_message", "Account details successfully updated"));
        } else {
            setError(t("problem_creating_your_account_try_again_later", "There was a problem creating your account, please try again later"));
        }
    }
} else {
    $title = $user->title;
    $firstname = $user->firstname;
    $lastname = $user->lastname;
    $emailAddress = $user->email;
}
require_once '_header.php';
?>

<div class="contentPageWrapper">