Code Duplication    Length = 6-6 lines in 10 locations

editprofile.php 1 location

@@ 227-232 (lines=6) @@
224
            }
225
226
            // Textarea for Music
227
            if (0 != smallworldGetValfromArray('favouritemusic', 'smallworldusethesefields')) {
228
                $music = $item->textarea('music', 'music', _SMALLWORLD_MUSIC, 1, 20, 'favourites', $preset = stripslashes($r['music']));
229
                $xoopsTpl->append('music', $music);
230
            } else {
231
                $xoopsTpl->assign('show_music', 'no');
232
            }
233
234
            // Textarea for Tvshow
235
            if (0 != smallworldGetValfromArray('favouritetvshows', 'smallworldusethesefields')) {

register.php 9 locations

@@ 118-123 (lines=6) @@
115
    }
116
117
    // Select Birthday dd-mm-Y
118
    if (0 != smallworldGetValfromArray('birthday', 'smallworldusethesefields')) {
119
        //$birthEle = new \XoopsFormText('', 'birthday', 12, 12);
120
        //$birthEle->setExtra("class='birthday smallworld_select'");
121
        //$birthday = $birthEle->render();
122
        $birthday = $item->input('birthday', 'birthday', 'birthday', $size = '12', $preset = null);
123
        $GLOBALS['xoopsTpl']->append('birthdaydate', $birthday);
124
    } else {
125
        $GLOBALS['xoopsTpl']->assign('show_birthday', 'no');
126
    }
@@ 129-134 (lines=6) @@
126
    }
127
128
    // Select Hometown or Enter new
129
    if (0 != smallworldGetValfromArray('birthplace', 'smallworldusethesefields')) {
130
        $birthplace = $item->input('birthplace', 'birthplace', 'birthplace', $size = '50', $preset = null);
131
        $GLOBALS['xoopsTpl']->append('birthplace', $birthplace);
132
    } else {
133
        $GLOBALS['xoopsTpl']->assign('show_birthplace', 'no');
134
    }
135
136
    // Dropdown politics
137
    if (0 != smallworldGetValfromArray('politicalview', 'smallworldusethesefields')) {
@@ 179-184 (lines=6) @@
176
    }
177
178
    // Mobilephone
179
    if (0 != smallworldGetValfromArray('mobile', 'smallworldusethesefields')) {
180
        $mobile = $item->input('mobile', 'mobile', 'mobile', 12, $preset = null);
181
        $GLOBALS['xoopsTpl']->append('mobile', $mobile);
182
    } else {
183
        $GLOBALS['xoopsTpl']->assign('show_mobile', 'no');
184
    }
185
186
    // Landphone
187
    if (0 != smallworldGetValfromArray('landphone', 'smallworldusethesefields')) {
@@ 187-192 (lines=6) @@
184
    }
185
186
    // Landphone
187
    if (0 != smallworldGetValfromArray('landphone', 'smallworldusethesefields')) {
188
        $phone = $item->input('phone', 'phone', 'phone', 12, $preset = null);
189
        $GLOBALS['xoopsTpl']->append('phone', $phone);
190
    } else {
191
        $GLOBALS['xoopsTpl']->assign('show_landphone', 'no');
192
    }
193
194
    // Adress
195
    if (0 != smallworldGetValfromArray('streetadress', 'smallworldusethesefields')) {
@@ 195-200 (lines=6) @@
192
    }
193
194
    // Adress
195
    if (0 != smallworldGetValfromArray('streetadress', 'smallworldusethesefields')) {
196
        $adress = $item->input('adress', 'adress', 'adress', $size = '50', $preset = null);
197
        $GLOBALS['xoopsTpl']->append('adress', $adress);
198
    } else {
199
        $GLOBALS['xoopsTpl']->assign('show_adress', 'no');
200
    }
201
202
    if (0 != smallworldGetValfromArray('presentcity', 'smallworldusethesefields')) {
203
        $present_city = $item->input('present_city', 'present_city', 'present_city', 50, $preset = null);
@@ 227-232 (lines=6) @@
224
    }
225
226
    // Textarea for Music
227
    if (0 != smallworldGetValfromArray('favouritemusic', 'smallworldusethesefields')) {
228
        $music = $item->textarea('music', 'music', _SMALLWORLD_MUSIC, 1, 20, 'favourites');
229
        $GLOBALS['xoopsTpl']->append('music', $music);
230
    } else {
231
        $GLOBALS['xoopsTpl']->assign('show_music', 'no');
232
    }
233
234
    // Textarea for Tvshow
235
    if (0 != smallworldGetValfromArray('favouritetvshows', 'smallworldusethesefields')) {
@@ 235-240 (lines=6) @@
232
    }
233
234
    // Textarea for Tvshow
235
    if (0 != smallworldGetValfromArray('favouritetvshows', 'smallworldusethesefields')) {
236
        $tvshow = $item->textarea('tvshow', 'tvshow', _SMALLWORLD_TVSHOW, 1, 20, 'favourites');
237
        $GLOBALS['xoopsTpl']->append('tvshow', $tvshow);
238
    } else {
239
        $GLOBALS['xoopsTpl']->assign('show_tv', 'no');
240
    }
241
242
    // Textarea for Movie
243
    if (0 != smallworldGetValfromArray('favouritemovies', 'smallworldusethesefields')) {
@@ 243-248 (lines=6) @@
240
    }
241
242
    // Textarea for Movie
243
    if (0 != smallworldGetValfromArray('favouritemovies', 'smallworldusethesefields')) {
244
        $movie = $item->textarea('movie', 'movie', _SMALLWORLD_MOVIE, 1, 20, 'favourites');
245
        $GLOBALS['xoopsTpl']->append('movie', $movie);
246
    } else {
247
        $GLOBALS['xoopsTpl']->assign('show_movies', 'no');
248
    }
249
250
    // Textarea for Books
251
    if (0 != smallworldGetValfromArray('favouritebooks', 'smallworldusethesefields')) {
@@ 251-256 (lines=6) @@
248
    }
249
250
    // Textarea for Books
251
    if (0 != smallworldGetValfromArray('favouritebooks', 'smallworldusethesefields')) {
252
        $books = $item->textarea('books', 'books', _SMALLWORLD_BOOKS, 1, 20, 'favourites');
253
        $GLOBALS['xoopsTpl']->append('books', $books);
254
    } else {
255
        $GLOBALS['xoopsTpl']->assign('show_books', 'no');
256
    }
257
258
    // Textarea for About me
259
    if (0 != smallworldGetValfromArray('aboutme', 'smallworldusethesefields')) {