<?php
include('modules/gcm/view/include.php');
 

 $msg=false;
 
 if($obj->getVars('actionDel') == 'true')
 {
     $obj->delPushUser();
     $msg = true;
 }
 

?>
<div class="widget3">
 <div class="widgetlegend">Apps Push notifications </div>
 <?php
  if($msg)
  {
  ?>
   <div class="ui-widget">
	<div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
		<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
		<strong>Felicitaciones!</strong> eliminado satisfactoriamente.</p>
	</div>
</div>
  <?
  }
 ?>
<p style="width:100">
	<a href="<?php $_SERVER['PHP_SELF'];?>?p=modules/gcm/view/index.php" class="btn_normal" style="float:left; margin:5px;">Volver </a>
	<a href="<?php $_SERVER['PHP_SELF'];?>?p=modules/gcm/view/newPushUser.php" class="btn_normal" style="float:left; margin:5px;">Nuevo </a>
	<!--<a href="modules/products/view/exportCodes.php" class="btn_normal" style="float:left; margin:5px;" target="_blank">Codigos </a>-->
</p>
 <br><br><br>
<table width="803" height="48" border="0">
    <tr>
        <th>ID</th>
        <th>Nombre</th>
        <th>Email</th>
        <th>Token</th>
        <th colspan="2">&nbsp;</th>
    </tr>
    <?php
        $row = $obj->getPushUser();
        if(count($row)>0)
        {
            foreach($row as $row)
            {
                ?>
                <tr>
                    <td><?php echo $row['gcm_id']?></td>
            		<td><?php echo $row['gcm_name']?></td>
            		<td><?php echo $row['gcm_email']?></td>
            		<td><?php echo $row['gcm_regid']?></td>
            		<td><a href="<?php $_SERVER['PHP_SELF'];?>?p=modules/<?php echo $obj->folder?>/view/editPushUser.php&id=<?php echo $row['gcm_id']?>" class="btn_normal">Editar </a></td>
            		<td><a href="<?php $_SERVER['PHP_SELF'];?>?p=modules/<?php echo $obj->folder?>/view/showPushUser.php&id=<?php echo $row['gcm_id']?>&actionDel=true" class="btn_borrar">Eliminar </a></td>
		        </tr>
                <?php
            }
        }
    ?>
  
</table>


</div>

