<%set set_focus = 'myform.mli_id'%>
<%set book_mark = 'search_mailing'%>
<%include include_header.html%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="82%">
  <tr>
    <td rowspan="2" bgcolor="#008000" height="100%" width="1"><img src="<%image_url%>/pics/1pixel.gif" width="1" height="1"></td>
    <td colspan="3" height="3%" bgcolor="#E8EAD0" valign="top"><%include mli_include_menu.html%></td>
    <td rowspan="2" bgcolor="#008000" height="100%" width="1"><img src="<%image_url%>/pics/1pixel.gif" width="1" height="1"></td>
  </tr>
  <tr>
    <td height="97%" width="20%" valign="top"><%include mli_include_nav.html%></td>
    <td bgcolor="#008000" height="97%" width="1" valign="top"><img src="<%image_url%>/pics/1pixel.gif" width="1" height="1"></td>
    <td height="97%" width="80%" valign="top">
      <table width="99%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>
          <td><img src="<%image_url%>/pics/1pixel.gif" width="1" height="3"></td>
        </tr>
        <tr bgcolor="#C5E1A3">
          <td>
            <table width="100%" border="0" cellspacing="1" cellpadding="1">
              <tr class="bold_white">
                <td bgcolor="#336600">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr class="bold_white">
                      <td height="20"><img src="<%image_url%>/icons/search.gif" width="16" align="texttop" hspace="2" vspace="0">Find Mailing</td>
                      <td align="right"><a href="glist.cgi?do=mli_home&<%if id%>id=<%id%><%endif%><%if fd%>&fd=<%fd%><%endif%><%if url%>;url<%endif%><%hidden_query%>"><img src="<%image_url%>/icons/close.gif" width="17" height="16" border=0 alt="Close"></a></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            <form name=myform action="glist.cgi" method="post">
            <table width="100%" border="0" bgcolor="#FFFFFF"  cellspacing="0" cellpadding="0" align=center>
              <tr>
                  <td class="body" align="center">
                  <%if msg%><span align=center class="body" /><br /><%msg%></span><%endif%>
                  <table border="0" cellspacing="3" cellpadding="0" align="center">
                    <tr>
                      <td class="body" colspan="3"><br /><li><b>Search Info</b></li></td>
                    </tr>
                    <tr>
                      <td class="body" nowrap>Mailing ID</td>
                      <td colspan="2">
                        <input type="text" class="object" name="mli_id" size="12" value="<%if mli_id%><%mli_id%><%endif%>" />
                        <select name="fd" class="object">
                            <option value="1" <%if fd == 1%>selected<%endif%>>Queued Mailings</option>
                            <option value="4" <%if fd == 4%>selected<%endif%>>Scheduled Mailings</option>
                            <option value="2" <%if fd == 2%>selected<%endif%>>Sent Mailings</option>
                            <%if hits_sent%>
                              <%loop results_sent%>
                                <option value="cat-<%cm_id%>" <%if id eq $cm_id%>selected<%endif%>>&nbsp;&nbsp;<%cm_name%></option>
                              <%endloop%>
                            <%endif%>
                            <option value="3" <%if fd == 3%>selected<%endif%>>Deleted Mailings</option>
                        </select>
                      </td>
                    </tr>
                    <tr class="body">
                      <td valign="top" class="body">Done</td>
                      <td colspan="2">
                          <table cellpadding="0" cellspacing="0">
                            <tr>
                              <td class="body">From<br /><input class="object" type="text" name="mli_done-ge" maxlength=30  size="<%if is_ie or is_mozilla%>12<%else%>10<%endif%>" value="<%if mli_done-ge%><%mli_done-ge%><%endif%>" /></td>
                              <td class="body">&nbsp;To<br />&nbsp;<input class="object" type="text" name="mli_done-le" size="<%if is_ie or is_mozilla%>12<%else%>10<%endif%>" maxlength=30 value="<%if mli_done-le%><%mli_done-le%><%endif%>" /> <font size=1><%GList::language('SYS_DATE_FORMAT')%></font></td>
                            </tr>
                          </table>
                      </td>
                    </tr>
                    <tr>
                      <td class="body">Subject</td>
                      <td colspan="2">
                        <input type="text" class="object" name="mli_subject" size="<%if is_ie or is_mozilla%>45<%else%>30<%endif%>" value="<%if mli_subject%><%mli_subject%><%endif%>" />
                      </td>
                    </tr>
                    <tr class="body">
                      <td class="body" valign="top">Message TEXT</td>
                      <td colspan="2">
                        <textarea class="object" name="mli_message_text" cols="<%if is_ie or is_mozilla%>43<%else%>35<%endif%>" rows="3"><%if mli_message_text%><%mli_message_text%><%endif%></textarea>
                      </td>
                    </tr>
                    <tr class="body">
                      <td class="body" valign="top">Message HTML</td>
                      <td colspan="2">
                        <textarea class="object" name="mli_message_html" cols="<%if is_ie or is_mozilla%>43<%else%>35<%endif%>" rows="3"><%if mli_message_html%><%mli_message_html%><%endif%></textarea>
                      </td>
                    </tr>
                    <tr>
                      <td class="body">From</td>
                      <td colspan="2">
                        <input type="text" class="object" name="mli_from" size="<%if is_ie or is_mozilla%>45<%else%>30<%endif%>" value="<%if mli_from%><%mli_from%><%endif%>">
                      </td>
                    </tr>
                    <tr>
                      <td class="body">Name</td>
                      <td colspan="2">
                        <input type="text" class="object" name="mli_name" size="<%if is_ie or is_mozilla%>45<%else%>30<%endif%>" value="<%if mli_name%><%mli_name%><%endif%>">
                      </td>
                    </tr>
                    <%if usr_type%>
                    <tr class="body">
                      <td>Username</td>
                      <td colspan="2">
                        <input type="text" class="object" name="mli_user_id_fk" size="<%if is_ie or is_mozilla%>29<%else%>20<%endif%>" value="" />
                        <select name="mli_user_id_fk-opt" class="object">
                          <option value="=">Exact Match</option>
                          <option value="<>">Not Equal</option>
                        </select>
                      </td>
                    </tr>
                    <%endif%>
                    <tr class="body">
                      <td class="body" colspan="3"><li><b>Search Options</b></li></td>
                    </tr>
                    <tr class="body">
                      <td class="body">Keyword search</td>
                      <td colspan=2><input class="object" name=keyword value="<%if keyword%><%keyword%><%endif%>" size="<%if is_ie or is_mozilla%>45<%else%>30<%endif%>" /></td>
                    </tr>
                    <tr class="body">
                      <td class="body">Maximum hits</td>
                      <td><input class="object" name=mh value="<%if mh%><%mh%><%else%>25<%endif%>" size=1 maxlength=2 /></td>
                      <td class="body">Match Any: <input name="ma" value=1 type=checkbox /></td>
                    </tr>
                    <tr class="body">
                      <td class="body">Sort by</td>
                      <td colspan=2>
                        <select name=sb class="object">
                          <option value="mli_id">ID</option>
                          <option value="mli_subject">Subject</option>
                        </select>
                        <select  name="so" class="object">
                          <option value="">---</option>
                          <option value="DESC">Descending</option>
                          <option value="ASC">Ascending</option>
                        </select>
                      </td>
                    </tr>
                    <tr>
                      <td align=center colspan="3"><BR />
                        <input name="bsearch" type=submit value=" Search " class="button" />
                        <input name="breset" type=reset value=" Reset " class="button" />
                      </td>
                    </tr>
                </table><BR />
                <input type="hidden" name="do" value="mli_search" />
                <input name='cd' value="<%if cd%><%cd%><%endif%>" type=hidden />
                <input name='cs' value="<%if cs%><%cs%><%endif%>" type=hidden />
                <input name='ca' value="<%if ca%><%ca%><%endif%>" type=hidden />
                <%hidden_objects%>
                </form>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<%include include_footer.html%>
