<%set book_mark = 'send_message'%>
<%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 msg_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 msg_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">
      <form name=myform action="glist.cgi" method=post>
      <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>
                      <td height="20" class="bold_white"><img src="<%image_url%>/icons/<%if msg_status%>sent.gif<%else%>message.gif<%endif%>" align="texttop" hspace="2" vspace="2">Select Lists</td>
                      <td align="right" class="body">
                        <%set iclose = 1%>
                        <%set ipreview = 1%>
                        <%set idetails = 1%>
                        <%set iedit = 1%>
                        <%set modify = 1%>
                        <%include msg_include_icons.html%>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            <table width="100%" border="0" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" align=center>
              <tr>
                <td valign=top class="body" colspan="2">
                  <br/>Selected messages:
                  <blockquote style="margin-top: 0px;margin-bottom: 10px">
                  <%loop loop_messages%>
                  <input type="hidden" name="msg_id" value="<%msg_id%>">
                  - <%msg_subject%><br />
                  <%endloop%>
                  </blockquote>
                </td>
              </tr>
              <tr class=body>
                <td class="body" style="padding-bottom: 4px">
                  <%if msg%><%msg%><%else%>Send message(s) to the following lists:<BR/><%endif%>
                  <br>
                  <%if mh != -1 and hits > $mh%><%include include_toolbar.html%><a href="glist.cgi?do=msg_send_form;mh=-1<%if toolbar_query%>;<%toolbar_query%><%endif%><%hidden_query%>">All</a><%endif%>
                </td>
                <td class="body" valign="bottom" align="right" style="padding-bottom: 4px">
                  <%if usr_type == 1%>
                  <input type="button" name="bselect" value="Show <%if show_user%>Your<%else%>All Users'<%endif%> Lists" class="button" onclick="open_url('do=msg_send_form<%ifnot show_user%>;show_user=1<%endif%><%if toolbar_query%>;<%toolbar_query%><%endif%><%hidden_query%>')" >
                  <%else%>&nbsp;<%endif%>
                </td>
              </tr>
              <tr>
                <td valign=top colspan="2">
                 <table width="100%" border="0" cellspacing="0" cellpadding="0"  bgcolor="#7a9f54">
                    <tr valign="middle">
                      <td height="0">
                        <table width="100%" border="0" cellspacing="1" cellpadding="1" align="center">
                          <tr bgcolor="#97ACBD" class="body_bold">
                            <td width="85%" bgcolor="#256A19" class="body_bold">List Name</td>
                            <td width="10%" bgcolor="#256A19" class="body_bold" align="right"  class="body_bold">Subscribers</td>
                            <td width="5%" bgcolor="#256A19" class="body_bold" align="center">
                              <input type="checkbox" name="c_all" value="1" onclick="check_all()" />
                            </td>
                          </tr>
                          <%loop results%>
                          <tr bgcolor="<%if even%>#d9e4f2<%else%>#FFFFFF<%endif%>" class=body>
                            <td><%lst_title%></td>
                            <td align=center><%if val_subs%><a href="javascript:rs('Details','glist.cgi?do=lst_subscribers;sub_list_id_fk=<%lst_id%>;sub_list_id_fk-opt==;<%if show_user%>;show_user=1<%endif%>sub_validated=1;mn_disable=1<%hidden_query%>',550,635,10,20,'Yes')"><%val_subs%></a><%else%>0<%endif%></td>
                            <td align="center">
                              <%if val_subs%>
                              <input type="hidden" name="<%row_num%>-list_id_fk" value="<%lst_id%>" />
                              <input type="checkbox" name="modify" value="<%row_num%>" onclick="check_item(this)" />
                              <%else%>&nbsp;
                              <%endif%>
                            </td>
                          </tr>
                          <%endloop%>
                        </table>
                      </td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <%if hits > $mh%>
                    <tr valign="middle">
                      <td height="0" class="body">
                        <%if mh != -1%><%include include_toolbar.html%><a href="glist.cgi?do=msg_send_form;mh=-1<%if toolbar_query%>;<%toolbar_query%><%endif%><%hidden_query%>">All</a><%endif%>
                      </td>
                    </tr>
                    <%endif%>
                    <tr valign="bottom" align="right">
                      <td height="30">
                        <input type="submit" name="Submit" value="Queue Mailing" class="button" />
                        <input type="button" name="scancel" value="Cancel" onclick="open_url('do=msg_home<%hidden_query%>')" class="button" />
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <input name="do" value="msg_send" type=hidden />
      <%hidden_objects%>
      </form>
    </td>
  </tr>
</table>
<%include include_footer.html%>
