<?php
global $hesk_settings, $hesklang;
/**
 * @var bool $customerLoggedIn - `true` if a customer is logged in, `false` otherwise
 * @var array $customerUserContext - User info for a customer if logged in.  `null` if a customer is not logged in.
 */

// This guard is used to ensure that users can't hit this outside of actual HESK code
if (!defined('IN_SCRIPT')) {
    die();
}
define('EXTRA_PAGE_CLASSES','page-category-select');

define('ALERTS',1);

define('RENDER_COMMON_ELEMENTS',1);

global $BREADCRUMBS;
$BREADCRUMBS = array(
    array('url' => $hesk_settings['site_url'], 'title' => $hesk_settings['site_title']),
    array('url' => $hesk_settings['hesk_url'], 'title' => $hesk_settings['hesk_title']),
    array('title' => $hesklang['submit_ticket'])
);

/* Print header */
require_once(TEMPLATE_PATH . 'customer/inc/header.inc.php');
?>
        <div class="main__content">
            <div class="contr">
                <div style="margin-bottom: 20px;">
                    <?php
                    hesk3_show_messages($messages);
                    ?>
                </div>
                <?php hesk3_show_messages($serviceMessages); ?>
                <h1 class="select__title"><?php echo $hesklang['select_dept']; ?></h1>
                <div class="nav">
                    <?php foreach ($hesk_settings['departments'] as $k => $v): ?>
                    <a href="index.php?a=add&amp;deptid=<?php echo intval($k); ?>" class="navlink">
                        <span class="icon-in-circle" aria-hidden="true">
                            <svg class="icon icon-chevron-right">
                                <use xlink:href="<?php echo TEMPLATE_PATH; ?>customer/img/sprite.svg#icon-chevron-right"></use>
                            </svg>
                        </span>
                        <div>
                            <h2 class="navlink__title"><!--[if IE]> &raquo; <![endif]--><?php echo htmlspecialchars($v['name']); ?></h2>
                        </div>
                    </a>
                    <?php endforeach; ?>
                </div>
            </div>
        </div>
<?php
/* Print Footer */
require_once(TEMPLATE_PATH . 'customer/inc/footer.inc.php');
?>
