Title: content page
1 2//
3// content page
4//
5//
6// setup
- HTTP_HOST_ROOT str_replace("\\","",dirname(_SE
RVER'PHP_SELF')) // root directory - //HTTP_HOST_ROOT "" // root
directory - DOCUMENT_ROOT _SERVER'DOCUMENT_ROOT'.HTTP_H
OST_ROOT // root path - include (DOCUMENT_ROOT."/inc/setup.inc.php")
// setup - require(DOCUMENT_ROOT."/inc/fx/User.class.php")
7//
8// settings
- User new User(login)
- //if(!User-valid()) - l'utilisateur n'est pas
valide, qu'en faire ? - login User-getField("USER_LOGIN")
- role User-getField("IDUSER_ROLE")
- core "content"
- if(idcontent "sitemap") core idcontent
- page_width page_width_content
- page_align page_align_content
- content_width content_width_content
- if(site_status) site_status site_status."
- "
9//
10// search selected idcontent category, title,
keyword
- query " select from CONTENT where
CONTENT_LANGUAGE '".lgadm."' and
CONTENT_NAME_PAGE like '".idcontent."'" - RechContent_selected mysql_query(query)
- content_selected mysql_fetch_array(RechContent
_selected) - group content_selected"CONTE
NT_GROUP" - private content_selected"CONTENT_PRIVATE"
- // On vérifie si la page est privée
(CONTENT_GROUP est égal à 0 si la page est
publique) - if(private)
- / La page est privée, on va vérifier
- - que l'utilisateur est au moins un membre privé
(USER_ROLE 10) - - que son groupe a le droit d'accéder à cette
page - /
- if(!User-hasLevel(100) !(User-hasLevel(10)
User-hasGroup(group))) - // L'utilisateur n'est pas un membre privé ou n'a
pas les droits nécessaires, on charge la page
d'avertissement - query " select from CONTENT where
CONTENT_LANGUAGE '".lgadm."' and
CONTENT_NAME_PAGE like 'not'" - RechContent_selected mysql_query(query)
- content_selected mysql_fetch_array(RechContent
_selected) - idcontent "not"
-
- // On continue le chargement normal de la page
11//
12?
13Transitional//EN" "http//www.w3.org/TR/html4/loos
e.dtd"
14 15 16 17include (DOCUMENT_ROOT."/mod/meta.php")
// metatags 18?
19 20 21if (!titleIndex)
22 23?
24 25include (DOCUMENT_ROOT."/mod/title.php")
// title 26?
27 28 29 30if(checkTypePage "e_module"
file_exists(DOCUMENT_ROOT."/des/css/e_modules/".
specialPageName.".css")) echo 'rel"stylesheet" href"'.HTTP_HOST.'/des/css/e_mo
dules/'.specialPageName.'.css" type"text/css"'
31?
32/des/c
ss/style_main.css" type"text/css"
33 34include (DOCUMENT_ROOT."/des/css/style_main.inc.p
hp") // style main 35?
36 37 38 39/favicon.ico"
rel"shortcut icon"
40 41 42 43if(checkTypePage "e_module"
file_exists(DOCUMENT_ROOT."/inc/js/e_modules/".s
pecialPageName.".js")) echo 'type"text/JavaScript" src"'.HTTP_HOST.'/inc/js/
e_modules/'.specialPageName.'.js"'
44?
45/inc/js/browser.js"
46/inc/js/clock.js"
47/inc/js/wm_verif.js"
48 49 50 56 57/phpmyvisites/phpmyvisites.js" type"text/javascri
pt"
58 59 60 61"
62"
63 64include (DOCUMENT_ROOT."/mod/header.php")
// header 65?
66 67 68include (DOCUMENT_ROOT."/mod/bar_top.php")
// top bar 69?
70 71- core?pxwidthpx" border"0"
cellpadding"0" cellspacing"0"
72if (menu_width) 73?
- " valign"top"
rowspan"2" class"menubgborder"
74 75include (DOCUMENT_ROOT."/mod/menu.php")
// menu 76?
77 78 79 80?
81 82 83if (checkTypePage "page")
- include (DOCUMENT_ROOT."/mod/core_".core.".php")
// core content
84 85elseif (checkTypePage "specialpage"
specialPageName "contact")
- include (DOCUMENT_ROOT."/mod/core_contactForm.php
") // contact form
86 elseif (checkTypePage "e_module")
- // Syntaxe globale pour l'inclusion d'un module
externe - require(DOCUMENT_ROOT.'/e_modules/'.specialPageN
ame.'/content.php') // On ne vérifie pas
l'existence de ce fichier puisqu'on l'a déjà fait
précédemment
87 88?
89 90 91if (menu_width_2) 92?
93 94 97//include (DOCUMENT_ROOT."/mod/menu_2.php")
// menu 2 98?
99 100 101" height"90"
align"right" valign"top" rowspan"2"
class"right_content"
102 103include (DOCUMENT_ROOT."/mod/right_content.php")
104?
105 106 107 108?
-
-
- alt"" src"/des/img/spacer.gif"
width"30" height"20" border"0"
class"toppage" href"top"
src"/des/img/arrow-top-black.gif"
border"0"
-
109 110 111include (DOCUMENT_ROOT."/mod/bar_bottom.php")
// bottom bar 112?
113 114 115include (DOCUMENT_ROOT."/mod/footer.php")
// footer 116?
117 118 119 120if (snapshot "yes") // test snapshot
- include (DOCUMENT_ROOT."/mod/snapshot.php")
// snapshot
121 122?
123 124 125 126if (debug) // test debug mode
- include (DOCUMENT_ROOT."/mod/debug.php")
// debug mode
127 128?
129 130 131 132