From a0bf5ba0dfb13a13b18566bc7a1c909bcc264733 Mon Sep 17 00:00:00 2001 From: Eric Rasmussen <ericrasmussen1@gmail.com> Date: Fri, 24 Mar 2017 14:56:14 -0500 Subject: [PATCH] More cleanup --- .gitignore | 1 - admin_auth_session.php | 32 +++++++++++++++++--------------- connectinfo-sample.php | 3 +++ connections/inthenews.php | 10 ---------- www/admin/navigation.html | 4 ---- 5 files changed, 20 insertions(+), 30 deletions(-) delete mode 100644 connections/inthenews.php delete mode 100644 www/admin/navigation.html diff --git a/.gitignore b/.gitignore index 1f78364..9c62089 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ connectinfo.php -connections/inthenews.php .svn .project diff --git a/admin_auth_session.php b/admin_auth_session.php index b632f4a..c5eb031 100644 --- a/admin_auth_session.php +++ b/admin_auth_session.php @@ -12,23 +12,25 @@ if (isset($_GET['logout'])) { exit(); } -$admins = array('lreed5', 'ssmith13', 'rcrisler1', 'bbieber2', 'smeranda2', 'erasmussen2'); +$admins = array('lreed5', 'ssmith13', 'rcrisler1', 'erasmussen2'); if (!$auth->isLoggedIn() || !in_array($user, $admins)) { - echo 'You are not authorized!'; + echo 'Access Denied'; exit(); } -?> -<?php - if(isset($_POST['actionflag'])) - $actionflag = $_POST['actionflag']; - else - $actionflag = ""; - //echo $actionflag; - if(isset($_POST['ID'])) - $recid = $_POST['ID']; - //echo $recid; - if(isset($_POST['headline'])) - $headline = $_POST['headline']; - //echo $headline; + +if (isset($_POST['actionflag'])) { + $actionflag = $_POST['actionflag']; +} else { + $actionflag = ""; +} + +if (isset($_POST['ID'])) { + $recid = $_POST['ID']; +} + +if (isset($_POST['headline'])) { + $headline = $_POST['headline']; +} + diff --git a/connectinfo-sample.php b/connectinfo-sample.php index d7b6dbd..c5ec55f 100644 --- a/connectinfo-sample.php +++ b/connectinfo-sample.php @@ -1,4 +1,7 @@ <?php + +// Copy and rename as connectinfo.php + $username = ''; $password = ''; $database = 'inthenews'; diff --git a/connections/inthenews.php b/connections/inthenews.php deleted file mode 100644 index 6bf0505..0000000 --- a/connections/inthenews.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -# FileName="Connection_php_mysql.htm" -# Type="MYSQL" -# HTTP="true" -$hostname_inthenews = "localhost"; -$database_inthenews = "inthenews"; -$username_inthenews = "root"; -$password_inthenews = ""; -$inthenews = mysql_pconnect($hostname_inthenews, $username_inthenews, $password_inthenews) or trigger_error(mysql_error(),E_USER_ERROR); -?> \ No newline at end of file diff --git a/www/admin/navigation.html b/www/admin/navigation.html deleted file mode 100644 index 0637acd..0000000 --- a/www/admin/navigation.html +++ /dev/null @@ -1,4 +0,0 @@ -<ul> - <li><a href="../">In the News Home</a></li> - <li><a href="index.php">ItN Admin</a></li> -</ul> -- GitLab