Code Duplication    Length = 18-21 lines in 2 locations

web_interface/astpp/system/helpers/html_helper.php 2 locations

@@ 215-235 (lines=21) @@
212
213
		$img = '<img';
214
215
		foreach ($src as $k=>$v)
216
		{
217
218
			if ($k == 'src' AND strpos($v, '://') === FALSE)
219
			{
220
				$CI = & get_instance();
221
222
				if ($index_page === TRUE)
223
				{
224
					$img .= ' src="'.$CI->config->site_url($v).'"';
225
				} else
226
				{
227
					$img .= ' src="'.$CI->config->slash_item('base_url').$v.'"';
228
				}
229
			} else
230
			{
231
				$img .= " $k=\"$v\"";
232
			}
233
		}
234
235
		$img .= '/>';
236
237
		return $img;
238
	}
@@ 314-331 (lines=18) @@
311
312
		if (is_array($href))
313
		{
314
			foreach ($href as $k=>$v)
315
			{
316
				if ($k == 'href' AND strpos($v, '://') === FALSE)
317
				{
318
					if ($index_page === TRUE)
319
					{
320
						$link .= 'href="'.$CI->config->site_url($v).'" ';
321
					}
322
					else
323
					{
324
						$link .= 'href="'.$CI->config->slash_item('base_url').$v.'" ';
325
					}
326
				}
327
				else
328
				{
329
					$link .= "$k=\"$v\" ";
330
				}
331
			}
332
333
			$link .= "/>";
334
		}