public function updateAction() { $criteria = new Criteria("person"); $person = PersonData::getById($_POST["id"]); $criteria->update(array("no" => "\"{$_POST['no']}\"", "name" => "\"{$_POST['name']}\"", "lastname" => "\"{$_POST['lastname']}\"", "job" => "\"{$_POST['job']}\"", "phone1" => "\"{$_POST['phone1']}\"", "phone2" => "\"{$_POST['phone2']}\"", "address1" => "\"{$_POST['address1']}\"", "address2" => "\"{$_POST['address2']}\"", "email1" => "\"{$_POST['email1']}\"", "email2" => "\"{$_POST['email2']}\"", "team_id" => "\"{$_POST['team_id']}\"", "category_id" => "\"{$_POST['category_id']}\""), "id=" . $_POST["id"]); Core::redir("./?r=index/people"); }
<?php if (count($_POST) > 0) { $user = PersonData::getById($_POST["user_id"]); $user->name = $_POST["name"]; $user->lastname = $_POST["lastname"]; $user->address1 = $_POST["address1"]; $user->email1 = $_POST["email1"]; $user->phone1 = $_POST["phone1"]; $user->update_client(); print "<script>window.location='index.php?view=clients';</script>"; }
<?php $user = PersonData::getById($_GET["id"]); ?> <div class="row"> <div class="col-md-12"> <h1>Editar Cliente</h1> <br> <form class="form-horizontal" method="post" id="addproduct" action="index.php?view=updateclient" 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"> <label for="inputEmail1" class="col-lg-2 control-label">Apellido*</label> <div class="col-md-6"> <input type="text" name="lastname" value="<?php echo $user->lastname; ?> " required class="form-control" id="lastname" placeholder="Apellido"> </div> </div> <div class="form-group"> <label for="inputEmail1" class="col-lg-2 control-label">Direccion*</label>
<?php $client = PersonData::getById($_GET["id"]); $client->del(); Core::redir("./index.php?view=providers");
public function getPerson() { return PersonData::getById($this->person_id); }
<div class="page-content"> <!-- Header Bar --> <?php $person = PersonData::getById($_GET["id"]); $teams = TeamData::getAll(); $categories = CategoryData::getAll(); Action::load("header"); ?> <!-- End Header Bar --> <div class="row"> <div class="col-lg-12"> <h2><?php echo $person->name . " " . $person->lastname; ?> <small>Editar</small></h2> <div class="widget"> <div class="widget-title"> <i class="fa fa-male"></i> Contacto </div> <div class="widget-body"> <form class="form-horizontal" role="form" method="post" action="./?r=person/update"> <div class="form-group"> <label for="inputEmail1" class="col-lg-2 control-label">Numero</label> <div class="col-lg-10"> <input type="text" name="no" value="<?php echo $person->no; ?> " required class="form-control" id="inputEmail1" placeholder="Numero">