
    <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            <?php echo $lang['TITLE_LIST_CUSTOMER']; ?>
            <small><?php echo $lang['LIST_CUSTOMER']; ?></small>
          </h1>
          
        </section>

       
       <section class="content">
          <div class="row">
            <div class="col-xs-12">
				
				<!-- ALERTS -->
				<?php if($_GET['y'] == '1') { ?>
				<div class="callout callout-success">
                    <h4><?php echo $lang['ALERT_CUSTOMER_NEW']; ?></h4>
                    <p><?php echo $lang['ALERT_CUSTOMER_NEW_TXT']; ?></p>
                  </div>
				<?php } ?>
				<?php if($_GET['y'] == '2') { ?>
				<div class="callout callout-success">
                    <h4><?php echo $lang['ALERT_CUSTOMER_UPDATE']; ?></h4>
                    <p><?php echo $lang['ALERT_CUSTOMER_UPDATE_TXT']; ?></p>
                  </div>
				<?php } ?>
				<?php if($_GET['y'] == '3') { ?>
				<div class="callout callout-success">
                    <h4><?php echo $lang['ALERT_CUSTOMER_DELETE']; ?></h4>
                    <p><?php echo $lang['ALERT_CUSTOMER_DELETE_TXT']; ?></p>
                  </div>
				<?php } ?>
				
              <div class="box">
                <div class="box-header">
                  <h3 class="box-title"><?php echo $lang['CUSTOMERS']; ?></h3>
                </div><!-- /.box-header -->
                <div class="box-body">
                  <table id="tabela" class="table table-striped table-hover">
                    <thead>
                      <tr>
						<th></th>
                        <th><?php echo $lang['CUST_NAME']; ?></th>
                        <th><?php echo $lang['CUST_MAIL']; ?></th>
                        <th><?php echo $lang['CUST_ADDRESS']; ?></th>
                        <th><?php echo $lang['CUST_CITY']; ?></th>
                        <th><?php echo $lang['STATUS']; ?></th>
                        <th><?php echo $lang['ACTIONS']; ?></th>
                      </tr>
                    </thead>
                    <tbody>
					<?php
 		  			$query = mysql_query("SELECT * FROM customers order by id DESC");
 		  			while($result = mysql_fetch_array($query)){ 
					?>
		            <tr>
					<td><img src="<?php echo gravatar($result['email']); ?>" style="width:30px;height:30px;" class="img-circle" alt="Gravatar"></td>
		            <td><a href="?mod=Profile&id=<?php echo base64_encode($result['id']); ?>"><?php echo $result['name']; ?></a></td>
		            <td><?php echo $result['email']; ?></td>
		            <td><?php echo $result['address']; ?></td>
		            <td><?php echo $result['city']; ?></td>
		            <td><?php if($result['status'] == 'S') { ?> <?php echo $lang['ACTIVE']; ?> <? } else { ?> <?php echo $lang['BLOCK']; ?> <?php } ?></td>
		            <td>
					<div class="btn-group">
                      <button type="button" class="btn btn-info btn-sm"><?php echo $lang['ACTIONS']; ?></button>
                      <button type="button" class="btn btn-info btn-sm dropdown-toggle" data-toggle="dropdown">
                        <span class="caret"></span>
                        <span class="sr-only">Toggle Dropdown</span>
                      </button>
                      <ul class="dropdown-menu" role="menu">
                        <li><a href="?mod=Profile&id=<?php echo base64_encode($result['id']); ?>"><?php echo $lang['BTN_VIEW']; ?></a></li>
                        <li><a href="../doLogin.php?cLogin=login&u=<?php echo base64_encode($result['email']); ?>&p=<?php echo $result['pass']; ?>" target=_blank>Login</a></li>
                        <li><a href="?mod=NewCustomer&id=<?php echo base64_encode($result['id']); ?>"><?php echo $lang['BTN_UPDATE']; ?></a></li>
                        <li class="divider"></li>
                        <li><a href="javascript:void(0);" onclick="javascript: if (confirm('<?php echo $lang['ALERT_BTN_DELETE']; ?>')) { window.location.href='?mod=NewCustomer&id=<?php echo base64_encode($result['id']); ?>&action=delete' } else { void('') };"><?php echo $lang['BTN_DELETE']; ?></a></li>
                      </ul>
                    </div>
                    
                    </td>
		            </tr>
					<?php } ?>
					
                    </tbody>
                    <tfoot>
                      <tr>
						<th></th>
                        <th><?php echo $lang['CUST_NAME']; ?></th>
                        <th><?php echo $lang['CUST_MAIL']; ?></th>
                        <th><?php echo $lang['CUST_ADDRESS']; ?></th>
                        <th><?php echo $lang['CUST_CITY']; ?></th>
                        <th><?php echo $lang['STATUS']; ?></th>
                        <th><?php echo $lang['ACTIONS']; ?></th>
                      </tr>
                    </tfoot>
                  </table>
                </div><!-- /.box-body -->
              </div><!-- /.box -->
       
           </div><!-- /.col -->
          </div><!-- /.row -->
        </section><!-- /.content -->
       
       
        
        
      </div><!-- /.content-wrapper -->
   
   
   
   
