<!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.lblImportedUsersList}</title>
{include file='CommonStyles.tpl'} 

{include file='CommonJavaScript.tpl'} 

{include file='CommonCustomStyles.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/grid_listing.css" media="screen" />
<link href="{$view_styles}/right-menu.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="outer_container">
  {include file='CommonTop.tpl'} 
  <!--End:Header Container--> 
  
  <!--***********************************************************************END HEADER CONTAINER******************************************************-->
  
  <div class="content_container2 clearfix">
    <div class="right-sidebar">
      <div class="side_wrapper"> {include file='importrightlink.tpl'} </div>
    </div>
    <!--End: Right Block-->
    <div class="left_wrapper">
      <div class="content_wrapper">
    <h2>{$language.lblImportedUsersList}</h2>
          <div id="common_message"></div> 
          {form->start name="formImportUserSearch" action="" method="post" enctype="multipart/form-data"}
          <div class="search_container">
             <div class="inner single-box">
            <ul class="clearfix">
            	<li class="column">
                	<p class="label-field01">{$language.lblAffiliateID}</p>
                   <span class="form-field01">
                      {form->select name="affiliateID" class="select-box" options=$resAffiliateIDs value=$affiliateID caption="->{$language.lblSelectProductType}"}
                     </span>
                </li>
                <li class="column">
                	<p class="label-field01">{$language.lblAffiliateName}</p>
                   <span class="form-field01">
                       {form->textbox name="affiliateName" value=$affiliateName class="text-box"}
                      </span>
                </li>
                <li class="column">
                	{form->submit name="submitSearchList" class="button01"  value=$language.lblSearch}               
                  {html->anchor href="/affiliate/importUserList/" class="action-link" content="{$language.lblListAll}"}</li>
                  </ul>
               </div>
          </div>{form->close}
          
          <!--END:sEARCH cONTAINER-->
         {if $resList} <div class="grid_table00" >  
          {form->start  name="formAffiliateUsers" action="" method="post" enctype="multipart/form-data"}
            <table width="100%" border="0" cellspacing="0" cellpadding="0"   >
              <tr>
                <th align="left" valign="top"  width="2%" class="radioRemove"></th>
                <th align="left" valign="top"  width="18%">{$language.lblAffiliateName}</th>
                <th align="left" valign="top" width="5%" >{$language.lblConfirmedUsers}</th>
                <th align="left" valign="top" width="10%" >{$language.lblImportDate}</th>
                {*}
                <th align="left" valign="top" width="10%" >{$language.lblTotal}</th>
                <th align="left" valign="top" width="10%">
                    {$language.lblNotConfirmedUsers}
                  </th>
                {*}
                <th align="left" valign="top" width="18%">
                    {$language.lblMailScheduleID}
                  </th>
                <th align="center" valign="top" width="8%">
                    {$language.lblScheduled}
                 </th>
                <th align="left" valign="top" width="20%" >{$language.lblimportLog}</th>
              </tr>
              {assign var="counter" value="0"}
              {foreach from=$resList item="resultList" key="key1"} 
              {assign var="bulkID" value=$resultList.bulkID}
              <tr {if $key1%2!=0} class="shade01" {/if}>
                <td align="left" valign="top" class="radioRemove"> {if $resultList.mailSendStatus=='No' && $resultList.total>0}{assign var=counter value=$counter+1} 
                  {form->radio name="scheduleIDUser"  value=$bulkID}
                  {/if} </td>
                <td align="left" valign="top">{$resultList.name}</td>
                <td  valign="top" align="left"> {$resultList.confirmed} </td>
                <td align="left" valign="top"> {$resultList.addedDate|date_format:$date_format} </td>
                {*}
                <td  valign="top" align="left"> {$resultList.total} </td>
                <td  valign="top" align="left"> {$resultList.notconfirmed} </td>
                {*}
                <td  valign="top" align="left"> {$resultList.campaignListName} </td>
                <td  valign="top" align="center"> {if $resultList.total>0}
                  {if $resultList.mailSendStatus=='No'}
                  {$resultList.mailSendStatus}
                  {else}
                  {$resultList.mailScheduleDate|date_format:$date_format}
                  {/if}
                  {else}
                   -
                  {/if} </td>
                <td  valign="top" align="left"><p class="imp-details"> {foreach from=$resultList.importLog item="log" key="keylog"} 
                     <span class="left-span">{$keylog}</span> :<strong> {$log}</strong><br/>
                    {/foreach} </p></td>
              </tr>
              {/foreach}
              </table>
              </div>
              <div class="clearfix">{if $counter>0}
          <div class="action_box">{if $mailEnable=='yes'} {$language.lblScheduleDate}  {form->textbox class="text-box" name="scheduleDateUser"}
            {form->submit name='scheduleSubmitUser' class="update_btn_table button04" value="{$language.lblSchedule}"} {else}
			 {form->submit name='scheduleSubmitUser' class="update_btn_table button04" value="{$language.lblSend}"}
			{/if}</div>
          {/if}
          <div class="fixing_right pagination_outer"> {paginate->layout key="page" label_record="{$language.lblRecorsFound}" label_pages="{$language.lblPages}"}
            <div class="clear"></div>
          </div>
        </div>
              
            
            {form->close} {else}
            <div id="common_message" class="message_info"> {$language.msgNoRecords}</div>
            {/if} 
            </div>
    </div>
    
    <!--End: left Block-->
  </div>
  
  <!--End:Content Container--> 
  {include file='CommonBottom.tpl'}
</div>
{html->messages_script id="common_message"} {include file='CommonJavaScriptBottom.tpl'}

{form->rootpath_script} {form->basepath_script} 
<script type="text/javascript" src="{$view_javascript}/table.plugin.js"></script> 
<script type="text/javascript" src="{$view_javascript}/jquery-ui-timepicker-addon.js"></script> 
<script type="text/javascript">
$(document).ready(function(){
$("#scheduleDateUser").datetimepicker({ minDate: new Date()});
	if($('input:radio').length ==0){
		$('.radioRemove').remove();
	}
$(".reset").click(function(){
	$('input:radio').removeAttr('checked');
});
$("#formAffiliateUsers").submit(function(){
	if($("[name=scheduleIDUser]:checked").length>0 && $("#scheduleDateUser").val()!='')
		{
		return true;
		}
	else if(!($("[name=scheduleIDUser]:checked").length>0))
		{
		jAlert('Please select any schedule List','Info');
		return false;
		}
	else
		{
		jAlert('Please select the schedule Date','Info');
		return false;
		}

});
$('.side_wrapper ul li a[rel=importuserlist]').addClass('selected');
	 setSideMenu(); 
});
</script>
</body>
</html>