Issues (181)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  Header Injection
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

admin/main.php (5 issues)

Severity
1
<?php declare(strict_types=1);
2
3
/**
4
 * ****************************************************************************
5
 * marquee - MODULE FOR XOOPS
6
 * Copyright (c) Hervé Thouzard (https://www.herve-thouzard.com)
7
 *
8
 * You may not change or alter any portion of this comment or credits
9
 * of supporting developers from this source code or any supporting source code
10
 * which is considered copyrighted (c) material of the original comment or credit authors.
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
 *
15
 * @copyright          Hervé Thouzard (https://www.herve-thouzard.com)
16
 * @license            GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
17
 * @author             Hervé Thouzard (https://www.herve-thouzard.com)
18
 *
19
 * ****************************************************************************
20
 */
21
22
use Xmf\Module\Admin;
23
use Xmf\Request;
24
use XoopsModules\Marquee\{
25
    Utility
26
};
27
28
require_once __DIR__ . '/admin_header.php';
29
require \dirname(__DIR__, 3) . '/include/cp_header.php';
30
require_once XOOPS_ROOT_PATH . '/modules/marquee/admin/functions.php';
31
//require_once XOOPS_ROOT_PATH . '/modules/marquee/class/Utility.php';
32
//require_once XOOPS_ROOT_PATH . '/modules/marquee/class/marquee_utils.php';
33
$adminObject = Admin::getInstance();
34
$op          = Request::getString('op', Request::getCmd('op', 'default', 'POST'), 'GET');
35
// Verify that a field exists inside a mysql table
36
/**
37
 * @param $fieldname
38
 * @param $table
39
 *
40
 * @return bool
41
 */
42
function marquee_FieldExists($fieldname, $table)
43
{
44
    global $xoopsDB;
45
        $sql ="SHOW COLUMNS FROM   $table LIKE '$fieldname'";
46
        $result = Utility::queryFAndCheck($xoopsDB, $sql);
47
48
    return ($xoopsDB->getRowsNum($result) > 0);
49
}
50
51
// Verify if the table is up to date
52
if (!marquee_FieldExists('marquee_marqueeid', $xoopsDB->prefix('marquee'))) {
53
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . ' CHANGE `marqueeid` `marquee_marqueeid` INT( 8 ) NOT NULL AUTO_INCREMENT');
54
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . " CHANGE `uid` `marquee_uid` MEDIUMINT( 8 ) NOT NULL DEFAULT '0'");
55
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . " CHANGE `direction` `marquee_direction` SMALLINT( 6 ) NOT NULL DEFAULT '0'");
56
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . " CHANGE `scrollamount` `marquee_scrollamount` INT( 11 ) NOT NULL DEFAULT '0'");
57
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . " CHANGE `behaviour` `marquee_behaviour` SMALLINT( 6 ) NOT NULL DEFAULT '0'");
58
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . ' CHANGE `bgcolor` `marquee_bgcolor` VARCHAR( 7 ) NOT NULL');
59
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . " CHANGE `align` `marquee_align` SMALLINT( 6 ) NOT NULL DEFAULT '0'");
60
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . " CHANGE `height` `marquee_height` SMALLINT( 6 ) NOT NULL DEFAULT '0'");
61
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . ' CHANGE `width` `marquee_width` VARCHAR( 4 ) NOT NULL');
62
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . " CHANGE `hspace` `marquee_hspace` SMALLINT( 6 ) NOT NULL DEFAULT '0'");
63
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . " CHANGE `scrolldelay` `marquee_scrolldelay` SMALLINT( 6 ) NOT NULL DEFAULT '0'");
64
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . " CHANGE `stoponmouseover` `marquee_stoponmouseover` SMALLINT( 6 ) NOT NULL DEFAULT '0'");
65
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . " CHANGE `loop` `marquee_loop` SMALLINT( 6 ) NOT NULL DEFAULT '0'");
66
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . " CHANGE `vspace` `marquee_vspace` SMALLINT( 6 ) NOT NULL DEFAULT '0'");
67
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . ' CHANGE `content` `marquee_content` TEXT NOT NULL');
68
    $result = $xoopsDB->queryF('ALTER TABLE ' . $xoopsDB->prefix('marquee') . " CHANGE `source` `marquee_source` VARCHAR( 255 ) NOT NULL DEFAULT 'fixed'");
