Code Duplication    Length = 17-17 lines in 2 locations

admin/actions/attributes.php 1 location

@@ 228-244 (lines=17) @@
225
            } else {
226
                oledrion_utils::redirect(_AM_OLEDRION_SAVE_PB, $baseurl . '?op=' . $operation, 5);
227
            }
228
        } else {
229
            oledrion_utils::htitle(_AM_OLEDRION_SORRY_NOREMOVE2, 4);
230
            $tblTmp = $oledrion_handlers->h_oledrion_caddy_attributes->getCommandIdFromAttribute($id);
231
            $tblTmp2 = $h_oledrion_commands->getObjects(new Criteria('cmd_id', '(' . implode(',', $tblTmp) . ')', 'IN'), true);
232
            echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'>";
233
            $class = '';
234
            echo "<tr><th align='center'>" . _AM_OLEDRION_ID . "</th><th align='center'>" . _AM_OLEDRION_DATE . "</th><th align='center'>" . _AM_OLEDRION_CLIENT . "</th><th align='center'>" . _AM_OLEDRION_TOTAL_SHIPP . "</th></tr>";
235
            foreach ($tblTmp2 as $item) {
236
                $class = ($class == 'even') ? 'odd' : 'even';
237
                $date = formatTimestamp(strtotime($item->getVar('cmd_date')), 's');
238
                echo "<tr class='" . $class . "'>\n";
239
                echo "<td align='right'>" . $item->getVar('cmd_id') . "</td><td align='center'>" . $date . "</td><td align='center'>" . $item->getVar('cmd_lastname') . ' ' . $item->getVar('cmd_firstname') . "</td><td align='center'>" . $item->getVar('cmd_total') . ' ' . oledrion_utils::getModuleOption('money_short') . ' / ' . $item->getVar('cmd_shipping') . ' ' . oledrion_utils::getModuleOption('money_short') . "</td>\n";
240
                echo "<tr>\n";
241
            }
242
            echo '</table>';
243
            include_once OLEDRION_ADMIN_PATH . 'admin_footer.php';
244
        }
245
        break;
246
247
    // ****************************************************************************************************************

admin/actions/products.php 1 location

@@ 780-796 (lines=17) @@
777
            } else {
778
                oledrion_utils::redirect(_AM_OLEDRION_NOT_FOUND, $baseurl . '?op=' . $opRedirect, 5);
779
            }
780
        } else {
781
            oledrion_utils::htitle(_AM_OLEDRION_SORRY_NOREMOVE, 4);
782
            $tblTmp2 = array();
783
            $tblTmp2 = $h_oledrion_commands->getObjects(new Criteria('cmd_id', '(' . implode(',', $tblTmp) . ')', 'IN'), true);
784
            echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'>";
785
            $class = '';
786
            echo "<tr><th align='center'>" . _AM_OLEDRION_ID . "</th><th align='center'>" . _AM_OLEDRION_DATE . "</th><th align='center'>" . _AM_OLEDRION_CLIENT . "</th><th align='center'>" . _AM_OLEDRION_TOTAL_SHIPP . "</th></tr>";
787
            foreach ($tblTmp2 as $item) {
788
                $class = ($class == 'even') ? 'odd' : 'even';
789
                $date = formatTimestamp(strtotime($item->getVar('cmd_date')), 's');
790
                echo "<tr class='" . $class . "'>\n";
791
                echo "<td align='right'>" . $item->getVar('cmd_id') . "</td><td align='center'>" . $date . "</td><td align='center'>" . $item->getVar('cmd_lastname') . ' ' . $item->getVar('cmd_firstname') . "</td><td align='center'>" . $item->getVar('cmd_total') . ' ' . oledrion_utils::getModuleOption('money_short') . ' / ' . $item->getVar('cmd_shipping') . ' ' . oledrion_utils::getModuleOption('money_short') . "</td>\n";
792
                echo "<tr>\n";
793
            }
794
            echo '</table>';
795
            include_once OLEDRION_ADMIN_PATH . 'admin_footer.php';
796
        }
797
        break;
798
799
    // **********************************************************************************************