survey_seahorse

Software Engineering Project - Fall 2018
Log | Files | Refs | README

commit eb90768e7e4783e3df4593284eea5e9beacf3539
parent af059c3c3580d395e37bcbd87733d6f9a145eb44
Author: John Kubach <johnkubach@gmail.com>
Date:   Mon, 10 Dec 2018 19:55:54 -0500

Add admin control panel

Diffstat:
Awebsite/controlpanel.php | 33+++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+), 0 deletions(-)

diff --git a/website/controlpanel.php b/website/controlpanel.php @@ -0,0 +1,33 @@ +<?php +session_start(); +include_once 'config.php'; +if (!isset($_SESSION['admin'])) { + header("Location: res/nope.php"); + exit(); +} else { + $user = $_SESSION['username']; + + echo "<p> Hello, ", $user, " what would you like to do? <br>"; +} +?> +<form class="block-form" action="res/block.php" method="POST"> + <input type='text' name='username' placeholder='User Name'> <br> + <button type='submit' name='revoke-creation' > Revoke Survey Creation </button> + <button type='submit' name='revoke-access' > Revoke All Survey Access </button> + <button type='submit' name='ban' > Ban User </button> + <button type='submit' name='unban' > Unban User </button> +</form> + +<form class="delete-survey-form" action="res/delete-survey.php" method="POST"> + <input type='text' name='survey-code' placeholder='Survey Code'> <br> + <button type='submit' name='delete-survey' > Delete Survey</button> +</form> + +<form class="create-admin" action="res/register-admin.php" method="POST"> + <input type='text' name='email' placeholder='Email'> <br> + <input type='text' name='username' placeholder='User Name'> <br> + <input type='text' name='password' placeholder='Password'> <br> + <button type='submit' name='admin' > Create New Admin Account</button> +</form> + +<a href="index.php"> Home </a> <br>