Code Duplication    Length = 8-8 lines in 20 locations

admin/actions/products.php 10 locations

@@ 514-521 (lines=8) @@
511
        $downloadFile->setDescription(_AM_OLEDRION_ATTACHED_HLP);
512
        $sform->addElement($downloadFile, false);
513
514
        if (Oledrion_utils::getModuleOption('product_property1')) {
515
            $property1select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property1_title'), 'product_property1', $item->getVar('product_property1'));
516
            $property1Array  = explode('|', Oledrion_utils::getModuleOption('product_property1'));
517
            foreach ($property1Array as $property1) {
518
                $property1select->addOption($property1);
519
            }
520
            $sform->addElement($property1select, false);
521
        }
522
523
        if (Oledrion_utils::getModuleOption('product_property2')) {
524
            $property2select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property2_title'), 'product_property2', $item->getVar('product_property2'));
@@ 523-530 (lines=8) @@
520
            $sform->addElement($property1select, false);
521
        }
522
523
        if (Oledrion_utils::getModuleOption('product_property2')) {
524
            $property2select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property2_title'), 'product_property2', $item->getVar('product_property2'));
525
            $property2Array  = explode('|', Oledrion_utils::getModuleOption('product_property2'));
526
            foreach ($property2Array as $property2) {
527
                $property2select->addOption($property2);
528
            }
529
            $sform->addElement($property2select, false);
530
        }
531
532
        if (Oledrion_utils::getModuleOption('product_property3')) {
533
            $property3select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property3_title'), 'product_property3', $item->getVar('product_property3'));
@@ 532-539 (lines=8) @@
529
            $sform->addElement($property2select, false);
530
        }
531
532
        if (Oledrion_utils::getModuleOption('product_property3')) {
533
            $property3select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property3_title'), 'product_property3', $item->getVar('product_property3'));
534
            $property3Array  = explode('|', Oledrion_utils::getModuleOption('product_property3'));
535
            foreach ($property3Array as $property3) {
536
                $property3select->addOption($property3);
537
            }
538
            $sform->addElement($property3select, false);
539
        }
540
541
        if (Oledrion_utils::getModuleOption('product_property4')) {
542
            $property4select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property4_title'), 'product_property4', $item->getVar('product_property4'));
@@ 541-548 (lines=8) @@
538
            $sform->addElement($property3select, false);
539
        }
540
541
        if (Oledrion_utils::getModuleOption('product_property4')) {
542
            $property4select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property4_title'), 'product_property4', $item->getVar('product_property4'));
543
            $property4Array  = explode('|', Oledrion_utils::getModuleOption('product_property4'));
544
            foreach ($property4Array as $property4) {
545
                $property4select->addOption($property4);
546
            }
547
            $sform->addElement($property4select, false);
548
        }
549
550
        if (Oledrion_utils::getModuleOption('product_property5')) {
551
            $property5select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property5_title'), 'product_property5', $item->getVar('product_property5'));
@@ 550-557 (lines=8) @@
547
            $sform->addElement($property4select, false);
548
        }
549
550
        if (Oledrion_utils::getModuleOption('product_property5')) {
551
            $property5select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property5_title'), 'product_property5', $item->getVar('product_property5'));
552
            $property5Array  = explode('|', Oledrion_utils::getModuleOption('product_property5'));
553
            foreach ($property5Array as $property5) {
554
                $property5select->addOption($property5);
555
            }
556
            $sform->addElement($property5select, false);
557
        }
558
559
        if (Oledrion_utils::getModuleOption('product_property6')) {
560
            $property6select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property6_title'), 'product_property6', $item->getVar('product_property6'));
@@ 559-566 (lines=8) @@
556
            $sform->addElement($property5select, false);
557
        }
558
559
        if (Oledrion_utils::getModuleOption('product_property6')) {
560
            $property6select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property6_title'), 'product_property6', $item->getVar('product_property6'));
561
            $property6Array  = explode('|', Oledrion_utils::getModuleOption('product_property6'));
562
            foreach ($property6Array as $property6) {
563
                $property6select->addOption($property6);
564
            }
565
            $sform->addElement($property6select, false);
566
        }
567
568
        if (Oledrion_utils::getModuleOption('product_property7')) {
569
            $property7select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property7_title'), 'product_property7', $item->getVar('product_property7'));
@@ 568-575 (lines=8) @@
565
            $sform->addElement($property6select, false);
566
        }
567
568
        if (Oledrion_utils::getModuleOption('product_property7')) {
569
            $property7select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property7_title'), 'product_property7', $item->getVar('product_property7'));
570
            $property7Array  = explode('|', Oledrion_utils::getModuleOption('product_property7'));
571
            foreach ($property7Array as $property7) {
572
                $property7select->addOption($property7);
573
            }
574
            $sform->addElement($property7select, false);
575
        }
576
577
        if (Oledrion_utils::getModuleOption('product_property8')) {
578
            $property8select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property8_title'), 'product_property8', $item->getVar('product_property8'));
@@ 577-584 (lines=8) @@
574
            $sform->addElement($property7select, false);
575
        }
576
577
        if (Oledrion_utils::getModuleOption('product_property8')) {
578
            $property8select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property8_title'), 'product_property8', $item->getVar('product_property8'));
579
            $property8Array  = explode('|', Oledrion_utils::getModuleOption('product_property8'));
580
            foreach ($property8Array as $property8) {
581
                $property8select->addOption($property8);
582
            }
583
            $sform->addElement($property8select, false);
584
        }
585
586
        if (Oledrion_utils::getModuleOption('product_property9')) {
587
            $property9select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property9_title'), 'product_property9', $item->getVar('product_property9'));
@@ 586-593 (lines=8) @@
583
            $sform->addElement($property8select, false);
584
        }
585
586
        if (Oledrion_utils::getModuleOption('product_property9')) {
587
            $property9select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property9_title'), 'product_property9', $item->getVar('product_property9'));
588
            $property9Array  = explode('|', Oledrion_utils::getModuleOption('product_property9'));
589
            foreach ($property9Array as $property9) {
590
                $property9select->addOption($property95);
591
            }
592
            $sform->addElement($property9select, false);
593
        }
594
595
        if (Oledrion_utils::getModuleOption('product_property10')) {
596
            $property10select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property10_title'), 'product_property10', $item->getVar('product_property10'));
@@ 595-602 (lines=8) @@
592
            $sform->addElement($property9select, false);
593
        }
594
595
        if (Oledrion_utils::getModuleOption('product_property10')) {
596
            $property10select = new XoopsFormSelect(Oledrion_utils::getModuleOption('product_property10_title'), 'product_property10', $item->getVar('product_property10'));
597
            $property10Array  = explode('|', Oledrion_utils::getModuleOption('product_property10'));
598
            foreach ($property10Array as $property10) {
599
                $property10select->addOption($property10);
600
            }
601
            $sform->addElement($property10select, false);
602
        }
603
604
        $button_tray = new XoopsFormElementTray('', '');
605
        $submit_btn  = new XoopsFormButton('', 'post', $label_submit, 'submit');

include/product_search_form.php 10 locations

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