C:\$Recycle.Bin\S-1-5-21-3967099092-2644009230-141905953-500\$RJRNN8D\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
<?php
/**
* @version $Id: frontend.html.php,v 1.17 2005/02/18 16:05:19 rhuk Exp $
* @package Mambo
* @copyright (C) 2000 - 2005 Miro International Pty Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* Mambo is Free Software
*/

/** ensure this file is being included by a parent file */
defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

/**
* @package Mambo
*/
class modules_html {

    function 
module( &$module, &$params$Itemid$style=) {
        global 
$mosConfig_live_site$mosConfig_sitename$mosConfig_lang$mosConfig_absolute_path;

        
// custom module params
        
$rssurl             $params->get'rssurl' );
        
$rssitems             $params->get'rssitems');
        
$rssdesc             $params->get'rssdesc');
        
$rssimage             $params->get'rssimage');
        
$rssitemdesc        $params->get'rssitemdesc');
        
$moduleclass_sfx     $params->get'moduleclass_sfx' );
        
$words                 $params->def'word_count');

        if (
$style == -&& !$rssurl) {
            echo 
$module->content;
            return;
        } else {
            
?>
            <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
            
}
    
            if ( 
$module->content ) {
                
?>
                <tr>
                    <td>
                    <?php echo $module->content?>
                    </td>
                </tr>
                <?php
            
}
        }
        
// feed output
        
if ( $rssurl ) {
            
$cacheDir         $mosConfig_absolute_path .'/cache/';
            
$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->loadRSS$rssurl );
            
$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
                
?>
                <tr>
                    <td>
                    <strong>
                    <a href="<?php echo $currChannel->getLink(); ?>" target="_blank">
                    <?php echo $currChannel->getTitle(); ?>
                    </a>
                    </strong>
                    </td>
                </tr>
                <?php
                
// feed description
                
if ( $rssdesc ) {
                    
?>
                    <tr>
                        <td>
                        <?php echo $currChannel->getDescription(); ?>
                        </td>
                    </tr>
                    <?php
                
}
                
// feed image
                
if ( $rssimage ) {
                    
?>
                    <tr>
                        <td align="center">
                        <image src="<?php echo $iUrl?>" alt="<?php echo $iTitle?>"/>
                        </td>
                    </tr>
                    <?php
                
}

                
$actualItems $currChannel->getItemCount();
                
$setItems $rssitems;

                if (
$setItems $actualItems) {
                    
$totalItems $actualItems;
                } else {
                    
$totalItems $setItems;
                }

                
?>
                <tr>
                    <td>
                    <ul class="newsfeed<?php echo $moduleclass_sfx?>">
                    <?php
                    
for ($j 0$j $totalItems$j++) {
                        
$currItem =& $currChannel->getItem($j);
                        
// item title
                        
?>
                        <li class="newsfeed<?php echo $moduleclass_sfx?>">
                        <strong>
                        <a href="<?php echo $currItem->getLink(); ?>" target="_blank">
                        <?php echo $currItem->getTitle(); ?>
                        </a>
                        </strong>
                        <?php
                        
// item description
                        
if ( $rssitemdesc ) {
                            
// item description
                            
$text     html_entity_decode$currItem->getDescription() );

                            
// 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 .= '...';
                                }
                            }
                            
?>
                            <div>
                            <?php echo $text?>
                            </div>
                            <?php
                        
}
                        
?>
                        </li>
                        <?php
                    
}
                    
?>
                    </ul>
                    </td>
                </tr>
                <?php
            
}
        }
        
?>
        </table>
        <?php
    
}

    
/**
    * @param object
    * @param object
    * @param int The menu item ID
    * @param int -1=show without wrapper and title, -2=x-mambo style
    */
    
function module2( &$module, &$params$Itemid$style=0$count=) {
        global 
$mosConfig_live_site$mosConfig_sitename$mosConfig_lang$mosConfig_absolute_path;
        global 
$mainframe$database$my;
        
$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> ';
        }
        if (
$style == -3) {
            
// allows for rounded corners
            
echo "\n<div class=\"module$moduleclass_sfx\"><div><div><div>";
            if (
$module->showtitle != 0) {
                echo 
"<h3>$module->title</h3>";
            }
             echo 
"\n";

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

            echo 
"\n";
            echo 
"\n</div></div></div></div>\n";
        } else if (
$style == -2) {
            
// x-mambo (divs and font headder tags)
            
?>
            <div class="moduletable<?php echo $moduleclass_sfx?>">
            <?php
            
if ($module->showtitle != 0) {
                
//echo $number;
                
?>
                <h3>
                <?php echo $module->title?>
                </h3>
                <?php
            
}
            include( 
$mosConfig_absolute_path .'/modules/'$module->module .'.php' );

            if (isset( 
$content)) {
                echo 
$content;
            }
            
?>
            </div>
            <?php
        
} else if ($style == -1) {
            
// show a naked module - no wrapper and no title
            
include( $mosConfig_absolute_path .'/modules/'$module->module .'.php' );

            if (isset( 
$content)) {
                echo 
$content;
            }
        } else {
            
?>
            <table cellpadding="0" cellspacing="0" class="moduletable<?php echo $moduleclass_sfx?>">
            <?php
            
if ( $module->showtitle != ) {
                
?>
                <tr>
                    <th valign="top">
                    <?php //echo $number; ?>
                    <?php echo $module->title?>
                    </th>
                </tr>
                <?php
            
}
            
?>
            <tr>
                <td>
                <?php
                
include( $mosConfig_absolute_path '/modules/' $module->module '.php' );
                if (isset( 
$content)) {
                    echo 
$content;
                }
                
?>
                </td>
            </tr>
            </table>
            <?php
        
}
    }
}
?>