<?php
 include('modules/gcm/view/include.php');
  
 $msg=false;
  if($_POST)
  {
	  $obj->editParam();
	  $msg=true;
  }

?>

 <div class="widget3">
 <div class="widgetlegend">Configuracion Cloud Messaging </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> se ha sido guardado 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>
</p>
 <br><br><br><br>
<table width="100%" height="48" border="0">
  <?php
   $row=$obj->getParams();
   if(count($row)>0)
   {
       foreach($row as $row)
       {
           if($row["gcmp_type"] == 'text')
           {
              ?>
              <form action="" method="post">
                  <tr>
                    <td><?php echo $row["gcmp_id"];?></td>
                    <td><?php echo $row["gcmp_name"];?></td>
                	<td>
                	    <input type="text" name="value" value="<?php echo $row['gcmp_value']?>" />
                	    <input type="hidden" name="id" value="<?php echo $row['gcmp_id']?>" />
                	    <input type="hidden" name="type" value="<?php echo $row['gcmp_type']?>" />
                	</td>
                    <td><input type="submit" class="btn_submit" value="Guardar" /></td>
                  </tr>
              </form>
              <?
           }
           if($row["gcmp_type"] == 'file')
           {
              ?>
              <form action="" method="post" enctype="multipart/form-data">
                  <tr>
                    <td><?php echo $row["gcmp_id"];?></td>
                    <td><?php echo $row["gcmp_name"];?></td>
                	<td>
                	    <input type="file" name="value" />
                	    <input type="hidden" name="id" value="<?php echo $row['gcmp_id']?>" />
                	    <input type="hidden" name="type" value="<?php echo $row['gcmp_type']?>" />
                	    <br><br><br>
                	    <?php echo $row['gcmp_value']?>
                	</td>
                    <td><input type="submit" class="btn_submit" value="Guardar" /></td>
                  </tr>
              </form>
              <?
           }
       }
    } 
  ?>
</table>

</div>

