<!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.lbladminSettings} :  {$language.lblmanageAdmin}</title>
{include file='CommonStyles.tpl'}
{include file='CommonCustomStyles.tpl'}
{include file='CommonJavaScript.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/grid_listing.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/right-menu.css" />
<script type="text/javascript" src="{$view_javascript}/table.plugin.js"></script>
</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"> 
      {html->anchor priv_href="adminuser/new/" href="adminuser/new/" class="custom-btnt" content=" <strong><span class='add'></span>{$language.lblAddNewAdmin2}</strong>" title={$language.lblAddNewAdmin2}}
      {include file='AdminUserRightLinks.tpl'} 
      </div>
    </div>
    <!--End: Right Block-->
    <div class="left_wrapper">
      <div class="content_wrapper">
        <h2>{$language.lblmanageAdmin}</h2>
        <div class="inner_content_wrapper"> 
          <div id="common_message"></div>
          {if $resListAdmin}
          <div class="grid_table00"> 
           {form->start name="formAdminList" action=""  method="post" enctype="multipart/form-data"} 
           <table width="100%" border="0" cellspacing="0" cellpadding="0"   >
              <tr>
                {if $editPrivilege || $deletePrivilege}<th align="left" valign="middle"  class="checkbox_column" width="35"> <div class="chekingdiv">
                    <ul>
                      <li> {form->checkbox name="ListStatusLinkCheckbox" id="ListStatusLinkCheckbox" class="fixing_left" value=""}
                        {html->anchor href="" id="ListStatusLink" class="status-arw fixing_left" alt="down arrow"}
                        <ul id="ListStatusSelection"  class="check_status">
                          <li> {html->anchor href="" rel="ListActive" content=$language.lblActive}</li>
                          <li> {html->anchor href="" rel="ListInactive" content=$language.lblInactive}</li>
                          <li> {html->anchor href="" rel="ListAll" content=$language.lblSelectAll}</li>
                        </ul>
                      </li>
                    </ul>
                  </div></th>{/if}
                <th  align="left" valign="middle"  width="20%">{$language.lblAdminName}</th>
                <th  align="left" valign="middle" >{$language.lblEmail}</th>
                <th  align="left" valign="middle"  width="15%">{$language.lblUserName}</th>
                <th  align="left" valign="middle"  width="13%">{$language.lblRole}</th>
                <th  align="left" valign="middle"  width="15%">{$language.lblLastAccessed}</th>
                {if $editPrivilege || $deletePrivilege}
				<th width="60" align="left" valign="middle" >&nbsp;</th>
				{/if}
              </tr>
              {foreach from=$resListAdmin item="resAdmin" key="key1"}
              {assign var="curr_adminUserID" value=$resAdmin.adminUserID}
              {assign var="fullName" value=$resAdmin.adminUserFirstName|cat:' '|cat:$resAdmin.adminUserLastName}
              <tr {if $resAdmin@iteration is even by 1} class="shade01" {/if}>
                {if $editPrivilege || $deletePrivilege}
		<td align="left" valign="middle" class="checkbox_column">
		  {if $resAdmin.adminUserID=="1"  || $resAdmin.adminUserID==$view_common_manageUserID}
		  <span class="user rmv-mrg-lf icon-set">&nbsp;</span>
		  {else}
                  {form->checkbox name="adminUserBulkStatus[]" class="adminUserBulkStatus checkbox01 ListAll {if $resAdmin.adminUserStatus   eq 'Active'}ListActive{else}ListInactive{/if}"  options="" value=$curr_adminUserID}                  
                  {/if} </td>{/if}
                <td align="left" valign="middle">{$fullName|htmlspecialchars|wordwrap:15:"<br />
                  ":true}</td>
                <td align="left" valign="middle">{$resAdmin.adminUserEmail}</td>
                <td align="left" valign="middle">{$resAdmin.adminUserLoginName|wordwrap:16:"<br />
                  ":true}</td>
                <td align="left" valign="middle">{$resAdmin.userTypeName}</td>
                <td align="left" valign="middle">{if $resAdmin.adminUserLastAccessDate =='0000-00-00 00:00:00'}
                  {$language.lblNotyetAccessed}{else}{$resAdmin.adminUserLastAccessDate|date_format:$config.date}&nbsp;{$resAdmin.adminUserLastAccessDate|date_format:$config.time}{/if}</td>
               {if $editPrivilege || $deletePrivilege}
			   <td align="left" valign="middle">
				{if $editPrivilege}
				{if $resAdmin.adminUserID=="1" || $resAdmin.adminUserID==$view_common_manageUserID}
					<span class="icon-set-space"></span>
				{else}
						{if $resAdmin.adminUserStatus neq "Blocked"}
					{if  $resAdmin.adminUserStatus eq "Active"}
                  		{assign var="newstatus" value="Inactive"}
                  		{assign var="changeStatus" value="status-active"}
               		 {else}
                  		{assign var="newstatus" value="Active"}
                  		{assign var="changeStatus" value="status-inactive"}
               		 {/if}
				{if $curr_page>0}{assign var="curpage" value=$curr_page}{else}{assign var="curpage" value="1"}{/if}
				  {html->anchor task='status-change' id="{$curr_adminUserID}" rel="{$newstatus}" title="{$resAdmin.adminUserStatus}" class="{$changeStatus} icon-set"}
                  {else}
                <span class="status-locked  icon-set" title="{$language.lblBlockedUser}">&nbsp;</span> {/if}
                {/if}  
				{if $view_common_manageUserID!="1" && $resAdmin.adminUserID=="1"}	
					{html->anchor class="status-locked icon-set"} 
				{else}	
					{html->anchor href="adminuser/edit/id/$curr_adminUserID/" caption="" class="edit02 icon-set" alt="Edit" history="yes"}
				{/if}	
                {/if}
				{if $deletePrivilege}
                  {if $resAdmin.adminUserID=="1" || $resAdmin.adminUserID==$view_common_manageUserID} 
                  {html->anchor  alt="{$language.lblAdminCantDelete}"  class="delete02-inactive icon-set"}
                  {else}
                  
                  {html->anchor confirm="{$language.msgDeleteAdmin}"   href="adminuser/destroy/id/$curr_adminUserID/" alt="delete" class="delete02 icon-set"  confirm_head=$language.lblDelete}                  
                  {/if}
				{/if}  
				 </td>
				  {/if}
              </tr>
              {/foreach}
             
            </table>
            </div>
            {if $editPrivilege || $deletePrivilege}
            	{if $deletePrivilege && $editPrivilege}
          		{assign var="statusoptions" value="->{$language.lblDonotchange}~*Active->{$language.lblActivate}~*Inactive->{$language.lblInactivate}~*Deleted->{$language.lblDelete}"}
          		{else if $deletePrivilege && (!$editPrivilege)} 
          		{assign var="statusoptions" value="->{$language.lblDonotchange}~*Deleted->{$language.lblDelete}"} 
          		{else if (!$deletePrivilege) && $editPrivilege} 
          		{assign var="statusoptions" value="->{$language.lblDonotchange}~*Active->{$language.lblActivate}~*Inactive->{$language.lblInactivate}"} 
          {/if} 
            
            <div class="action_box">
            	{form->select name="adminUserStatus" class="select-box width-auto" options=$statusoptions value=""}
                {form->submit name="submitBulkStatus" id="submitBulkStatus" class="button04"  value="{$language.lblUpdate}"}
            </div>
            {/if} 
			{form->close}
            <div class="fixing_right pagination_outer" >{paginate->layout  key="page" label_record="{$language.lblRecorsFound}" label_pages="{$language.lblPages}"} </div>
            <div class="clear"></div>
            {else}
            <div class="message_info" id="common_message">{$language.msgNoRecords}</div>
            {/if}
          <!--End:From Listing--> 
        </div>
        <!--End:Border 3--> 
      </div>
      <!--End:Border 2--> 
    </div>
    <!--End: left Block-->
    <div class="clear"></div>
  </div>
  <!--End: Content--> 
  {include file='CommonBottom.tpl'} </div>
<!--***********************************************************************END CONTAINER SECTION******************************************************--> 
<!--End:Content Container--> 
<!--End:Outer Container--> 
{include file='CommonJavaScriptBottom.tpl'} 
<script type="text/javascript" src="{$view_javascript}/adminuser.page.js"></script> 
<script type="text/javascript">
var msgDeleteSelectedAdmin	= '{$language.msgDeleteSelectedAdmin}';
var lblSelectAction			= '{$language.lblSelectAction}';
var lblSelectItem			= '{$language.lblSelectItem}';
{literal}
$(document).ready(function(){
		$('.side_wrapper ul li a[rel=adminuser]').addClass('selected'); 
});
{/literal}
</script>
{html->messages_script id="common_message"}
</body>
</html>
