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/FreeBusy.aspx
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="FreeBusy.aspx.vb" Inherits="MailEnable.Clients.WebMail.Mondo.FreeBusy" %>
<%@ Register TagPrefix="uc1" TagName="uscStyleHeader" Src="../../../Controls/uscStyleHeader.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 XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title><%=uscToken.GetText("[ME_TXT-FreeAndBusyTimes]")%></title>
	<uc1:uscstyleheader id="UscStyleHeader1" runat="server"></uc1:uscstyleheader>		
	<uc1:ScriptsInclude id="ScriptsInclude" runat="server"></uc1:ScriptsInclude>

    <script type="text/javascript">
    //<!--
    
    var gBrowserType = GetBrowserType();
    
   
    function ServerPost(sCommand, sData, bUseCallback, sFrameName)
    {
	    var Source = '<%=ParseRequestArgument("Source")%>';
	    if (Source != '')
	    {
		    sData = sData + "&URI=" + Source;
	    }
    	
	    LIBAjax_ServerPost(sCommand, sData, bUseCallback, sFrameName);
    }

    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 == 'GET-FREEBUSY')
			    {
				    ProcessFreeBusyResult(BaseNode);
			    }
    			
			    return true;
		    }    		
		    return true;
	    }
	    return true;
    }

    function ProcessFreeBusyResult(BaseNode)
    {
	    var ItemsNodeList = BaseNode.getElementsByTagName('ITEM');
	    for (var ItemIndex=0; ItemIndex < ItemsNodeList.length; ItemIndex++)
	    {
		    var ItemNode = ItemsNodeList[ItemIndex];
		    var Address = GetXMLValue(ItemNode.getElementsByTagName('ADDRESS')[0]);
		    var FreeBusyData = GetXMLValue(ItemNode.getElementsByTagName('FREEBUSY')[0]);
		    UpdateAttendeeFreeBusyRow(Address, FreeBusyData);
	    }
    }
    
    function GetAttendeeRow(Address)
    {
        var FreeBusyTable = document.getElementById('freeBusy_table_js');
        var FreeBusyRows = FreeBusyTable.getElementsByTagName('tr');
        var AttendeeRow = null;
        for (var i = 2; i < FreeBusyRows.length && AttendeeRow == null; i++)
        {
            var FreeBusyRow = FreeBusyRows[i];
            var AddressCell = FreeBusyRow.getElementsByTagName('td')[0];
            if (GetXMLValue(AddressCell) == Address)
            {
                AttendeeRow = FreeBusyRow;
            }
        }
        if (AttendeeRow == null)
        {
            // doesn't exist, create it
            AttendeeRow = AddAttendeeFreeBusyRow(Address);
        }
        return AttendeeRow;
    }
    
    function ClearAttendeesRows()
    {
        var FreeBusyTable = document.getElementById('freeBusy_table_js');
        var FreeBusyRows = FreeBusyTable.getElementsByTagName('tr');
        for (var i = 2; i < FreeBusyRows.length && AttendeeRow == null; i++)
        {
            var FreeBusyRow = FreeBusyRows[i];
            FreeBusyRow.parentNode.removeChild(FreeBusyRow);
        }
    }
    
    function SetFreeBusyCellClass(FreeBusyCell, FreeBusyState)
    {
        if (!FreeBusyState)
        {
            FreeBusyState = FreeBusyCell.FreeBusyState;
        }
        switch (FreeBusyState)
        {
            case 0:
                FreeBusyCell.className = 'freeBusy_free';
                break;
            case 1:
                FreeBusyCell.className = 'freeBusy_tentative';
                break;
            case 2:
                FreeBusyCell.className = 'freeBusy_busy';
                break;
            case 3:
                FreeBusyCell.className = 'freeBusy_outOfOffice';
                break;
            default:
                FreeBusyCell.className = 'freeBusy_unknown';
                break;
        }
    }
    
    function GetHourFreeBusyState(HourFreeBusyState, HalfHourFreeBusyState)
    {
    	var TimeScale = document.getElementById('TimeScale');
        if (TimeScale.value == '60')
        {
            // when the interval is an hour, the free busy state of an hour cell is
            // the greatest of the free busy state of itself, or the second half of
            // the hour
            HourFreeBusyState = Math.max(HourFreeBusyState, HalfHourFreeBusyState);
        }
        return HourFreeBusyState;
    }
    
    function UpdateAttendeeFreeBusyRow(Address, FreeBusyData)
    {
        var AttendeeRow = GetAttendeeRow(Address);
        AttendeeRow.FreeBusyData = FreeBusyData;
        var FreeBusyCells = AttendeeRow.getElementsByTagName('td');
        for (var i = 0; i < FreeBusyData.length; i++)
        {
            var FreeBusyDatum = FreeBusyData.charAt(i);
            var FreeBusyCell = FreeBusyCells[i + 1];
            FreeBusyCell.FreeBusyState = parseInt(FreeBusyDatum);
        }
        SetFreeBusyRowClasses(AttendeeRow);
    }
    
    function AddAttendeeFreeBusyRow(Address)
    {
        var FreeBusyTable = document.getElementById('freeBusy_table_js');
        
        var AttendeeRow = document.createElement('tr');
        FreeBusyTable.appendChild(AttendeeRow);
        
        var AddressCell = document.createElement('td');
        AttendeeRow.appendChild(AddressCell);
        AddressCell.className = 'freeBusy_table_contacts';
        AddressCell.appendChild(document.createTextNode(Address));
        
        for (var i = 0; i < 96; i++)
        {
            var FreeBusyCell = document.createElement('td');
            FreeBusyCell.className = 'freeBusy_unknown';
            AttendeeRow.appendChild(FreeBusyCell);
        }
        
        ShowHideFreeBusyRowCells(AttendeeRow);
        
        return AttendeeRow;
    }
    
    function SetFreeBusyRowClasses(FreeBusyRow)
    {
        var FreeBusyCells = FreeBusyRow.getElementsByTagName('td');
        for (var iCell = 1; iCell < FreeBusyCells.length; iCell += 2)
        {
            var HourFreeBusyCell = FreeBusyCells[iCell];
            var HalfHourFreeBusyCell = FreeBusyCells[iCell + 1];
            
            // set free busy state of the hour cell to be the most busy state between it and the following
            // half hour cell.
            var HourFreeBusyState = GetHourFreeBusyState(HourFreeBusyCell.FreeBusyState, HalfHourFreeBusyCell.FreeBusyState);
            SetFreeBusyCellClass(HourFreeBusyCell, HourFreeBusyState);
            SetFreeBusyCellClass(HalfHourFreeBusyCell, HalfHourFreeBusyCell.FreeBusyState);
        }
    }
    
    function FreeBusyCellIndexIsInWorkingHours(CellIndex)
    {
        var StartOfFirstWorkingDay = 18;
        var EndOfFirstWorkingDay = 36;
        var StartOfSecondWorkingDay = 66;
        var EndOfSecondWorkingDay = 84;
        return (CellIndex > StartOfFirstWorkingDay && CellIndex <= EndOfFirstWorkingDay) ||
                (CellIndex > StartOfSecondWorkingDay && CellIndex <= EndOfSecondWorkingDay);
    }
        
    function ShowHideFreeBusyRowCells(FreeBusyRow)
    {
    	var ShowOnlyWorkingHours = document.getElementById('ShowOnlyWorkingHours');
    	var TimeScale = document.getElementById('TimeScale');
        var NumVisibleFreeBusyCells = 0;
        var FreeBusyCells = FreeBusyRow.getElementsByTagName('td');
        for (var iCell = 1; iCell < FreeBusyCells.length; iCell++)
        {
            var FreeBusyCell = FreeBusyCells[iCell];
            // we show/hide the half hour cells based on the interval (ie. show if the interval is set to
            // show by 30 minutes, hide if interval is set to show by 1 hour), and on whether we are
            // showing the entire day or only working hours.
            var HideCell = (iCell % 2 == 0 && TimeScale.value != '30') ||
                     (ShowOnlyWorkingHours.checked && !FreeBusyCellIndexIsInWorkingHours(iCell));
            FreeBusyCell.style.display = (HideCell ? 'none' : '');
            if (!HideCell)
            {
                // we are counting the number of visible cells per row as we go in order to adjust the colspan of
                // the day header cells later.
                NumVisibleFreeBusyCells++;
            }
        }
        return NumVisibleFreeBusyCells;
    }

    function FilterFreeBusyTable()
    {
        // we are going to iterate the rows from the time headers onwards to expand or contract the
        // table displayed based on the interval and whether we are showing working hours only or
        // the entire day.
        
        var FreeBusyTable = document.getElementById('freeBusy_table_js');
        var FreeBusyRows = FreeBusyTable.getElementsByTagName('tr');
        
        var NumVisibleFreeBusyCells = 0;
        for (var iRow = 1; iRow < FreeBusyRows.length; iRow++)
        {
            var FreeBusyRow = FreeBusyRows[iRow];
            NumVisibleFreeBusyCells = ShowHideFreeBusyRowCells(FreeBusyRow);
            
            // Update the free busy classes because the two halves of each hour may need to be combined into a
            // single free/busy state in the case of an hour long interval setting. Note that the first row we
            // are iterating is the time headers, so we have to skip it for this step.
            if (iRow > 1)
            {
                SetFreeBusyRowClasses(FreeBusyRow);
            }
        }
        
        // also need to alter the colspan of the date header cells based on the interval, since we
        // are going to hide some of the cells potentially.
        var FreeBusyDateHeaderRow = FreeBusyRows[0];
        var FreeBusyDateHeaderCells = FreeBusyDateHeaderRow.getElementsByTagName('td');
        FreeBusyDateHeaderCells[1].colSpan = NumVisibleFreeBusyCells / 2;
        FreeBusyDateHeaderCells[2].colSpan = FreeBusyDateHeaderCells[1].colSpan;
    }
    
    function dateSelected(StartDate)
    {
        RequestFreeBusyData(StartDate);
    }
    
    function RequestFreeBusyData(StartDate)
    {
        var SecondDate = new Date(StartDate);
        SecondDate.setDate(SecondDate.getDate() + 1);
        
        var DateHeaderRow = document.getElementById('DateHeaderRow');
        var DateHeaderCells = DateHeaderRow.getElementsByTagName('td');
        var FirstDateCell = DateHeaderCells[1];
        var SecondDateCell = DateHeaderCells[2];
        clearChildNodes(FirstDateCell);
		FirstDateCell.appendChild(document.createTextNode(formatDate(StartDate, "DDD dd/MM/yyyy")));
        clearChildNodes(SecondDateCell);
		SecondDateCell.appendChild(document.createTextNode(formatDate(SecondDate, "DDD dd/MM/yyyy")));
		
        // request free busy data to the end of the following day
		var EndDate = new Date(StartDate);
		EndDate.setDate(EndDate.getDate() + 2);
		
    	var TimeScale = document.getElementById('TimeScale');
    
	    var data = 'StartDate=' + encodeURIComponent(formatDate(StartDate, "yyyy-MM-dd"));		
	    data += '&EndDate=' + encodeURIComponent(formatDate(EndDate, "yyyy-MM-dd"));
	    data += '&Interval=30';
	    data += '&Attendees=' + encodeURIComponent('<%=gAttendees%>');	
    			
	    ServerPost('GET-FREEBUSY', data, true, 'Appointments');			
    }

    function FreeBusyConfigure(sDate,iTimeScale) {
        ClearAttendeesRows();        
	    var oStartDate = getDateTimeObjectFromDateString(sDate);
    	var TimeScale = document.getElementById('TimeScale');
	    TimeScale.value = iTimeScale;	    
	    var odivStartDateCalendar = document.getElementById('divStartDateCalendar');
	    arrDatePickers['startDatePicker'] = new DatePickerInstance('startDatePicker', odivStartDateCalendar,
		    dateSelected, null, ME_DP_MONDAY, dayTokens, monthTokens);
	    arrDatePickers['startDatePicker'].todayButtonText = t_('[ME_TXT-Today]');
	    arrDatePickers['startDatePicker'].selectionButtonText = t_('[ME_TXT-Selection]');
	    arrDatePickers['startDatePicker'].selectNoneButtonText = t_('[ME_TXT-None]');
	    arrDatePickers['startDatePicker'].prepare();
	    arrDatePickers['startDatePicker'].disableSelectNoneButton();
	    arrDatePickers['startDatePicker'].show();
	    arrDatePickers['startDatePicker'].selectDate(oStartDate);	    
	    // setup the initial filter defaults in the table headers
	    FilterFreeBusyTable();
    }


    function PageLoad()
    {
        FreeBusyConfigure('<%= gStartDate %>', <%= gInterval %>);
    }

    // -->
    </script>
