コード例 #1
0
ファイル: action-default.php プロジェクト: evilnapsis/yibun
<?php

$user = EventData::getById($_GET["id"]);
$user->del();
print "<script>window.location='index.php?view=reservations';</script>";
コード例 #2
0
<?php

$reservation = EventData::getById($_GET["id"]);
$pacients = ProjectData::getAll();
$medics = CategoryData::getAll();
?>
<div class="row">
	<div class="col-md-8">
	<h1>Editar Evento</h1>
	<br>
<form class="form-horizontal" role="form" method="post" action="./?action=updatereservation">
  <div class="form-group">
    <label for="inputEmail1" class="col-lg-2 control-label">Fecha/Hora</label>
    <div class="col-lg-5">
      <input type="date" name="date_at" value="<?php 
echo $reservation->date_at;
?>
" required class="form-control" id="inputEmail1" placeholder="Fecha">
    </div>
    <div class="col-lg-5">
      <input type="time" name="time_at" value="<?php 
echo $reservation->time_at;
?>
" class="form-control" id="inputEmail1" placeholder="Hora">
    </div>
  </div>
  <div class="form-group">
    <label for="inputEmail1" class="col-lg-2 control-label">Titulo</label>
    <div class="col-lg-10">
      <input type="text" name="title" value="<?php 
echo $reservation->title;
コード例 #3
0
<?php

if (count($_POST) > 0) {
    $user = EventData::getById($_POST["id"]);
    $user->title = $_POST["title"];
    $category_id = "NULL";
    if ($_POST["category_id"] != "") {
        $category_id = $_POST["category_id"];
    }
    $user->category_id = $category_id;
    $project_id = "NULL";
    if ($_POST["project_id"] != "") {
        $project_id = $_POST["project_id"];
    }
    $user->project_id = $project_id;
    $user->date_at = $_POST["date_at"];
    $user->time_at = $_POST["time_at"];
    $user->description = $_POST["description"];
    $user->update();
    print "<script>window.location='index.php?view=reservations';</script>";
}