Skip to content
Permalink
Browse files

Updates 9/10/2015

  • Loading branch information...
Kevin Roth
Kevin Roth committed Sep 10, 2015
1 parent 33ee81c commit 88ae75142e7c54f87ce411ae32dc1493f76ffdfd
Showing with 8 additions and 17 deletions.
  1. +7 −1 includes/application_top.php
  2. +0 −2 login.php
  3. +1 −5 password_reset.php
  4. +0 −1 send_email.php
  5. +0 −3 signup.php
  6. +0 −3 user_edit.php
  7. +0 −2 users.php
@@ -2,7 +2,11 @@
// application_top.php -- included first on all pages
require('includes/config.php');
require('includes/functions.php');
require('includes/classes/crypto.php');
require('includes/classes/class.phpmailer.php');
require('includes/htmlpurifier/HTMLPurifier.auto.php');
$crypto = new phpFreaksCrypto;
$purifier_config = HTMLPurifier_Config::createDefault();
$purifier_config->set('Cache.DefinitionImpl', null); //turns off caching
@@ -45,13 +49,15 @@
require('includes/classes/login.php');
$login = new Login;
$adminUser = $login->get_user('admin');
//print_r($adminUser);
$okFiles = array('login.php', 'signup.php', 'password_reset.php');
if (!in_array(basename($_SERVER['PHP_SELF']), $okFiles) && (empty($_SESSION['logged']) || $_SESSION['logged'] !== 'yes')) {
header( 'Location: login.php' );
exit;
} else if (!empty($_SESSION['loggedInUser'])) {
$user = $login->get_user($_SESSION['loggedInUser']);
$adminUser = $login->get_user('admin');
}
if ($_SESSION['loggedInUser'] === 'admin' && $_SESSION['logged'] === 'yes') {
@@ -3,8 +3,6 @@
//session_start();
require_once('includes/application_top.php');
require('includes/classes/crypto.php');
$crypto = new phpFreaksCrypto;
$_SESSION = array();
@@ -1,15 +1,11 @@
<?php
require('includes/application_top.php');
require('includes/classes/crypto.php');
$crypto = new phpFreaksCrypto;
include('includes/classes/class.phpmailer.php');
if ($_GET['reset'] == 'true') {
$display = '<div class="responseOk">Your password has been reset, and has been sent to you.</div><br/>';
}
if (isset($_POST['submit'])) {
if (is_array($_POST) && sizeof($_POST) > 0) {
//create new user, disabled
$sql = "SELECT * FROM " . DB_PREFIX . "users WHERE firstname='".$_POST['firstname']."' and email = '".$_POST['email']."';";
$query = $mysqli->query($sql);
@@ -1,6 +1,5 @@
<?php
require('includes/application_top.php');
include('includes/classes/class.phpmailer.php');
if (!$user->is_admin) {
header('Location: ./');
@@ -1,8 +1,6 @@
<?php
require_once('includes/application_top.php');
require('includes/classes/crypto.php');
include('includes/classes/class.formvalidation.php');
include('includes/classes/class.phpmailer.php');
if (!ALLOW_SIGNUP) {
header('location: login.php?signup=no');
@@ -13,7 +11,6 @@
$my_form = new validator;
$mail = new PHPMailer();
$crypto = new phpFreaksCrypto;
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
@@ -1,10 +1,7 @@
<?php
require('includes/application_top.php');
require('includes/classes/crypto.php');
$crypto = new phpFreaksCrypto;
include('includes/classes/class.formvalidation.php');
include('includes/classes/class.phpmailer.php');
if (isset($_POST['submit'])) {
$my_form = new validator;
@@ -1,8 +1,6 @@
<?php
require('includes/application_top.php');
include('includes/classes/class.formvalidation.php');
require('includes/classes/crypto.php');
$crypto = new phpFreaksCrypto;
if (!$user->is_admin) {
header('Location: ./');

0 comments on commit 88ae751

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.