</head>
<body onload="PageLoad();" class="popupWin_background">

  <div class="popupWin_input_body_shell">
    <div class="freeBusy_datePicker_shell" id="freeBusy_datePicker_shell_js">
        <table class="options_form_table_fixed options_form_table_freeBusy" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="options_form_table_freeBusy_left">
            
                <!-- DatePicker Table -->
                <div id="divStartDateCalendar" style="color:#333;"></div>
                
            </td>
            <td class="options_form_table_freeBusy_right">
              <div class="options_form_table_freeBusy_right_div">
              
                <div class="freeBusy_color freeBusy_tentative"></div>
                <div class="freeBusy_color_label"><%=uscToken.GetText("[ME_TXT-Tentative]")%></div>
                <div class="freeBusy_color freeBusy_outOfOffice"></div>
                <div class="freeBusy_color_label"><%=uscToken.GetText("[ME_TXT-OutofOffice]")%></div>
                <div class="freeBusy_color freeBusy_busy"></div>
                <div class="freeBusy_color_label"><%=uscToken.GetText("[ME_TXT-Busy]")%></div>
                <div class="freeBusy_color freeBusy_free"></div>
                <div class="freeBusy_color_label"><%=uscToken.GetText("[ME_TXT-Free]")%></div>
                <div class="freeBusy_color freeBusy_unknown"></div>
                <div class="freeBusy_color_label"><%=uscToken.GetText("[ME_TXT-Unknown]")%></div>
                
                <div class="clear_div" style="height:5px;margin:5px 0px;border-bottom:1px solid #999;"></div>

                <input id="ShowOnlyWorkingHours" onclick="FilterFreeBusyTable();" class="checkbox" name="" type="checkbox" value="" checked="checked"/>&nbsp; <%=uscToken.GetText("[ME_TXT-Showonlyworkinghours]")%><br />
                
                <span id="lblTimeScale" style="color:#333;font-weight:bold;"><%=uscToken.GetText("[ME_TXT-TimeScale]")%>:</span> &nbsp;
                <select id="TimeScale" name="time_scale" onclick="FilterFreeBusyTable();">
                  <option value="30">30 <%=uscToken.GetText("[ME_TXT-Minutes]")%></option>
                  <option value="60">1 <%=uscToken.GetText("[ME_TXT-Hour]")%></option>
                </select>                              
              </div>
            </td>
          </tr>
        </table>
	</div><!-- freeBusy_datePicker_shell -->                  
    
    <div class="freeBusy_table_shell" id="freeBusy_table_shell_js">
          
      <table class="freeBusy_table" id="freeBusy_table_js" border="0" cellspacing="0" cellpadding="0">
        <tr id="DateHeaderRow">
          <td style="border-bottom:0px;border-left:1px solid #666"></td>
          <td class="freeBusy_table_head" colspan="48"></td>
          <td class="freeBusy_table_head" colspan="48"></td>
        </tr>
        <tr id="TimeHeaderRow">
          <td class="freeBusy_table_attendees"><%=uscToken.GetText("[ME_TXT-Attendees]")%></td>
          <td class="freeBusy_table_time">00:00</td>
          <td class="freeBusy_table_time">00:30</td>
          <td class="freeBusy_table_time">01:00</td>
          <td class="freeBusy_table_time">01:30</td>
          <td class="freeBusy_table_time">02:00</td>
          <td class="freeBusy_table_time">02:30</td>
          <td class="freeBusy_table_time">03:00</td>
          <td class="freeBusy_table_time">03:30</td>
          <td class="freeBusy_table_time">04:00</td>
          <td class="freeBusy_table_time">04:30</td>
          <td class="freeBusy_table_time">05:00</td>
          <td class="freeBusy_table_time">05:30</td>
          <td class="freeBusy_table_time">06:00</td>
          <td class="freeBusy_table_time">06:30</td>
          <td class="freeBusy_table_time">07:00</td>
          <td class="freeBusy_table_time">07:30</td>
          <td class="freeBusy_table_time">08:00</td>
          <td class="freeBusy_table_time">08:30</td>
          <td class="freeBusy_table_time">09:00</td>
          <td class="freeBusy_table_time">09:30</td>
          <td class="freeBusy_table_time">10:00</td>
          <td class="freeBusy_table_time">10:30</td>
          <td class="freeBusy_table_time">11:00</td>
          <td class="freeBusy_table_time">11:30</td>
          <td class="freeBusy_table_time">12:00</td>
          <td class="freeBusy_table_time">12:30</td>
          <td class="freeBusy_table_time">13:00</td>
          <td class="freeBusy_table_time">13:30</td>
          <td class="freeBusy_table_time">14:00</td>
          <td class="freeBusy_table_time">14:30</td>
          <td class="freeBusy_table_time">15:00</td>
          <td class="freeBusy_table_time">15:30</td>
          <td class="freeBusy_table_time">16:00</td>
          <td class="freeBusy_table_time">16:30</td>
          <td class="freeBusy_table_time">17:00</td>
          <td class="freeBusy_table_time">17:30</td>
          <td class="freeBusy_table_time">18:00</td>
          <td class="freeBusy_table_time">18:30</td>
          <td class="freeBusy_table_time">19:00</td>
          <td class="freeBusy_table_time">19:30</td>
          <td class="freeBusy_table_time">20:00</td>
          <td class="freeBusy_table_time">20:30</td>
          <td class="freeBusy_table_time">21:00</td>
          <td class="freeBusy_table_time">21:30</td>
          <td class="freeBusy_table_time">22:00</td>
          <td class="freeBusy_table_time">22:30</td>
          <td class="freeBusy_table_time">23:00</td>
          <td class="freeBusy_table_time">23:30</td>
          <td class="freeBusy_table_time">00:00</td>
          <td class="freeBusy_table_time">00:30</td>
          <td class="freeBusy_table_time">01:00</td>
          <td class="freeBusy_table_time">01:30</td>
          <td class="freeBusy_table_time">02:00</td>
          <td class="freeBusy_table_time">02:30</td>
          <td class="freeBusy_table_time">03:00</td>
          <td class="freeBusy_table_time">03:30</td>
          <td class="freeBusy_table_time">04:00</td>
          <td class="freeBusy_table_time">04:30</td>
          <td class="freeBusy_table_time">05:00</td>
          <td class="freeBusy_table_time">05:30</td>
          <td class="freeBusy_table_time">06:00</td>
          <td class="freeBusy_table_time">06:30</td>
          <td class="freeBusy_table_time">07:00</td>
          <td class="freeBusy_table_time">07:30</td>
          <td class="freeBusy_table_time">08:00</td>
          <td class="freeBusy_table_time">08:30</td>
          <td class="freeBusy_table_time">09:00</td>
          <td class="freeBusy_table_time">09:30</td>
          <td class="freeBusy_table_time">10:00</td>
          <td class="freeBusy_table_time">10:30</td>
          <td class="freeBusy_table_time">11:00</td>
          <td class="freeBusy_table_time">11:30</td>
          <td class="freeBusy_table_time">12:00</td>
          <td class="freeBusy_table_time">12:30</td>
          <td class="freeBusy_table_time">13:00</td>
          <td class="freeBusy_table_time">13:30</td>
          <td class="freeBusy_table_time">14:00</td>
          <td class="freeBusy_table_time">14:30</td>
          <td class="freeBusy_table_time">15:00</td>
          <td class="freeBusy_table_time">15:30</td>
          <td class="freeBusy_table_time">16:00</td>
          <td class="freeBusy_table_time">16:30</td>
          <td class="freeBusy_table_time">17:00</td>
          <td class="freeBusy_table_time">17:30</td>
          <td class="freeBusy_table_time">18:00</td>
          <td class="freeBusy_table_time">18:30</td>
          <td class="freeBusy_table_time">19:00</td>
          <td class="freeBusy_table_time">19:30</td>
          <td class="freeBusy_table_time">20:00</td>
          <td class="freeBusy_table_time">20:30</td>
          <td class="freeBusy_table_time">21:00</td>
          <td class="freeBusy_table_time">21:30</td>
          <td class="freeBusy_table_time">22:00</td>
          <td class="freeBusy_table_time">22:30</td>
          <td class="freeBusy_table_time">23:00</td>
          <td class="freeBusy_table_time">23:30</td>
        </tr>
      </table>                
          
    </div><!-- freeBusy_table_shell -->
    
  </div><!-- popupWin_input_body_shell -->
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit