当前位置: 首页>>代码示例>>PHP>>正文


PHP Agenda类代码示例

本文整理汇总了PHP中Agenda的典型用法代码示例。如果您正苦于以下问题:PHP Agenda类的具体用法?PHP Agenda怎么用?PHP Agenda使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Agenda类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Class constructor
  * Creates the page
  */
 function __construct()
 {
     parent::__construct();
     try {
         TTransaction::open("sample");
         $evento = new Agenda(R);
         $evento->nome = "Curso Adianti framework";
         $evento->lugar = "Progs Scholl alterado";
         $evento->descricao = "Curso basico";
         $evento->data_ev = date("Y-m-d");
         $evento->hora_ev = date("h:m:");
         $evento->store();
         TTransaction::close();
     } catch (Exception $e) {
         echo $e->getMessage();
     }
     TPage::include_css('app/resources/styles.css');
     $this->html = new THtmlRenderer('app/resources/wellcome.html');
     // define replacements for the main section
     $replace = array();
     // replace the main section variables
     $this->html->enableSection('main', $replace);
     // add the template to the page
     parent::add($this->html);
 }
开发者ID:cbsistem,项目名称:Cursos,代码行数:29,代码来源:WellcomeView.class.php

示例2: actionCadastrar

 public function actionCadastrar()
 {
     if ($this->request->isPostRequest) {
         $cadastrarAgenda = new Agenda();
         $cadastrarAgenda->agenda = $this->request->getPost('agenda');
         $cadastrarAgenda->save();
     }
 }
开发者ID:jralison,项目名称:chrono,代码行数:8,代码来源:AgendaController.php

示例3: excluir

 public function excluir()
 {
     $agenda = new Agenda();
     $agenda->setCodigoAge(toNumero(GetVar('EventId')));
     $agendaDAO = new AgendaDAO();
     $return = $agendaDAO->excluir($agenda);
     $result = $return ? 'Registro Excluido com sucesso.' : 'Erro ao Excluir Registro.';
     echo json_encode(array("success" => is_string($return) ? false : $return, "msg" => is_string($return) ? $return : $result));
 }
开发者ID:jhonleandres,项目名称:estagio,代码行数:9,代码来源:AgendaController.php

示例4: insert

 public function insert($param)
 {
     switch ($_SERVER['REQUEST_METHOD']) {
         case 'GET':
             if (isset($_SESSION['user'])) {
                 $this->load->model("Activite");
                 $jour = substr($param, 0, 2);
                 $mois = substr($param, 2, 2);
                 $annee = substr($param, 4, 4);
                 $heureDebut = substr($param, 8, 2)[0] == '0' ? substr($param, 9, 1) . 'h' : substr($param, 8, 2) . 'h';
                 $heureFin = substr($param, 10, 2)[0] == '0' ? substr($param, 11, 1) . 'h' : substr($param, 10, 2) . 'h';
                 $activites = Activite::getAll();
                 $date = new \DateTime($annee . '-' . $mois . '-' . $jour);
                 setlocale(LC_TIME, 'fr_FR.utf8', 'fra');
                 $titre = ucfirst(strftime("%A", $date->getTimestamp())) . ' ' . $date->format('d') . ' ' . ucfirst(strftime("%B", $date->getTimestamp())) . ' - ' . $heureDebut . '-' . $heureFin;
                 $data['titre'] = $titre;
                 $data["hidden"] = $date->format('Y-m-d') . '|' . $heureDebut . ':' . $heureFin;
                 $data['activites'] = $activites;
                 $this->load->view("ajoutActiviteAgenda", $data);
             } else {
                 $_SESSION['messagee'] = "Erreur, accès refusé";
                 header('Location: ' . BASEURL);
                 exit;
             }
             break;
         case 'POST':
             if (isset($_SESSION['user']) && isset($_POST['redondance']) && $_POST['redondance'] != null) {
                 $this->load->model("Agenda");
                 $dateHeure = preg_split('/[|]/', $_POST['dateDebut']);
                 $dateDebut = new \DateTime($dateHeure[0] . '00:00:01');
                 $redondance = $_POST['redondance'];
                 $dateFin = date_modify(new \DateTime($dateHeure[0] . '23:59:59'), "+ " . $redondance . ' week');
                 $hDebut = preg_split('/[:]/', $dateHeure[1])[0];
                 $heureMinuteSecondeDebut = preg_split('/h/', $hDebut);
                 $hFin = preg_split('/[:]/', $dateHeure[1])[1];
                 $heureMinuteSecondeFin = preg_split('/h/', $hFin);
                 $heureDebut = $heureMinuteSecondeDebut[1] != "" ? $heureMinuteSecondeDebut[0] . ':' . $heureMinuteSecondeDebut[1] . ':00' : $heureMinuteSecondeDebut[0] . ':00:00';
                 $heureFin = $heureMinuteSecondeFin[1] != "" ? $heureMinuteSecondeFin[0] . ':' . $heureMinuteSecondeFin[1] . ':00' : $heureMinuteSecondeFin[0] . ':00:00';
                 $idActivite = $_POST['activite'];
                 $jour = $dateDebut->format('N');
                 $ajoutActivite = new Agenda(null, $idActivite, $dateDebut->format("Y-m-d H:i:s"), $dateFin->format("Y-m-d H:i:s"), $jour, $heureDebut, $heureFin);
                 $ajoutActivite->create();
                 header('Location: ' . base_url() . '/index.php/agendaActivite/gestion');
                 exit;
             }
             break;
     }
 }
