Code Duplication    Length = 20-20 lines in 2 locations

Themes/default/Register.template.php 1 location

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

Themes/default/Profile.template.php 1 location

@@ 1526-1545 (lines=20) @@
1523
						<input type="checkbox" name="', $key, '" id="', $key, '"', !empty($field['value']) ? ' checked' : '', ' value="1" ', $field['input_attr'], '>';
1524
1525
			// Always fun - select boxes!
1526
			elseif ($field['type'] == 'select')
1527
			{
1528
				echo '
1529
						<select name="', $key, '" id="', $key, '">';
1530
1531
				if (isset($field['options']))
1532
				{
1533
					// Is this some code to generate the options?
1534
					if (!is_array($field['options']))
1535
						$field['options'] = $field['options']();
1536
1537
					// Assuming we now have some!
1538
					if (is_array($field['options']))
1539
						foreach ($field['options'] as $value => $name)
1540
							echo '
1541
							<option value="', $value, '"', $value == $field['value'] ? ' selected' : '', '>', $name, '</option>';
1542
				}
1543
1544
				echo '
1545
						</select>';
1546
			}
1547
1548
			// Something to end with?