Code Duplication    Length = 33-33 lines in 2 locations

admin/actions/attributes.php 1 location

@@ 251-283 (lines=33) @@
248
            } else {
249
                OledrionUtility::redirect(_AM_OLEDRION_SAVE_PB, $baseurl . '?op=' . $operation, 5);
250
            }
251
        } else {
252
            OledrionUtility::htitle(_AM_OLEDRION_SORRY_NOREMOVE2, 4);
253
            $tblTmp  = $oledrionHandlers->h_oledrion_caddy_attributes->getCommandIdFromAttribute($id);
254
            $tblTmp2 = $h_oledrion_commands->getObjects(new Criteria('cmd_id', '(' . implode(',', $tblTmp) . ')', 'IN'), true);
255
            echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'>";
256
            $class = '';
257
            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>';
258
            foreach ($tblTmp2 as $item) {
259
                $class = ($class === 'even') ? 'odd' : 'even';
260
                $date  = formatTimestamp(strtotime($item->getVar('cmd_date')), 's');
261
                echo "<tr class='" . $class . "'>\n";
262
                echo "<td align='right'>"
263
                     . $item->getVar('cmd_id')
264
                     . "</td><td align='center'>"
265
                     . $date
266
                     . "</td><td align='center'>"
267
                     . $item->getVar('cmd_lastname')
268
                     . ' '
269
                     . $item->getVar('cmd_firstname')
270
                     . "</td><td align='center'>"
271
                     . $item->getVar('cmd_total')
272
                     . ' '
273
                     . OledrionUtility::getModuleOption('money_short')
274
                     . ' / '
275
                     . $item->getVar('cmd_shipping')
276
                     . ' '
277
                     . OledrionUtility::getModuleOption('money_short')
278
                     . "</td>\n";
279
                echo "<tr>\n";
280
            }
281
            echo '</table>';
282
            require_once OLEDRION_ADMIN_PATH . 'admin_footer.php';
283
        }
284
        break;
285
286
    // ****************************************************************************************************************

admin/actions/products.php 1 location

@@ 910-942 (lines=33) @@
907
            } else {
908
                OledrionUtility::redirect(_AM_OLEDRION_NOT_FOUND, $baseurl . '?op=' . $opRedirect, 5);
909
            }
910
        } else {
911
            OledrionUtility::htitle(_AM_OLEDRION_SORRY_NOREMOVE, 4);
912
            $tblTmp2 = array();
913
            $tblTmp2 = $h_oledrion_commands->getObjects(new Criteria('cmd_id', '(' . implode(',', $tblTmp) . ')', 'IN'), true);
914
            echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'>";
915
            $class = '';
916
            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>';
917
            foreach ($tblTmp2 as $item) {
918
                $class = ($class === 'even') ? 'odd' : 'even';
919
                $date  = formatTimestamp(strtotime($item->getVar('cmd_date')), 's');
920
                echo "<tr class='" . $class . "'>\n";
921
                echo "<td align='right'>"
922
                     . $item->getVar('cmd_id')
923
                     . "</td><td align='center'>"
924
                     . $date
925
                     . "</td><td align='center'>"
926
                     . $item->getVar('cmd_lastname')
927
                     . ' '
928
                     . $item->getVar('cmd_firstname')
929
                     . "</td><td align='center'>"
930
                     . $item->getVar('cmd_total')
931
                     . ' '
932
                     . OledrionUtility::getModuleOption('money_short')
933
                     . ' / '
934
                     . $item->getVar('cmd_shipping')
935
                     . ' '
936
                     . OledrionUtility::getModuleOption('money_short')
937
                     . "</td>\n";
938
                echo "<tr>\n";
939
            }
940
            echo '</table>';
941
            require_once OLEDRION_ADMIN_PATH . 'admin_footer.php';
942
        }
943
        break;
944
945
    // **********************************************************************************************