Code Duplication    Length = 8-8 lines in 20 locations

admin/actions/products.php 10 locations

@@ 610-617 (lines=8) @@
607
        $downloadFile->setDescription(_AM_OLEDRION_ATTACHED_HLP);
608
        $sform->addElement($downloadFile, false);
609
610
        if (OledrionUtility::getModuleOption('product_property1')) {
611
            $property1select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property1_title'), 'product_property1', $item->getVar('product_property1'));
612
            $property1Array  = explode('|', OledrionUtility::getModuleOption('product_property1'));
613
            foreach ($property1Array as $property1) {
614
                $property1select->addOption($property1);
615
            }
616
            $sform->addElement($property1select, false);
617
        }
618
619
        if (OledrionUtility::getModuleOption('product_property2')) {
620
            $property2select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property2_title'), 'product_property2', $item->getVar('product_property2'));
@@ 619-626 (lines=8) @@
616
            $sform->addElement($property1select, false);
617
        }
618
619
        if (OledrionUtility::getModuleOption('product_property2')) {
620
            $property2select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property2_title'), 'product_property2', $item->getVar('product_property2'));
621
            $property2Array  = explode('|', OledrionUtility::getModuleOption('product_property2'));
622
            foreach ($property2Array as $property2) {
623
                $property2select->addOption($property2);
624
            }
625
            $sform->addElement($property2select, false);
626
        }
627
628
        if (OledrionUtility::getModuleOption('product_property3')) {
629
            $property3select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property3_title'), 'product_property3', $item->getVar('product_property3'));
@@ 628-635 (lines=8) @@
625
            $sform->addElement($property2select, false);
626
        }
627
628
        if (OledrionUtility::getModuleOption('product_property3')) {
629
            $property3select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property3_title'), 'product_property3', $item->getVar('product_property3'));
630
            $property3Array  = explode('|', OledrionUtility::getModuleOption('product_property3'));
631
            foreach ($property3Array as $property3) {
632
                $property3select->addOption($property3);
633
            }
634
            $sform->addElement($property3select, false);
635
        }
636
637
        if (OledrionUtility::getModuleOption('product_property4')) {
638
            $property4select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property4_title'), 'product_property4', $item->getVar('product_property4'));
@@ 637-644 (lines=8) @@
634
            $sform->addElement($property3select, false);
635
        }
636
637
        if (OledrionUtility::getModuleOption('product_property4')) {
638
            $property4select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property4_title'), 'product_property4', $item->getVar('product_property4'));
639
            $property4Array  = explode('|', OledrionUtility::getModuleOption('product_property4'));
640
            foreach ($property4Array as $property4) {
641
                $property4select->addOption($property4);
642
            }
643
            $sform->addElement($property4select, false);
644
        }
645
646
        if (OledrionUtility::getModuleOption('product_property5')) {
647
            $property5select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property5_title'), 'product_property5', $item->getVar('product_property5'));
@@ 646-653 (lines=8) @@
643
            $sform->addElement($property4select, false);
644
        }
645
646
        if (OledrionUtility::getModuleOption('product_property5')) {
647
            $property5select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property5_title'), 'product_property5', $item->getVar('product_property5'));
648
            $property5Array  = explode('|', OledrionUtility::getModuleOption('product_property5'));
649
            foreach ($property5Array as $property5) {
650
                $property5select->addOption($property5);
651
            }
652
            $sform->addElement($property5select, false);
653
        }
654
655
        if (OledrionUtility::getModuleOption('product_property6')) {
656
            $property6select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property6_title'), 'product_property6', $item->getVar('product_property6'));
@@ 655-662 (lines=8) @@
652
            $sform->addElement($property5select, false);
653
        }
654
655
        if (OledrionUtility::getModuleOption('product_property6')) {
656
            $property6select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property6_title'), 'product_property6', $item->getVar('product_property6'));
657
            $property6Array  = explode('|', OledrionUtility::getModuleOption('product_property6'));
658
            foreach ($property6Array as $property6) {
659
                $property6select->addOption($property6);
660
            }
661
            $sform->addElement($property6select, false);
662
        }
663
664
        if (OledrionUtility::getModuleOption('product_property7')) {
665
            $property7select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property7_title'), 'product_property7', $item->getVar('product_property7'));
@@ 664-671 (lines=8) @@
661
            $sform->addElement($property6select, false);
662
        }
