41 $Res=$p_cn->exec_sql(
"select jr_valid from jrn where jr_grpt_id=$p_grpt_id");
47 if (
$a[
'jr_valid'] ==
't')
return 1;
48 if (
$a[
'jr_valid'] ==
'f')
return 0;
76function navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1,$p_javascript=
"")
80 if ( $_SESSION[SESSION_KEY.
'g_pagesize'] == -1 )
return "";
83 $p_size= $_SESSION[SESSION_KEY.
'g_pagesize'];
86 if ( $p_line == 0 )
return "";
94 $nb_page=($p_line-($p_line%$p_size))/$p_size;
96 if ( $p_line % $p_size != 0 ) $nb_page+=1;
99 if ( $nb_page == 1)
return "";
102 if ( isset(
$_GET[
'o']))
113 $r=
'<A class="mtitle" href="'.basename($_SERVER[
'PHP_SELF']).
"?".
$url.
"&offset=$offset&step=$step&page=$e&size=$step".
'" '.$p_javascript.
'>';
116 $r.=
"</A> ";
123 $start_bar=($p_page < 11 )?1:$p_page-10;
124 $end_bar =($p_page < 11 )?20:$p_page+10;
125 $end_bar =($end_bar > $nb_page )?$nb_page:$end_bar;
129 for (
$e=$start_bar;
$e<=$end_bar;
$e++)
137 $go=$_SERVER[
'PHP_SELF'].
"?".
$url.
"&offset=$offset&step=$step&page=$e&size=$step";
139 $r.=sprintf(
'<A class="nav" HREF="%s" %s >%d</A> ',$go,$p_javascript,
$e);
145 $r.=
"<b> [ $e ] </b>";
151 if ($p_page !=$nb_page)
158 $r.=
' <A class="mtitle" href="'.$_SERVER[
'PHP_SELF'].
"?".
$url.
"&offset=$offset&step=$step&page=$e&size=$step".
'" '.$p_javascript.
' >';
183 if (strpos( $p_string,
'?') == 0 ) {
184 $p_string = $p_string.
'?v='.microtime(
true);
186 echo
'<HTML><head><META HTTP-EQUIV="REFRESH" content="'.$p_time.
'; url='.$p_string.
'"></head><body> Connecting... </body></html>';
197 if ($p_num==
'')
return 0;
211 $needed =explode(
',',$p_needed);
212 for (
$e=0;
$e<count($needed);
$e++) {
214 throw new Exception (_(
'Paramètre manquant').
" ".$needed[
$e]);
225 $filename=$p_filename;
226 foreach (array(
'/',
'*',
'<',
'>',
';',
',',
'\\',
':',
'(',
')',
' ',
'[',
']') as
$i) {
noalyss_str_replace($search, $replace, $string)
echo_error($p_log, $p_line="", $p_message="")
log error into the /tmp/noalyss_error.log it doesn't work on windows
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
if(!headers_sent())
– pour utiliser unoconv démarrer un server libreoffice commande libreoffice –headless –accept="socket...
static fetch_array($ret, $p_indice=0, $p_mode=PGSQL_ASSOC)
wrapper for the function pg_fetch_array
static num_row($ret)
wrapper for the function pg_num_rows
isValid_deprecrated($p_cn, $p_grpt_id)
test if a jrn op is valid
check_parameter($p_array, $p_needed)
Check that all the index are in the array, used by function to check if the array contains the needed...
clean_filename($p_filename)
sanitize the filename remove character which could be a problem,
CleanUrl()
Clean the url, remove the $_GET offset,step, page and size.
redirect($p_string, $p_time=0)
toNumber($p_num)
remove the useless space, change comma by period and try to return a number
navigation_bar($p_offset, $p_line, $p_size=0, $p_page=1, $p_javascript="")
Create a navigation_bar (pagesize)