pnbp

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit f6d11d1bea54e7c862a701dea15fae00d515a17a
parent 12e4fe73a1ebc0d1e24d85cfd32cb6f5ece7eca3
Author: Paul Longtine <paullongtine@gmail.com>
Date:   Thu May 22 17:14:40 2014

removed a few things that do nothing

Diffstat:
 data/admin/auth.php    | 31 -------------------------------
 data/admin/config.json |  8 --------
 2 files changed, 0 insertions(+), 39 deletions(-)

diff --git a/data/admin/auth.php b/data/admin/auth.php @@ -1,31 +0,0 @@ -<?php -$config = json_decode(file_get_contents("./config.json"),TRUE); -$user = "root"; -$pass = ""; -$con = mysqli_connect($config['db_hostname'],$config['db_username'],$config['db_password'],$config['db_name']); -var_dump($_POST); -if (isset($_POST['u']) && isset($_POST['p'])) { - if (!isset($_POST['new'])) { - $guser = mysql_real_escape_string($_POST['u']); - echo 'SELECT hash, username FROM usr WHERE username = "'.$guser.'"'; - $user = mysqli_query($con,'SELECT hash, username FROM usr WHERE `username` = "$guser"'); - $user = mysqli_fetch_array($user); - if ( crypt($_POST['p'], $user['hash']) == $user['hash'] ) { - echo "Yes!"; - } else { - - } - } else { - $sth = $dbh->prepare(' - INSERT INTO usr (username, hash) - VALUES (:user, :hash) - '); - $username = $_POST['u']; - $hash = crypt($_POST['p']); - $sth->bindParam(':user',$username); - $sth->bindParam(':hash',$hash); - $sth->execute(); - echo "$hash, $username"; - } -} -?>- \ No newline at end of file diff --git a/data/admin/config.json b/data/admin/config.json @@ -1,8 +0,0 @@ -{ - "db_hostname": "localhost", - "db_username": "root", - "db_password": "", - "db_name": "usr", - "maintemplate": "./default.page", - "pastetemplate": "./paste.page" -}- \ No newline at end of file