C:\$Recycle.Bin\S-1-5-21-3967099092-2644009230-141905953-500\$RELDAD8\includes\frontend.html.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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
<?php
/**
* @version $Id: frontend.html.php 2488 2006-02-19 08:42:36Z 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.
*/

// no direct access
defined'_VALID_MOS' ) or die( 'Restricted access' );

/**
* @package Joomla
*/
class modules_html {

    function 
module( &$module, &$params$Itemid$style=) {
        
// custom module params
        
$moduleclass_sfx     $params->get'moduleclass_sfx' );
        
$rssurl             $params->get'rssurl' );
        
        if ( 
$rssurl ) {
            
// feed output
            
modules_html::modoutput_feed$module$params$moduleclass_sfx );
        }

        switch ( 
$style ) {
            case -
3:
            
// allows for rounded corners
                
modules_html::modoutput_rounded$module$params$Itemid$moduleclass_sfx);
                break;

            case -
2:
            
// xhtml (divs and font headder tags)
                
modules_html::modoutput_xhtml$module$params$Itemid$moduleclass_sfx);
                break;

            case -
1:
            
// show a naked module - no wrapper and no title
                
modules_html::modoutput_naked$module$params$Itemid$moduleclass_sfx);
                break;

            default:
            
// standard tabled output
                
modules_html::modoutput_table$module$params$Itemid$moduleclass_sfx);
                break;
        }

        
    }

    
/**
    * @param object
    * @param object
    * @param int The menu item ID
    * @param int -1=show without wrapper and title, -2=xhtml style
    */
    
function module2( &$module, &$params$Itemid$style=0$count=) {
        global 
$mosConfig_lang$mosConfig_absolute_path;

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

        
// check for custom language file
        
$path $mosConfig_absolute_path '/modules/' $module->module $mosConfig_lang .'.php';
        if (
file_exists$path )) {
            include( 
$path );
        } else {
            
$path $mosConfig_absolute_path .'/modules/'$module->module .'.eng.php';
            if (
file_exists$path )) {
                include( 
$path );
            }
        }

        
$number '';
        if (
$count 0) {
            
$number '<span>' $count '</span> ';
        }

        switch ( 
$style ) {
            case -
3:
            
// allows for rounded corners
                
modules_html::modoutput_rounded$module$params$Itemid$moduleclass_sfx );
                break;

            case -
2:
            
// xhtml (divs and font headder tags)
                
modules_html::modoutput_xhtml$module$params$Itemid$moduleclass_sfx );
                break;

            case -
1:
            
// show a naked module - no wrapper and no title
                
modules_html::modoutput_naked$module$params$Itemid$moduleclass_sfx );
                break;

            default:
            
// standard tabled output
                
modules_html::modoutput_table$module$params$Itemid$moduleclass_sfx );
                break;
        }
    }

    
// feed output
    
function modoutput_feed( &$module, &$params$moduleclass_sfx ) {
        global 
$mosConfig_absolute_path$mosConfig_cachepath;

        
// check if cache directory is writeable
        
$cacheDir         $mosConfig_cachepath .'/';    
        if ( !
is_writable$cacheDir ) ) {    
            
$module->content 'Cache Directory Unwriteable';
            return;
        }
        
        
$rssurl             $params->get'rssurl' );
        
$rssitems             $params->get'rssitems');
        
$rssdesc             $params->get'rssdesc');
        
$rssimage             $params->get'rssimage');
        
$rssitemdesc        $params->get'rssitemdesc');
        
$words                 $params->def'word_count');
        
$rsstitle            $params->get'rsstitle');

        
$contentBuffer    '';
        
        
$LitePath         $mosConfig_absolute_path .'/includes/Cache/Lite.php';
        require_once( 
$mosConfig_absolute_path .'/includes/domit/xml_domit_rss.php' );
        
        
$rssDoc = new xml_domit_rss_document();
        
$rssDoc->useCacheLite(true$LitePath$cacheDir3600);
        
$rssDoc->useHTTPClient(true); 
        
$success $rssDoc->loadRSS$rssurl );

        if ( 
$success )    {        
            
// special handling for feed encoding
            
$encoding mosCommonHTML::newsfeedEncoding$rssDoc );
            
            
$content_buffer '';
            
