Example #1
0
        } else {
            $html = alert(_('Action interdite'), true);
        }
        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"?>