Code Duplication    Length = 20-20 lines in 2 locations

Themes/default/Profile.template.php 1 location

@@ 1510-1529 (lines=20) @@
1507
						<input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" ', $field['input_attr'], '>';
1508
1509
			// Always fun - select boxes!
1510
			elseif ($field['type'] == 'select')
1511
			{
1512
				echo '
1513
						<select name="', $key, '" id="', $key, '">';
1514
1515
				if (isset($field['options']))
1516
				{
1517
					// Is this some code to generate the options?
1518
					if (!is_array($field['options']))
1519
						$field['options'] = $field['options']();
1520
1521
					// Assuming we now have some!
1522
					if (is_array($field['options']))
1523
						foreach ($field['options'] as $value => $name)
1524
							echo '
1525
							<option value="', $value, '"', $value == $field['value'] ? ' selected' : '', '>', $name, '</option>';
1526
				}
1527
1528
				echo '
1529
						</select>';
1530
			}
1531
1532
			// Something to end with?

Themes/default/Register.template.php 1 location

@@ 231-250 (lines=20) @@
228
							<input type="hidden" name="', $key, '" value="0"><input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" tabindex="', $context['tabindex']++, '" ', $field['input_attr'], '>';
229
230
				// Always fun - select boxes!
231
				elseif ($field['type'] == 'select')
232
				{
233
					echo '
234
							<select name="', $key, '" id="', $key, '" tabindex="', $context['tabindex']++, '">';
235
236
					if (isset($field['options']))
237
					{
238
						// Is this some code to generate the options?
239
						if (!is_array($field['options']))
240
							$field['options'] = eval($field['options']);
241
242
						// Assuming we now have some!
243
						if (is_array($field['options']))
244
							foreach ($field['options'] as $value => $name)
245
								echo '
246
								<option value="', $value, '"', $value == $field['value'] ? ' selected' : '', '>', $name, '</option>';
247
					}
248
249
					echo '
250
							</select>';
251
				}
252
253
				// Something to end with?