Code Duplication    Length = 96-107 lines in 3 locations

blocks/partners_list.php 1 location

@@ 91-197 (lines=107) @@
88
 * @param $options
89
 * @return string
90
 */
91
function b_partners_list_edit($options)
92
{
93
    $form = "<table border='0'>";
94
    $form .= '<tr><td>' . _MB_SPARTNER_PARTNERS_PSPACE . '</td><td>';
95
    $chk = '';
96
    if ($options[0] == 0) {
97
        $chk = " checked='checked'";
98
    }
99
    $form .= "<input type='radio' name='options[0]' value='0'" . $chk . ' />' . _NO . '';
100
    $chk = '';
101
    if ($options[0] == 1) {
102
        $chk = " checked='checked'";
103
    }
104
    $form .= "<input type='radio' name='options[0]' value='1'" . $chk . ' />' . _YES . '</td></tr>';
105
    $form .= '<tr><td>' . _MB_SPARTNER_FADE . '</td><td>';
106
    $chk = '';
107
    if ($options[1] == 0) {
108
        $chk = " checked='checked'";
109
    }
110
    $form .= "<input type='radio' name='options[1]' value='0'" . $chk . ' />' . _NO . '';
111
    $chk = '';
112
    if ($options[1] == 1) {
113
        $chk = " checked='checked'";
114
    }
115
    $form .= "<input type='radio' name='options[1]' value='1'" . $chk . ' />' . _YES . '</td></tr>';
116
    /*$form .= "<tr><td>"._MB_SPARTNER_BRAND."</td><td>";
117
     $chk   = "";
118
     if ($options[2] == 0) {
119
         $chk = " checked='checked'";
120
     }*/
121
    /*$form .= "<input type='radio' name='options[2]' value='0'".$chk." />"._NO."";
122
     $chk   = "";
123
     if ($options[2] == 1) {
124
         $chk = " checked='checked'";
125
     }
126
     $form .= "<input type='radio' name='options[2]' value='1'".$chk." />"._YES."</td></tr>";*/
127
    $form .= '<tr><td>' . _MB_SPARTNER_BLIMIT . '</td><td>';
128
    $form .= "<input type='text' name='options[2]' size='16' value='" . $options[2] . "' /></td></tr>";
129
    /*$form .= "<tr><td>"._MB_SPARTNER_BSHOW."</td><td>";
130
     $form .= "<select size='1' name='options[3]'>";
131
     $sel = "";
132
     if ($options[3] == 1) {
133
         $sel = " selected='selected'";
134
     }
135
     $form .= "<option value='1' ".$sel.">"._MB_SPARTNER_IMAGES."</option>";
136
     $sel = "";
137
     if ($options[3] == 2) {
138
         $sel = " selected='selected'";
139
     }
140
     $form .= "<option value='2' ".$sel.">"._MB_SPARTNER_TEXT."</option>";
141
     $sel = "";
142
     if ($options[3] == 3) {
143
         $sel = " selected='selected'";
144
     }
145
     $form .= "<option value='3' ".$sel.">"._MB_SPARTNER_BOTH."</option>";
146
     $form .= "</select></td></tr>";
147
     $form .= "<tr><td>"._MB_SPARTNER_BORDER."</td><td>";
148
     $form .= "<select size='1' name='options[5]'>";
149
     $sel = "";
150
     if ($options[4] == "id") {
151
         $sel = " selected='selected'";
152
     }
153
     $form .= "<option value='id' ".$sel.">"._MB_SPARTNER_ID."</option>";
154
     $sel = "";
155
     if ($options[4] == "hits") {
156
         $sel = " selected='selected'";
157
     }
158
     $form .= "<option value='hits' ".$sel.">"._MB_SPARTNER_HITS."</option>";
159
     $sel = "";
160
     if ($options[4] == "title") {
161
         $sel = " selected='selected'";
162
     }
163
     $form .= "<option value='title' ".$sel.">"._MB_SPARTNER_TITLE."</option>";
164
     if ($options[4] == "weight") {
165
         $sel = " selected='selected'";
166
     }
167
     $form .= "<option value='weight' ".$sel.">"._MB_SPARTNER_WEIGHT."</option>";
168
     $form .= "</select> ";
169
     $form .= "<select size='1' name='options[6]'>";
170
     $sel = "";
171
     if ($options[5] == "ASC") {
172
         $sel = " selected='selected'";
173
     }
174
     $form .= "<option value='ASC' ".$sel.">"._MB_SPARTNER_ASC."</option>";
175
     $sel = "";
176
     if ($options[5] == "DESC") {
177
         $sel = " selected='selected'";
178
     }
179
     $form .= "<option value='DESC' ".$sel.">"._MB_SPARTNER_DESC."</option>";
180
     $form .= "</select></td></tr>";
181
182
     $form .= "<tr><td>"._MB_SPARTNER_SEE_ALL."</td><td>";
183
     $chk   = "";
184
     if ($options[6] == 0) {
185
         $chk = " checked='checked'";
186
     }
187
     $form .= "<input type='radio' name='options[7]' value='0'".$chk." />"._NO."";
188
     $chk   = "";
189
     if ($options[6] == 1) {
190
         $chk = " checked='checked'";
191
     }
192
     $form .= "<input type='radio' name='options[7]' value='1'".$chk." />"._YES."</td></tr>";*/
193
194
    $form .= '</table>';
195
196
    return $form;
197
}
198

