id=$_POST['fr_id']; $rap->delete(); $menu=1; } if (isset($_POST["record"])) { $rap->from_array($_POST); $rap->save(); $menu=1; } if (isset($_POST['update'])) { $rap->from_array($_POST); $rap->save($_POST); $menu=1; } if (isset($_POST['upload'])) { $rap->upload(); $menu=1; } if (isset($_REQUEST["action"]) && $menu == 0) { $action=$_REQUEST ["action"]; $rap->id=(isset($_REQUEST ['fr_id']))?$_REQUEST['fr_id']:0; if ($action=="add"&&!isset($_REQUEST['fr_id'])) { echo '
'; echo '

'._('Définition').'

'; echo '
'; echo dossier::hidden(); $rap->id=0; echo $rap->form(15); echo HtmlInput::submit("record", _("Sauve")); echo '
'; echo ''._("Les lignes vides seront effacées").''; echo "
"; echo '
'; echo '
'; echo '

Importation

'; echo dossier::hidden(); $rap->id=0; $wUpload=new IFile(); $wUpload->name='report'; $wUpload->value='report_value'; echo _('Importer ce rapport').' '; echo $wUpload->input(); echo HtmlInput::submit("upload", _("Sauve")); echo '
'; echo ''._("Les lignes vides seront effacées").''; echo "
"; } if ($action=="view") { echo '
'; $rap->id=$_REQUEST ['fr_id']; echo '
'; $rap->load(); echo h1($rap->name); echo $rap->form(); echo HtmlInput::hidden("fr_id", $rap->id); echo HtmlInput::hidden("action", "record"); echo HtmlInput::submit("update", _("Mise a jour")); echo HtmlInput::submit("del_form", _("Effacement")); echo '
'; echo '
'; echo dossier::hidden(); echo HtmlInput::hidden("act", "CSV:reportinit"); echo HtmlInput::hidden('f', $rap->id); echo HtmlInput::submit('bt_csv', "Export CSV"); echo HtmlInput::request_to_hidden(array('ac', 'action', 'p_action', 'fr_id')); $href=http_build_query(array('ac'=>$_REQUEST['ac'],'gDossier'=>$_REQUEST['gDossier'])); echo ''._('Retour').''; echo '
'; echo ''._("Les lignes vides seront effacées").''; echo "
"; } } else { $lis=$rap->get_list(); $ac="&ac=".$_REQUEST['ac']; $p_action='p_action=defreport'; echo '
'; echo _('Filtre')." ".HtmlInput::filter_table("rapport_table_id", '0', 1); echo ''; echo ''; foreach ($lis as $row) { printf('', $row->id, $str_dossier, $row->name); } echo "
Ajout
%s
"; echo '
'; } html_page_stop(); ?>