Bootswatch, Summernote, and Captcheck mods for Mods for HESK (mods-for-hesk.com). In use at support.netsyms.com.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

calendar.php 35KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. <?php
  2. define('IN_SCRIPT', 1);
  3. define('VALIDATOR', 1);
  4. define('HESK_PATH', '../');
  5. define('PAGE_TITLE', 'ADMIN_CALENDAR');
  6. define('MFH_PAGE_LAYOUT', 'TOP_AND_SIDE');
  7. define('USE_JQUERY_2', 1);
  8. /* Get all the required files and functions */
  9. require(HESK_PATH . 'hesk_settings.inc.php');
  10. require(HESK_PATH . 'inc/common.inc.php');
  11. require(HESK_PATH . 'inc/admin_functions.inc.php');
  12. require(HESK_PATH . 'inc/mail_functions.inc.php');
  13. hesk_load_database_functions();
  14. hesk_session_start();
  15. hesk_dbConnect();
  16. hesk_isLoggedIn();
  17. // Define required constants
  18. if (hesk_checkPermission('can_man_calendar', 0)) {
  19. define('MFH_CALENDAR', 1);
  20. } else {
  21. define('MFH_CALENDAR_READONLY', 1);
  22. }
  23. // Is the calendar enabled?
  24. $modsForHesk_settings = mfh_getSettings();
  25. if ($modsForHesk_settings['enable_calendar'] == '0') {
  26. hesk_error($hesklang['calendar_disabled']);
  27. }
  28. // Get categories for the dropdown
  29. $order_by = $modsForHesk_settings['category_order_column'];
  30. $rs = hesk_dbQuery("SELECT `id`, `name`, `background_color`, `foreground_color`, `display_border_outline`
  31. FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories`
  32. WHERE `usage` <> 1 ORDER BY `" . hesk_dbEscape($order_by) . "`");
  33. $categories = array();
  34. while ($row = hesk_dbFetchAssoc($rs)) {
  35. if (!$_SESSION['isadmin'] && !in_array($row['id'], $_SESSION['categories'])) {
  36. continue;
  37. }
  38. $row['css_style'] = "background: {$row['background_color']};";
  39. $row['background_volatile'] = 'background-volatile';
  40. if ($row['foreground_color'] != 'AUTO') {
  41. $row['background_volatile'] = '';
  42. $row['css_style'] .= " color: {$row['foreground_color']};";
  43. if ($row['display_border_outline'] == '1') {
  44. $row['css_style'] .= " border: solid 1px {$row['foreground_color']};";
  45. }
  46. }
  47. $categories[] = $row;
  48. }
  49. /* Print header */
  50. require_once(HESK_PATH . 'inc/headerAdmin.inc.php');
  51. /* Print main manage users page */
  52. require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
  53. ?>
  54. <aside class="main-sidebar">
  55. <section class="sidebar" style="height: auto">
  56. <ul class="sidebar-menu">
  57. <li class="header text-uppercase"><?php echo $hesklang['calendar_categories']; ?></li>
  58. <?php foreach ($categories as $category): ?>
  59. <li>
  60. <div class="ticket-info">
  61. <div class="hide-on-overflow no-wrap event-category <?php echo $category['background_volatile']; ?>"
  62. data-select-toggle="category-toggle" data-name="category-toggle" data-category-value="<?php echo $category['id']; ?>"
  63. data-checked="1"
  64. data-toggle="tooltip"
  65. title="<?php echo $hesklang['click_to_toggle']; ?>"
  66. style="<?php echo $category['css_style']; ?>">
  67. <?php echo $category['name']; ?>
  68. </div>
  69. </div>
  70. </li>
  71. <?php endforeach; ?>
  72. <li>
  73. <div class="ticket-info">
  74. <button id="select-all" class="btn btn-default btn-sm" data-select-all="category-toggle">
  75. <?php echo $hesklang['select_all_title_case']; ?>
  76. </button>
  77. <button id="deselect-all" class="btn btn-default btn-sm" data-deselect-all="category-toggle">
  78. <?php echo $hesklang['deselect_all_title_case']; ?>
  79. </button>
  80. </div>
  81. <script>
  82. $('#select-all').click(function() {
  83. $('div[data-name="category-toggle"]').attr('data-checked', 1);
  84. updateCategoryVisibility();
  85. });
  86. $('#deselect-all').click(function() {
  87. $('div[data-name="category-toggle"]').attr('data-checked', 0);
  88. updateCategoryVisibility();
  89. });
  90. </script>
  91. </li>
  92. <li class="header text-uppercase"><?php echo $hesklang['legend']; ?></li>
  93. <li>
  94. <div class="ticket-info">
  95. <i class="fa fa-calendar"></i> <?php echo $hesklang['event']; ?>
  96. </div>
  97. </li>
  98. <li>
  99. <div class="ticket-info">
  100. <i class="fa fa-ticket"></i> <?php echo $hesklang['ticket']; ?>
  101. </div>
  102. </li>
  103. <li>
  104. <div class="ticket-info">
  105. <i class="fa fa-exclamation-triangle"></i> <?php echo $hesklang['overdue_ticket_legend']; ?>
  106. </div>
  107. </li>
  108. </ul>
  109. </section>
  110. </aside>
  111. <div class="content-wrapper">
  112. <section class="content">
  113. <div class="row">
  114. <div class="col-md-12">
  115. <div class="box">
  116. <div class="box-header">
  117. <h1 class="box-title">
  118. <?php echo $hesklang['calendar_title_case']; ?>
  119. </h1>
  120. <div class="box-tools pull-right">
  121. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  122. <i class="fa fa-minus"></i>
  123. </button>
  124. </div>
  125. </div>
  126. <div class="box-body no-padding">
  127. <?php if (hesk_checkPermission('can_man_calendar', 0)): ?>
  128. <div class="row" style="padding-right: 10px">
  129. <div class="col-xs-12 text-right">
  130. <button class="btn btn-success" id="create-event-button">
  131. <i class="fa fa-plus-circle"></i>
  132. <?php echo $hesklang['new_event']; ?>
  133. </button>
  134. </div>
  135. </div>
  136. <?php endif; ?>
  137. <div id="calendar"></div>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. </section>
  143. </div>
  144. <div class="modal fade" id="create-event-modal" tabindex="-1" role="dialog" style="overflow: hidden">
  145. <div class="modal-dialog modal-lg" role="document">
  146. <div class="modal-content">
  147. <div class="modal-header" style="cursor: move">
  148. <button type="button" class="close cancel-callback" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  149. <h4 class="modal-title" id="myModalLabel">
  150. <?php echo $hesklang['create_event']; ?>
  151. </h4>
  152. </div>
  153. <form id="create-form" class="form-horizontal" data-toggle="validator">
  154. <div class="modal-body">
  155. <div class="row">
  156. <div class="col-md-12">
  157. <div class="form-group">
  158. <label for="name" class="col-sm-3 control-label">
  159. <?php echo $hesklang['event_title']; ?>
  160. <i class="fa fa-question-circle settingsquestionmark"
  161. data-toggle="tooltip"
  162. title="<?php echo htmlspecialchars($hesklang['event_title_tooltip']); ?>"></i></label>
  163. <div class="col-sm-9">
  164. <input type="text" name="name" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['event_title']); ?>"
  165. data-error="<?php echo htmlspecialchars($hesklang['this_field_is_required']); ?>"
  166. required>
  167. <div class="help-block with-errors"></div>
  168. </div>
  169. </div>
  170. <div class="form-group">
  171. <label for="location" class="col-sm-3 control-label">
  172. <?php echo $hesklang['event_location']; ?>
  173. <i class="fa fa-question-circle settingsquestionmark"
  174. data-toggle="tooltip"
  175. title="<?php echo htmlspecialchars($hesklang['event_location_tooltip']); ?>"></i>
  176. </label>
  177. <div class="col-sm-9">
  178. <input type="text" name="location" class="form-control"
  179. placeholder="<?php echo htmlspecialchars($hesklang['event_location']); ?>">
  180. <div class="help-block with-errors"></div>
  181. </div>
  182. </div>
  183. <div class="form-group">
  184. <label for="category" class="col-sm-3 control-label">
  185. <?php echo $hesklang['category']; ?>
  186. <i class="fa fa-question-circle settingsquestionmark"
  187. data-toggle="tooltip"
  188. title="<?php echo htmlspecialchars($hesklang['event_category_tooltip']); ?>"></i>
  189. </label>
  190. <div class="col-sm-9">
  191. <select name="category" class="form-control"
  192. pattern="[0-9]+"
  193. data-error="<?php echo htmlspecialchars($hesklang['sel_app_cat']); ?>" required>
  194. <?php
  195. if ($hesk_settings['select_cat']) {
  196. echo '<option value="">'.$hesklang['select'].'</option>';
  197. }
  198. foreach ($categories as $category): ?>
  199. <option value="<?php echo $category['id']; ?>" data-background-color="<?php echo htmlspecialchars($category['background_color']); ?>"
  200. data-foreground-color="<?php echo htmlspecialchars($category['foreground_color']); ?>"
  201. data-display-border="<?php echo htmlspecialchars($category['display_border_outline']); ?>">
  202. <?php echo $category['name']; ?>
  203. </option>
  204. <?php endforeach; ?>
  205. </select>
  206. <div class="help-block with-errors"></div>
  207. </div>
  208. </div>
  209. </div>
  210. </div>
  211. <div class="row">
  212. <div class="col-md-6">
  213. <div class="form-group">
  214. <label for="start-date" class="col-sm-6 control-label">
  215. <?php echo $hesklang['event_start']; ?>
  216. <i class="fa fa-question-circle settingsquestionmark"
  217. data-toggle="tooltip"
  218. title="<?php echo htmlspecialchars($hesklang['event_start_tooltip']); ?>"></i>
  219. </label>
  220. <div class="col-sm-6">
  221. <input type="text" name="start-date" class="form-control datepicker"
  222. placeholder="<?php echo htmlspecialchars($hesklang['event_start_date']); ?>"
  223. data-error="<?php echo htmlspecialchars($hesklang['this_field_is_required']); ?>"
  224. required>
  225. <input type="text" name="start-time" class="form-control clockpicker"
  226. placeholder="<?php echo htmlspecialchars($hesklang['event_start_time']); ?>"
  227. data-placement="left" data-align="top" data-autoclose="true">
  228. <div class="help-block with-errors"></div>
  229. <div class="checkbox">
  230. <label>
  231. <input type="checkbox" name="all-day"> <?php echo $hesklang['event_all_day']; ?>
  232. </label>
  233. </div>
  234. </div>
  235. </div>
  236. </div>
  237. <div class="col-md-6">
  238. <div class="form-group">
  239. <label for="end-date" class="col-sm-6 control-label">
  240. <?php echo $hesklang['event_end']; ?>
  241. <i class="fa fa-question-circle settingsquestionmark"
  242. data-toggle="tooltip"
  243. title="<?php echo htmlspecialchars($hesklang['event_end_tooltip']); ?>"></i>
  244. </label>
  245. <div class="col-sm-6">
  246. <input type="text" name="end-date" class="form-control datepicker"
  247. placeholder="<?php echo htmlspecialchars($hesklang['event_end_date']); ?>"
  248. data-error="<?php echo htmlspecialchars($hesklang['this_field_is_required']); ?>"
  249. required>
  250. <input type="text" name="end-time" class="form-control clockpicker"
  251. data-placement="left"
  252. data-align="top"
  253. data-autoclose="true"
  254. placeholder="<?php echo htmlspecialchars($hesklang['event_end_time']); ?>">
  255. <div class="help-block with-errors"></div>
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. <div class="row">
  261. <div class="col-md-12">
  262. <div class="form-group">
  263. <label for="reminder" class="col-sm-3 control-label">
  264. <?php echo $hesklang['event_reminder']; ?>
  265. <i class="fa fa-question-circle settingsquestionmark"
  266. data-toggle="tooltip"
  267. title="<?php echo htmlspecialchars($hesklang['event_reminder_tooltip']); ?>"></i>
  268. </label>
  269. <div class="col-sm-2">
  270. <input type="text" name="reminder-value" class="form-control" placeholder="#">
  271. </div>
  272. <div class="col-sm-4">
  273. <select name="reminder-unit" class="form-control">
  274. <option value="MINUTE"><?php echo $hesklang['event_min_before_event']; ?></option>
  275. <option value="HOUR"><?php echo $hesklang['event_hours_before_event']; ?></option>
  276. <option value="DAY"><?php echo $hesklang['event_days_before_event']; ?></option>
  277. <option value="WEEK"><?php echo $hesklang['event_weeks_before_event']; ?></option>
  278. </select>
  279. </div>
  280. </div>
  281. </div>
  282. </div>
  283. <div class="row">
  284. <div class="col-md-12">
  285. <div class="form-group">
  286. <label for="comments" class="col-sm-3 control-label">
  287. <?php echo $hesklang['event_comments']; ?>
  288. <i class="fa fa-question-circle settingsquestionmark"
  289. data-toggle="tooltip"
  290. title="<?php echo htmlspecialchars($hesklang['event_comments_tooltip']); ?>"></i>
  291. </label>
  292. <div class="col-sm-9">
  293. <textarea name="comments" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['event_comments']); ?>"></textarea>
  294. </div>
  295. </div>
  296. </div>
  297. </div>
  298. </div>
  299. <div class="modal-footer">
  300. <input type="hidden" name="action" value="create">
  301. <div class="btn-group">
  302. <button type="button" class="btn btn-default cancel-callback" data-dismiss="modal">
  303. <i class="fa fa-times-circle"></i>
  304. <span><?php echo $hesklang['cancel']; ?></span>
  305. </button>
  306. <button type="submit" class="btn btn-success callback-btn">
  307. <i class="fa fa-check-circle"></i>
  308. <span><?php echo $hesklang['save']; ?></span>
  309. </button>
  310. </div>
  311. </div>
  312. </form>
  313. </div>
  314. </div>
  315. </div>
  316. <?php // End create modal, begin edit modal ?>
  317. <div class="modal fade" id="edit-event-modal" tabindex="-1" role="dialog" style="overflow: hidden">
  318. <div class="modal-dialog modal-lg" role="document">
  319. <div class="modal-content">
  320. <div class="modal-header" style="cursor: move">
  321. <button type="button" class="close cancel-callback" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  322. <h4 class="modal-title" id="myModalLabel">Edit Event</h4>
  323. </div>
  324. <form id="edit-form" class="form-horizontal" data-toggle="validator">
  325. <div class="modal-body">
  326. <ul class="nav nav-tabs" role="tablist" id="edit-modal-tabs">
  327. <li role="presentation" class="active"><a href="#edit-contents" aria-controls="home" role="tab" data-toggle="tab"><?php echo $hesklang['information']; ?></a></li>
  328. <li role="presentation"><a href="#edit-history" aria-controls="profile" role="tab" data-toggle="tab"><?php echo $hesklang['thist']; ?></a></li>
  329. </ul>
  330. <div class="tab-content" id="information-tab">
  331. <div role="tabpanel" class="tab-pane active" id="edit-contents">
  332. <br>
  333. <div class="row">
  334. <div class="col-md-12">
  335. <div class="form-group">
  336. <label for="name" class="col-sm-3 control-label">
  337. <?php echo $hesklang['event_title']; ?>
  338. <i class="fa fa-question-circle settingsquestionmark"
  339. data-toggle="tooltip"
  340. title="<?php echo htmlspecialchars($hesklang['event_title_tooltip']); ?>"></i></label>
  341. <div class="col-sm-9">
  342. <input type="text" name="name" class="form-control"
  343. placeholder="<?php echo htmlspecialchars($hesklang['event_title']); ?>"
  344. data-error="<?php echo htmlspecialchars($hesklang['this_field_is_required']); ?>"
  345. required>
  346. <div class="help-block with-errors"></div>
  347. </div>
  348. </div>
  349. <div class="form-group">
  350. <label for="location" class="col-sm-3 control-label">
  351. <?php echo $hesklang['event_location']; ?>
  352. <i class="fa fa-question-circle settingsquestionmark"
  353. data-toggle="tooltip"
  354. title="<?php echo htmlspecialchars($hesklang['event_location_tooltip']); ?>"></i>
  355. </label>
  356. <div class="col-sm-9">
  357. <input type="text" name="location" class="form-control"
  358. placeholder="<?php echo htmlspecialchars($hesklang['event_location']); ?>">
  359. <div class="help-block with-errors"></div>
  360. </div>
  361. </div>
  362. <div class="form-group">
  363. <label for="category" class="col-sm-3 control-label">
  364. <?php echo $hesklang['category']; ?>
  365. <i class="fa fa-question-circle settingsquestionmark"
  366. data-toggle="tooltip"
  367. title="<?php echo htmlspecialchars($hesklang['event_category_tooltip']); ?>"></i>
  368. </label>
  369. <div class="col-sm-9">
  370. <select name="category" class="form-control"
  371. pattern="[0-9]+"
  372. data-error="<?php echo htmlspecialchars($hesklang['sel_app_cat']); ?>" required>
  373. <?php
  374. if ($hesk_settings['select_cat']) {
  375. echo '<option value="">'.$hesklang['select'].'</option>';
  376. }
  377. foreach ($categories as $category): ?>
  378. <option value="<?php echo $category['id']; ?>" data-background-color="<?php echo htmlspecialchars($category['background_color']); ?>"
  379. data-foreground-color="<?php echo htmlspecialchars($category['foreground_color']); ?>"
  380. data-display-border="<?php echo htmlspecialchars($category['display_border_outline']); ?>">
  381. <?php echo $category['name']; ?>
  382. </option>
  383. <?php endforeach; ?>
  384. </select>
  385. <div class="help-block with-errors"></div>
  386. </div>
  387. </div>
  388. </div>
  389. </div>
  390. <div class="row">
  391. <div class="col-md-6">
  392. <div class="form-group">
  393. <label for="start-date" class="col-sm-6 control-label">
  394. <?php echo $hesklang['event_start']; ?>
  395. <i class="fa fa-question-circle settingsquestionmark"
  396. data-toggle="tooltip"
  397. title="<?php echo htmlspecialchars($hesklang['event_start_tooltip']); ?>"></i>
  398. </label>
  399. <div class="col-sm-6">
  400. <input type="text" name="start-date" class="form-control datepicker"
  401. placeholder="<?php echo htmlspecialchars($hesklang['event_start_date']); ?>"
  402. data-error="<?php echo htmlspecialchars($hesklang['this_field_is_required']); ?>"
  403. required>
  404. <input type="text" name="start-time" class="form-control clockpicker"
  405. placeholder="<?php echo htmlspecialchars($hesklang['event_start_time']); ?>"
  406. data-placement="left" data-align="top" data-autoclose="true">
  407. <div class="help-block with-errors"></div>
  408. <div class="checkbox">
  409. <label>
  410. <input type="checkbox" name="all-day"> <?php echo $hesklang['event_all_day']; ?>
  411. </label>
  412. </div>
  413. </div>
  414. </div>
  415. </div>
  416. <div class="col-md-6">
  417. <div class="form-group">
  418. <label for="end-date" class="col-sm-6 control-label">
  419. <?php echo $hesklang['event_end']; ?>
  420. <i class="fa fa-question-circle settingsquestionmark"
  421. data-toggle="tooltip"
  422. title="<?php echo htmlspecialchars($hesklang['event_end_tooltip']); ?>"></i>
  423. </label>
  424. <div class="col-sm-6">
  425. <input type="text" name="end-date" class="form-control datepicker"
  426. placeholder="<?php echo htmlspecialchars($hesklang['event_end_date']); ?>"
  427. data-error="<?php echo htmlspecialchars($hesklang['this_field_is_required']); ?>"
  428. required>
  429. <input type="text" name="end-time" class="form-control clockpicker"
  430. data-placement="left" data-align="top" data-autoclose="true"
  431. placeholder="<?php echo htmlspecialchars($hesklang['event_end_time']); ?>">
  432. <div class="help-block with-errors"></div>
  433. </div>
  434. </div>
  435. </div>
  436. </div>
  437. <div class="row">
  438. <div class="col-md-12">
  439. <div class="form-group">
  440. <label for="reminder" class="col-sm-3 control-label">
  441. <?php echo $hesklang['event_reminder']; ?>
  442. <i class="fa fa-question-circle settingsquestionmark"
  443. data-toggle="tooltip"
  444. title="<?php echo htmlspecialchars($hesklang['event_reminder_tooltip']); ?>"></i>
  445. </label>
  446. <div class="col-sm-2">
  447. <input type="text" name="reminder-value" class="form-control" placeholder="#">
  448. </div>
  449. <div class="col-sm-4">
  450. <select name="reminder-unit" class="form-control">
  451. <option value="MINUTE"><?php echo $hesklang['event_min_before_event']; ?></option>
  452. <option value="HOUR"><?php echo $hesklang['event_hours_before_event']; ?></option>
  453. <option value="DAY"><?php echo $hesklang['event_days_before_event']; ?></option>
  454. <option value="WEEK"><?php echo $hesklang['event_weeks_before_event']; ?></option>
  455. </select>
  456. </div>
  457. </div>
  458. </div>
  459. </div>
  460. <div class="row">
  461. <div class="col-md-12">
  462. <div class="form-group">
  463. <label for="comments" class="col-sm-3 control-label">
  464. <?php echo $hesklang['event_comments']; ?>
  465. <i class="fa fa-question-circle settingsquestionmark"
  466. data-toggle="tooltip"
  467. title="<?php echo htmlspecialchars($hesklang['event_comments_tooltip']); ?>"></i>
  468. </label>
  469. <div class="col-sm-9">
  470. <textarea name="comments" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['event_comments']); ?>"></textarea>
  471. </div>
  472. </div>
  473. </div>
  474. </div>
  475. </div>
  476. <div role="tabpanel" class="tab-pane" id="edit-history">
  477. <br>
  478. <table class="table table-striped">
  479. <thead>
  480. <tr>
  481. <th><?php echo $hesklang['date']; ?></th>
  482. <th><?php echo $hesklang['description']; ?></th>
  483. </tr>
  484. </thead>
  485. <tbody id="history-table"></tbody>
  486. </table>
  487. </div>
  488. </div>
  489. </div>
  490. <div class="modal-footer">
  491. <input type="hidden" name="id">
  492. <div class="btn-group">
  493. <button type="button" class="btn btn-danger" id="delete-button">
  494. <i class="fa fa-trash"></i>
  495. <span><?php echo $hesklang['delete']; ?></span>
  496. </button>
  497. <a href="#" class="btn btn-primary" id="create-ticket-button">
  498. <i class="fa fa-plus"></i>
  499. <span><?php echo $hesklang['event_create_ticket']; ?></span>
  500. </a>
  501. <button type="button" class="btn btn-default cancel-callback" data-dismiss="modal">
  502. <i class="fa fa-times-circle"></i>
  503. <span><?php echo $hesklang['cancel']; ?></span>
  504. </button>
  505. <button type="submit" class="btn btn-success callback-btn">
  506. <i class="fa fa-check-circle"></i>
  507. <span><?php echo $hesklang['save']; ?></span>
  508. </button>
  509. </div>
  510. </div>
  511. </form>
  512. </div>
  513. </div>
  514. </div>
  515. <div class="popover-template" style="display: none">
  516. <div>
  517. <div class="popover-location">
  518. <strong><?php echo $hesklang['event_location']; ?></strong>
  519. <span></span>
  520. </div>
  521. <div class="popover-category">
  522. <strong><?php echo $hesklang['category']; ?></strong>
  523. <span></span>
  524. </div>
  525. <div class="popover-from">
  526. <strong><?php echo $hesklang['from']; ?></strong>
  527. <span></span>
  528. </div>
  529. <div class="popover-to">
  530. <strong><?php echo $hesklang['to_title_case']; ?></strong>
  531. <span></span>
  532. </div>
  533. <div class="popover-comments">
  534. <strong><?php echo $hesklang['event_comments']; ?></strong>
  535. <span></span>
  536. </div>
  537. </div>
  538. </div>
  539. <div class="ticket-popover-template" style="display: none">
  540. <div>
  541. <div class="popover-tracking-id">
  542. <strong><?php echo $hesklang['trackID']; ?></strong>
  543. <span></span>
  544. </div>
  545. <div class="popover-owner">
  546. <strong><?php echo $hesklang['owner']; ?></strong>
  547. <span></span>
  548. </div>
  549. <div class="popover-subject">
  550. <strong><?php echo $hesklang['subject']; ?></strong>
  551. <span></span>
  552. </div>
  553. <div class="popover-category">
  554. <strong><?php echo $hesklang['category']; ?></strong>
  555. <span></span>
  556. </div>
  557. <div class="popover-status">
  558. <strong><?php echo $hesklang['status']; ?></strong>
  559. <span></span>
  560. </div>
  561. <div class="popover-priority">
  562. <strong><?php echo $hesklang['priority']; ?></strong>
  563. <span></span>
  564. </div>
  565. </div>
  566. </div>
  567. <?php
  568. echo mfh_get_hidden_fields_for_language(array('error_loading_events',
  569. 'error_deleting_event',
  570. 'event_deleted',
  571. 'event_created',
  572. 'error_creating_event',
  573. 'event_updated',
  574. 'error_updating_event',
  575. 'ticket_due_date_updated',
  576. 'error_updating_ticket_due_date',
  577. 'critical',
  578. 'high',
  579. 'medium',
  580. 'low',
  581. 'audit_event_created',
  582. 'audit_event_updated'));
  583. ?>
  584. <div style="display: none">
  585. <p id="setting_first_day_of_week"><?php echo $modsForHesk_settings['first_day_of_week']; ?></p>
  586. <p id="setting_default_view">
  587. <?php
  588. $view_array = array(
  589. 0 => 'month',
  590. 1 => 'agendaWeek',
  591. 2 => 'agendaDay',
  592. );
  593. echo $view_array[$_SESSION['default_calendar_view']];
  594. ?>
  595. </p>
  596. <p id="setting_show_start_time"><?php echo $modsForHesk_settings['calendar_show_start_time']; ?></p>
  597. <?php
  598. $businessHoursRs = hesk_dbQuery("SELECT * FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mfh_calendar_business_hours`");
  599. while ($row = hesk_dbFetchAssoc($businessHoursRs)):
  600. ?>
  601. <p id="business_hours_<?php echo $row['day_of_week']; ?>_start"><?php echo $row['start_time']; ?></p>
  602. <p id="business_hours_<?php echo $row['day_of_week']; ?>_end"><?php echo $row['end_time']; ?></p>
  603. <?php endwhile; ?>
  604. </div>
  605. <script type="text/html" id="audit-trail-template">
  606. <tr>
  607. <td data-property="date"></td>
  608. <td data-property="description"></td>
  609. </tr>
  610. </script>
  611. <?php
  612. require_once(HESK_PATH . 'inc/footer.inc.php');
  613. exit();
  614. /*** START FUNCTIONS ***/