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


PHP View::renderTemplate方法代码示例

本文整理汇总了PHP中core\View::renderTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP View::renderTemplate方法的具体用法?PHP View::renderTemplate怎么用?PHP View::renderTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在core\View的用法示例。


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

示例1: index

 public function index()
 {
     $cache = new \Helpers\SimpleCache();
     $forecastApi = json_decode($cache->get_data('forecast', 'http://www.prevision-meteo.ch/services/json/colmar'), TRUE);
     $data["title"] = "Prévisions";
     $data['csrf_token'] = Csrf::makeToken();
     $data["tempMin+1"] = $forecastApi["fcst_day_1"]["tmin"];
     $data["tempMax+1"] = $forecastApi["fcst_day_1"]["tmax"];
     $data["tempMin+2"] = $forecastApi["fcst_day_2"]["tmin"];
     $data["tempMax+2"] = $forecastApi["fcst_day_2"]["tmax"];
     $data["tempMin+3"] = $forecastApi["fcst_day_3"]["tmin"];
     $data["tempMax+3"] = $forecastApi["fcst_day_3"]["tmax"];
     $data["tempMin+4"] = $forecastApi["fcst_day_4"]["tmin"];
     $data["tempMax+4"] = $forecastApi["fcst_day_4"]["tmax"];
     $data["resume+1"] = $forecastApi["fcst_day_1"]["condition"];
     $data["resume+2"] = $forecastApi["fcst_day_2"]["condition"];
     $data["resume+3"] = $forecastApi["fcst_day_3"]["condition"];
     $data["resume+4"] = $forecastApi["fcst_day_4"]["condition"];
     $data["icon+1"] = $forecastApi["fcst_day_1"]["icon"];
     $data["icon+2"] = $forecastApi["fcst_day_2"]["icon"];
     $data["icon+3"] = $forecastApi["fcst_day_3"]["icon"];
     $data["icon+4"] = $forecastApi["fcst_day_4"]["icon"];
     $data['javascript'] = array('AjaxControllers/Forecast/forecast');
     View::renderTemplate('header', $data);
     View::render('forecast/index', $data);
     View::renderTemplate('footer', $data);
 }
开发者ID:XxP1asmaxX,项目名称:MeteoColmar,代码行数:27,代码来源:Forecast.php

示例2: index

 public function index()
 {
     $data['title'] = "Sistema de Administración de Aerolíneas";
     $data['page'] = "page3";
     if (!is_null(filter_input(INPUT_POST, 'insertar'))) {
         $matricula = $_POST['matricula'];
         $asientos = $_POST['asientos'];
         $id_aerolinea = $_POST['id_aerolinea'];
         $datos = array('ASIENTOS' => $matricula, 'MATRICULA' => $asientos, 'AEROLINEA_ID' => $id_aerolinea);
         $this->_model->insertar_avion($datos);
         Url::redirect("aviones?aer=1");
     } elseif (!is_null(filter_input(INPUT_POST, 'eliminar'))) {
         $id_aerolinea = $_POST['id_avion'];
         $where = array('avion_id' => $id_aerolinea);
         $this->_model->eliminar_avion($where);
     } elseif (!is_null(filter_input(INPUT_POST, 'editar'))) {
         $matricula = $_POST['matricula'];
         $asientos = $_POST['asientos'];
         $id_aerolinea = $_POST['id_aerolinea'];
         $id_avion = $_POST['id_avion'];
         $datos = array('ASIENTOS' => $matricula, 'MATRICULA' => $asientos, 'AEROLINEA_ID' => $id_aerolinea);
         $where = array('avion_id' => $id_avion);
         $this->_model->actualizar_avion($datos, $where);
     }
     $data['aerolineas'] = $this->_model->obtener_aerolineas();
     $data['aviones'] = $this->_model->obtener_aviones();
     View::renderTemplate('header', $data);
     View::render('aviones/aviones', $data);
     View::renderTemplate('footer', $data);
 }
开发者ID:alejandrozepeda,项目名称:admin,代码行数:30,代码来源:Aviones.php

