<?php

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

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

include(MSW_ADM_LANG . basename(__file__));

$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_nav3;

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

include(PATH . 'content/_header.php');
include(PATH . 'content/' . basename(__file__));
include(PATH . 'content/_footer.php');

?>