$totalChannels     $rssDoc->getChannelCount();
    
            for ( 
$i 0$i $totalChannels$i++ ) {
                
$currChannel =& $rssDoc->getChannel($i);
                
$elements     $currChannel->getElementList();
                
$iUrl        0;
                foreach ( 
$elements as $element ) {
                    
//image handling
                    
if ( $element == 'image' ) {
                        
$image =& $currChannel->getElementDOMIT_RSS_ELEMENT_IMAGE );
                        
$iUrl    $image->getUrl();
                        
$iTitle    $image->getTitle();
                    }
                }
    
                
// feed title
                
$content_buffer '<table cellpadding="0" cellspacing="0" class="moduletable'.$moduleclass_sfx.'">' "\n";
                            
                if ( 
$currChannel->getTitle() && $rsstitle ) {
                    
$feed_title     $currChannel->getTitle();
                    
$feed_title     $encoding$feed_title );
                    
$feed_title     html_entity_decode($feed_title);
                    
$feed_title     str_replace('&apos;'"'"$feed_title);

                    
$content_buffer .= "<tr>\n";
                    
$content_buffer .= "    <td>\n";
                    
$content_buffer .= "        <strong>\n";
                    
$content_buffer .= "        <a href=\"" ampReplace$currChannel->getLink() )  . "\" target=\"_blank\">\n";
                    
$content_buffer .= $feed_title "</a>\n";
                    
$content_buffer .= "        </strong>\n";
                    
$content_buffer .= "    </td>\n";
                    
$content_buffer .= "</tr>\n";
    
                }
    
                
// feed description
                
if ( $rssdesc ) {
                    
$feed_descrip     $currChannel->getDescription();
                    
$feed_descrip     $encoding$feed_descrip );
                    
$feed_descrip     html_entity_decode($feed_descrip);
                    
$feed_descrip     str_replace('&apos;'"'"$feed_descrip);
                    
                    
$content_buffer .= "<tr>\n";
                    
$content_buffer .= "    <td>\n";
                    
$content_buffer .= $feed_descrip;
                    
$content_buffer .= "    </td>\n";
                    
$content_buffer .= "</tr>\n";
                }
    
                
// feed image
                
if ( $rssimage && $iUrl ) {
                    
$content_buffer .= "<tr>\n";
                    
$content_buffer .= "    <td align=\"center\">\n";
                    
$content_buffer .= "        <image src=\"" $iUrl "\" alt=\"" . @$iTitle "\"/>\n";
                    
$content_buffer .= "    </td>\n";
                    
$content_buffer .= "</tr>\n";
                }
    
                
$actualItems $currChannel->getItemCount();
                
$setItems $rssitems;
    
                if (
$setItems $actualItems) {
                    
$totalItems $actualItems;
                } else {
                    
$totalItems $setItems;
                }
    
    
                
$content_buffer .= "<tr>\n";
                
$content_buffer .= "    <td>\n";
                
$content_buffer .= "        <ul class=\"newsfeed" $moduleclass_sfx "\">\n";
    
                        for (
$j 0$j $totalItems$j++) {
                            
$currItem =& $currChannel->getItem($j);
                            
// item title
                            
                            
$item_title $currItem->getTitle();
                            
$item_title $encoding$item_title );
                            
$item_title html_entity_decode($item_title);
                            
$item_title str_replace('&apos;'"'"$item_title);
    
                            
// START fix for RSS enclosure tag url not showing
                            
$content_buffer .= "<li class=\"newsfeed" $moduleclass_sfx "\">\n";
                            
$content_buffer .= "    <strong>\n";
                            if (
$currItem->getLink()) {
                                
$content_buffer .= "        <a href=\"" ampReplace$currItem->getLink() ) . "\" target=\"_blank\">\n";
                                
$content_buffer .= "      " $item_title "</a>\n";
                            } else if (
$currItem->getEnclosure()) {
                                
$enclosure $currItem->getEnclosure();
                                
$eUrl    $enclosure->getUrl();
                                
$content_buffer .= "        <a href=\"" ampReplace$eUrl ) . "\" target=\"_blank\">\n";
                                
$content_buffer .= "      " $item_title "</a>\n";
                            }  else if ((
$currItem->getEnclosure()) && ($currItem->getLink())) {
                                
$enclosure $currItem->getEnclosure();
                                
$eUrl    $enclosure->getUrl();
                                
$content_buffer .= "        <a href=\"" ampReplace$currItem->getLink() ) . "\" target=\"_blank\">\n";
                                
$content_buffer .= "      " $item_title "</a><br/>\n";
                                
$content_buffer .= "        <a href=\"" ampReplace$eUrl ) . "\" target=\"_blank\"><u>Download</u></a>\n";
                            }
                            
