Check(); include_once ("check_priv.php"); include_once ("user_menu.php"); echo '
'; echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php"); echo '
'; // TODO : add a check for permission if ( $User->CheckAction($cn,EXP_IMP_ECR) == 0 ) { /* Cannot Access */ NoAccess(); exit -1; } echo ShowMenuAdvanced("ecrit_ouv.php"); echo ''; echo '
'; /////////////////////////// EXPORT //////////////////////////////////////////// if ( isset ($_GET['export'])) { // if the year is not set, ask it // ask the exercice and do the export $periode=make_array($cn,"select distinct p_exercice,p_exercice from parm_periode order by p_exercice"); echo '
'; $w=new widget('select'); $w->table=0; $w->label='Periode'; $w->readonly=false; $w->value=$periode; $w->name="p_periode"; echo 'Période : '.$w->IOValue(); echo $w->Submit('export','Export'); echo "
"; exit(0); } /////////////////////////// IMPORT //////////////////////////////////////////// if ( isset ($_GET['import'])) { // show a form to upload the file // that form will parse the file, create an ods operation // and ask you to validate it // if no file is given if ( ! isset ($_REQUEST['p_submit']) ) { ?>
name='p_jrn'; $x->value=$ods; echo "Choississez votre journal ".$x->IOValue(); $w=new widget("file"); $w->name='import_file'; $w->label='p_file'; echo $w->IOValue(); echo $w->Submit('p_submit','Charger le fichier'); ?>
'; $r=FormODS($cn,$_POST['p_jrn'],$User->GetPeriode(),$submit, $array_ods,false,$idx,$p_saved=false); echo $r; echo "

On-line calculator

".JS_CALC_LINE."
"; } } } // else -> a file is given }// if import // IF import and export are not set then the choice is proposed echo '
'; html_page_stop(); ?>