C:\$Recycle.Bin\S-1-5-21-3967099092-2644009230-141905953-500\$RELDAD8\includes\frontend.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<?php
/**
* @version $Id: frontend.php 2456 2006-02-18 01:36:30Z stingrey $
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

defined'_VALID_MOS' ) or die( 'Restricted access' );
/**
* Displays the capture output of the main element
*/
function mosMainBody() {
    
// message passed via the url
    
$mosmsg mosGetParam$_REQUEST'mosmsg''' );
    if (!
get_magic_quotes_gpc()) {
        
$mosmsg addslashes$mosmsg );
    }

    
$popMessages false;

    if (
$mosmsg && !$popMessages) {
        echo 
"\n<div class=\"message\">$mosmsg</div>";
    }

    echo 
$GLOBALS['_MOS_OPTION']['buffer'];

    if (
$mosmsg && $popMessages) {
        echo 
"\n<script language=\"javascript\">alert('$mosmsg');</script>";
    }
}
/**
* Utility functions and classes
*/
function mosLoadComponent$name ) {
    
// set up some global variables for use by the frontend component
    
global $mainframe$database;
    include( 
$mainframe->getCfg'absolute_path' )."/components/com_$name/$name.php" );
}
/**
* Cache some modules information
* @return array
*/
function &initModules() {
    global 
$database$my$Itemid;

    if (!isset( 
$GLOBALS['_MOS_MODULES'] )) {
        
$query "SELECT id, title, module, position, content, showtitle, params"
        
"\n FROM #__modules AS m"
        
"\n INNER JOIN #__modules_menu AS mm ON mm.moduleid = m.id"
        
"\n WHERE m.published = 1"
        
"\n AND m.access <= '"$my->gid ."'"
        
"\n AND m.client_id != 1"
        
"\n AND ( mm.menuid = '"$Itemid ."' OR mm.menuid = 0 )"
        
"\n ORDER BY ordering";

        
$database->setQuery$query );
        
$modules $database->loadObjectList();
        foreach (
$modules as $module) {
            
$GLOBALS['_MOS_MODULES'][$module->position][] = $module;
        }
    }
    return 
$GLOBALS['_MOS_MODULES'];
}
/**
* @param string THe template position
*/
function mosCountModules$position='left' ) {
    global 
$database$my$Itemid;

    
$tp mosGetParam$_GET'tp');
    if (
$tp) {
        return 
1;
    }

    
$modules =& initModules();
    if (isset( 
$GLOBALS['_MOS_MODULES'][$position] )) {
        return 
count$GLOBALS['_MOS_MODULES'][$position] );
    } else {
        return 
0;
    }
}
/**
* @param string The position
* @param int The style.  0=normal, 1=horiz, -1=no wrapper
*/
function mosLoadModules$position='left'$style=) {
    global 
$mosConfig_gzip$mosConfig_absolute_path$database$my$Itemid$mosConfig_caching;

    
$tp mosGetParam$_GET'tp');
    if (
$tp) {
        echo 
'<div style="height:50px;background-color:#eee;margin:2px;padding:10px;border:1px solid #f00;color:#700;">';
        echo 
$position;
        echo 
'</div>';
        return;
    }
    
$style intval$style );
    
$cache =& mosCache::getCache'com_content' );

    require_once( 
$mosConfig_absolute_path '/includes/frontend.html.php' );

    
$allModules =& initModules();
    if (isset( 
$GLOBALS['_MOS_MODULES'][$position] )) {
        
$modules $GLOBALS['_MOS_MODULES'][$position];
    } else {
        
$modules = array();
    }

    if (
count$modules ) < 1) {
        
$style 0;
    }
    if (
$style == 1) {
        echo 
"<table cellspacing=\"1\" cellpadding=\"0\" border=\"0\" width=\"100%\">\n";
        echo 
"<tr>\n";
    }
    
$prepend = ($style == 1) ? "<td valign=\"top\">\n" '';
    
$postpend = ($style == 1) ? "</td>\n" '';

    
$count 1;
    foreach (
$modules as $module) {
        
$params = new mosParameters$module->params );

        echo 
$prepend;

        if ((
substr("$module->module",0,4))=="mod_") {
            if (
$params->get('cache') == && $mosConfig_caching == 1) {
                
$cache->call('modules_html::module2'$module$params$Itemid$style );
            } else {
                
modules_html::module2$module$params$Itemid$style$count );
            }
        } else {
            if (
$params->get('cache') == && $mosConfig_caching == 1) {
                
$cache->call('modules_html::module'$module$params$Itemid$style );
            } else {
                
modules_html::module$module$params$Itemid$style );
            }
        }

        echo 
$postpend;
        
$count++;
    }
    if (
$style == 1) {
        echo 
"</tr>\n</table>\n";
    }
}
/**
* Assembles head tags
*/
function mosShowHead() {
    global 
$database$option$my$mainframe$_VERSION;
    global 
$mosConfig_MetaDesc$mosConfig_MetaKeys$mosConfig_live_site$mosConfig_sef$mosConfig_absolute_path$mosConfig_sitename$mosConfig_favicon;

    
$task mosGetParam$_REQUEST'task''' );

    if (
$my->id || $mainframe->get'joomlaJavascript' )) {
        
?>
        <script language="JavaScript" src="<?php echo $mosConfig_live_site;?>/includes/js/joomla.javascript.js" type="text/javascript"></script>
        <?php
    
}

    
$mainframe->appendMetaTag'description'$mosConfig_MetaDesc );
    
$mainframe->appendMetaTag'keywords'$mosConfig_MetaKeys );
    
$mainframe->addMetaTag'Generator'$_VERSION->PRODUCT " - " $_VERSION->COPYRIGHT);
    
$mainframe->addMetaTag'robots''index, follow' );

    echo 
$mainframe->getHead();
    
    if ( isset(
$mosConfig_sef) && $mosConfig_sef ) {
        echo 
"<base href=\"$mosConfig_live_site/\" />\r\n";
    }

    
// support for Firefox Live Bookmarks ability for site syndication
    
$query "SELECT a.*"
    
"\n FROM #__components AS a"
    
"\n WHERE a.name = 'Syndicate'"
    
;
    
$database->setQuery$query );
    
$database->loadObject$row );

    
// get params definitions
    
$params = new mosParameters$row->params$mainframe->getPath'com_xml'$row->option ), 'component' );

    
$live_bookmark $params->get'live_bookmark');

    
// support for Live Bookmarks ability for site syndication
    
if ($live_bookmark) {
        
$show 1;

        
$link_file     $mosConfig_live_site '/index2.php?option=com_rss&feed='$live_bookmark .'&no_html=1';

        
// xhtml check
        
$link_file ampReplace$link_file );

        
// outputs link tag for page
        
if ($show) {
            
?>
            <link rel="alternate" type="application/rss+xml" title="<?php echo $mosConfig_sitename?>" href="<?php echo $link_file?>" />
            <?php
        
}
    }

    
// favourites icon
    
if ( !$mosConfig_favicon ) {
        
$mosConfig_favicon 'favicon.ico';
    }
    
$icon $mosConfig_absolute_path .'/images/'$mosConfig_favicon;
    
// checks to see if file exists
    
if ( !file_exists$icon ) ) {
        
$icon $mosConfig_live_site .'/images/favicon.ico';
    } else {
        
$icon $mosConfig_live_site .'/images/' .$mosConfig_favicon;
    }

    
// outputs link tag for page
    
?>
    <link rel="shortcut icon" href="<?php echo $icon;?>" />
    <?php
}
?>