source: trunk/web/app/run/08_pre_out.php @ 1

Last change on this file since 1 was 1, checked in by dj3c1t, 12 years ago

import initial

File size: 3.9 KB
Line 
1<?php
2
3  if(!$env->erreur)
4  { if($env->e == "forum" || strpos($_SERVER["SCRIPT_NAME"], "index.php") !== false)
5    {
6      # ----------------------------------------------------------------------------------------
7      #                                                                                    blocs
8      #
9
10      if(($env->out["emplacements"] = $env->data->box_emplacements()) === false)
11      { $env->erreur = "Impossible de lire les emplacements";
12      }
13
14      if(($env->out["blocs"] = $env->data->boxes(0, null, true)) === false)
15      { $env->erreur = "Impossible de lire les blocs";
16      }
17
18      # ----------------------------------------------------------------------------------------
19      #                                                                                spotlight
20      #
21
22      if(($env->out["spotlight"] = $env->data->spotlight()) === false)
23      { $env->out["spotlight"] = array();
24      }
25
26
27      # ----------------------------------------------------------------------------------------
28      #                                                                       artistes au hasard
29      #
30
31      if(($env->out["artistes_au_hasard"] = $env->data->artistes_au_hasard(12)) === false)
32      { $env->out["artistes_au_hasard"] = array();
33      }
34
35      # ----------------------------------------------------------------------------------------
36      #                                                                      total des downloads
37      #
38
39      if(($env->out["nb_downloads"] = $env->data->nb_downloads(true)) === false)
40      { $env->out["nb_downloads"] = 0;
41      }
42
43      # ----------------------------------------------------------------------------------------
44      #                                                                               navigation
45      #
46
47      require $env->out_file("utils.php");
48      if(($env->out["menu_top"] = $env->data->all_menus(array("Nav"))) === false)
49      { $env->out["menu_top"] = array();
50      }
51
52      # ----------------------------------------------------------------------------------------
53      #                                                               derniers messages du forum
54      #
55
56      if(($env->out["messages_forum"] = $env->data->forum_last_messages(7)) === false)
57      { $env->out["messages_forum"] = array();
58      }
59
60      # ----------------------------------------------------------------------------------------
61      #                                                                                     news
62      #
63
64      $path = array("root", "news");
65      $depth = 1;
66      if(($env->out["b_categories"] = $env->data->all_news_categories()) !== false)
67      { if(($env->out["b_news"] = $env->data->news($path, 0, $depth, true, 2)) !== false)
68        { 
69        }
70        else $env->erreur .= "<br>Impossible de lire la liste des news";
71      }
72      else $env->erreur .= "<br>Impossible de lire la liste des categories de news";
73
74      # ----------------------------------------------------------------------------------------
75      #                                                                          derniers albums
76      #
77
78//      if(($env->out["last_albums"] = $env->data->albums(0, 2, "date_publication", "DESC")) !== false)
79      if(($env->out["last_albums"] = $env->data->albums(0, 1, "rand()", "", "#--albums.actif=1")) !== false)
80      {
81      }
82      else $env->erreur .= "<br>Impossible de lire les derniers albums";
83
84      # ----------------------------------------------------------------------------------------
85      #                                                                                  charset
86      #
87
88//      header('Content-Type: text/html; charset=iso-8859-1');
89      header('Content-Type: text/html; charset=utf-8');
90
91    }
92  }
93  else
94  { $env->out["spotlight"] = array();
95    $env->out["artistes_au_hasard"] = array();
96    $env->out["nb_downloads"] = 0;
97    $env->out["menu_top"] = array();
98  }
99
100?>
Note: See TracBrowser for help on using the repository browser.