<!-- BEGIN DYNAMIC BLOCK: imgSearch -->
<tr>
    <td align="right"><img alt="" src="templates/images/search_category.jpg" width="161" height="38" /></td>
</tr>
<!-- END DYNAMIC BLOCK: imgSearch -->
<tr>
    <td align='left'>
        <table border='0'>
            <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td>
                <!-- BEGIN DYNAMIC BLOCK: searchSection -->
                    <script language="JavaScript" type="text/JavaScript">
                    function ToggleCustomFields(type, option){
                        if(type == 'c_profile_field'){
                            $('customprofile'+option).style.display='';
                        }else{
                            $('customprofile'+option).style.display='none';
                        }
                        if(type == 'c_package_field'){
                            $('custompackage'+option).style.display='';
                        }else{
                            $('custompackage'+option).style.display='none';
                        }
                    }
                   </script>
                   <form id="searchForm" action="index.php?fuse=clients" method="post">
                   <table align="center" style="width: 110px" border="0" cellpadding="1" cellspacing="0">
                <tr>
                    <td>
                        <select id="view" style="width: 100px">
                            <option value="ViewAllUsers"> [l]All Users[/l]</option>
                            <option value="ViewActiveUsers"> [l]Active Users[/l]</option>
                            <option value="ViewInactiveUsers"> [l]Inactive Users[/l]</option>
                            <option value="ViewDeletedUsers"> [l]Cancelled Users[/l]</option>
                            <option value="ViewFraudUsers"> [l]Fraud Users[/l]</option>
                            <option value="ViewPendingUsers"> [l]Pending Users[/l]</option>
                        </select>
                    </td>                                                       
                </tr>
                <tr>
                    <td>
                        <font class="summaryitem">[l]with[/l]</font><br />
                        <select name="searchbyfield" style="width: 100px" onchange="ToggleCustomFields(this.value, 'div');">
                            <option value="name"> [l]Name[/l]</option>
                            <option value="userid"> [l]User ID[/l]</option>
                            <option value="email"> [l]E-mail[/l]</option>
                            <option value="domain"> [l]Domain Name[/l]</option>
                            <option value="invoice"> [l]Invoice #[/l]</option>
                            <option value="pmt_reference"> [l]Pymt. Reference #[/l]</option>
                            <option value="ticket"> [l]Ticket #[/l]</option>
                            <option value="lastfour"> [l]CC Last 4[/l]</option>
                            <option value="organization"> [l]Organization[/l]</option>
                            <option value="c_profile_field"> [l]Custom Profile Field[/l]</option>
                            <option value="c_package_field"> [l]Custom Package Field[/l]</option>
                        </select>
                    </td>                                                       
                </tr>
                <tr>
                    <td>
                        <div style="display:none" id="customprofilediv">
                        <select name="searchbycustomprofilefield" style="width: 100px">
                            {CUSTOMPROFILEFIELDS}
                        </select>
                        </div>
                    </td>                                                       
                </tr>
                <tr>
                    <td>
                        <div style="display:none" id="custompackagediv">
                        <select name="searchbycustompackagefield" style="width: 100px">
                            {CUSTOMPACKAGEFIELDS}
                        </select>
                        </div>
                    </td>                                                       
                </tr>
                <tr>
                    <td>
                            <font class="summaryitem">[l]like[/l]</font><br />
                            <input type="text" size="20" name="searchstring" style="width: 100px" onkeydown="return processOnEnter(event)"/>
                    </td>                                                       
                </tr>
                <tr>
                    <td>
                            <br />
                            <input type="submit" class="button_medium" onclick="submitToView()" value='[lh]Search[/lh]' />
                    </td>                                                       
                </tr>
                   </table>
                   </form>
                <!-- END DYNAMIC BLOCK: searchSection -->

                   <!-- We are only going to add this if the search ticket report is available and public -->
                   <!-- BEGIN DYNAMIC BLOCK: ticketsearch -->
                   <!-- Search ticket if report is public -->
                   <br />
                   <script language="JavaScript" type="text/JavaScript">
                    function ToggleSearchTickets(){               
                        if($('searchvisible').value == 0){
                        if(bolUseEffects ){ new Effect.SlideDown($('ticketsearchdiv')); }
                        else{ $('ticketsearchdiv').style.display=''; }
                        $('searchvisible').value=1;                                                         
                        }else{
                        if(bolUseEffects ){ new Effect.SlideUp($('ticketsearchdiv')); }
                        else{ $('ticketsearchdiv').style.display='none'; }
                        $('searchvisible').value=0;
                        }               
                    }
                   </script>
                   <form action="index.php?fuse=admin&amp;view=Snapins&amp;plugin=ticketsearch" method="post">
                   <input type="hidden" id="searchvisible" value="0" />
                   <table align="center" style="width: 110px" border="0" cellpadding="1" cellspacing="0">
                       <tr>
                           <td><a href="javascript:void(0);" onclick='ToggleSearchTickets();'><font class="summaryitemheader">[l]Search Tickets[/l]</font></a>
                               <div style="display:none" id="ticketsearchdiv">
                               <font class="summaryitem">[l]that contain[/l]</font><br />
                                <input type="text" name="ticketsearch_keywords" style="width: 100px" /><br />
                                <select name="ticketsearch_limit" >
                                    <option value="1">1</option>
                                    <option value="5">5</option>
                                    <option value="10">10</option>
                                    <option value="20">20</option>
                                    <option value="50">50</option>
                                    <option value="100">100</option>
                                </select>
                                <font class="summaryitem"># [l]results[/l]</font>
                                <br /><br />
                                <input type="submit" class="button_medium" value="[lh]Search[/lh]" name="ticketsearch_submit" />
                                </div>                                                              
                            </td>
                        </tr>
                    </table>
                    </form>                                               
                    <!-- End Search Tickets -->
                    <!-- END DYNAMIC BLOCK: ticketsearch -->                                               


            </td></tr>
        </table><br />
    </td>
</tr>