663
664
        if (OledrionUtility::getModuleOption('product_property7')) {
665
            $property7select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property7_title'), 'product_property7', $item->getVar('product_property7'));
666
            $property7Array  = explode('|', OledrionUtility::getModuleOption('product_property7'));
667
            foreach ($property7Array as $property7) {
668
                $property7select->addOption($property7);
669
            }
670
            $sform->addElement($property7select, false);
671
        }
672
673
        if (OledrionUtility::getModuleOption('product_property8')) {
674
            $property8select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property8_title'), 'product_property8', $item->getVar('product_property8'));
@@ 673-680 (lines=8) @@
670
            $sform->addElement($property7select, false);
671
        }
672
673
        if (OledrionUtility::getModuleOption('product_property8')) {
674
            $property8select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property8_title'), 'product_property8', $item->getVar('product_property8'));
675
            $property8Array  = explode('|', OledrionUtility::getModuleOption('product_property8'));
676
            foreach ($property8Array as $property8) {
677
                $property8select->addOption($property8);
678
            }
679
            $sform->addElement($property8select, false);
680
        }
681
682
        if (OledrionUtility::getModuleOption('product_property9')) {
683
            $property9select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property9_title'), 'product_property9', $item->getVar('product_property9'));
@@ 682-689 (lines=8) @@
679
            $sform->addElement($property8select, false);
680
        }
681
682
        if (OledrionUtility::getModuleOption('product_property9')) {
683
            $property9select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property9_title'), 'product_property9', $item->getVar('product_property9'));
684
            $property9Array  = explode('|', OledrionUtility::getModuleOption('product_property9'));
685
            foreach ($property9Array as $property9) {
686
                $property9select->addOption($property95);
687
            }
688
            $sform->addElement($property9select, false);
689
        }
690
691
        if (OledrionUtility::getModuleOption('product_property10')) {
692
            $property10select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property10_title'), 'product_property10', $item->getVar('product_property10'));
@@ 691-698 (lines=8) @@
688
            $sform->addElement($property9select, false);
689
        }
690
691
        if (OledrionUtility::getModuleOption('product_property10')) {
692
            $property10select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property10_title'), 'product_property10', $item->getVar('product_property10'));
693
            $property10Array  = explode('|', OledrionUtility::getModuleOption('product_property10'));
694
            foreach ($property10Array as $property10) {
695
                $property10select->addOption($property10);
696
            }
697
            $sform->addElement($property10select, false);
698
        }
699
700
        $button_tray = new XoopsFormElementTray('', '');
701
        $submit_btn  = new XoopsFormButton('', 'post', $label_submit, 'submit');

include/product_search_form.php 10 locations

