Ejemplo n.º 1
0
<?php

if (count($_POST) > 0) {
    $user = EditorialData::getById($_POST["user_id"]);
    $user->name = $_POST["name"];
    $user->update();
    print "<script>window.location='index.php?view=editorials';</script>";
}
Ejemplo n.º 2
0
 public function getEditorial()
 {
     return $this->editorial_id != null ? EditorialData::getById($this->editorial_id) : null;
 }
Ejemplo n.º 3
0
<?php

/**
* @author evilnapsis
* @brief Eliminar editoriales 
**/
$category = EditorialData::getById($_GET["id"]);
$category->del();
Core::redir("./index.php?view=editorials");
Ejemplo n.º 4
0
<?php

$user = EditorialData::getById($_GET["id"]);
?>
<div class="row">
	<div class="col-md-12">
	<h1>Editar Editorial</h1>
	<br>
		<form class="form-horizontal" method="post" id="addproduct" action="index.php?action=updateeditorial" role="form">


  <div class="form-group">
    <label for="inputEmail1" class="col-lg-2 control-label">Nombre*</label>
    <div class="col-md-6">
      <input type="text" name="name" value="<?php 
echo $user->name;
?>
" class="form-control" id="name" placeholder="Nombre">
    </div>
  </div>

  <div class="form-group">
    <div class="col-lg-offset-2 col-lg-10">
    <input type="hidden" name="user_id" value="<?php 
echo $user->id;
?>
">
      <button type="submit" class="btn btn-success">Actualizar Editorial</button>
    </div>
  </div>
</form>