开发者ID:LaCongolexicomatisation,项目名称:CodeIgniter-3.0.3,代码行数:48,代码来源:agendaActivite.php

示例5: gestionAgendaActivite

 public function gestionAgendaActivite()
 {
     $this->load->model("Activite");
     $this->load->model("Agenda");
     $data['listAgenda'] = Agenda::getAll();
     $this->load->view("gestionAgendaActivite", $data);
 }
开发者ID:LaCongolexicomatisation,项目名称:CodeIgniter-3.0.3,代码行数:7,代码来源:activites.php

示例6: emploiDuTemps

 public function emploiDuTemps($id)
 {
     $this->load->helper("Date_helper");
     $semaines = week2period(date("Y"), date("W"));
     $this->load->model("Agenda");
     $x = Agenda::getById($id);
     $data['listAgenda'] = $x;
     $tab = [];
     foreach ($x as $y) {
         $z = true;
         $date = date('d-m-Y', strtotime($y->dateDebutActivite()));
         $dateFin = date('d-m-Y', strtotime($y->dateFinActivite()));
         while ($z == true) {
             if ($date == $dateFin) {
                 $z = false;
             }
             $p = new \DateTime($date);
             if ($p->format('N') == $y->jour()) {
                 $tab[] = str_replace('-', '', $date) . substr($y->horaireDebutActivite(), 0, 2) . substr($y->horaireFinActivite(), 0, 2);
             }
             //jddayofweek(gregoriantojd($mois,$jour,$annee));
             $date = date('d-m-Y', strtotime($date . ' + 1 days'));
         }
         //            $tab[]=$date;
         //            $date=date('d-m-Y', strtotime($date. ' + 1 days'));
         //            $tab[]=$date;
         //            $tab[]=$dateFin;
     }
     $data['semaines'] = $semaines;
     $data['test'] = $tab;
     $this->load->view("gestionInscription enfant", $data);
 }
开发者ID:LaCongolexicomatisation,项目名称:CodeIgniter-3.0.3,代码行数:32,代码来源:enfantClient.php