blocks/recent_offers.php 1 location

@@ 61-167 (lines=107) @@
58
 * @param $options
59
 * @return string
60
 */
61
function b_recent_offers_edit($options)
62
{
63
    $form = "<table border='0'>";
64
    $form .= '<tr><td>' . _MB_SPARTNER_PARTNERS_PSPACE . '</td><td>';
65
    $chk = '';
66
    if ($options[0] == 0) {
67
        $chk = " checked='checked'";
68
    }
69
    $form .= "<input type='radio' name='options[0]' value='0'" . $chk . ' />' . _NO . '';
70
    $chk = '';
71
    if ($options[0] == 1) {
72
        $chk = " checked='checked'";
73
    }
74
    $form .= "<input type='radio' name='options[0]' value='1'" . $chk . ' />' . _YES . '</td></tr>';
75
    $form .= '<tr><td>' . _MB_SPARTNER_FADE . '</td><td>';
76
    $chk = '';
77
    if ($options[1] == 0) {
78
        $chk = " checked='checked'";
79
    }
80
    $form .= "<input type='radio' name='options[1]' value='0'" . $chk . ' />' . _NO . '';
81
    $chk = '';
82
    if ($options[1] == 1) {
83
        $chk = " checked='checked'";
84
    }
85
    $form .= "<input type='radio' name='options[1]' value='1'" . $chk . ' />' . _YES . '</td></tr>';
86
    /*$form .= "<tr><td>"._MB_SPARTNER_BRAND."</td><td>";
87
     $chk   = "";
88
     if ($options[2] == 0) {
89
         $chk = " checked='checked'";
90
     }*/
91
    /*$form .= "<input type='radio' name='options[2]' value='0'".$chk." />"._NO."";
92
     $chk   = "";
93
     if ($options[2] == 1) {
94
         $chk = " checked='checked'";
95
     }
96
     $form .= "<input type='radio' name='options[2]' value='1'".$chk." />"._YES."</td></tr>";*/
97
    $form .= '<tr><td>' . _MB_SPARTNER_BLIMIT . '</td><td>';
98
    $form .= "<input type='text' name='options[2]' size='16' value='" . $options[2] . "' /></td></tr>";
99
    /*$form .= "<tr><td>"._MB_SPARTNER_BSHOW."</td><td>";
100
     $form .= "<select size='1' name='options[3]'>";
101
     $sel = "";
102
     if ($options[3] == 1) {
103
         $sel = " selected='selected'";
104
     }
105
     $form .= "<option value='1' ".$sel.">"._MB_SPARTNER_IMAGES."</option>";
106
     $sel = "";
107
     if ($options[3] == 2) {
108
         $sel = " selected='selected'";
109
     }
110
     $form .= "<option value='2' ".$sel.">"._MB_SPARTNER_TEXT."</option>";
111
     $sel = "";
112
     if ($options[3] == 3) {
113
         $sel = " selected='selected'";
114
     }
115
     $form .= "<option value='3' ".$sel.">"._MB_SPARTNER_BOTH."</option>";
116
     $form .= "</select></td></tr>";
117
     $form .= "<tr><td>"._MB_SPARTNER_BORDER."</td><td>";
118
     $form .= "<select size='1' name='options[5]'>";
119
     $sel = "";
120
     if ($options[4] == "id") {
121
         $sel = " selected='selected'";
122
     }
123
     $form .= "<option value='id' ".$sel.">"._MB_SPARTNER_ID."</option>";
124
     $sel = "";
125
     if ($options[4] == "hits") {
126
         $sel = " selected='selected'";
127
     }
128
     $form .= "<option value='hits' ".$sel.">"._MB_SPARTNER_HITS."</option>";
129
     $sel = "";
130
     if ($options[4] == "title") {
131
         $sel = " selected='selected'";
132
     }
133
     $form .= "<option value='title' ".$sel.">"._MB_SPARTNER_TITLE."</option>";
134
     if ($options[4] == "weight") {
135
         $sel = " selected='selected'";
136
     }
137
     $form .= "<option value='weight' ".$sel.">"._MB_SPARTNER_WEIGHT."</option>";
138
     $form .= "</select> ";
139
     $form .= "<select size='1' name='options[6]'>";
140
     $sel = "";
141
     if ($options[5] == "ASC") {
142
         $sel = " selected='selected'";
143
     }
144
     $form .= "<option value='ASC' ".$sel.">"._MB_SPARTNER_ASC."</option>";
145
     $sel = "";
146
     if ($options[5] == "DESC") {
147
         $sel = " selected='selected'";
148
     }
149
     $form .= "<option value='DESC' ".$sel.">"._MB_SPARTNER_DESC."</option>";
150
     $form .= "</select></td></tr>";
151
152
     $form .= "<tr><td>"._MB_SPARTNER_SEE_ALL."</td><td>";
153
     $chk   = "";
154
     if ($options[6] == 0) {
155
         $chk = " checked='checked'";
156
     }
157
     $form .= "<input type='radio' name='options[7]' value='0'".$chk." />"._NO."";
158
     $chk   = "";
159
     if ($options[6] == 1) {
160
         $chk = " checked='checked'";
161
     }
162
     $form .= "<input type='radio' name='options[7]' value='1'".$chk." />"._YES."</td></tr>";*/
163
164
    $form .= '</table>';
165
166
    return $form;
167
}
168

