本文整理汇总了PHP中Agenda::setEvento方法的典型用法代码示例。如果您正苦于以下问题:PHP Agenda::setEvento方法的具体用法?PHP Agenda::setEvento怎么用?PHP Agenda::setEvento使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agenda
的用法示例。
在下文中一共展示了Agenda::setEvento方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editarAction
public function editarAction()
{
//summernote (composer::textarea)
$this->view->headLink()->appendStylesheet($this->_request->getBaseUrl() . '/public/painel/assets/plugins/summernote/dist/summernote.css');
//css datepicker
$this->view->headLink()->appendStylesheet($this->_request->getBaseUrl() . '/public/painel/assets/plugins/form-daterangepicker/daterangepicker-bs3.css');
$ag = new Agenda();
$request = $this->getRequest();
$id = $request->getParam('id');
$evento = $ag->getAgendaById($id);
$erro = false;
$msg = '';
if ($request->isPost()) {
$start = new Zend_Date($request->getPost('data_ini'));
$end = new Zend_Date($request->getPost('data_fim'));
$evento = $request->getPost('evento');
$iniciaem = $start->toString('YYYY-MM-dd');
$finalizaem = $end->toString('YYYY-MM-dd');
$descricao = $request->getPost('descricao');
$horario = $request->getPost('horario');
$local = $request->getPost('local');
$ag->setEvento($evento);
$ag->setIniciaem($iniciaem);
$ag->setFinalizaem($finalizaem);
$ag->setDescricao($descricao);
$ag->setHorario($horario);
$ag->setLocal($local);
$data = array('evento' => $ag->getEvento(), 'iniciaem' => $ag->getIniciaem(), 'finalizaem' => $ag->getFinalizaem(), 'descricao' => $ag->getDescricao(), 'horario' => $ag->getHorario(), 'local' => $ag->getLocal());
$ag->saveAgenda($data, $id);
if ($erro) {
$msg = 'Ocorreu um erro, tente novamente';
$this->view->msg = $msg;
} else {
$this->_helper->redirector('listar', 'agenda');
}
}
$this->view->evento = $evento;
$this->render();
}
示例2: header
$url = BASE_URL . '/views/agenda/';
header('Location: ' . $url);
die;
} else {
echo "Deu ruim!";
die;
}
break;
case 'Atualizar':
$agenda = new Agenda();
$evento = $_POST['evento'];
$data = $_POST['data'];
$hora = $_POST['hora'];
$obs = $_POST['obs'];
$id = $_POST['id'];
$agenda->setEvento($evento);
$agenda->setData($data);
$agenda->setHora($hora);
$agenda->setObs($obs);
if ($agenda->update($id)) {
$url = BASE_URL . '/views/agenda/';
header('Location: ' . $url);
die;
} else {
echo "Deu ruim!";
die;
}
break;
default:
echo "Deu ruim de novo!";
break;