389 |
return; |
return; |
390 |
} |
} |
391 |
echo_debug(__FILE__,__LINE__,"Loading document"); |
echo_debug(__FILE__,__LINE__,"Loading document"); |
392 |
|
// Remove old document |
393 |
|
$ret=ExecSql($cn,"select jr_pj from jrn where jr_grpt_id=$seq"); |
394 |
|
if (pg_num_rows($ret) != 0) { |
395 |
|
$r=pg_fetch_array($ret,0); |
396 |
|
$old_oid=$r['jr_pj']; |
397 |
|
if (strlen($old_oid) != 0) |
398 |
|
pg_lo_unlink($cn,$old_oid); |
399 |
|
} |
400 |
|
// Load new document |
401 |
ExecSql($cn,"update jrn set jr_pj=".$oid.", jr_pj_name='".$_FILES['pj']['name']."', ". |
ExecSql($cn,"update jrn set jr_pj=".$oid.", jr_pj_name='".$_FILES['pj']['name']."', ". |
402 |
"jr_pj_type='".$_FILES['pj']['type']."' where jr_grpt_id=$seq"); |
"jr_pj_type='".$_FILES['pj']['type']."' where jr_grpt_id=$seq"); |
403 |
|
|