示例3: affichageScore

 public function affichageScore($num)
 {
     $data['title'] = "Les scores";
     $userSQL = new PersonneSQL();
     $user = $userSQL->prepareFindAll()->execute();
     // /!\ A ajouter dans le tableau data les scores correspondant au joueur quand il y aura des scores
     $score = new ScoreSQL();
     $condi = array();
     foreach ($user as $p) {
         $condi[] = "idPlayer = " . $p->id . " and idMap =" . $num;
     }
     $scores = array();
     $infos = array();
     for ($i = 0; $i < count($condi); $i++) {
         $scores[] = $score->prepareFindWithCondition($condi[$i])->execute();
     }
     for ($i = 0; $i < count($scores); $i++) {
         for ($j = 0; $j < count($scores[$i]); $j++) {
             $infos[] = $scores[$i][$j];
         }
     }
     $data['scores'] = $infos;
     $data['taille'] = count($infos);
     for ($i = 0; $i < count($infos); $i++) {
         $data['scores']['pseudos'][] = $userSQL->getPseudoById($data['scores'][$i]->idPlayer);
     }
     View::renderTemplate('header', $data);
     View::render('scores/scores', $data);
     View::renderTemplate('footer', $data);
 }
开发者ID:jordandevolder,项目名称:Algogoal,代码行数:30,代码来源:Scores.php

示例4: register

 public function register()
 {
     if (Session::get('logged')) {
         Url::redirect();
     }
     $data['title'] = 'הרשמה';
     if (isset($_POST['submit'])) {
         $username = $_POST['username'];
         $password = $_POST['password'];
         $email = $_POST['email'];
         if ($username == '') {
             $error[] = 'שם משתמש הוא שדה נדרש';
         }
         if ($this->_model->get_user($username)) {
             $error[] = 'שם המשתמש תפוס, בעסה';
         }
         if ($password == '') {
             $error[] = 'צריך סיסמא כדי להירשם, אחרת כל אחד יוכל להיכנס במקומך...';
         }
         if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
             $error[] = 'כדי להירשם צריך מייל, למקרה ששכחת את הסיסמא';
         }
         if (!$error) {
             $postdata = array('user_name' => $username, 'user_password' => Password::make($password), 'user_email' => $email);
             $this->_model->add_user($postdata);
             $this->login_user($username);
             //        Session::set('message','User Added');
             Url::redirect();
         }
     }
     View::renderTemplate('header', $data);
     View::render('register', $data, $error);
     View::renderTemplate('footer', $data);
 }
开发者ID:Zed3,项目名称:foodie,代码行数:34,代码来源:Auth.php

示例5: adsb

 public function adsb()
 {
     $data["title"] = "Trafic Aérien";
     View::renderTemplate('header', $data);
     View::render('pages/adsb', $data);
     View::renderTemplate('footer', $data);
 }
开发者ID:XxP1asmaxX,项目名称:MeteoColmar,代码行数:7,代码来源:Pages.php

示例6: index

 public function index()
 {
     $data['title'] = $this->language->get('beheer klanten');
     $rechten = \Helpers\Session::get('rechten') - 1;
     $result = $this->getData('klanten', $rechten);
     $i = 1;
     foreach ($result as $key) {
         $data["users"] .= '
             <tr>
                 <td>' . $i . '</td>
                 <td>' . $key->voornaam . '</td>
                 <td>' . $key->tussenvoegsel . '</td>
                 <td>' . $key->achternaam . '</td>
                 <td>' . $key->email . '</td>
                 <td style="text-align: right">
                     <a href="#" data-id="' . $key->klant_id . '" class="EditRow"><i class="fa fa-pencil-square-o fa-lg"></i></a>&nbsp;
                     <a href="#" data-id="' . $key->klant_id . '" class="DeleteRow"><i class="fa fa-times fa-lg"></i></a>
                 </td>
             </tr>
         ';
         $i++;
     }
     View::renderTemplate('header', $data);
     View::render('beheer/beheerklanten', $data);
     View::renderTemplate('footer', $data);
 }
