';
// if a search is asked otherwise don't show all the rows
if ( isset ($_GET["search"]) )
{
// If the usr is admin he has all right
if ( $User->admin != 1 && $User->is_local_admin()!=1)
{
$jnt=" inner join user_sec_jrn on uj_jrn_id=j_jrn_def";
}
else
{
$jnt=" ";
}
$sql="select j_id,to_char(j_date,'DD.MM.YYYY') as j_date,
j_montant,jr_montant,j_poste,j_debit,j_tech_per,jr_id,jr_comment,j_grpt,pcm_lib,jr_internal,jr_rapt,j_qcode from jrnx inner join
jrn on jr_grpt_id=j_grpt inner join tmp_pcmn on j_poste=pcm_val ".
$jnt.
$condition." order by jr_date,jr_id,j_debit desc";
$Res=$cn->exec_sql($sql);
$MaxLine=Database::num_row($Res);
$offset=(isset($_GET['offset']))?$_GET['offset']:0;
$limit=$_SESSION['g_pagesize'];
$sql_limit="";
$sql_offset="";
$bar="";
if ( $limit != -1)
{
$page=(isset($_GET['page']))?$_GET['page']:0;
$sql_limit=" LIMIT $limit ";
$sql_offset=" OFFSET $offset ";
$bar=jrn_navigation_bar($offset,$MaxLine,$limit,$page,'onClick="return go_next_concerned();"');
}
$sql.=$sql_limit.$sql_offset;
if ( $MaxLine==0)
{
html_page_stop();
return;
}
$Res=$cn->exec_sql($sql);
$MaxLine=Database::num_row($Res);
$col_vide="
| ";
echo '
';
echo '