28 lines
518 B
PHP
28 lines
518 B
PHP
|
|
<?php
|
||
|
|
function formatPDFPositions($positions, $focus) {
|
||
|
|
$result = array();
|
||
|
|
foreach ($positions as $pos) {
|
||
|
|
|
||
|
|
$pos['position'] = intval($pos['position'])+1;
|
||
|
|
|
||
|
|
$pos['quantity'] = $pos['quantity'];
|
||
|
|
$pos['price']=format_number($pos['price']);
|
||
|
|
$pos['total']=format_number($pos['total']);
|
||
|
|
|
||
|
|
$result[] = $pos;
|
||
|
|
}
|
||
|
|
|
||
|
|
return $result;
|
||
|
|
}
|
||
|
|
|
||
|
|
function mysql_escape_gpc($dirty)
|
||
|
|
{
|
||
|
|
if (ini_get('magic_quotes_gpc'))
|
||
|
|
{
|
||
|
|
return $dirty;
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
return mysql_real_escape_string($dirty);
|
||
|
|
}
|
||
|
|
}
|