tables[$_GET['section']] ) { $HTML->generateDefaultError(); return exit; } //------------------------------------------------------------------------------------- // TRATAMINETO DE LOS DATOS ENVIADOS POR POST if ( count($_POST) > 0 ) { strip_slashes($_POST); $action_result = $DOC->manageRecord($_POST, $_GET['section']); if ( ereg("^0+$", $action_result) ) { if ( $_GET['reload'] == 1 ) { $HTML->generateClosePage($CONF['sys_http_admin'] . $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 ( $DOC->checkRecord($_GET['id'], $_GET['section']) ) { $DATA_SOURCE = $DOC->getRecordValues($_GET['id'], $_GET['section']); $DATA_SOURCE['visualizar'] = split(',', $DATA_SOURCE['visualizar']); $record = $_GET['id']; } else unset($_GET['id']); } else $DATA_SOURCE['id_seccion'] = $_GET['sId']; 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'] ); $HTML->generateHeader(array($CONF['css_forms']), array($CONF['js_general'],$CONF['js_forms']), $js_vars, ' onLoad="init();' . $js_onload . '"'); $HTMLAREA->initEditor(); //$HTMLAREA->getEditorContents(,); if ( !empty($error_string) ) $HTML->generateErrorDiv($error_string); $HTML->generateFormButtons($buttons, $button_actions); echo '
' . "\n"; echo '
' . "\n"; if ( !empty($record) ) echo ' ' . "\n"; $categories = array(); $main_cats = array(); if ( $_GET['section'] == 'section' ) { $SECTION->generateCategoriesTree($SECTION->getCategoriesList(),$categories); $SECTION->getSectionsSubcats('0', $main_cats, false); } elseif ( $_GET['section'] == 'oa' ) $categories = $OA->getCategoriesList($_GET['sId']); $form_status = array( '0' => $LNG['form_status_0'], '1' => $LNG['form_status_1'] ); $form_zones = array( '1' => $LNG['site_zone_1'], '3' => $LNG['site_zone_3']); ?>

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

generateSelectField($form_zones, 'visualizar[]', $DATA_SOURCE['visualizar'], true, 'multiple'); ?>

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

editorArea( 'texto', $DATA_SOURCE['texto'] , 'texto', '625', '150', '30', '6' ) ; ?>
' . "\n"; $HTML->generateFooterPage(); ?>