<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$language.lblAdmin} : {$language.lblSubscribers}</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
{include file='CommonCustomStyles.tpl'}
<link href="{$view_styles}/jquery-ui-1.8.19.custom.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/grid_listing.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/right-menu.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/ui.daterangepicker.css" />
</head><body>
<div class="outer_container">
  {include file='CommonTop.tpl'}
  <!--End:Header Container-->
  <!--***********************************************************************START CONTAINER SECTION******************************************************-->
  <div class="content_container2 clearfix">
    <div class="right-sidebar">
    <div class="side_wrapper">
      {include file='SubscribersRightLinks.tpl'}
      </div>
    </div>
    <!--End: Right Block-->
    <div class="left_wrapper">
      <div class="content_wrapper">
      	<h2>{$language.lblSubscribers}</h2>
          <div class="search_container">
            <div class="inner"> {form->start name="searchSubscribers" method="post" action="subscriber/"}
             <ul class="clearfix">
                <li class="column">
                  <p class="label-field01">{$language.lblEmail} </p>
                  <span class="textfield01">
                      {form->textbox name="emailID" class="text-box"} 
                   </span>
                </li>
                <li class="column">
                  <p class="label-field01">{$language.lblStatus} </p>
                  <span class="textfield01">                  	
                      {form->select options="subscribed->{$language.lblSubscribed}~*unsubscribed->{$language.lblUnsubscribed}" name="status" class="select-box"}
                    </span>
                </li>
                <li class="column">
                  <p class="label-field01">{$language.lblDate}</p>
                  <span class="textfield01">                  
                     <div class="text-box-div-date">{form->textbox id="date" name="date" readonly="readonly" class="date-field" value=$fromDate}</div>
                    {form->hidden name="formName" id="formName" value="searchSubscribers"}  
                 </span>
                </li>
                <li class="column btn-show">
                   <p class="label-field01 producttype">&nbsp;</p>
                  {form->submit name="submit_search" value="{$language.lblSearch}" class="button01 margin-r-10"}
                  {html->anchor href="/subscriber/" class="action-link" caption="<span class=listall> {$language.lblListAll} </span>"}
                </li>
               </ul>                 
              {form->close}
              <div class="clear"></div>
            </div>
          </div>
          <div id="common_message"> </div>
          {if $resListSubscribers}
          {form->start name="bulk_update" action="" method="post"}
          <div class="grid_table00">
            <table width="100%" border="0" cellspacing="0" cellpadding="0"   >
              <tr>
              {if $editPrivilege}
                <th align="left" valign="middle"  class="checkbox_column" width="20"> <div class="chekingdiv">
                    <ul>
                      <li>
                        <input name="ListStatusLinkCheckbox" id="ListStatusLinkCheckbox" type="checkbox" class="fixing_left" value="" />
                      </li>
                    </ul>
                  </div></th>
                  {/if}
                <th align="left" valign="middle" >{$language.lblEmailAddress}</th>
               
                <th width="30%" align="left" valign="middle" >{$language.lblLanguage}</th>
               
                <th width="15%" align="left" valign="middle"><p>{if $status!='Unsubscribed'}{$language.lblSubscribedDate}
                    {else}{$language.lblUnSubscribedDate}{/if}</p></th>
               </tr>
              {foreach $resListSubscribers as $subscriber key="i"}
              {assign var="subscID" value=$subscriber.subscID}
			  {assign var="subscStatus" value=$subscriber.subscStatus|default:''}
              <tr>
              {if $editPrivilege}
                <td align="left" valign="top" class="checkbox_column"> {form->checkbox name="unSubscEmailID[]" class="check" class="checkbox01 ListAll List "|cat:$subscStatus value=$subscriber.subscEmailID} </td>
               {/if} 
                <td align="left" valign="top" >{$subscriber.subscEmailID}</td>               
                <td align="left" valign="top" width="14%">
				{$indexLanguageArray[$subscriber.languageID]['languageName']|default:''}
				</td>
                <td align="left" valign="top" width="25%">
                {if $status eq 'Unsubscribed'}{$subscriber.unsubscrDate|date_format:$date_format} {$subscriber.unsubscrDate|date_format:$time_format}
                    {else}
                {$subscriber.subscribedDate|date_format:$date_format} {$subscriber.subscribedDate|date_format:$time_format}
                {/if}
                </td>
                </tr>
              {foreachelse}
              <tr>
                <td colspan="6"><div class="message_info">{$language.msgNoRecords}</div></td>
              </tr>
              {/foreach}
            </table>
            </div>
              <div class="fixing_right pagination_outer" > {paginate->layout  key="page" label_record="{$language.lblRecorsFound}" label_pages="{$language.lblPages}"} </div>
              {if $editPrivilege}
            <div class="action_box">
            	{form->select name="subscStatus" id="subscriberStatus" options=$statusOptions class="select-box width-auto"}
                {form->submit name="status_update" value={$language.lblUpdate} class="update_btn_table button04"}
            </div>
            {/if}
            {else}
            <div class="message_info"> {$language.msgNoRecords}</div>
            {/if}
            {form->close}
          <!--End:From Listing-->
      </div>
      <!--End:Border 2-->
    </div>
    <!--End: left Block-->
    <div class="clear"></div>
  </div>
  <!--***********************************************************************END CONTAINER SECTION******************************************************-->
  <!--End:Content Container-->
  {include file='CommonBottom.tpl'}
</div>
<!--End:Outer Container-->
<script type="text/javascript" src="{$view_javascript}/table.plugin.js"></script>
<script type="text/javascript" src="{$view_javascript}/subscriber.page.js"></script>
<script type="text/javascript" src="{$view_javascript}/daterangepicker.jQuery.js"></script>
<script type="text/javascript" src="{$common_js}/date.js"></script>
<script type="text/javascript">
var lblSelectAction			= '{$language.lblSelectAction}';
var lblSelectItem			= '{$language.lblSelectItem}';
var lblSelectProductType	=	'{$language.lblSelectProductType1}';
{literal}
$(function(){
	 $('#date').daterangepicker({arrows: false});
	 $('.side_wrapper ul li a[rel=subscribelist]').addClass('selected'); 
	 });
{/literal}
</script>

{include file='CommonJavaScriptBottom.tpl'} 
{html->messages_script id="common_message"}
</body>
</html>
