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.9 (2 years 4 months 5 days 9 hours 34 minutes 49 seconds ago) by nanocaiordo
Changed : +3 -5 lines
Comment: Block frames before loading any other javascript or css requests!


# 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.9 $Revision: 10.8 $
13 nanocaio 10.2 $Author: nanocaiordo $
14 nanocaio 10.9 $Date: 2011/11/11 13:26:15 $
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 9.10 if ($db->sql_count($prefix.'_session', "uname='$uname'")) {
51 djmaze 9.10 $db->sql_query('UPDATE '.$prefix."_session SET time='$ctime', module='$custom_title', url='$url', guest='$guest' WHERE uname='$uname'", true);
52 djmaze 9.10 } else {
53 nanocaio 9.33 $db->sql_query('INSERT INTO '.$prefix."_session (uname, time, host_addr, guest, module, url) VALUES ('$uname', '$ctime', {$userinfo['user_ip']}, '$guest', '$custom_title', '$url')", true);
54 djmaze 9.4 }
55 djmaze 9.4 }
56 djmaze 1.1 }
57 djmaze 1.1 function head() {
58 nanocaio 10.7 global $BASEHREF, $METATAGS, $sitename, $userinfo, $Blocks, $home, $cpgtpl,
59 phoenix 9.39 $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2,
60 nanocaio 10.5 $pagetitle, $modheader, $MAIN_CFG, $CPG_SESS, $Module, $CLASS;
61 nanocaio 10.6 define('THEME_PATH', 'themes/' .$CPG_SESS['theme'] .'/');
62 djmaze 9.15 header('imagetoolbar: no');
63 nanocaio 9.38 $header = '';
64 djmaze 9.5 foreach ($METATAGS as $name => $content) {
65 nanocaio 9.26 $header .= '<meta name="'.$name.'" content="'.$content.'" />'."\n";
66 djmaze 9.5 }
67 nanocaio 9.26 // $header .= '<script type="text/javascript" src="includes/javascript/MM_funcs.js"></script>'."\n\n";
68 nanocaio 9.38 $header .= $modheader.'
69 nanocaio 9.35 <link rel="copyright" href="'.URL::index('credits').'" title="Copyrights" />
70 nanocaio 9.40 <link rel="author" href="'.URL::index('Members_List').'" title="'._Members_ListLANG.'" />
71 nanocaio 9.40 ';
72 djmaze 8.12 /*
73 djmaze 9.4 $languages = lang_selectbox('', '', false, true);
74 djmaze 9.4 for ($i=0; $i < sizeof($languages); $i++) {
75 djmaze 9.4 if ($languages[$i] != '') {
76 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";
77 djmaze 9.4 }
78 djmaze 9.4 }
79 djmaze 8.12 */
80 nanocaio 10.5 if ($Module->name != 'Private_Messages' && is_user() && is_active('Private_Messages') && $userinfo['user_popup_pm'] && $userinfo['user_new_privmsg']) {
81 nanocaio 9.26 $header .= '
82 nanocaio 9.26 <script type="text/javascript">
83 djmaze 1.1 <!--
84 nanocaio 9.35 window.open(\''.URL::index('Private_Messages&file=index&mode=newpm', false).'\', \'\', \'height=150,resizable=yes,width=400\');
85 djmaze 1.1 //-->
86 nanocaio 9.26 </script>';
87 djmaze 9.4 }
88 nanocaio 9.38 $message = $MAIN_CFG['global']['maintenance'] ? '<strong>'._SYS_MESSAGE.'</strong><br />'._SYS_MAINTENANCE : '';
89 djmaze 9.4 if (is_admin() && $CLASS['member']->demo) {
90 djmaze 9.4 $message .= ($message == '') ? '<strong>'._SYS_MESSAGES.'</strong>' : '<br />';
91 djmaze 9.4 $message .= '<br />'._SYS_DEMO;
92 djmaze 9.4 }
93 nanocaio 10.7  
94 akamu 9.16 $adminmenuitems = $admincssmenuitems = false;
95 djmaze 9.14 if (!$home) {
96 djmaze 9.14 if (defined('ADMIN_PAGES') && is_admin() && !(isset($_GET['op']) && $_GET['op'] == 'logout')) {
97 djmaze 9.14 require_once('includes/classes/cpg_adminmenu.php');
98 nanocaio 10.7 $CLASS['adminmenu']->display();
99 djmaze 9.14 $adminmenuitems = $CLASS['adminmenu']->display('all', 'jsmenu');
100 nanocaio 9.29 $admincssmenuitems = ($MAIN_CFG['global']['admingraphic'] & 4);
101 djmaze 9.4 }
102 djmaze 9.4 }
103 nanocaio 10.7  
104 nanocaio 10.8 $Blocks = new Blocks($Module->mid);
105 nanocaio 10.8 $Blocks->prepare('l');
106 nanocaio 10.8 $Blocks->prepare('c');
107 nanocaio 10.8 $Blocks->prepare('r');
108 nanocaio 10.8 $Blocks->prepare('d');
109 nanocaio 10.8  
110 djmaze 9.14 $cpgtpl->assign_vars(array(
111 nanocaio 10.7 'BASEHREF' => $BASEHREF,
112 nanocaio 10.7 'I18N' => 'enctype="multipart/form-data" accept-charset="utf-8"',
113 nanocaio 9.38 'IMPORTANT_MESSAGE' => $message,
114 nanocaio 10.5 'PAGE_TITLE' => ($home || isset($ownpagetitle[$Module->name]))?'':$pagetitle,
115 nanocaio 10.7 'S_TEXTDIR' => _TEXT_DIR,
116 nanocaio 10.7 'S_LANGCODE' => _BROWSER_LANGCODE,
117 nanocaio 10.7 'S_HEADER_TAGS'=> $header,
118 nanocaio 10.7 'S_SITENAME' => $sitename,
119 nanocaio 10.7 'S_PAGETITLE' => !empty($pagetitle) ? strip_tags($pagetitle) : '',
120 nanocaio 10.7 'S_DELIM' => _BC_DELIM,
121 nanocaio 9.38 /* iSCSI, HTTP or FTP allowed */
122 nanocaio 9.38 'S_FILESERVER' => '',
123 djmaze 9.15 'S_ADMIN_MENU' => $adminmenuitems,
124 nanocaio 9.38 'S_ADMIN_CSSMENU' => $admincssmenuitems,
125 nanocaio 10.9 'B_BLOCK_FRAMES' => intval($MAIN_CFG['global']['block_frames']),
126 nanocaio 10.7 'B_SIDE_LEFT' => $Module->sides & Blocks::LEFT,
127 nanocaio 10.7 'B_SIDE_CENTER'=> $Module->sides & Blocks::CENTER,
128 nanocaio 10.7 'B_SIDE_RIGHT' => $Module->sides & Blocks::RIGHT,
129 nanocaio 10.7 'B_SIDE_DOWN' => $Module->sides & Blocks::DOWN,
130 nanocaio 10.7 'B_PAGETITLE' => 1 < strlen(strip_tags($pagetitle))
131 djmaze 9.14 ));
132 nanocaio 10.7  
133 nanocaio 10.7 include_once(THEME_PATH .'theme.php');
134 nanocaio 10.7 if (!defined('THEME_VERSION')) { define('THEME_VERSION', '9.0'); }
135 nanocaio 10.7 if (!defined('_BROWSER_LANGCODE')) { define('_BROWSER_LANGCODE', _LANGCODE); }
136 nanocaio 10.7 if (!defined('_CHARSET')) { define('_CHARSET', 'UTF-8'); }
137 nanocaio 10.7  
138 nanocaio 10.7 themeheader();
139 djmaze 9.4 unset($modheader);
140 djmaze 1.1 }
141 djmaze 1.1  
142 djmaze 9.22 if (empty($_SESSION['SECURITY']['banned'])) { online(); }
143 nanocaio 10.7 global $home, $cpgtpl, $Module;
144 djmaze 1.1 head();
145 djmaze 8.6 if (!defined('ADMIN_PAGES')) {
146 djmaze 9.22 require_once('includes/counter.php'); # 2-3 queries
147 nanocaio 10.3 require_once('includes/functions/messagebox.php');
148 djmaze 1.1 }
149 djmaze 9.14 $cpgtpl->set_filenames(array('cpgheader' => 'header.html'));
150 djmaze 9.14 $cpgtpl->display('cpgheader');


Code Credits - Privacy Policy