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"); }
public function updateAction() { $post = new Criteria("post"); $is_public = 0; if (isset($_POST["is_public"])) { $is_public = 1; } $post->update(array("title" => "\"{$_POST['title']}\"", "content" => "\"{$_POST['content']}\"", "is_public" => $is_public, "created_at" => "NOW()"), "id=" . $_POST["id"]); Core::redir("./?r=blog/index"); }
public function updcatAction() { $criteria = new Criteria("category"); $criteria->update(array("name" => "\"{$_POST['name']}\""), "id=" . $_POST["id"]); Core::redir("./?r=team/editcat&id=" . $_POST["id"]); }