<?php

/* ADMIN SYSTEM MODULE
----------------------------------*/

$bName = basename(__file__);

if (!defined('PARENT') || !isset($mswUser)) {
  include(PATH . 'control/modules/header/403.php');
}

include(MSW_ADM_LANG . $bName);

$fjs[] = 'sortable';
$fjs[] = 'sortable-def';
$mswWysCfg = array(
  'lang' => ($msw_cal2 != 'en' && file_exists(PATH . 'content/js/plugins/i18n-wysiwyg/' . $msw_cal2 . '.min.js') ? $msw_cal2 : '')
);
$fjs[] = 'wysiwyg';

$pagePrefix = $msw_adm_nav8;

if (isset($_GET['id'])) {
  $pagePrefix = $msw_adm_boxes8;
  $ID = (int) $_GET['id'];
  $Q  = $DB->db_query("SELECT * FROM `" . DB_PREFIX . "boxes` WHERE `id` = '{$ID}'");
  $ED = $DB->db_object($Q);
  if (!isset($ED->id)) {
    include(PATH . 'control/modules/header/403.php');
  }
}

include(PATH . 'content/_header.php');
include(PATH . 'content/' . $bName);
include(PATH . 'content/_footer.php');

?>