示例7: show

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function show($id)
 {
     if (Payment::VeryPayment() == false) {
         return View::make('clinic.payment.renews-payment');
     }
     $agenda = Agenda::where('doctor_id', $id)->first();
     $CustomDay = CustomDay::where('agenda_id', $agenda->id)->get();
     return View::make('clinic.doctors.customDay')->with('customddays', $CustomDay)->with('agendaID', $agenda->id);
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:14,代码来源:ClinicDoctorsCustomDaysController.php

示例8: getVeryAgenda

 public static function getVeryAgenda($agenda_id)
 {
     $user = Sentry::getUser();
     $doctor = Doctor::where('user_id', $user->id)->first();
     $agenda = Agenda::find($agenda_id);
     if ($agenda->doctor_id == $doctor->id) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:11,代码来源:Agenda.php

示例9: update

 public function update($id)
 {
     $data = array("first_name" => Input::get("first_name"), "last_name" => Input::get("last_name"), "email" => Input::get("email"), "phone" => Input::get("phone"), "picture" => Input::file("picture"), "specialty_id" => Input::get("specialty_id"), "dating_duration" => Input::get("dating_duration"));
     $rules = array("first_name" => 'required|min:1|max:255', "last_name" => 'required|min:1|max:100', "email" => 'required|min:1', "phone" => 'required|min:1|max:100', "specialty_id" => 'required|min:3|max:255', "dating_duration" => 'required|min:1|max:3', "picture" => 'mimes:jpeg,gif,png');
     $messages = array('required' => 'El campo :attribute es obligatorio.', 'min' => 'El campo :attribute no puede tener menos de :min carácteres.', 'email' => 'El campo :attribute debe ser un email válido.', 'max' => 'El campo :attribute no puede tener más de :max carácteres.', 'numeric' => 'El campo :attribute debe contener solo numeros', 'mimes' => 'El formato de la imagen logo debe ser jpg, git, png');
     $validation = Validator::make(Input::all(), $rules, $messages);
     //si la validación falla redirigimos al formulario de registro con los errores
     //y con los campos que nos habia llenado el usuario
     if ($validation->fails()) {
         return Redirect::to('/doctor/profile')->withErrors($validation)->withInput();
     } else {
         $doctor = Doctor::find($id);
         $agenda = Agenda::where('doctor_id', $doctor->id)->first();
         $agenda->dating_duration = Input::get("dating_duration");
         $agenda->save();
         $espes = explode(',', Input::get("specialty_id"));
         $espeuok = '';
         foreach ($espes as $espe) {
             $very = Specialty::where('name_es', $espe)->first();
             if ($very) {
                 $espeuok = $espeuok . ',' . $very->id;
             }
         }
         $doctor->specialty_id = $espeuok;
         $doctor->save();
         $user = User::find($doctor->user_id);
         $user->first_name = $data['first_name'];
         $user->last_name = $data['last_name'];
         $user->save();
         $profile = Profile::where('user_id', $doctor->user_id)->first();
         if (Input::file('picture') != NULL) {
             //agrega imagen de logo
             $file_logo = Input::file('picture');
             $ext = Input::file('picture')->getClientOriginalExtension();
             $nameIMG = date('YmdHis');
             $logo = $nameIMG . '.' . $ext;
             $logo = 'assets/doctor/images/profile_pic/profile_' . $logo;
             $profile->picture = $logo;
         }
         $profile->phone = Input::get("phone");
         $profile->save();
         if ($profile) {
             if (Input::file('picture') != NULL) {
                 $file_logo->move("assets/doctor/images/profile_pic/", $logo);
             }
             return Redirect::to('/doctor/profile')->withFlash_message("Guardado Exitosamente");
         } else {
             return Redirect::to('/doctor/profile')->withErrors("Error")->withInput();
         }
     }
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:51,代码来源:DoctorController.php

示例10: getConfigDay

 public function getConfigDay()
 {
     if (Payment::VeryPayment() == false) {
         return View::make('clinic.payment.renews-payment');
     }
     $doctor = Doctor::doctorLogin();
     $agenda = Agenda::where('doctor_id', $doctor)->first()->id;
     $configDay = Configday::where('agenda_id', $agenda)->get();
     if ($configDay->isEmpty()) {
         return View::make('clinic.doctor.config.ConfigDay')->with('agenda', $agenda);
     } else {
         return View::make('clinic.doctor.config.ConfigDay')->with('agenda', $agenda)->with('configDay', $configDay);
     }
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:14,代码来源:PatientsController.php

示例11: mailCreation

function mailCreation($nom, $time, $idEvent)
{
    include '../../../core/model/Mail.php';
    $date = Agenda::timeToDate($time);
    $nomSite = Config::getVal('nom');
    $adresseSite = Config::getVal('adresse');
    $expediteur = '"' . $nomSite . '"<robot@' . $adresseSite . '>';
    $sujet = "Nouvel evenement sur " . $nomSite;
    $arch = new Archiviste();
    $user = new User();
    $users = $arch->restituer($user);
    foreach ($users as $user) {
        $mail = $user->get('mail');
        $notif = $user->get('notifEvent');
        $login = $user->get('login');
        if ($mail && $notif != 'n') {
            $message = 'Bonjour ' . $login . ', <br />' . PHP_EOL . '<br />' . PHP_EOL . 'L\'évenement <b>' . $nom . '</b> a été ajouté sur le site ' . $nomSite . '. Il aura lieu le ' . $date . '<br />' . PHP_EOL . '<br />' . PHP_EOL . 'Pour y accéder, cliquez sur le lien suivant : <a href="http://' . $adresseSite . '/?mod=raidplanner&action=event&id=' . $idEvent . '">' . $nom . '</a><br />' . PHP_EOL . '<br />' . PHP_EOL . '<br />' . PHP_EOL . 'Si vous ne souhaitez plus recevoir ces notifications, consultez vos <a href="http://' . $adresseSite . '/?mod=raidplanner&action=options">options</a>.' . PHP_EOL . '<br />' . PHP_EOL . 'Ceci est un message automatique. Merci de ne pas y repondre. ';
            Mail::envoyer($mail, $expediteur, $sujet, $message);
        }
    }
}
开发者ID:selenith,项目名称:plasmide,代码行数:21,代码来源:jQueryRaidplanner.php

示例12: agendas

 public function agendas()
 {
     if (isset($_SESSION['user'])) {
         if (Utilisateur::is_admin($_SESSION['user'])) {
             $a = Agenda::get_all();
             $users = array();
             for ($i = 0; $i < count($a); $i++) {
                 $users[] = Utilisateur::get_by_id($a[$i]->idUtilisateur());
             }
             include 'views/adminAgenda.php';
         } else {
             $_SESSION['message']['type'] = 'error';
             $_SESSION['message']['text'] = "Vous n'êtes pas administrateur";
             include 'views/home.php';
         }
     } else {
         $_SESSION['message']['type'] = 'error';
         $_SESSION['message']['text'] = "You aren't connected";
         include 'views/connexion.php';
     }
 }
开发者ID:x0nePeace,项目名称:aCalendar,代码行数:21,代码来源:admin.php

示例13: get_lang

// setting the name of the tool
$nameTools = get_lang('MyAgenda');
// the variables for the days and the months
// Defining the shorts for the days
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days
$DaysLong = api_get_week_days_long();
// Defining the months of the year to allow translation of the months
$MonthsLong = api_get_months_long();
if (empty($_GET['id'])) {
    api_not_allowed();
}
$id = explode('_', $_GET['id']);
$type = $id[0];
$id = $id[1];
$agenda = new Agenda();
$agenda->type = $type;
//course,admin or personal
if (isset($_GET['course_id'])) {
    $course_info = api_get_course_info_by_id($_GET['course_id']);
    if (!empty($course_info)) {
        $agenda->set_course($course_info);
    }
}
$event = $agenda->get_event($id);
if (!empty($event)) {
    define('ICAL_LANG', api_get_language_isocode());
    $ical = new vcalendar();
    $ical->setConfig('unique_id', api_get_path(WEB_PATH));
    $ical->setProperty('method', 'PUBLISH');
    $ical->setConfig('url', api_get_path(WEB_PATH));
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:ical_export.php

示例14: date

include 'cabecera.php';
include 'clases/Consejero.class.php';
include 'clases/Agenda.class.php';
include 'menuIzquierda.php';
?>


<!-- info ================================================== -->
<div class="row">
<div class="page-header" style="text-align: center">
    <h1>Postponer Sesión</h1>
</div>
        <?php 
$fecha = date('Y\\-m\\-d');
$agenda = new Agenda();
$sesiones = $agenda->buscarCreadasPendientes($_SESSION['usuario']);
if (count($sesiones) > 0) {
    echo '<table class="table-condensed span7" style="margin: 0 10%">
            <thead>
                <tr>
                    <td><b>N°</b></td>
                    <td><b>Proximas sesiones:</b></td>
                </tr>
            </thead>
            <tbody>';
    for ($i = 0; $i < count($sesiones); $i++) {
        $agenda->setId($sesiones[$i]['id_agenda']);
        $resul = $agenda->obtenerDatos();
        $consecutivo = $agenda->consecutivo($resul[0]['id_dependencia'], $resul[0]['id_tipo_consejo'], $resul[0]['fecha'], $resul[0]['anio'], $resul[0]['extraordinaria']);
        echo '
开发者ID:rincedgar,项目名称:AgendaLuz,代码行数:30,代码来源:postponerSesion.php

示例15: WSEventsList

/**
 * Get a list of events between two dates for the given username
 * Function registered as service. Returns strings in UTF-8.
 * @param string Username
 * @param string User's API key (the user's API key)
 * @param int    Start date, in YYYYMMDD format
 * @param int    End date, in YYYYMMDD format
 * @return array Events list
 */
function WSEventsList($username, $signature, $datestart = 0, $dateend = 0)
{
    if (empty($username) or empty($signature)) {
        return -1;
    }
    global $_configuration;
    $info = api_get_user_info_from_username($username);
    $user_id = $info['user_id'];
    $list = UserManager::get_api_keys($user_id, 'dokeos');
    $key = '';
    foreach ($list as $key) {
        break;
    }
    $local_key = $username . $key;
    if (!api_is_valid_secret_key($signature, $local_key)) {
        return -1;
        // The secret key is incorrect.
    }
    $events_list = array();
    $user_id = UserManager::get_user_id_from_username($username);
    if ($user_id === false) {
        return $events_list;
    }
    // Error in user id recovery.
    $ds = substr($datestart, 0, 4) . '-' . substr($datestart, 4, 2) . '-' . substr($datestart, 6, 2) . ' 00:00:00';
    $de = substr($dateend, 0, 4) . '-' . substr($dateend, 4, 2) . '-' . substr($dateend, 6, 2) . ' 00:00:00';
    $events_list = Agenda::get_personal_agenda_items_between_dates($user_id, $ds, $de);
    return $events_list;
}
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:38,代码来源:user_info.soap.php


注:本文中的Agenda类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。