[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: calendar.init.js
function eventClicked(){document.getElementById("form-event").classList.add("view-event"),document.getElementById("event-title").classList.replace("d-block","d-none"),document.getElementById("event-category").classList.replace("d-block","d-none"),document.getElementById("btn-save-event").setAttribute("hidden",!0)}function editEvent(e){var t=e.getAttribute("data-id");"new-event"==t?(document.getElementById("modal-title").innerHTML="",document.getElementById("modal-title").innerHTML="Add Event",document.getElementById("btn-save-event").innerHTML="Add Event",eventTyped()):"edit-event"==t?(e.innerHTML="Cancel",document.getElementById("btn-save-event").innerHTML="Update Event",e.removeAttribute("hidden"),eventTyped()):(e.innerHTML="Edit",eventClicked())}function eventTyped(){document.getElementById("form-event").classList.remove("view-event"),document.getElementById("event-title").classList.replace("d-none","d-block"),document.getElementById("event-category").classList.replace("d-none","d-block"),document.getElementById("btn-save-event").removeAttribute("hidden")}document.addEventListener("DOMContentLoaded",function(){var d=new bootstrap.Modal(document.getElementById("event-modal"),{keyboard:!1});document.getElementById("event-modal");var t=document.getElementById("modal-title"),n=document.getElementById("form-event"),a=null,e=(document.getElementsByClassName("needs-validation"),new Date),l=e.getDate(),i=e.getMonth(),o=e.getFullYear(),r=FullCalendar.Draggable,e=document.getElementById("external-events"),c=[{title:"All Day Event",start:new Date(o,i,1)},{title:"Long Event",start:new Date(o,i,l-5),end:new Date(o,i,l-2),className:"bg-warning"},{id:999,title:"Repeating Event",start:new Date(o,i,l-3,16,0),allDay:!1,className:"bg-info"},{id:999,title:"Repeating Event",start:new Date(o,i,l+4,16,0),allDay:!1,className:"bg-primary"},{title:"Meeting",start:new Date(o,i,l,10,30),allDay:!1,className:"bg-success"},{title:"Lunch",start:new Date(o,i,l,12,0),end:new Date(o,i,l,14,0),allDay:!1,className:"bg-danger"},{title:"Birthday Party",start:new Date(o,i,l+1,19,0),end:new Date(o,i,l+1,22,30),allDay:!1,className:"bg-success"},{title:"Click for Google",start:new Date(o,i,28),end:new Date(o,i,29),url:"http://google.com/",className:"bg-dark"}];new r(e,{itemSelector:".external-event",eventData:function(e){return{id:Math.floor(11e3*Math.random()),title:e.innerText,allDay:!0,start:new Date,className:e.getAttribute("data-class")}}});e=document.getElementById("calendar");function s(e){document.getElementById("form-event").reset(),d.show(),n.classList.remove("was-validated"),n.reset(),a=null,t.innerText="Create Event",newEventData=e}function m(){return 768<=window.innerWidth&&window.innerWidth<1200?"timeGridWeek":window.innerWidth<=768?"listMonth":"dayGridMonth"}var v=new FullCalendar.Calendar(e,{timeZone:"local",editable:!0,droppable:!0,selectable:!0,navLinks:!0,initialView:m(),themeSystem:"bootstrap",headerToolbar:{left:"prev,next today",center:"title",right:"dayGridMonth,timeGridWeek,timeGridDay,listMonth"},windowResize:function(e){var t=m();v.changeView(t)},eventResize:function(t){var e=c.findIndex(function(e){return e.id==t.event.id});c[e]&&(c[e].title=t.event.title,c[e].className=t.event.classNames[0])},eventClick:function(e){document.getElementById("edit-event-btn").removeAttribute("hidden"),document.getElementById("btn-save-event").setAttribute("hidden",!0),document.getElementById("edit-event-btn").setAttribute("data-id","edit-event"),document.getElementById("edit-event-btn").innerHTML="Edit",eventClicked(),d.show(),n.reset(),a=e.event,document.getElementById("modal-title").innerHTML="",document.getElementById("event-title").value=a.title,document.getElementById("event-category").value=a.className,console.log("selectedEvent",a),document.getElementById("btn-delete-event").removeAttribute("hidden")},dateClick:function(e){document.getElementById("edit-event-btn").setAttribute("hidden",!0),document.getElementById("btn-save-event").removeAttribute("hidden"),s(e)},events:c,eventReceive:function(e){e={id:parseInt(e.event.id),title:e.event.title,className:e.event.classNames[0]};c.push(e)},eventDrop:function(t){var e=c.findIndex(function(e){return e.id==t.event.id});c[e]&&(c[e].title=t.event.title,c[e].className=t.event.classNames[0])}});setTimeout(()=>{v.render()},0),n.addEventListener("submit",function(e){e.preventDefault();var t=document.getElementById("event-title").value,n=document.getElementById("event-category").value;a?(e=document.getElementById("eventid").value,a.setProp("id",e),a.setProp("title",t),a.setProp("classNames",[n]),e=c.findIndex(function(e){return e.id==a.id}),c[e]&&(c[e].title=t,c[e].className=n),v.render()):(n={id:(1e4*Math.random()).toFixed(0),title:t,start:new Date(document.querySelector("#calender").value),allDay:!0,className:n},v.addEvent(n),c.push(n)),d.hide()}),document.getElementById("btn-delete-event").addEventListener("click",function(e){if(a){for(var t=0;t<c.length;t++)c[t].id==a.id&&(c.splice(t,1),t--);a.remove(),a=null,d.hide()}}),document.getElementById("btn-new-event").addEventListener("click",function(e){s(),document.getElementById("edit-event-btn").click()})});
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.97 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002