开发者ID:Aukevanoost,项目名称:zeilschooldewaai,代码行数:26,代码来源:beheerKlanten.php

示例7: index

 public function index()
 {
     $data['title'] = $this->language->get('Voorwaarden');
     View::renderTemplate('header', $data);
     View::render('home/voorwaarden', $data);
     View::renderTemplate('footer', $data);
 }
开发者ID:Aukevanoost,项目名称:zeilschooldewaai,代码行数:7,代码来源:Voorwaarden.php

示例8: index

 /**
  * Define Index page title and load template files
  */
 public function index()
 {
     $data['title'] = "Mini IMDB";
     View::renderTemplate('header', $data);
     View::render('movies/homepage', $data);
     View::renderTemplate('footer', $data);
 }
开发者ID:BryanYeh,项目名称:Movies,代码行数:10,代码来源:Home.php

示例9: file

 public function file()
 {
     $fileID = array_keys($_GET);
     $fileID = str_replace('files/', '', $fileID[0]);
     $fileInfo = $this->_files->getFileInfo($fileID);
     if (empty($fileInfo)) {
         header("{$_SERVER['SERVER_PROTOCOL']} 404 Not Found");
         $data['title'] = '404';
         $data['error'] = "Страница не найдена.";
         View::render('Error/404');
         die;
     }
     $data['title'] = $fileInfo['file_name'];
     $data['fileinfo'] = $fileInfo;
     if ($data['fileinfo']['file_type'] == 'image/jpg' || $data['fileinfo']['file_type'] == 'image/gif' || $data['fileinfo']['file_type'] == 'image/png') {
         $data['imageinfo'] = getimagesize($_SERVER['DOCUMENT_ROOT'] . '/uploads/' . $data['fileinfo']['server_name']);
     }
     if ($data['fileinfo']['file_type'] == 'image/jpg' || $data['fileinfo']['file_type'] == 'image/tiff') {
         $data['imageinfo']['saved'] = exif_read_data($_SERVER['DOCUMENT_ROOT'] . '/uploads/' . $data['fileinfo']['server_name']);
     }
     $fileType = array_shift(explode('/', $data['fileinfo']['file_type']));
     if ($fileType == 'video' || $fileType == 'audio') {
         $getID3 = new GetId3();
         $data['mediainfo'] = $getID3->setEncoding('UTF-8')->analyze($_SERVER['DOCUMENT_ROOT'] . '/uploads/' . $data['fileinfo']['server_name']);
     }
     $data['comments'] = $this->_files->getAllComments($fileID);
     $data['token'] = $this->makeToken();
     View::renderTemplate('header', $data);
     View::render('files/file', $data);
     View::renderTemplate('footer', $data);
 }
开发者ID:Nattpyre,项目名称:rocketfiles,代码行数:31,代码来源:Files.php

示例10: index

 public function index()
 {
     // editable if admin privileges
     $admin_privilege = false;
     if (isset($_SESSION['user_info'])) {
         if ($_SESSION['user_info']->privilege >= 5) {
             // admin privilege level
             $admin_privilege = true;
         }
     }
     // get parents
     $parents = $this->db->getParents();
     $data["info"] = array();
     // get children
     foreach ($parents as $parent) {
         $buffer = array($parent);
         // get title
         $children = $this->db->getChildren($parent);
         foreach ($children as $child) {
             array_push($buffer, $child);
         }
         array_push($data["info"], $buffer);
     }
     // display information
     $data['title'] = 'Task';
     View::renderTemplate('header', $data);
     View::render('task/task', $data);
     View::renderTemplate('footer', $data);
 }
开发者ID:maksym-gryb,项目名称:portfolio,代码行数:29,代码来源:Task.php

示例11: index

 public function index()
 {
     $data['title'] = "Inicio";
     View::renderTemplate('header', $data);
     View::render('inicio/inicio', $data);
     View::renderTemplate('footer', $data);
 }
开发者ID:alejandrozepeda,项目名称:docstify,代码行数:7,代码来源:Inicio.php

