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

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