$content_buffer .= "    </strong>\n";
                            
// END fix for RSS enclosure tag url not showing
                            
                                // item description
                                
if ( $rssitemdesc ) {
                                    
// item description
                                    
$text $currItem->getDescription();
                                    
$text $encoding$text );
                                    
$text html_entity_decode($text);
                                    
$text str_replace('&apos;'"'"$text);

                                    
// word limit check
                                    
if ( $words ) {
                                        
$texts explode' '$text );
                                        
$count count$texts );
                                        if ( 
$count $words ) {
                                            
$text '';
                                            for( 
$i=0$i $words$i++ ) {
                                                
$text .= ' '$texts[$i];
                                            }
                                            
$text .= '...';
                                        }
                                    }
    
                                    
$content_buffer .= "     <div>\n";
                                    
$content_buffer .= "        " $text;
                                    
$content_buffer .= "        </div>\n";
    
                                }
                            
$content_buffer .= "</li>\n";
                        }
                
$content_buffer .= "    </ul>\n";
                
$content_buffer .= "    </td>\n";
                
$content_buffer .= "</tr>\n";
                
$content_buffer .= "</table>\n";
            }
            
$module->content $content_buffer;
        }
    }

    
/*
    * standard tabled output
    */
    
function modoutput_table$module$params$Itemid$moduleclass_sfx$type=) {
        global 
$mosConfig_live_site$mosConfig_sitename$mosConfig_lang$mosConfig_absolute_path;
        global 
$mainframe$database$my;
        
?>
        <table cellpadding="0" cellspacing="0" class="moduletable<?php echo $moduleclass_sfx?>">
        <?php
        
if ( $module->showtitle != ) {
            
?>
            <tr>
                <th valign="top">
                    <?php echo $module->title?>
                </th>
            </tr>
            <?php
        
}
        
?>
        <tr>
            <td>
                <?php
                
if ( $type ) {
                    echo 
$module->content;
                } else {
                    include( 
$mosConfig_absolute_path '/modules/' $module->module '.php' );
                    
                    if (isset( 
$content)) {
                        echo 
$content;
                    }
                }
                
?>
            </td>
        </tr>
        </table>
        <?php
    
}

    
/*
    * show a naked module - no wrapper and no title
    */
    
function modoutput_naked$module$params$Itemid$moduleclass_sfx$type=) {
        global 
$mosConfig_live_site$mosConfig_sitename$mosConfig_lang$mosConfig_absolute_path;
        global 
$mainframe$database$my;

        if ( 
$type ) {
            echo 
$module->content;
        } else {
            include( 
$mosConfig_absolute_path '/modules/' $module->module '.php' );
            
            if (isset( 
$content)) {
                echo 
$content;
            }
        }
    }

    
/*
    * xhtml (divs and font headder tags)
    */
    
function modoutput_xhtml$module$params$Itemid$moduleclass_sfx$type=) {
        global 
$mosConfig_live_site$mosConfig_sitename$mosConfig_lang$mosConfig_absolute_path;
        global 
$mainframe$database$my;
        
?>
        <div class="moduletable<?php echo $moduleclass_sfx?>">
            <?php
            
if ($module->showtitle != 0) {
                
//echo $number;
                
?>
                <h3>
                    <?php echo $module->title?>
                </h3>
                <?php
            
}

            if ( 
$type ) {
                echo 
$module->content;
            } else {
                include( 
$mosConfig_absolute_path '/modules/' $module->module '.php' );
                
                if (isset( 
$content)) {
                    echo 
$content;
                }
            }
            
?>
        </div>
        <?php
    
}

    
/*
    * allows for rounded corners
    */
    
function modoutput_rounded$module$params$Itemid$moduleclass_sfx$type=) {
        global 
$mosConfig_live_site$mosConfig_sitename$mosConfig_lang$mosConfig_absolute_path;
        global 
$mainframe$database$my;
        
?>
        <div class="module<?php echo $moduleclass_sfx?>">
            <div>
                <div>
                    <div>
                        <?php
                        
if ($module->showtitle != 0) {
                            echo 
"<h3>$module->title</h3>";
                        }

                        if ( 
$type ) {
                            echo 
$module->content;
                        } else {
                            include( 
$mosConfig_absolute_path '/modules/' $module->module '.php' );
                            
                            if (isset( 
$content)) {
                                echo 
$content;
                            }
                        }
                        
?>
                    </div>
                </div>
            </div>
        </div>
        <?php
    
}
}
?>