本文整理汇总了PHP中Evento::setEvento方法的典型用法代码示例。如果您正苦于以下问题:PHP Evento::setEvento方法的具体用法?PHP Evento::setEvento怎么用?PHP Evento::setEvento使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Evento
的用法示例。
在下文中一共展示了Evento::setEvento方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fileEventSave
public function fileEventSave()
{
View::select(null, null);
$data = null;
if (Input::hasPost('fechaSelect')) {
$upload = new DwUpload('archivo', 'img/upload/eventos/');
//$upload->setAllowedTypes('png|jpg|gif|jpeg|png');
$upload->setEncryptName(TRUE);
$this->data = $upload->save();
if (!$this->data) {
//retorna un array('path'=>'ruta', 'name'=>'nombre.ext');
$data = array('error' => TRUE, 'message' => $upload->getError());
} else {
$fecha = Input::post('fechaSelect');
$hora = Input::post('hora');
$id = Input::post('id');
$evento = new Evento();
if (is_numeric($id) && $evento->find_first($id)) {
$evento->urlFile = "img/upload/eventos/{$this->data['name']}";
$evento->update();
$data = array('success' => true);
$data = $evento;
$data->networks = json_decode($data->networks);
} else {
$return = array("start" => $fecha, "urlFile" => "img/upload/eventos/{$this->data['name']}", "constraint" => "", "author" => "", "hour" => $hora, "networks" => array("facebook" => "false", "twitter" => "false", "instagram" => "false", "linkedin" => "false", "pinterest" => "false", "youtube" => "false", "plus" => "false"));
$data = Evento::setEvento('create', $return, Session::get('id'));
$data->networks = json_decode($data->networks);
}
}
}
$this->data = $data;
View::json();
}
示例2: BaseDeDatos
<?php
require "funciones.php";
$bd = new BaseDeDatos();
$bd->setConexion();
$evento = new Evento();
$evento->setEvento($_POST['nombre']);