'; echo $left_menu; echo ''; include_once("stock_inc.php"); // if year is not set then use the year of the user's periode if ( ! isset ($_GET['p_year']) ) { // get defaut periode $a=GetUserPeriode($cn,$g_user); // get exercice of periode $p_year=GetExercice($cn,$a); } else { $p_year=$_GET['p_year']; } // Show the possible years $sql="select distinct (p_exercice) as exercice from parm_periode "; $Res=ExecSql($cn,$sql); $r=""; for ( $i = 0; $i < pg_NumRows($Res);$i++) { $l=pg_fetch_array($Res,$i); $r.=sprintf('%d - ', $l['exercice'], $l['exercice']); } // Show the current stock echo '
'; echo $r; echo '
'; $a=ViewStock($cn,$p_year); if ( $a != null ) { echo ''; echo $a; } echo '
'; ?>