<%set set_focus = 'myform.import_to'%>
<%set book_mark = 'import_subscriber'%>
<%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 lst_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%" colspan="3" valign="top">
      <table width="99%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
        <tr>
          <td><img src="<%image_url%>/pics/1pixel.gif" width="1" height="3"></td>
        </tr>
        <tr>
          <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#336600" style="border: 1px solid #C5E1A3">
              <tr>
                <td class="bold_white" height="20"><img src="<%image_url%>/icons/list.gif" hspace="2" vspace="0">Import Subscribers</td>
                <td class="body" align="right" valign="middle">
                  <%set mn_subscriber = 1%>
                  <%set isub_search = 1%>
                  <%set isub_add = 1%>
                  <%set iremove_sub = 1%>
                  <%set iclose = 1%>
                  <%include lst_include_icons.html%>
                </td>
              </tr>
            </table>
            <br />
            <blockquote>
                <p  align=center class="body"><%if msg%><%msg%><%else%>This lets you to import the subscribers from either an existing text file or a list.<%endif%> </p>
            </blockquote>
            <form name=myform action="glist.cgi" ENCTYPE='multipart/form-data' method=post>
            <table border="0" cellspacing="0" cellpadding="0" align=center align=center>
                <tr class="body">
                  <td class="body"><li><b>Import into</b><br />Select lists from the list below</li></td>
                </tr>
                <tr>
                  <td class="body" align="right">
                    <select name="import_to" class="object" multiple size="5" style="width: 380px">
                      <%GList::Tools::generate_list('import_to')%>
                    </select>
                  </td>
                </tr>
                <tr class="body" height=25>
                  <td class="body"><li><b>Import Data</b></li></td>
                </tr>
                <tr valign="middle" class="body">
                  <td>
                    <table width="95%" border="0" cellspacing="1" cellpadding="1" align="center">
                      <tr class="body">
                        <td width="20%" class="body">From file</td>
                        <td width="80%">
                          <input type="file" class="object" name="sub_file" size="40" />
                        </td>
                      </tr>
                      <tr class="body">
                        <td width="20%" class="body">OR </td>
                        <td width="80%">&nbsp;</td>
                      </tr>
                      <tr class="body">
                        <td width="20%" class="body" valign="top">Subscribers</td>
                        <td width="80%">
                          <textarea class="object" name="sub_data" cols="50" rows="5"><%if sub_data%><%sub_data%><%endif%></textarea>
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
                <tr class="body" height=25>
                  <td class="body"><li><b>Fields To Import</li></b>
                    <table border="0" cellspacing="0" cellpadding="0" align="center" width=90%>
                      <tr class="body">
                        <td width=3 align="center">
                          <input type="checkbox" name="cname" value="1" />
                        </td>
                        <td class="body">Subscriber Name</td>
                        <td width=3>
                          <div align="center">
                            <input type="checkbox" name="cemail" value="1" disabled checked />
                          </div>
                        </td>
                        <td width="45%" class="body">Subscriber Email</td>
                      </tr>
                    </table><br />
                  </td>
                </tr>
                <tr class="body" height=25>
                  <td><li><b>Import Options</li></b>
                    <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
                      <tr class="body">
                        <td width="17%" valign="top" class="body"><b>Fields</b></td>
                        <td width="27%" class="body">Delimiter<br />
                          <input class="object" type="text" name="fd" size="2" maxlength="2" value="," /><br />
                        </td>
                        <td width="56%" valign="top" class="body">Escape charactor<br />
                          <input class="object" type="text" name="fe" size="2" maxlength="2" value="\" />
                        </td>
                      </tr>
                      <tr class="body">
                        <td width="17%" valign="top" class="body"><b>Records</b></td>
                        <td width="27%" class="body">Delimiter<br />
                          <input class="object" type="text" name="rd" size="2" maxlength="2" value="\n" />
                          <br />
                        </td>
                        <td width="56%" class="body">Ignore first<br />
                          <input class="object" type="text" name="rl" size="2" maxlength="1" value="0" /> lines </td>
                      </tr>
                    </table>
                  </td>
                </tr>
                <tr valign="bottom" align="center">
                  <td height="30">
                    <input type="submit" name="Submit" value="Import" class="button" />
                    <input type="reset" name="Submit2" value="Reset" class="button" />
                  </td>
                </tr>
            </table>
            <input type=hidden name="do" value="lst_import" />
            <input type=hidden name="lst_id" value="<%lst_id%>" />
            <%hidden_objects%>
            </form>
            <br />
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<%include include_footer.html%>
