Ejemplo n.º 1
0
 public function notifyActionAction()
 {
     $params = array('payment_agent' => 'alipay', 'method' => 'notify_action', 'data' => $this->input);
     try {
         Hook::listen('process_payment', $event = new EventData($params));
         if ($event->getData('result/0/error_code')) {
             throw new Exception();
         }
         //$this->_ajaxReturn('success','200','EVAL');
         echo "success";
     } catch (Exception $e) {
         echo "fail";
     }
 }
Ejemplo n.º 2
0
 function setTen($num)
 {
     $evs = EventData::getWithStart($this->startDate, $num);
     $email = $this->checkGetEmail();
     $icsgen = new IcsGenerator($evs, $email, EventData::$calendarNames[$num]);
     return $icsgen->getString();
 }
Ejemplo n.º 3
0
<?php

$events = EventData::getEvery();
foreach ($events as $event) {
    $thejson[] = array("title" => $event->title, "url" => "./?view=editreservation&id=" . $event->id, "start" => $event->date_at . "T" . $event->time_at);
}
// print_r(json_encode($thejson));
?>
<script>


	$(document).ready(function() {

		$('#calendar').fullCalendar({
			header: {
				left: 'prev,next today',
				center: 'title',
				right: 'month,agendaWeek,agendaDay'
			},
			defaultDate: '2015-08-12',
			editable: false,
			eventLimit: true, // allow "more" link when too many events
			events: <?php 
echo json_encode($thejson);
?>
		});
		
	});

</script>
Ejemplo n.º 4
0
 /**
  * Returns all CalendarEvents in the given time range for the given range_id.
  *
  * @param string $range_id Id of Stud.IP object from type user, course, inst
  * @param DateTime $start The start date time.
  * @param DateTime $end The end date time.
  * @return SimpleORMapCollection Collection of found CalendarEvents.
  */
 public static function getEventsByInterval($range_id, DateTime $start, DateTime $end)
 {
     $stmt = DBManager::get()->prepare('SELECT * FROM calendar_event ' . 'INNER JOIN event_data USING(event_id) ' . 'WHERE range_id = :range_id ' . 'AND (start BETWEEN :start AND :end OR ' . "(start <= :end AND (expire + end - start) >= :start AND rtype != 'SINGLE') " . 'OR (:start BETWEEN start AND end)) ' . 'ORDER BY start ASC');
     $stmt->execute(array(':range_id' => $range_id, ':start' => $start->getTimestamp(), ':end' => $end->getTimestamp()));
     $i = 0;
     $event_collection = array();
     foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
         $event_collection[$i] = new CalendarEvent();
         $event_collection[$i]->setData($row);
         $event_collection[$i]->setNew(false);
         $event = new EventData();
         $event->setData($row);
         $event->setNew(false);
         $event_collection[$i]->event = $event;
         $i++;
     }
     $event_collection = SimpleORMapCollection::createFromArray($event_collection, false);
     $event_collection->setClassName('Event');
     return $event_collection;
 }
Ejemplo n.º 5
0
 /**
  * Creates a new event, sets some default data and returns it.
  *
  * @return \CalendarEvent The new event.
  */
 public function getNewEvent()
 {
     $event_data = new EventData();
     $event_data->setId($event_data->getNewId());
     $now = time();
     $event_data->start = $now;
     $event_data->end = $now + 3600;
     $calendar_event = new CalendarEvent();
     $calendar_event->setId(array($this->getRangeId(), $event_data->getId()));
     $calendar_event->event = $event_data;
     return $calendar_event;
 }
Ejemplo n.º 6
0
  </button>
  <ul class="dropdown-menu" role="menu">
    <li><a href="report/clients-word.php">Word 2007 (.docx)</a></li>
  </ul>
</div>
-->
</div>
		<h1>Historial de Eventos</h1>
<h4>Ministerio: <?php 
echo $pacient->name;
?>
</h4>

<br>
		<?php 
$users = EventData::getAllByProjectId($_GET["id"]);
if (count($users) > 0) {
    // si hay usuarios
    ?>
			<table class="table table-bordered table-hover">
			<thead>
			<th>Titulo</th>
			<th>Categoria</th>
			<th>Fecha</th>
			</thead>
			<?php 
    foreach ($users as $user) {
        $category = $user->getCategory();
        ?>
				<tr>
				<td><?php 
Ejemplo n.º 7
0
    }
    if ($_GET["category_id"] != "") {
        if ($_GET["q"] != "" || $_GET["project_id"] != "") {
            $sql .= " and ";
        }
        $sql .= " category_id = " . $_GET["category_id"];
    }
    if ($_GET["date_at"] != "") {
        if ($_GET["q"] != "" || $_GET["project_id"] != "" || $_GET["category_id"] != "") {
            $sql .= " and ";
        }
        $sql .= " date_at = \"" . $_GET["date_at"] . "\"";
    }
    $users = EventData::getBySQL($sql);
} else {
    $users = EventData::getAll();
}
if (count($users) > 0) {
    // si hay usuarios
    ?>
        <table class="table table-bordered table-hover">
            <thead>
                <th>Titulo</th>
                <th>Ministerio</th>
                <th>Categoria</th>
                <th>Fecha</th>
                <th></th>
            </thead>
            <?php 
    foreach ($users as $user) {
        $project = null;
Ejemplo n.º 8
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;
Ejemplo n.º 9
0
<?php

$user = EventData::getById($_GET["id"]);
$user->del();
print "<script>window.location='index.php?view=reservations';</script>";
Ejemplo n.º 10
0
	<div class="col-md-12">
<div class="btn-group pull-right">
<!--<div class="btn-group pull-right">
  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
    <i class="fa fa-download"></i> Descargar <span class="caret"></span>
  </button>
  <ul class="dropdown-menu" role="menu">
    <li><a href="report/clients-word.php">Word 2007 (.docx)</a></li>
  </ul>
</div>
-->
</div>
		<h1>Eventos pasados</h1>
<br>
		<?php 
$users = EventData::getOld();
if (count($users) > 0) {
    // si hay usuarios
    ?>

			<table class="table table-bordered table-hover">
			<thead>
			<th>Titulo</th>
			<th>Ministerio</th>
			<th>Categoria</th>
			<th>Fecha</th>
			<th></th>
			</thead>
			<?php 
    foreach ($users as $user) {
        $pacient = $user->getProject();
Ejemplo n.º 11
0
 function setTen($num)
 {
     $evs = EventData::getWithStart(self::$startDate, $num);
     $icsgen = new IcsGenerator($evs, EventData::$calendarNames[$num]);
     return $icsgen->getString();
 }
Ejemplo n.º 12
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>";
}
Ejemplo n.º 13
0
<?php

$r = new EventData();
$r->title = $_POST["title"];
$r->description = $_POST["description"];
$category_id = "NULL";
if ($_POST["category_id"] != "") {
    $category_id = $_POST["category_id"];
}
$r->category_id = $category_id;
$project_id = "NULL";
if ($_POST["project_id"] != "") {
    $project_id = $_POST["project_id"];
}
$r->project_id = $project_id;
$r->date_at = $_POST["date_at"];
$r->time_at = $_POST["time_at"];
$r->user_id = $_SESSION["user_id"];
$r->add();
Core::redir("./index.php?view=reservations");