示例12: index

 public function index()
 {
     $data['title'] = "Sistema de Administración de Aerolíneas";
     $data['page'] = "page2";
     if (!is_null(filter_input(INPUT_POST, 'insertar'))) {
         $nombre = $_POST['nombre'];
         $responsable = $_POST['responsable'];
         $numero = $_POST['numero'];
         $email = $_POST['correo'];
         $datos = array('NOMBRE' => $nombre, 'NOMBRE_RESPONSABLE' => $responsable, 'AVIONES' => $numero, 'EMAIL' => $email);
         $this->_model->insertar_aerolinea($datos);
         Url::redirect("aerolineas?aer=1");
     } elseif (!is_null(filter_input(INPUT_POST, 'eliminar'))) {
         $id_aerolinea = $_POST['id_aerolinea'];
         $where = array('aerolinea_id' => $id_aerolinea);
         $this->_model->eliminar_aerolinea($where);
     } elseif (!is_null(filter_input(INPUT_POST, 'editar'))) {
         $nombre = $_POST['nombre'];
         $responsable = $_POST['responsable'];
         $numero = $_POST['numero'];
         $email = $_POST['correo'];
         $id_aerolinea = $_POST['id_aerolinea'];
         $data = array('NOMBRE' => $nombre, 'NOMBRE_RESPONSABLE' => $responsable, 'AVIONES' => $numero, 'EMAIL' => $email);
         $where = array('aerolinea_id' => $id_aerolinea);
         $this->_model->actualizar_aerolinea($data, $where);
     }
     $data['aerolineas'] = $this->_model->obtener_aerolineas();
     $data['aviones'] = $this->_model->obtener_aviones();
     View::renderTemplate('header', $data);
     View::render('aerolineas/aerolineas', $data);
     View::renderTemplate('footer', $data);
 }
开发者ID:alejandrozepeda,项目名称:admin,代码行数:32,代码来源:Aerolineas.php

示例13: index

 public function index()
 {
     $data = array();
     View::renderTemplate("NewPortalHeader", $data, 'MetroTemplate');
     View::render("portal/Portal", $data);
     View::renderTemplate("footer", $data, 'MetroTemplate');
 }
开发者ID:hieunguyenbk,项目名称:AgriExtension,代码行数:7,代码来源:NewPortalController.php

示例14: developers

 public function developers()
 {
     $data['title'] = $this->language->get('Developerteam');
     View::renderTemplate('header', $data);
     View::render('home/developers', $data);
     View::renderTemplate('footer', $data);
 }
开发者ID:Aukevanoost,项目名称:zeilschooldewaai,代码行数:7,代码来源:Home.php

示例15: login

 public function login()
 {
     if (Session::get('loggedin')) {
         Url::redirect('admin-panel');
     }
     $data['title'] = 'Login';
     if (isset($_POST['submit'])) {
         $correo = $_POST['correo'];
         $password = $_POST['password'];
         if ($correo == '' || !isset($correo)) {
             $data['error'][0] = 'Correo es un campo obligatorio';
         }
         if ($password == '' || !isset($password)) {
             $data['error'][1] = 'Password es un campo obligatorio';
         }
         if (Password::verify($password, $this->_model->getHash($correo)) == false) {
             $data['error'][2] = 'Correo o password incorrectos';
         }
         if (!$data['error']) {
             $data['usuario'] = $this->_model->getUsuario($correo);
             Session::set('loggedin', true);
             Session::set('idUsuario', $data[usuario][0]->idUsuario);
             Session::set('nombre', $data[usuario][0]->nombre);
             Session::set('apellidoPaterno', $data[usuario][0]->apellidoPaterno);
             $dataUsuario = array('fechaConexion' => date("Y-m-d H:i:s"));
             $where = array('correo' => $correo);
             $this->_model->updateUsuario($dataUsuario, $where);
             Url::redirect('admin-panel');
         }
     }
     View::renderTemplate('header', $data);
     View::render('Auth/Login', $data);
     View::renderTemplate('footer', $data);
 }
开发者ID:alejandrozepeda,项目名称:dcorrido,代码行数:34,代码来源:Auth.php


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