Dragonfly CMS logo Server sponsored and hosted by
DedicatedNOW
CVS logo  
.:: Home :: Dev. Resources :: Forums ::.
Dragonfly CMS CVS Repository
 Location: / cvs / html / header.php
This is a web interface to the Dragonfly CMS CVS tree. You can browse the file hierarchy by picking directories. If you pick a file, you will see the revision history for that file.
Selecting a revision number will show that revision of the file. There are links at each revision to display diffs, annotate and download.
Note: Info about CVS and our commits can be found at our CVS Info Forum
File name: html/header.php
Revision : 10.13 (2 years 4 weeks 1 days 22 hours 8 minutes 37 seconds ago) by nanocaiordo
Changed : +24 -10 lines
Comment: All blocks, poodle.js and style.css loaded in header.php


# Author Rev Line
1 djmaze 1.1 <?php
2 djmaze 1.1 /*********************************************
3 djmaze 9.1 CPG Dragonfly™ CMS
4 djmaze 1.1 ********************************************
5 nanocaio 9.30 Copyright © 2004 - 2007 by CPG-Nuke Dev Team
6 djmaze 9.12 http://dragonflycms.org
7 djmaze 1.1  
8 djmaze 8.23 Dragonfly is released under the terms and conditions
9 djmaze 8.11 of the GNU GPL version 2 or any later version
10 djmaze 1.1  
11 djmaze 1.36 $Source: /cvs/html/header.php,v $
12 nanocaio 10.13 $Revision: 10.12 $
13 nanocaio 10.13 $Author: djmaze $
14 nanocaio 10.13 $Date: 2012/03/11 18:40:52 $
15 djmaze 8.23 **********************************************/
16 trevor 8.19 if (!defined('CPG_NUKE')) { exit; }
17 djmaze 1.37 define('HEADER_OPEN', true);
18 djmaze 9.22  
19 nanocaio 10.1 // temporary patch
20 nanocaio 10.1 if ('HEAD' === $_SERVER['REQUEST_METHOD']) {
21 nanocaio 10.1 HttpHeader::flush();
22 nanocaio 10.1 exit;
23 nanocaio 10.1 }
24 nanocaio 10.1  
25 djmaze 9.22 # 1-2 queries
26 djmaze 1.1 function online() {
27 djmaze 9.4 global $userinfo, $prefix, $db, $module_title, $SESS, $mainindex;
28 djmaze 9.4 if ($SESS->dbupdate) {
29 nanocaio 9.36 $url = URL::uri();
30 djmaze 9.4 $uname = $SESS->sess_id;
31 djmaze 9.4 $guest = 1;
32 djmaze 9.4 if (is_user()) {
33 djmaze 9.4 $uname = $userinfo['username'];
34 djmaze 9.4 $guest = 0;
35 djmaze 9.4 } elseif (SEARCHBOT) {
36 djmaze 9.4 $uname = SEARCHBOT;
37 djmaze 9.4 $guest = 3;
38 djmaze 9.4 }
39 djmaze 9.4 if (is_admin()) {
40 djmaze 9.4 global $CLASS;
41 djmaze 9.4 if ($guest == 1) { $uname = $CLASS['member']->admin['aid']; }
42 djmaze 9.4 $guest = 2;
43 djmaze 9.4 if (defined('ADMIN_PAGES')) $url = $mainindex;
44 djmaze 9.4 }
45 djmaze 9.7 $uname = Fix_Quotes($uname);
46 djmaze 9.14 if (empty($uname)) return; # something screwey
47 nanocaio 9.34 $ctime = time();
48 djmaze 9.4 $custom_title = Fix_Quotes(($module_title) ? $module_title : _HOME);
49 djmaze 9.14 $url = Fix_Quotes(str_replace('&', '&amp;', $url));
50 djmaze 10.12 $tbl = $db->TBL->session;
51 djmaze 10.12 $data = array(
52 djmaze 10.12 'time' => $ctime,
53 djmaze 10.12 'module' => $custom_title,
54 djmaze 10.12 'url' => $url,
55 djmaze 10.12 'guest' => $guest,
56 djmaze 10.12 );
57 djmaze 10.12 if ($tbl->count(array('uname'=>$uname))) {
58 djmaze 10.12 $tbl->update($data, array('uname'=>$uname));
59 djmaze 9.10 } else {
60 djmaze 10.12 $data['uname'] = $uname;
61 djmaze 10.12 $data['host_addr'] = $userinfo['user_ip'];
62 djmaze 10.12 $tbl->insert($data);
63 djmaze 9.4 }
64 djmaze 9.4 }
65 djmaze 1.1 }
66 djmaze 10.12  
67 djmaze 1.1 function head() {
68 nanocaio 10.7 global $BASEHREF, $METATAGS, $sitename, $userinfo, $Blocks, $home, $cpgtpl,
69 phoenix 9.39 $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2,
70 nanocaio 10.5 $pagetitle, $modheader, $MAIN_CFG, $CPG_SESS, $Module, $CLASS;
71 nanocaio 10.6 define('THEME_PATH', 'themes/' .$CPG_SESS['theme'] .'/');
72 djmaze 9.15 header('imagetoolbar: no');
73 nanocaio 9.38 $header = '';
74 djmaze 9.5 foreach ($METATAGS as $name => $content) {
75 nanocaio 9.26 $header .= '<meta name="'.$name.'" content="'.$content.'" />'."\n";
76 djmaze 9.5 }
77 nanocaio 9.26 // $header .= '<script type="text/javascript" src="includes/javascript/MM_funcs.js"></script>'."\n\n";
78 nanocaio 9.38 $header .= $modheader.'
79 nanocaio 9.35 <link rel="copyright" href="'.URL::index('credits').'" title="Copyrights" />
80 nanocaio 9.40 <link rel="author" href="'.URL::index('Members_List').'" title="'._Members_ListLANG.'" />
81 nanocaio 9.40 ';
82 djmaze 8.12 /*
83 djmaze 9.4 $languages = lang_selectbox('', '', false, true);
84 djmaze 9.4 for ($i=0; $i < sizeof($languages); $i++) {
85 djmaze 9.4 if ($languages[$i] != '') {
86 djmaze 9.4 $header .= '<link rel="alternate" type="text/html" href="?newlang='.$languages[$i].'" hreflang="'.get_langcode($languages[$i]).'" lang="'.get_langcode($languages[$i]).'" title="Version '.ucfirst($languages[$i]).'" />'."\n";
87 djmaze 9.4 }
88 djmaze 9.4 }
89 djmaze 8.12 */
90 nanocaio 10.5 if ($Module->name != 'Private_Messages' && is_user() && is_active('Private_Messages') && $userinfo['user_popup_pm'] && $userinfo['user_new_privmsg']) {
91 nanocaio 9.26 $header .= '
92 nanocaio 9.26 <script type="text/javascript">
93 djmaze 1.1 <!--
94 nanocaio 9.35 window.open(\''.URL::index('Private_Messages&file=index&mode=newpm', false).'\', \'\', \'height=150,resizable=yes,width=400\');
95 djmaze 1.1 //-->
96 nanocaio 9.26 </script>';
97 djmaze 9.4 }
98 nanocaio 9.38 $message = $MAIN_CFG['global']['maintenance'] ? '<strong>'._SYS_MESSAGE.'</strong><br />'._SYS_MAINTENANCE : '';
99 djmaze 9.4 if (is_admin() && $CLASS['member']->demo) {
100 djmaze 9.4 $message .= ($message == '') ? '<strong>'._SYS_MESSAGES.'</strong>' : '<br />';
101 djmaze 9.4 $message .= '<br />'._SYS_DEMO;
102 djmaze 9.4 }
103 nanocaio 10.7  
104 akamu 9.16 $adminmenuitems = $admincssmenuitems = false;
105 djmaze 9.14 if (!$home) {
106 djmaze 9.14 if (defined('ADMIN_PAGES') && is_admin() && !(isset($_GET['op']) && $_GET['op'] == 'logout')) {
107 djmaze 9.14 require_once('includes/classes/cpg_adminmenu.php');
108 nanocaio 10.7 $CLASS['adminmenu']->display();
109 djmaze 9.14 $adminmenuitems = $CLASS['adminmenu']->display('all', 'jsmenu');
110 nanocaio 9.29 $admincssmenuitems = ($MAIN_CFG['global']['admingraphic'] & 4);
111 djmaze 9.4 }
112 djmaze 9.4 }
113 nanocaio 10.7  
114 nanocaio 10.13 CSS::add(THEME_PATH. 'style/style.css', 'screen');
115 nanocaio 10.13 JS::add('includes/javascript/poodle.js');
116 nanocaio 10.13 if (defined('ADMIN_PAGES')) {
117 nanocaio 10.13 CSS::add('themes/default/style/admin.css');
118 nanocaio 10.13 if ($MAIN_CFG['global']['admin_help']) {
119 nanocaio 10.13 JS::add('includes/javascript/infobox.js');
120 nanocaio 10.13 }
121 nanocaio 10.13 }
122 nanocaio 10.13  
123 nanocaio 10.13 include_once(THEME_PATH .'theme.php');
124 nanocaio 10.13 if (!defined('THEME_VERSION')) { define('THEME_VERSION', '9.0'); }
125 nanocaio 10.13  
126 nanocaio 10.8 $Blocks = new Blocks($Module->mid);
127 nanocaio 10.13 $Blocks->prepare(Blocks::LEFT);
128 nanocaio 10.13 $Blocks->prepare(Blocks::CENTER);
129 nanocaio 10.13 $Blocks->prepare(Blocks::RIGHT);
130 nanocaio 10.13 $Blocks->prepare(Blocks::DOWN);
131 nanocaio 10.8  
132 djmaze 9.14 $cpgtpl->assign_vars(array(
133 nanocaio 10.7 'BASEHREF' => $BASEHREF,
134 nanocaio 10.7 'I18N' => 'enctype="multipart/form-data" accept-charset="utf-8"',
135 nanocaio 9.38 'IMPORTANT_MESSAGE' => $message,
136 nanocaio 10.5 'PAGE_TITLE' => ($home || isset($ownpagetitle[$Module->name]))?'':$pagetitle,
137 nanocaio 10.7 'S_TEXTDIR' => _TEXT_DIR,
138 nanocaio 10.7 'S_LANGCODE' => _BROWSER_LANGCODE,
139 nanocaio 10.7 'S_HEADER_TAGS'=> $header,
140 nanocaio 10.7 'S_SITENAME' => $sitename,
141 nanocaio 10.7 'S_PAGETITLE' => !empty($pagetitle) ? strip_tags($pagetitle) : '',
142 nanocaio 10.7 'S_DELIM' => _BC_DELIM,
143 nanocaio 9.38 /* iSCSI, HTTP or FTP allowed */
144 nanocaio 9.38 'S_FILESERVER' => '',
145 djmaze 9.15 'S_ADMIN_MENU' => $adminmenuitems,
146 nanocaio 9.38 'S_ADMIN_CSSMENU' => $admincssmenuitems,
147 nanocaio 10.10 'S_BLOCK_FRAMES' => intval($MAIN_CFG['global']['block_frames']),
148 nanocaio 10.13 'B_SIDE_LEFT' => $Module->sides & Blocks::LEFT,
149 nanocaio 10.13 'B_SIDE_CENTER'=> $Module->sides & Blocks::CENTER,
150 nanocaio 10.13 'B_SIDE_RIGHT' => $Module->sides & Blocks::RIGHT,
151 nanocaio 10.13 'B_SIDE_DOWN' => $Module->sides & Blocks::DOWN,
152 nanocaio 10.7 'B_PAGETITLE' => 1 < strlen(strip_tags($pagetitle))
153 djmaze 9.14 ));
154 nanocaio 10.7  
155 nanocaio 10.7 if (!defined('_BROWSER_LANGCODE')) { define('_BROWSER_LANGCODE', _LANGCODE); }
156 nanocaio 10.7 if (!defined('_CHARSET')) { define('_CHARSET', 'UTF-8'); }
157 nanocaio 10.7  
158 nanocaio 10.7 themeheader();
159 djmaze 9.4 unset($modheader);
160 djmaze 1.1 }
161 nanocaio 10.13 //if (300 < $_SESSION['SECURITY']['status']) { online(); }
162 djmaze 9.22 if (empty($_SESSION['SECURITY']['banned'])) { online(); }
163 nanocaio 10.7 global $home, $cpgtpl, $Module;
164 djmaze 1.1 head();
165 djmaze 8.6 if (!defined('ADMIN_PAGES')) {
166 djmaze 9.22 require_once('includes/counter.php'); # 2-3 queries
167 nanocaio 10.3 require_once('includes/functions/messagebox.php');
168 djmaze 1.1 }
169 djmaze 9.14 $cpgtpl->set_filenames(array('cpgheader' => 'header.html'));
170 djmaze 9.14 $cpgtpl->display('cpgheader');


Code Credits - Privacy Policy