homepage.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. if(file_exists('config'.DIRECTORY_SEPARATOR.'config.php')){
  3. $pageHomepage = '
  4. <script>
  5. !function($) {
  6. "use strict";
  7. var CalendarApp = function() {
  8. this.$body = $("body")
  9. this.$calendar = $("#calendar"),
  10. this.$event = ("#calendar-events div.calendar-events"),
  11. this.$categoryForm = $("#add-new-event form"),
  12. this.$extEvents = $("#calendar-events"),
  13. this.$modal = $("#my-event"),
  14. this.$saveCategoryBtn = $(".save-category"),
  15. this.$calendarObj = null
  16. };
  17. /* Initializing */
  18. CalendarApp.prototype.init = function() {
  19. /* Initialize the calendar */
  20. var date = new Date();
  21. var d = date.getDate();
  22. var m = date.getMonth();
  23. var y = date.getFullYear();
  24. var form = "";
  25. var today = new Date($.now());
  26. var $this = this;
  27. $this.$calendarObj = $this.$calendar.fullCalendar({
  28. defaultView: "'.$GLOBALS['calendarDefault'].'",
  29. firstDay: "'.$GLOBALS['calendarFirstDay'].'",
  30. timeFormat: "'.$GLOBALS['calendarTimeFormat'].'",
  31. handleWindowResize: true,
  32. header: {
  33. left: "prev,next today",
  34. center: "title",
  35. right: "month,basicDay,basicWeek"
  36. },
  37. timezone: "local",
  38. editable: false,
  39. droppable: false, // this allows things to be dropped onto the calendar !!!
  40. eventLimit: false, // allow "more" link when too many events
  41. selectable: false,
  42. height: "auto",
  43. eventRender: function eventRender( event, element, view ) {
  44. if (typeof filter !== "undefined") {
  45. if(filter === "all"){
  46. return event.imagetype === event.imagetype;
  47. }else if(filter !== "all"){
  48. return filter === event.imagetype;
  49. }
  50. if(filter === null){
  51. return event.imagetype === event.imagetype;
  52. }
  53. }else {
  54. return event.imagetype === event.imagetype;
  55. }
  56. },
  57. });
  58. },
  59. //init CalendarApp
  60. $.CalendarApp = new CalendarApp, $.CalendarApp.Constructor = CalendarApp
  61. }(window.jQuery),
  62. //initializing CalendarApp
  63. function($) {
  64. "use strict";
  65. $.CalendarApp.init()
  66. }(window.jQuery);
  67. </script>
  68. <link href="plugins/bower_components/owl.carousel/owl.carousel.min.css" rel="stylesheet" type="text/css" />
  69. <link href="plugins/bower_components/owl.carousel/owl.theme.default.css" rel="stylesheet" type="text/css" />
  70. <div class="container-fluid p-t-10" id="homepage-items">
  71. '.buildHomepage().'
  72. </div>
  73. <!-- /.container-fluid -->
  74. ';
  75. }