<!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.lblCustomerMessages}</title>
{include file='CommonStyles.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/messages.css" />
<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}/ui.daterangepicker.css" />
{include file='CommonJavaScript.tpl'}
</head>
<body>
	<!-- Outer container starts-->
	<div class="outer_container" > {include file='CommonTop.tpl'} 
    <div class="head-strip-outer">
<div class="head-strip clearfix">
  <h2 class="fixing_left">{$language.lblUserMessages}</h2>
{if $sort=='DESC'}{assign var="sortorder" value="ASC"}{else}{assign var="sortorder" value="DESC"}{/if}
  {html->anchor class="sortby fixing_left {$sortorder|strtolower}" href=$link|cat :"sort/$sortorder/" content="{$language.lblDate}  <span class='arw'></span>"}
  
  {form->start name="formMessagesSearch" action="" method="post" enctype="multipart/form-data"}
  <div class="search-form fixing_right">
    <ul class="clearfix">
      <li class="column" style="width:15%">  {form->textbox  id="busSrchName" class="text-box"  name="busSrchName" placeholder="{$language.lblBusinessName}"}  </li>
      <li class="column">{form->textbox id="fromDate" readonly="readonly" name="fromDate" placeholder="{$language.lblDate}"   class="date-field"} </li>
<li class="column" style="width:15%">  {form->select class="select-box" name="msgSrchtype" options="->{$language.lblReason}~*About Product->{$language.lblAboutProduct}~*Warranty->{$language.lblWarranty}~*Others->{$language.lblothers}"} </li>
   <li class="column"> {form->textbox  id="busSrchProduct" class="text-box"  name="busSrchProduct" placeholder="{$language.lblProduct}"}
   </li> 
<li class="column" style="width:100px">    {form->select  class="select-box" name="srchStatus" options="->{$language.lblSelect}~*New->{$language.lblNew}~*Verified->{$language.lblVerified}"} 
        </li>
      <li class="column" style="width:70px">{form->submit id="submitSearch" name="submitSearch"  class="button01 curve-3"  value="{$language.lblGo}"}
         {html->anchor href="messages/user/" class="action-link" content=$language.lblListAll}
         </li>
    </ul>
  </div>
  {form->close}
  
   </div>
   <div class="head-strip-border"></div>
</div>
	<!-- Content Container starts-->
<div class="content_container2 clearfix">
 <div id="common_message" ></div>
 {if empty($resMessages)}  <div class="msg-container pos-relative clearfix norecode " >

	<div class="message_info" >{$language.msgNoRecords}</div>
    </div>
{else}
 <div class="msg-container pos-relative clearfix">
    {form->start name="formBulkVerify" method="post"}
     {if $srchStatus!='Verified'}
            {form->hidden value='Verified' name="status"}     
            <span class="fixing_btm"> 
            {form->submit class="button03 curve-3" name="bulkSubmit" id="bulkSubmit" value="{$language.lblVerify}"}
            </span>
     {/if}
    <span class="line"></span>
    <div class="msg-sec-left fixing_left msg-scrol pos-relative">
    
    {form->hidden value=$resMessages.0.messageID id="AjaxMsgID" name="AjaxMsgID"}
    {form->hidden value=$resMessages.0.originID id="AjaxOrgnID" name="AjaxOrgnID"}
    {form->hidden value='customer' id="AjaxMsgType" name="AjaxMsgType"}	
    <ul class="clearfix">            
    {foreach from=$resMessages item="message" key="key1"}
        <li class="pos-relative list-main" id="Ajax_{$key1}">  
            {assign var="replyID" value=$message.messageID}
        {if $message.status=='New'}<span class="new-icon" id="Ajax_message_{$replyID}">&nbsp;</span>{/if}
            <div class="perioddiv" ><label for="chkbx_{$key1}">&nbsp;</label>
                <input type="checkbox" name="verify_msgarr[]" id="chkbx_{$key1}" value="{$replyID}" class="chkbx" />
            </div>
       {html->anchor class="link-all leftspc" onclick="showCustomerMessageDetails({$replyID},{$message.originID},'Ajax_{$key1}')" 
    content="<span class='line2'></span>
    <p>{$message.createdDate|date_format:$date_format} {$message.createdDate|date_format:$time_format}</p>
    <p><span> {if $message.type=='Warranty'}
                {$language.lblWarranty}
             {elseif $message.type=='Others'}
                 {$language.lblOthers}
              {else}
                  {$language.lblAboutProduct}
                  {/if} :- {$message.subject}</span></p>
    <strong>{$message.user}</strong>&nbsp;{$message.businessName}"} 
    </li>                               
    {/foreach} 
    </ul> 
                           
    </div>
    {form->close} 
    <div class="msg-sec-right fixing_right msg-scrol-ajax pos-relative"  id="AjaxMessageDetails"></div>
{/if}
        <!--End:From Listing--> 
</div>
</div>

</div>
  <!-- Content Container ends--> 
  <!-- Footer starts--> 
  {include file='CommonBottom.tpl'} 
  <!-- Footer ends--> 
</div>
<!-- Outer container ends--> 
{include file='CommonJavaScriptBottom.tpl'}
{form->basepath_script}
{html->messages_script id="common_message"} 
<script type="text/javascript"  src="{$view_javascript}/jquery.colorbox.js"></script>
<script type="text/javascript" src="{$view_javascript}/custom-radiobutton.js"></script> 

<script type="text/javascript">
    var msgSelectItem = "{$language.msgSelectItem}";
    var lblVerified = "{$language.lblVerified}";
{literal}
    $(document).ready(function (){
		$(".verify").colorbox({iframe:true, innerWidth:"60%", innerHeight:"60%"});
		$('#fromDate').daterangepicker({arrows: false});
		$('.perioddiv input').customInput('');
	});
{/literal}
		
        </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" src="{$common_js}/jquery.perfect-scrollbar.js"></script>
<script type="text/javascript">
  {literal}
    $(".msg-scrol").perfectScrollbar();
    $(".msg-scrol-ajax").perfectScrollbar({wheelSpeed:300});
{/literal}
</script> 
<script type="text/javascript"  src="{$view_javascript}/message.page.js"></script>
</body>
</html>