0 ) { strip_slashes($_POST); $action_result = $OA->manageRecord($_POST, $_FILES); if ( ereg("^0+$", $action_result) ) { if ( $_GET['reload'] == 1 ) { $HTML->generateClosePage($CONF['sys_http_server'] . $CONF['ws_js'] . $CONF['js_forms']); return exit; } else $js_onload = ' afterInsert();'; } else $error_string = manage_error_string($action_result); } //------------------------------------------------------------------------------------- // CARGAR VALORES PARA UN REGISTRO DADO if ( count($_POST) > 0 ) { $record = $_POST['record_id']; $DATA_SOURCE = &$_POST; } elseif ( !empty($_GET['id']) ) { if ( $OA->checkRecord($_GET['id']) ) { $DATA_SOURCE = $OA->getRecordValues($_GET['id']); $DATA_SOURCE['tipo'] = split(',', $DATA_SOURCE['tipo']); $record = $_GET['id']; } else unset($_GET['id']); } html_special_chars($DATA_SOURCE); //------------------------------------------------------------------------------------- // GENERAR PAGINA $js_vars = array( 'JS_CALENDAR_SRC' => $CONF['sys_http_server'] . $CONF['pg_calendar'], 'JS_ACTION_SAVE' => $LNG['js_action_save_ok'] ); $buttons = array(); /*$buttons[] = array( 'href' => $CONF['pg_section_oas'] . '?id_oa=' . $record, 'title' => $LNG['button_sections'], 'img' => 'boton_secciones_peq.gif', 'img_des' => 'boton_secciones_peq_des.gif', 'status' => ( $record ? true : false ), 'params' => 'class="separation"' ); $buttons[] = array( 'href' => $CONF['pg_section_docs'] . '?section=oa&sId=' . $record, 'title' => $LNG['button_docs'], 'img' => 'boton_documentos_peq.gif', 'img_des' => 'boton_documentos_peq_des.gif', 'status' => ( $record ? true : false ), 'params' => 'class="separation"' ); $buttons[] = array( 'href' => $CONF['pg_section_files'] . '?section=oa&sId=' . $record, 'title' => $LNG['button_files'], 'img' => 'boton_ficheros_peq.gif', 'img_des' => 'boton_ficheros_peq_des.gif', 'status' => ( $record ? true : false ) );*/ $HTML->generateHeader(array($CONF['css_forms']), array($CONF['js_general'],$CONF['js_forms']), $js_vars, ' onLoad="init();' . $js_onload . '"'); if ( !empty($error_string) ) $HTML->generateErrorDiv($error_string); $HTML->generateFormButtons($buttons, $button_actions); echo '
' . "\n"; echo '
' . "\n"; if ( !empty($record) ) echo ' ' . "\n"; $categories = array(); //Para poder meter en las categorias de profesorado y público también $second_level_categories = $SECTION->getCategoriesSecondLevel(); $second_level_categories[] = '0'; $SECTION->generateCategoriesTree($SECTION->getCategoriesLevelList($second_level_categories, array('1', '2', '3')),$categories); //$SECTION->generateCategoriesTree($SECTION->getCategoriesList(array('0')),$categories); //$SECTION->generateCategoriesTree($SECTION->getCategoriesLevelList(array('0'), array('2')),$categories); $form_status = array( '0' => $LNG['form_status_0'], '1' => $LNG['form_status_1'] ); $form_levels = array( '1' => '1', '2' => '2', '3' => '3'); $form_zones = array( '1' => $LNG['site_tipo_1'], '2' => $LNG['site_tipo_2'], '3' => $LNG['site_tipo_3']); $form_visualization = array( '1' => $LNG['site_zone_1'], '2' => $LNG['site_zone_2'], '3' => $LNG['site_zone_3']); ?>

generateSelectField($form_status, 'estado', $DATA_SOURCE['estado'], true); ?>

generateSelectField($categories, 'id_seccion', $DATA_SOURCE['id_seccion'], false); ?>

generateSelectField($form_visualization, 'visualizar[]', $DATA_SOURCE['visualizar'], true, 'multiple style="height: 75px;"'); ?>

 Borrar "' . $DATA_SOURCE['pdf_file'] . '"'; ?>

 Borrar "' . $DATA_SOURCE['imagen'] . '"'; ?>

generateSelectField($form_levels, 'nivel', $DATA_SOURCE['nivel'], false); ?>

 Borrar "' . $DATA_SOURCE['imagen_pro_pu'] . '"'; ?>

>

>

generateSelectField($form_zones, 'tipo[]', $DATA_SOURCE['tipo'], true, 'multiple style="height: 75px;"'); ?>
' . "\n"; $HTML->generateFooterPage(); ?>