blocks/recent_partners.php 1 location

@@ 56-151 (lines=96) @@
53
 * @param $options
54
 * @return string
55
 */
56
function b_recent_partners_edit($options)
57
{
58
    $form = "<table border='0'>";
59
    $form .= '<tr><td>' . _MB_SPARTNER_PARTNERS_PSPACE . '</td><td>';
60
    $chk = '';
61
    if ($options[0] == 0) {
62
        $chk = " checked='checked'";
63
    }
64
    $form .= "<input type='radio' name='options[0]' value='0'" . $chk . ' />' . _NO . '';
65
    $chk = '';
66
    if ($options[0] == 1) {
67
        $chk = " checked='checked'";
68
    }
69
    $form .= "<input type='radio' name='options[0]' value='1'" . $chk . ' />' . _YES . '</td></tr>';
70
    $form .= '<tr><td>' . _MB_SPARTNER_FADE . '</td><td>';
71
    $chk = '';
72
    if ($options[1] == 0) {
73
        $chk = " checked='checked'";
74
    }
75
    $form .= "<input type='radio' name='options[1]' value='0'" . $chk . ' />' . _NO . '';
76
    $chk = '';
77
    if ($options[1] == 1) {
78
        $chk = " checked='checked'";
79
    }
80
    $form .= "<input type='radio' name='options[1]' value='1'" . $chk . ' />' . _YES . '</td></tr>';
81
    $form .= '<tr><td>' . _MB_SPARTNER_BLIMIT . '</td><td>';
82
    $form .= "<input type='text' name='options[2]' size='16' value='" . $options[2] . "' /></td></tr>";
83
    /*$form .= "<tr><td>"._MB_SPARTNER_BSHOW."</td><td>";
84
     $form .= "<select size='1' name='options[3]'>";
85
     $sel = "";
86
     if ($options[3] == 1) {
87
         $sel = " selected='selected'";
88
     }
89
     $form .= "<option value='1' ".$sel.">"._MB_SPARTNER_IMAGES."</option>";
90
     $sel = "";
91
     if ($options[3] == 2) {
92
         $sel = " selected='selected'";
93
     }
94
     $form .= "<option value='2' ".$sel.">"._MB_SPARTNER_TEXT."</option>";
95
     $sel = "";
96
     if ($options[3] == 3) {
97
         $sel = " selected='selected'";
98
     }
99
     $form .= "<option value='3' ".$sel.">"._MB_SPARTNER_BOTH."</option>";
100
     $form .= "</select></td></tr>";
101
     $form .= "<tr><td>"._MB_SPARTNER_BORDER."</td><td>";
102
     $form .= "<select size='1' name='options[5]'>";
103
     $sel = "";
104
     if ($options[4] == "id") {
105
         $sel = " selected='selected'";
106
     }
107
     $form .= "<option value='id' ".$sel.">"._MB_SPARTNER_ID."</option>";
108
     $sel = "";
109
     if ($options[4] == "hits") {
110
         $sel = " selected='selected'";
111
     }
112
     $form .= "<option value='hits' ".$sel.">"._MB_SPARTNER_HITS."</option>";
113
     $sel = "";
114
     if ($options[4] == "title") {
115
         $sel = " selected='selected'";
116
     }
117
     $form .= "<option value='title' ".$sel.">"._MB_SPARTNER_TITLE."</option>";
118
     if ($options[4] == "weight") {
119
         $sel = " selected='selected'";
120
     }
121
     $form .= "<option value='weight' ".$sel.">"._MB_SPARTNER_WEIGHT."</option>";
122
     $form .= "</select> ";
123
     $form .= "<select size='1' name='options[6]'>";
124
     $sel = "";
125
     if ($options[5] == "ASC") {
126
         $sel = " selected='selected'";
127
     }
128
     $form .= "<option value='ASC' ".$sel.">"._MB_SPARTNER_ASC."</option>";
129
     $sel = "";
130
     if ($options[5] == "DESC") {
131
         $sel = " selected='selected'";
132
     }
133
     $form .= "<option value='DESC' ".$sel.">"._MB_SPARTNER_DESC."</option>";
134
     $form .= "</select></td></tr>";
135
136
     $form .= "<tr><td>"._MB_SPARTNER_SEE_ALL."</td><td>";
137
     $chk   = "";
138
     if ($options[6] == 0) {
139
         $chk = " checked='checked'";
140
     }
141
     $form .= "<input type='radio' name='options[7]' value='0'".$chk." />"._NO."";
142
     $chk   = "";
143
     if ($options[6] == 1) {
144
         $chk = " checked='checked'";
145
     }
146
     $form .= "<input type='radio' name='options[7]' value='1'".$chk." />"._YES."</td></tr>";*/
147
148
    $form .= '</table>';
149
150
    return $form;
151
}
152