@@ 80-87 (lines=8) @@
77
}
78
79
//
80
if (OledrionUtility::getModuleOption('search_property1') && OledrionUtility::getModuleOption('product_property1')) {
81
    $property1select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property1_title'), 'product_property1', '');
82
    $property1Array  = explode('|', OledrionUtility::getModuleOption('product_property1'));
83
    foreach ($property1Array as $property1) {
84
        $property1select->addOption($property1);
85
    }
86
    $sform->addElement($property1select, false);
87
}
88
89
//
90
if (OledrionUtility::getModuleOption('search_property2') && OledrionUtility::getModuleOption('product_property2')) {
@@ 90-97 (lines=8) @@
87
}
88
89
//
90
if (OledrionUtility::getModuleOption('search_property2') && OledrionUtility::getModuleOption('product_property2')) {
91
    $property2select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property2_title'), 'product_property2', '');
92
    $property2Array  = explode('|', OledrionUtility::getModuleOption('product_property2'));
93
    foreach ($property2Array as $property2) {
94
        $property2select->addOption($property2);
95
    }
96
    $sform->addElement($property2select, false);
97
}
98
99
//
100
if (OledrionUtility::getModuleOption('search_property3') && OledrionUtility::getModuleOption('product_property3')) {
@@ 100-107 (lines=8) @@
97
}
98
99
//
100
if (OledrionUtility::getModuleOption('search_property3') && OledrionUtility::getModuleOption('product_property3')) {
101
    $property3select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property3_title'), 'product_property3', '');
102
    $property3Array  = explode('|', OledrionUtility::getModuleOption('product_property3'));
103
    foreach ($property3Array as $property3) {
104
        $property3select->addOption($property3);
105
    }
106
    $sform->addElement($property3select, false);
107
}
108
109
//
110
if (OledrionUtility::getModuleOption('search_property4') && OledrionUtility::getModuleOption('product_property4')) {
@@ 110-117 (lines=8) @@
107
}
108
109
//
110
if (OledrionUtility::getModuleOption('search_property4') && OledrionUtility::getModuleOption('product_property4')) {
111
    $property4select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property4_title'), 'product_property4', '');
112
    $property4Array  = explode('|', OledrionUtility::getModuleOption('product_property4'));
113
    foreach ($property4Array as $property4) {
114
        $property4select->addOption($property4);
115
    }
116
    $sform->addElement($property4select, false);
117
}
118
119
//
120
if (OledrionUtility::getModuleOption('search_property5') && OledrionUtility::getModuleOption('product_property5')) {
@@ 120-127 (lines=8) @@
117
}
118
119
//
120
if (OledrionUtility::getModuleOption('search_property5') && OledrionUtility::getModuleOption('product_property5')) {
121
    $property5select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property5_title'), 'product_property5', '');
122
    $property5Array  = explode('|', OledrionUtility::getModuleOption('product_property5'));
123
    foreach ($property5Array as $property5) {
124
        $property5select->addOption($property5);
125
    }
126
    $sform->addElement($property5select, false);
127
}
128
129
//
130
if (OledrionUtility::getModuleOption('search_property6') && OledrionUtility::getModuleOption('product_property6')) {
@@ 130-137 (lines=8) @@
127
}
128
129
//
130
if (OledrionUtility::getModuleOption('search_property6') && OledrionUtility::getModuleOption('product_property6')) {
131
    $property6select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property6_title'), 'product_property6', '');
132
    $property6Array  = explode('|', OledrionUtility::getModuleOption('product_property6'));
133
    foreach ($property6Array as $property6) {
134
        $property6select->addOption($property6);
135
    }
136
    $sform->addElement($property6select, false);
137
}
138
139
//
140
if (OledrionUtility::getModuleOption('search_property7') && OledrionUtility::getModuleOption('product_property7')) {
@@ 140-147 (lines=8) @@
137
}
138
139
//
140
if (OledrionUtility::getModuleOption('search_property7') && OledrionUtility::getModuleOption('product_property7')) {
141
    $property7select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property7_title'), 'product_property7', '');
142
    $property7Array  = explode('|', OledrionUtility::getModuleOption('product_property7'));
143
    foreach ($property7Array as $property7) {
144
        $property7select->addOption($property7);
145
    }
146
    $sform->addElement($property7select, false);
147
}
148
149
//
150
if (OledrionUtility::getModuleOption('search_property8') && OledrionUtility::getModuleOption('product_property8')) {
@@ 150-157 (lines=8) @@
147
}
148
149
//
150
if (OledrionUtility::getModuleOption('search_property8') && OledrionUtility::getModuleOption('product_property8')) {
151
    $property8select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property8_title'), 'product_property8', '');
152
    $property8Array  = explode('|', OledrionUtility::getModuleOption('product_property8'));
153
    foreach ($property8Array as $property8) {
154
        $property8select->addOption($property8);
155
    }
156
    $sform->addElement($property8select, false);
157
}
158
159
//
160
if (OledrionUtility::getModuleOption('search_property9') && OledrionUtility::getModuleOption('product_property9')) {
@@ 160-167 (lines=8) @@
157
}
158
159
//
160
if (OledrionUtility::getModuleOption('search_property9') && OledrionUtility::getModuleOption('product_property9')) {
161
    $property9select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property9_title'), 'product_property9', '');
162
    $property9Array  = explode('|', OledrionUtility::getModuleOption('product_property9'));
163
    foreach ($property9Array as $property9) {
164
        $property9select->addOption($property9);
165
    }
166
    $sform->addElement($property9select, false);
167
}
168
169
//
170
if (OledrionUtility::getModuleOption('search_property10') && OledrionUtility::getModuleOption('product_property10')) {
@@ 170-177 (lines=8) @@
167
}
168
169
//
170
if (OledrionUtility::getModuleOption('search_property10') && OledrionUtility::getModuleOption('product_property10')) {
171
    $property10select = new XoopsFormSelect(OledrionUtility::getModuleOption('product_property10_title'), 'product_property10', '');
172
    $property10Array  = explode('|', OledrionUtility::getModuleOption('product_property10'));
173
    foreach ($property10Array as $property10) {
174
        $property10select->addOption($property10);
175
    }
176
    $sform->addElement($property10select, false);
177
}
178
179
$sform->addElement(new XoopsFormHidden('op', 'go'));
180