예제 #1
0
파일: view.class.php 프로젝트: ATS001/PRSIT
 public static function load($view_rep, $view_file)
 {
     if (tg('_tsk') == 'news') {
         $instance = new news();
         $array = $instance->index();
     }
     if (isset($array)) {
         $titre = lg('TITR') . ' | ' . $array['titre'];
         $content = htmlentities($array['titre']);
         $image = "http://{$_SERVER['HTTP_HOST']}" . criimg_link('upload/news/' . $array['img'], 200, 200, 'PNG');
         $actual_link = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
     } else {
         $titre = lg('TITR');
         $content = 'Site Internet Officiel de la présidence de la République du Tchad.';
         $image = './img/header.jpg';
         $actual_link = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
     }
     include_once AFFICH_REP . 'layout/header.php';
     include_once AFFICH_REP . 'layout/limen.php';
     include_once AFFICH_REP . $view_rep . SLASH . $view_file . '_v.php';
 }
예제 #2
0
파일: news_c.php 프로젝트: ATS001/PRSIT
<?php

if (tg('id') != 0) {
    //Requet de la news
    model::load('news', 'news');
    $instance = new news();
    $array;
    $array = $instance->index();
    view::load('news', 'news');
} else {
    view::load('news', 'lstnews');
}