admin/main.php
File main.php
has 345 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/*
* You may not change or alter any portion of this comment or credits of
* supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit
Line exceeds 120 characters; contains 203 characters Open
Open
echo " <tr>\n" . " <td class='{$class} width20 center middle'>" . "<a href='{$url}' rel='external'>{$title}</a>" . "</td>\n" . " <td class='{$class} width3 center'>";
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
Open
$formStat = new \XoopsFormRadioYN(_AM_XOOPSPARTNERS_STATUS, 'status', Constants::STATUS_ACTIVE, $statOnTxt, $statOffTxt);
- Exclude checks
Line exceeds 120 characters; contains 136 characters Open
Open
$helper->redirect("admin/main.php?op=edit_partner&id={$id}", Constants::REDIRECT_DELAY_SHORT, _AM_XOOPSPARTNERS_BESURE);
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
Open
$helper->redirect('admin/main.php?op=partnersAdminAdd', Constants::REDIRECT_DELAY_MEDIUM, _AM_XOOPSPARTNERS_EMPTYDATABASE, false);
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
Open
$order = (!empty($order) && ((int)$order > Constants::DEFAULT_WEIGHT)) ? (int)$order : Constants::DEFAULT_WEIGHT;
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
Open
$formDesc = new \XoopsFormTextArea(_AM_XOOPSPARTNERS_DESCRIPTION, 'description', $partnerVars['description'], 5, 51);
- Exclude checks
Line exceeds 120 characters; contains 176 characters Open
Open
$status = isset($_POST['status']) ? is_array($_POST['status']) ? Request::getArray('status', [], 'POST') : Request::getInt('status', Constants::STATUS_INACTIVE, 'POST') : null;
- Exclude checks
Line exceeds 120 characters; contains 184 characters Open
Open
$statOnTxt = "<img src='" . Admin::iconUrl('on.png', '16') . "' " . "class='tooltip floatcenter1' " . "alt='" . _AM_XOOPSPARTNERS_ACTIVE . "'>" . _AM_XOOPSPARTNERS_ACTIVE;
- Exclude checks
Line exceeds 120 characters; contains 189 characters Open
Open
$statOffTxt = "<img src='" . Admin::iconUrl('off.png', '16') . "' " . "class='tooltip floatcenter1' " . "alt='" . _AM_XOOPSPARTNERS_INACTIVE . "'>" . _AM_XOOPSPARTNERS_INACTIVE;
- Exclude checks
Line exceeds 120 characters; contains 175 characters Open
Open
$weight = isset($_POST['weight']) ? is_array($_POST['weight']) ? Request::getArray('weight', [], 'POST') : Request::getInt('weight', Constants::DEFAULT_WEIGHT, 'POST') : null;
- Exclude checks
Line exceeds 120 characters; contains 150 characters Open
Open
$stat = (!empty($status[$id]) && ($status[$id] > Constants::STATUS_INACTIVE)) ? (int)$status[$id] : Constants::STATUS_INACTIVE;
- Exclude checks
Line exceeds 120 characters; contains 264 characters Open
Open
echo " <tr>\n" . " <td class='foot right' colspan='7'>\n" . " <input type='hidden' name='op' value='reorderPartners'>\n" . "{$adminButtons}\n" . " </td>\n" . " </tr>\n" . " </tbody>\n" . " </table>\n" . " </form>\n";
- Exclude checks
Line exceeds 120 characters; contains 139 characters Open
Open
$helper->redirect('admin/main.php', Constants::REDIRECT_DELAY_MEDIUM, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
- Exclude checks
Line exceeds 120 characters; contains 198 characters Open
Open
$statOffTxt = "<img src='" . Admin::iconUrl('off.png', '16') . "' " . "class='tooltip floatcenter1' " . "alt='" . _AM_XOOPSPARTNERS_INACTIVE . "'>" . ' ' . _AM_XOOPSPARTNERS_INACTIVE;
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
Open
$status = (!empty($status) && ($status > Constants::STATUS_INACTIVE)) ? (int)$status : Constants::STATUS_INACTIVE;
- Exclude checks
Line exceeds 120 characters; contains 193 characters Open
Open
$statOnTxt = "<img src='" . Admin::iconUrl('on.png', '16') . "' " . "class='tooltip floatcenter1' " . "alt='" . _AM_XOOPSPARTNERS_ACTIVE . "'>" . ' ' . _AM_XOOPSPARTNERS_ACTIVE;
- Exclude checks
Line exceeds 120 characters; contains 159 characters Open
Open
echo " <tr>\n" . " <td class='{$class} center bold line140' colspan='7'>" . _AM_XOOPSPARTNERS_NOPARTNERS . "</td>\n" . " </tr>\n";
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
Open
$helper->redirect('admin/main.php?op=partnersAdminAdd', Constants::REDIRECT_DELAY_MEDIUM, _AM_XOOPSPARTNERS_EMPTYDATABASE, false);
- Exclude checks
Line exceeds 120 characters; contains 179 characters Open
Open
$helper->redirect('admin/main.php', Constants::REDIRECT_DELAY_MEDIUM, _AM_XOOPSPARTNERS_NOTUPDATED . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
- Exclude checks
Line exceeds 120 characters; contains 284 characters Open
Open
$adminButtons = " <input type='button' " . "name='button' " . "onclick=\"location='main.php?op=reorderAutoPartners'\" " . "value='" . _AM_XOOPSPARTNERS_AUTOMATIC_SORT . "'>\n" . " <input type='submit' name='submit' value='" . _AM_XOOPSPARTNERS_UPDATE . "'>";
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
Open
$formStat = new \XoopsFormRadioYN(_AM_XOOPSPARTNERS_STATUS, 'status', $partnerVars['status'], $statOnTxt, $statOffTxt);
- Exclude checks
Line exceeds 120 characters; contains 175 characters Open
Open
$helper->redirect('admin/main.php', Constants::REDIRECT_DELAY_MEDIUM, _AM_XOOPSPARTNERS_NOTUPDATED . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
- Exclude checks
Line exceeds 120 characters; contains 132 characters Open
Open
$errorMsg = ($imageWidth > $maxWidth || $imageHeight > $maxHeight) ? '<br>' . _AM_XOOPSPARTNERS_IMAGE_ERROR : '';
- Exclude checks
Line exceeds 120 characters; contains 177 characters Open
Open
echo "<img src='{$image}' alt='{$title}' " . "style='width: " . (int)(.65 * $imageWidth) . 'px; ' . 'height: ' . (int)(.65 * $imageHeight) . "px;'>" . $errorMsg;
- Exclude checks