| 1 | <?PHP |
| 2 | include_once('../slack.php'); |
| 3 | include_once('security.php'); |
| 4 | if ($_COOKIE['level'] == 'user'){ |
| 5 | slack_general('ADMIN: Redirect User Home ('.$_COOKIE['name'].') ('.$_COOKIE['level'].')','md-petition'); |
| 6 | header('Location: user_home.php'); |
| 7 | } |
| 8 | if ($_COOKIE['level'] == 'manager'){ |
| 9 | slack_general('ADMIN: Redirect Manager Home ('.$_COOKIE['name'].') ('.$_COOKIE['level'].')','md-petition'); |
| 10 | header('Location: manager_home.php'); |
| 11 | } |
| 12 | include_once('header.php'); |
| 13 | slack_general('ADMIN: Website Text Loaded ('.$_COOKIE['name'].') ('.$_COOKIE['level'].')','md-petition'); |
| 14 | ?> |
| 15 | |
| 16 | <h1>Website Text</h1> |
| 17 | <?PHP |
| 18 | $q2 = "SELECT * FROM website_text"; |
| 19 | $r2 = $petition->query($q2); |
| 20 | while($d2 = mysqli_fetch_array($r2)){ |
| 21 | echo "<h2>$d2[text_title]</h2><div>".htmlspecialchars($d2['text_block'])."</div>"; |
| 22 | } |
| 23 | |
| 24 | |
| 25 | include_once('footer.php'); |
| 26 | ?> |