69
}
70
//$marqueeHandler = Marquee\Helper::getInstance()->getHandler('Marqueex');
71
//$marqueeHandler = new MarqueeHandler($db);
72
// Function used to add and modify an element
73
/**
74
 * @param        $marqueeid
75
 * @param        $action
76
 * @param        $formTitle
77
 * @param        $contentvalue
78
 * @param        $bgcolorvalue
79
 * @param        $widthvalue
80
 * @param        $heightvalue
81
 * @param        $scrollamountvalue
82
 * @param        $hspacevalue
83
 * @param        $vspacevalue
84
 * @param        $scrolldelayvalue
85
 * @param        $directionvalue
86
 * @param        $behaviourvalue
87
 * @param        $alignvalue
88
 * @param        $loopvalue
89
 * @param        $stopvalue
90
 * @param        $LabelSubmitButton
91
 * @param string $sourcevalue
92
 * @throws \Exception
93
 */
94
function AddEditMarqueeForm(
95
    $marqueeid,
96
    $action,
97
    $formTitle,
98
    $contentvalue,
99
    $bgcolorvalue,
100
    $widthvalue,
101
    $heightvalue,
102
    $scrollamountvalue,
103
    $hspacevalue,
104
    $vspacevalue,
105
    $scrolldelayvalue,
106
    $directionvalue,
107
    $behaviourvalue,
108
    $alignvalue,
109
    $loopvalue,
110
    $stopvalue,
111
    $LabelSubmitButton,
112
    $sourcevalue = 'fixed'
113
): void {
114
    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
115
    global $xoopsModule;
116
    $sform  = new \XoopsThemeForm($formTitle, 'marqueeform', XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/main.php');
117
    $source = new \XoopsFormSelect(_AM_MARQUEE_SOURCE, 'source', $sourcevalue);
118
    $source->addOption('fixed', _AM_MARQUEE_SOURCE_FIXED);
119
    $filesList = myglob(XOOPS_ROOT_PATH . '/modules/marquee/plugins/', 'php');
120
    foreach ($filesList as $onefile) {
121
        $onefile = basename($onefile, '.php');
122
        $source->addOption($onefile, $onefile);
123
    }
124
    $sform->addElement($source);
125
    $utility = new Utility();
126
    $editor  = $utility::getWysiwygForm(_AM_MARQUEE_CONTENT, 'content', $contentvalue, 15, 60, 'content_text_hidden');
127
    if ($editor) {
128
        $sform->addElement($editor, false);
129
    }
130
    if ('DHTML' !== $utility::getModuleOption('methodtouse')) {
0 ignored issues
show
The condition 'DHTML' !== $utility::ge...leOption('methodtouse') is always true.
Loading history...
131
        // $sform->addElement(new \XoopsFormText(_AM_MARQUEE_BGCOLOR, 'bgcolor', 7, 7, $bgcolorvalue), false);
132
        $sform->addElement(new \XoopsFormColorPicker(_AM_MARQUEE_BGCOLOR, 'bgcolor', $bgcolorvalue), false);
133
    }
134
    $sform->addElement(new \XoopsFormText(_AM_MARQUEE_WIDTH, 'width', 4, 4, $widthvalue), false);
135
    $sform->addElement(new \XoopsFormText(_AM_MARQUEE_HEIGHT, 'height', 4, 4, $heightvalue), false);
136
    $sform->addElement(new \XoopsFormText(_AM_MARQUEE_SCRAMOUNT, 'scrollamount', 4, 4, $scrollamountvalue), false);
137
    if ('DHTML' !== $utility::getModuleOption('methodtouse')) {
0 ignored issues
show
The condition 'DHTML' !== $utility::ge...leOption('methodtouse') is always true.
Loading history...
138
        $sform->addElement(new \XoopsFormText(_AM_MARQUEE_HSPACE, 'hspace', 4, 4, $hspacevalue), false);
139
        $sform->addElement(new \XoopsFormText(_AM_MARQUEE_VSPACE, 'vspace', 4, 4, $vspacevalue), false);
140
    }
141
    $sform->addElement(new \XoopsFormText(_AM_MARQUEE_SCRDELAY, 'scrolldelay', 6, 6, $scrolldelayvalue), false);
142
    $direction = new \XoopsFormSelect(_AM_MARQUEE_DIRECTION, 'direction', $directionvalue);
143
    $direction->addOption('0', _AM_MARQUEE_DIRECTION1);
144
    $direction->addOption('1', _AM_MARQUEE_DIRECTION2);
145
    $direction->addOption('2', _AM_MARQUEE_DIRECTION3);
146
    $direction->addOption('3', _AM_MARQUEE_DIRECTION4);
147
    $sform->addElement($direction, true);
148
    $behaviour = new \XoopsFormSelect(_AM_MARQUEE_BEHAVIOUR, 'behaviour', $behaviourvalue);
149
    $behaviour->addOption('0', _AM_MARQUEE_BEHAVIOUR1);
150
    if ('DHTML' !== $utility::getModuleOption('methodtouse')) {
0 ignored issues
show
The condition 'DHTML' !== $utility::ge...leOption('methodtouse') is always true.
Loading history...
151
        $behaviour->addOption('1', _AM_MARQUEE_BEHAVIOUR2);
152
    }
153
    $behaviour->addOption('2', _AM_MARQUEE_BEHAVIOUR3);
154
    $sform->addElement($behaviour, true);
155
    if ('DHTML' !== $utility::getModuleOption('methodtouse')) {
0 ignored issues
show
The condition 'DHTML' !== $utility::ge...leOption('methodtouse') is always true.
Loading history...
156
        $align = new \XoopsFormSelect(_AM_MARQUEE_ALIGN, 'align', $alignvalue);
157
        $align->addOption('0', _AM_MARQUEE_ALIGN1);
158
        $align->addOption('1', _AM_MARQUEE_ALIGN2);
159
        $align->addOption('2', _AM_MARQUEE_ALIGN3);
160
        $sform->addElement($align, true);
161
    }
162
    $loop = new \XoopsFormSelect(_AM_MARQUEE_LOOP, 'loop', $loopvalue);
163
    $loop->addOption('0', _AM_MARQUEE_INFINITELOOP);
164
    for ($i = 1; $i <= 100; ++$i) {
165
        $loop->addOption($i, $i);
166
    }
167
    if ('DHTML' !== $utility::getModuleOption('methodtouse')) {
0 ignored issues
show
The condition 'DHTML' !== $utility::ge...leOption('methodtouse') is always true.
Loading history...
168
        $sform->addElement($loop, true);
169
        $sform->addElement(new \XoopsFormRadioYN(_AM_MARQUEE_STOP, 'stoponmouseover', $stopvalue, _YES, _NO));
170
    }
171
    $sform->addElement(new \XoopsFormHidden('op', $action), false);
172
    if (!empty($marqueeid)) {
173
        $sform->addElement(new \XoopsFormHidden('marqueeid', $marqueeid), false);
174
    }
175
    $buttonTray = new \XoopsFormElementTray('', '');
176
    $submit_btn = new \XoopsFormButton('', 'submit', $LabelSubmitButton, 'submit');
177
    $buttonTray->addElement($submit_btn);
178
    $cancel_btn = new \XoopsFormButton('', 'reset', _AM_MARQUEE_RESETBUTTON, 'reset');
179
    $buttonTray->addElement($cancel_btn);
180
    $sform->addElement($buttonTray);
181
    $sform->display();
182
}
183
184
// ******************************************************************************************************************************************
185
// **** Main ********************************************************************************************************************************
186
// ******************************************************************************************************************************************
187
switch ($op) {
188
    // Verify before to edit an element
189
    case 'verifybeforeedit':
190
        if ('' !== Request::getString('submit', '', 'POST')) {
191
            $marquee = $marqueeHandler->get(Request::getInt('marqueeid', 0, 'POST'));
192
            if (is_object($marquee)) {
193
                $marquee->setVar('marquee_uid', $xoopsUser->getVar('uid'));
194
                $marquee->setVar('marquee_direction', Request::getString('direction', '', 'POST'));
195
                $marquee->setVar('marquee_scrollamount', Request::getInt('scrollamount', 0, 'POST'));
196
                $marquee->setVar('marquee_behaviour', Request::getInt('behaviour', 0, 'POST'));
197
                $marquee->setVar('marquee_bgcolor', Request::getString('bgcolor', '', 'POST'));
198
                $marquee->setVar('marquee_align', Request::getInt('align', 0, 'POST'));
199
                $marquee->setVar('marquee_height', Request::getInt('height', 0, 'POST'));
200
                $marquee->setVar('marquee_width', Request::getString('width', '', 'POST'));
201
                $marquee->setVar('marquee_hspace', Request::getInt('hspace', 0, 'POST'));
202
                $marquee->setVar('marquee_scrolldelay', Request::getInt('scrolldelay', 0, 'POST'));
203
                $marquee->setVar('marquee_stoponmouseover', Request::getInt('stoponmouseover', 0, 'POST'));
204
                $marquee->setVar('marquee_loop', Request::getInt('loop', 0, 'POST'));
205
                $marquee->setVar('marquee_vspace', Request::getInt('vspace', 0, 'POST'));
206
                $marquee->setVar('marquee_content', Request::getText('content', '', 'POST'));
207
                $marquee->setVar('marquee_source', Request::getString('source', '', 'POST'));
208
                if (!$marqueeHandler->insert($marquee)) {
209
                    redirect_header('main.php', 1, _AM_MARQUEE_ERROR_MODIFY_DB);
210
                }
211
                redirect_header('main.php', 1, _AM_MARQUEE_DBUPDATED);
212
            } else {
213
                redirect_header('main.php', 3, _ERRORS);
214
            }
215
        }
216
        break;
217
    // Edit an element
218
    case 'edit':
219
        xoops_cp_header();
220
        $adminObject->displayNavigation(basename(__FILE__));
221
        echo '<br>';
222
        if (\Xmf\Request::hasVar('marqueeid', 'GET')) {
223
            $marqueeid = Request::getInt('marqueeid', 0, 'GET');
224
            $marquee   = $marqueeHandler->get($marqueeid);
225
            AddEditMarqueeForm(
226
                $marqueeid,
227
                'verifybeforeedit',
228
                _AM_MARQUEE_CONFIG,
229
                $marquee->getVar('marquee_content', 'e'),
230
                $marquee->getVar('marquee_bgcolor', 'e'),
231
                $marquee->getVar('marquee_width', 'e'),
232
                $marquee->getVar('marquee_height', 'e'),
233
                $marquee->getVar('marquee_scrollamount', 'e'),
234
                $marquee->getVar('marquee_hspace', 'e'),
235
                $marquee->getVar('marquee_vspace', 'e'),
236
                $marquee->getVar('marquee_scrolldelay', 'e'),
237
                $marquee->getVar('marquee_direction', 'e'),
238
                $marquee->getVar('marquee_behaviour', 'e'),
239
                $marquee->getVar('marquee_align', 'e'),
240
                $marquee->getVar('marquee_loop', 'e'),
241
                $marquee->getVar('marquee_stoponmouseover', 'e'),
242
                _AM_MARQUEE_UPDATE,
243
                $marquee->getVar('marquee_source', 'e')
244
            );
245
        }
246
        break;
247
    // Delete an element
248
    case 'delete':
249
        if ('' !== Request::getString('ok', '', 'POST')) {
250
            xoops_cp_header();
251
            $adminObject->displayNavigation(basename(__FILE__));
252
            // echo '<h4>' . _AM_MARQUEE_CONFIG . '</h4>';
253
            xoops_confirm(
254
                [
255
                    'op'        => 'delete',
256
                    'marqueeid' => Request::getInt('marqueeid', 0, 'GET'),
257
                    'ok'        => 1,
258
                ],
259
                'main.php',
260
                _AM_MARQUEE_RUSUREDEL
261
            );
262
        } else {
263
            if (empty($_POST['marqueeid'])) {
264
                redirect_header('main.php', 2, _AM_MARQUEE_ERROR_ADD_MARQUEE);
265
            }
266
            $marqueeid = Request::getInt('marqueeid', 0, 'POST');
267
            $marquee   = $marqueeHandler->deleteAll(new \Criteria('marquee_marqueeid', $marqueeid, '='));
268
            redirect_header('main.php', 1, _AM_MARQUEE_DBUPDATED);
269
        }
270
        break;
271
    // Verify before to add an element
272
    case 'verifytoadd':
273
        if ('' !== Request::getString('submit', '', 'POST')) {
274
            $vres = $marqueeHandler->quickInsert(
275
                [
276
                    'marquee_uid'             => $xoopsUser->getVar('uid'),
277
                    'marquee_direction'       => Request::getString('direction', '', 'POST'),
278
                    'marquee_scrollamount'    => Request::getInt('scrollamount', 0, 'POST'),
279
                    'marquee_behaviour'       => Request::getInt('behaviour', 0, 'POST'),
280
                    'marquee_bgcolor'         => Request::getString('bgcolor', '', 'POST'),
281
                    'marquee_align'           => Request::getInt('align', 0, 'POST'),
282
                    'marquee_height'          => Request::getInt('height', 0, 'POST'),
283
                    'marquee_width'           => Request::getString('width', '', 'POST'),
284
                    'marquee_hspace'          => Request::getInt('hspace', 0, 'POST'),
285
                    'marquee_scrolldelay'     => Request::getInt('scrolldelay', 0, 'POST'),
286
                    'marquee_stoponmouseover' => Request::getInt('stoponmouseover', 0, 'POST'),
287
                    'marquee_loop'            => Request::getInt('loop', 0, 'POST'),
288
                    'marquee_vspace'          => Request::getInt('vspace', 0, 'POST'),
289
                    'marquee_content'         => Request::getText('content', '', 'POST'),
290
                    'marquee_source'          => Request::getString('source', '', 'POST'),
291
                ]
292
            );
293
            if (!$vres) {
294
                redirect_header('main.php', 1, _AM_MARQUEE_ERROR_ADD_MARQUEE);
295
            }
296
            redirect_header('main.php', 1, _AM_MARQUEE_ADDED_OK);
297
        }
298
        break;
299
    // Display the form to add an element
300
    case 'addmarquee':
301
        xoops_cp_header();
302
        $adminObject->displayNavigation(basename(__FILE__));
303
        echo '<br>';
304
305
//        try {
306
            AddEditMarqueeForm(0, 'verifytoadd', _AM_MARQUEE_CONFIG, '', '', '', '', '', 0, 0, '', 0, 0, 0, 0, 0, _AM_MARQUEE_ADDBUTTON, 'fixed');
307
//        } catch (\Throwable $e) {
308
//        }
309
        break;
310
    // Default action, list all elements
311
    case 'default':
312
        xoops_cp_header();
313
        $adminObject->displayNavigation(basename(__FILE__));
314
        //        echo '<h4>' . _AM_MARQUEE_CONFIG . "</h4><br>\n";
315
        echo "<table width='100%' border='0' cellspacing='1' class='outer'>\n";
316
        echo "<tr><th align='center'>"
317
             . _AM_MARQUEE_ID
318
             . "</th><th align='center'>"
319
             . _AM_MARQUEE_CONTENT
320
             . "</th><th align='center'>"
321
             . _AM_MARQUEE_BGCOLOR_SHORT
322
             . "</th><th align='center'>"
323
             . _AM_MARQUEE_BEHAVIOUR
324
             . "</th><th align='center'>"
325
             . _AM_MARQUEE_SOURCE
326
             . "</th><th align='center'>"
327
             . _AM_MARQUEE_STOP
328
             . "</th><th align='center'>"
329
             . _AM_MARQUEE_DIRECTION
330
             . "</th><th align='center'>"
331
             . _AM_MARQUEE_ACTION
332
             . "</th></tr>\n";
333
        $marqueeArray = $marqueeHandler->getObjects();
334
        $class        = 'even';
335
        $baseurl      = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/main.php';
336
        $tbldirection = [
337
            _AM_MARQUEE_DIRECTION1,
338
            _AM_MARQUEE_DIRECTION2,
339
            _AM_MARQUEE_DIRECTION3,
340
            _AM_MARQUEE_DIRECTION4,
341
        ];
342
        $tblbehaviour = [_AM_MARQUEE_BEHAVIOUR1, _AM_MARQUEE_BEHAVIOUR2, _AM_MARQUEE_BEHAVIOUR3];
343
        if (count($marqueeArray) > 0) {
344
            /** @var Marquee\Marqueex $marquee */
345
            foreach ($marqueeArray as $marquee) {
346
                //              $action_edit="<a href='".$baseurl."?op=edit&marqueeid=".$marquee->getVar('marquee_marqueeid')."'>"._AM_MARQUEE_EDIT."</a>";
347
                //              $action_delete="<a href='".$baseurl."?op=delete&marqueeid=".$marquee->getVar('marquee_marqueeid')."'>"._AM_MARQUEE_DELETE."</a>";
348
                $action_edit   = '<a href=' . $baseurl . '?op=edit&marqueeid=' . $marquee->getVar('marquee_marqueeid') . '><img src=' . $pathIcon16 . '/edit.png title=' . _AM_MARQUEE_EDIT . '></a>';
349
                $action_delete = '<a href=' . $baseurl . '?op=delete&marqueeid=' . $marquee->getVar('marquee_marqueeid') . '><img src=' . $pathIcon16 . '/delete.png title=' . _AM_MARQUEE_DELETE . '></a>';
350
                $bgcolorvalue  = $marquee->getVar('marquee_bgcolor');
351
                $direction     = $tbldirection[$marquee->getVar('marquee_direction')];
352
                $behaviour     = $tblbehaviour[$marquee->getVar('marquee_behaviour')];
353
                $stop          = _YES;
354
                if (0 == $marquee->getVar('marquee_stoponmouseover')) {
355
                    $stop = _NO;
356
                }
357
                $source = $marquee->getVar('marquee_source');
358
                if ('fixed' === $marquee->getVar('marquee_source')) {
359
                    $source = _AM_MARQUEE_SOURCE_FIXED;
360
                }
361
                echo "<tr class='"
362
                     . $class
363
                     . "'><td align='center'>"
364
                     . $marquee->getVar('marquee_marqueeid')
365
                     . "</td><td align='left'>"
366
                     . Utility::truncateHtml($marquee->getVar('marquee_content'), 80, '...', false, true)
367
                     . "</td><td align='center'>"
368
                     . "<div style='height:12px; width:12px; background-color:"
369
                     . $bgcolorvalue
370
                     . "; border:1px solid black;float:left; margin-right:5px;'></div>"
371
                     . $bgcolorvalue
372
                     . "</td><td align='center'>"
373
                     . $behaviour
374
                     . "</td><td align='center'>"
375
                     . $source
376
                     . "</td><td align='center'>"
377
                     . $stop
378
                     . "</td><td align='center'>"
379
                     . $direction
380
                     . "</td><td align='center'>"
381
                     . $action_edit
382
                     . '&nbsp;&nbsp;'
383
                     . $action_delete
384
                     . "</td></tr>\n";
385
                $class = ('even' === $class) ? 'odd' : 'even';
386
            }
387
        }
388
        //      echo "<tr class='".$class."'><td colspan='7' align='center'><form name='faddmarquee' method='post' action='main.php'><input type='hidden' name='op' value='addmarquee'><input type='submit' name='submit' value='"._AM_MARQUEE_ADDMARQUEE."'></td></tr>";
389
        $adminObject->addItemButton(_AM_MARQUEE_ADDMARQUEE, 'main.php?op=addmarquee', 'add', '');
390
        $adminObject->displayButton('left', '');
391
        echo '</table>';
392
        break;
393
}
394
require_once __DIR__ . '/admin_footer.php';
395
//xoops_cp_footer();
396