<?php 
function formatPDFPositions($positions, $focus) {
	$result = array();
	foreach ($positions as $pos) {
		
		$pos['position'] = intval($pos['position'])+1;
			
		$pos['quantity'] = $pos['quantity'];
		$pos['price_start']=format_number($pos['price_start']);
		$pos['total_netto']=format_number($pos['total_netto']);

		$result[] = $pos;
	}
	
	return $result;
}

function mysql_escape_gpc($dirty)
{
	if (ini_get('magic_quotes_gpc'))
	{
		return $dirty;
	}
	else
	{
		return mysql_real_escape_string($dirty);
	}
}