<?php $feedback = new Feedback(); if (Input::get('del') && $_SESSION['role'] == 'Staff') { $del = Input::get('del'); unset($_POST['del']); if ($feedback->find($del)) { $feedback->delete($del); //force refresh header('Location: /TCS/' . Input::get('page')); exit; } } if ($_SESSION['role'] == 'Staff') { ?> <div class="row title-top-pad footer-padding"> <?php if (Input::get('view')) { $feedback->find(Input::get('view')); ?> <h4>View Feedback</h4> <h5>Type: <?php echo $feedback->data()->category; ?> </h5> <h5>Message:</h5> <h6><?php
<?php require "../includes/checkPermission.php"; require "../../deny/connector.php"; require "class/class.Feedback.php"; require "../includes/injection.php"; $fbid = sqlInjection($_GET['feedbackID']); $fb = new Feedback(); $fb->delete($fbid); echo "<meta http-equiv='refresh' content='0;url=../admincp.php?opt=listfeedback'>"; //header("location: ../admincp.php?opt=listnews"); //exit();
<?php require 'includes/master.inc.php'; $Auth->requireAdmin('login.php'); $f = new Feedback($_GET['id']); if (!$f->ok()) { redirect('feedback.php'); } if (isset($_POST['btnNew'])) { $f->new = 1; $f->update(); redirect('feedback.php'); } elseif (isset($_POST['btnDelete'])) { $f->delete(); redirect('feedback.php'); } else { $f->new = 0; $f->update(); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Shine</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" > <link rel="stylesheet" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css" type="text/css"> <link rel="stylesheet" href="css/yuiapp.css" type="text/css"> <style type="text/css" media="screen"> th { text-align:right; font-weight:bold; } </style>
<?php /** * Created by PhpStorm. * User: Ristee * Date: 30.10.2015 * Time: 23:16 */ require __DIR__ . '/functions/Feedback.php'; require __DIR__ . '/functions/Auth.php'; $auth = new Auth(); if ($auth->isAuth()) { if (isset($_GET['id'])) { $id = (int) $_GET['id']; $feed = new Feedback(); $feed->delete($id); } } header('Location: ./resp.php');