break; case 'upc': $html = HtmlInput::title_box("Détail fiche", $ctl); if ($g_user->check_action(FICADD) == 0) { $html .= alert(_('Action interdite'), true); } else { if ($cn->get_value('select count(*) from fiche where f_id=$1', array($_GET['f_id'])) == '0') { $html .= alert(_('Fiche non valide'), true); } else { $html = HtmlInput::title_box(_('Détail fiche (sauvée)'), $ctl); $f = new Fiche($cn, $_GET['f_id']); ob_start(); $f->update($_GET); $html .= ob_get_contents(); ob_end_clean(); $html .= $f->Display(true); } } } // switch $xml = escape_xml($html); if (DEBUG && headers_sent()) { echo $html; return; } header('Content-type: text/xml; charset=UTF-8'); echo <<<EOF <?xml version="1.0" encoding="UTF-8"?> <data> <ctl>{$ctl}</ctl> <code>{$xml}</code>
} echo '<div class="u_content">'; $f_id = $_REQUEST['f_id']; echo '<div class="content" style="width:50%">'; if (isset($_POST['mod'])) { echo hb(_('Information sauvée')); } $supplier = new Fiche($cn, $f_id); $p_readonly = $g_user->check_action(FICADD) == 0 ? true : false; if (!$p_readonly) { echo '<form id="catergory_detail_frm" method="post">'; } echo dossier::hidden(); echo HtmlInput::hidden('sb', 'detail'); echo HtmlInput::hidden('dc', 'cc'); echo $supplier->Display($p_readonly); $w = new IHidden(); $w->name = "p_action"; $w->value = "supplier"; echo $w->input(); $w->name = "f_id"; $w->value = $f_id; echo $w->input(); echo HtmlInput::hidden('action_fiche', ''); if (!$p_readonly) { echo HtmlInput::submit('mod', _('Sauver les modifications'), ' onclick="$(\'action_fiche\').value=\'mod\';"'); echo HtmlInput::reset(_("Annuler")); echo HtmlInput::submit('delete_card', _('Effacer cette fiche'), 'onclick="$(\'action_fiche\').value=\'delete_card\';return confirm_box(\'catergory_detail_frm\',\'' . 'Confirmer effacement ?' . '\');"'); echo '</form>'; } echo '</div>';