check_module('CFGPCMN') == 0 ) { $html=h2(_('Action interdite'),' class="notice"'); $html = escape_xml($response); header('Content-type: text/xml; charset=UTF-8'); echo << pcmn_update $html NOTALLOWED EOF; return; } ob_start(); $pcmn_val=HtmlInput::default_value_get('value', "-1"); // if empty if ( $pcmn_val != "-1" ) { // not set } $action='new'; $val=new IText('p_valu'); $parent=new IText('p_parentu'); $lib=new IText('p_libu'); $lib->css_size="100%"; $type=new ISelect('p_typeu'); $type->value=Acc_Account::$type; if ( $pcmn_val != "") { $action='update'; /* * Not empty, show the default value */ $account = new Acc_Account($cn); $account->set_parameter('value',$pcmn_val); $account->load(); $val->value=$account->get_parameter('value'); $parent->value=$account->get_parameter('parent'); $lib->value=$account->get_parameter('libelle'); $type->selected=$account->get_parameter('type'); } require 'template/pcmn_update.php'; $response = ob_get_clean(); $html = escape_xml($response); if ( headers_sent() ) { echo $response; echo $html; } else { header('Content-type: text/xml; charset=UTF-8'); echo << $html ok EOF; }