<!-- BEGIN DYNAMIC BLOCK: calendar -->
<script type="text/javascript">
    Ext.onReady(function(){
        SearchBtn = new Ext.Button({
            text:     lang('search'),
            renderTo: 'ExtSearchBtn',
            type:     'submit',
            width:    100,
            handler:  function(){
                          Ext.getDom('reportdropdown').submit();
                      }
        });
        
        var dh = Ext.DomHelper;
        var els=Ext.get(Ext.query("input.datefield"));
        els.each(function(el){
            var span = dh.insertBefore(el, {tag:"span"})
            var d = new Ext.form.DateField({
                el:            el.dom,
                hideLabel:     true,
                height:        "5px",
                selectOnFocus: true,
                format:        'm/d/Y'
            });
            d.render(span);
        });
        
        // create the combo instance
        var combo = new Ext.form.ComboBox({
            id:             'eventtype',
            name:           'eventtype',
            typeAhead:      false,
            editable:       false,
            triggerAction:  'all',
            transform:      'eventtype',
            forceSelection: true
            
        });
    });
</script>

<br>
<form id='reportdropdown' action="index.php" method='GET'>
    <input type="hidden" name="fuse" value="clients" />
    <input type="hidden" name="view" value="Clients_ViewEventLog" />
    <table border=0 cellpadding=2 cellspacing=0>
        <tr>
            <td align="center" style="padding-left:20px;">
                [l]Show[/l]:
            </td>
            <td align="center" style="padding-right:20px;">
                <select name="eventtype" id="eventtype">
                    <option value="all" {eventtypeAllSelected} >[l]All events[/l]</option>
                    <option value="profileandpackages" {eventtypeProfileandpackagesSelected} >[l]Profile and Packages events[/l]</option>
                    <option value="billing" {eventtypeBillingSelected} >[l]Billing events[/l]</option>
                    <option value="support" {eventtypeSupportSelected} >[l]Support Tickets events[/l]</option>
                </select>
            </td>
            <td align="center" style="padding-left:20px;">
                [l]Start Date[/l]:
            </td>
            <td align="center" style="padding-right:20px;">
                <input class=datefield type=text size=12 MAXLENGTH=10 name="startdate" id="startdate" value='{startDateValue}'>
            </td>
            <td align="center" style="padding-left:20px;">
                [l]End Date[/l]:
            </td>
            <td align="center" style="padding-right:20px;">
                <input class=datefield type=text size=12 MAXLENGTH=10 name="enddate" id="enddate" value='{endDateValue}'>
            </td>
            <td align="center" style="padding-left:20px; padding-right:20px;">
                <span id='ExtSearchBtn' name=search></span>
            </td>
        </tr>
    </table>
</form>
<br>
<br>
<br>
<!-- END DYNAMIC BLOCK: calendar -->

<div style="width:{width}px">
    {eventLogTableTitle}
    <table width="100%" border="0" cellspacing="3">
        <tr>
            <th nowrap><h3>[l]Date[/l]</h3></th>
            <th nowrap><h3>[l]User[/l]</h3></th>
            <!-- BEGIN DYNAMIC BLOCK: modifiedUser -->
            <th nowrap><h3>[l]Modified user[/l]</h3></th>
            <!-- END DYNAMIC BLOCK: modifiedUser -->
            <th nowrap><h3>[l]IP Address[/l]</h3></th>
            <th nowrap><h3>[l]Action[/l]</h3></th>
        </tr>
        <!-- BEGIN DYNAMIC BLOCK: logActionRow -->
        <tr class="{trClass}">
            <td width="1%" nowrap="true">{logDate}</td>
            <td>{logUser}</td>
            <!-- BEGIN DYNAMIC BLOCK: logModifiedUser -->
            <td>{logModifiedUser}</td>
            <!-- END DYNAMIC BLOCK: logModifiedUser -->
            <td>{logIpAddress}</td>
            <td>
                {logAction}
                <!-- BEGIN DYNAMIC BLOCK: clickForBody -->
                &nbsp;<a href="#" onclick="openWindow('index.php?fuse=clients&view=HistoryFullEmail&entryId={entryId}', 'email', 'scrollbars=yes,menubar=no,location=no,width=760,height=520,resizable=yes')">([l]view full message[/l])</a>
                <!-- END DYNAMIC BLOCK: clickForBody -->
                <!-- BEGIN DYNAMIC BLOCK: clickForProfileDetails -->
                &nbsp;<a href="#" onclick="openWindow('index.php?fuse=clients&view=HistoryOriginalProfile&entryId={entryId}', 'email', 'scrollbars=yes,menubar=no,location=no,width=760,height=520,resizable=yes')">([l]view original profile[/l])</a>
                <!-- END DYNAMIC BLOCK: clickForProfileDetails -->
                <!-- BEGIN DYNAMIC BLOCK: clickForPaypalCallbackDetails -->
                &nbsp;<a href="#" onclick="openWindow('index.php?fuse=billing&view=ViewPaypalCallbackDetails&entryId={entryId}', 'email', 'scrollbars=yes,menubar=no,location=no,width=760,height=520,resizable=yes')">([l]view[/l])</a>
                <!-- END DYNAMIC BLOCK: clickForPaypalCallbackDetails -->
                <!-- BEGIN DYNAMIC BLOCK: clickForStaffNote -->
                &nbsp;<a href="#" onclick="openWindow('index.php?fuse=clients&view=EventLogStaffNote&entryId={entryId}', 'email', 'scrollbars=yes,menubar=no,location=no,width=760,height=520,resizable=yes')">([l]view note[/l])</a>
                <!-- END DYNAMIC BLOCK: clickForStaffNote -->
                <!-- BEGIN DYNAMIC BLOCK: clickForPackageDetails -->
                &nbsp;<a href="#" onclick="openWindow('index.php?fuse=clients&view=HistoryOriginalPackage&entryId={entryId}', 'email', 'scrollbars=yes,menubar=no,location=no,width=760,height=520,resizable=yes')">([l]view original package[/l])</a>
                <!-- END DYNAMIC BLOCK: clickForPackageDetails -->
            </td>
        </tr>
        <!-- END DYNAMIC BLOCK: logActionRow -->
    </table>
</div>

