1. <?php header("Content-Type: text/html; charset=utf-8"); ?>
  2. <?php $permittedList = array(
  3. "action" =>
  4.     array("upload", "delete"),
  5. "owner" =>
  6.     array("slider", "project")
  7. ); ?>
  8. <?php
  9. (
  10.     (count($_GET) == 2) and
  11.     (
  12.         in_array($_GET['action'], $permittedList['action'])
  13.         and
  14.         in_array($_GET['owner'], $permittedList['owner'])
  15.     )
  16. ) ?
  17. require_once('includes/functions.php') :
  18. exit(header('HTTP/1.1 403 Forbidden'));
  19. ?>