error == '') { if (!$File->fetch($File->uri_real, 'base', 'arry')) { // The target page could not be read $opt_head['error'] = $lang['file_error']; } else { $url_redir = ''; $meta_redir = ''; } } else { $opt_head['error'] = $File->error; } if ($opt_head['error'] != '') { include_once('inc/header.php'); include_once('inc/pages.php'); } else { // No error if ($_SESSION['uri_anterior']) { if (!defined(HID) && isset($_SESSION['ultimo_id'])) { define ('HID', (int)$_SESSION['ultimo_id']); } } $_SESSION['uri_anterior'] = URL; require_once ("inc/parse.php"); $New_Parse = new Parse; $New_Parse->This_Page($url_redir, $meta_redir); if (defined('ID')) { // Parse page was successful // NUEVO: output rdf if (isset($_REQUEST['output']) && ($_REQUEST['output'] == 'rdf')) { DB_Query('select', 'informe'); include_once('output_rdf.php'); exit; } // FIN NUEVO $param = '?id='.(int)ID; $opt_head['bread'] = 'resumen'; $opt_head['form'] = URL; $opt_head['bar'] = 'info'; include_once('inc/header.php'); DB_Query('select', 'todo'); $New_Resumen = new Resumen; $New_Resumen->Results(); // Debug //echo '
'.print_r($File->headers, true).'
'."\n"; echo '
'; if (is_array($contents)) { print_r($contents); } else { echo htmlspecialchars($contents); } echo '
'; // End debug } else { // Parse page fails $opt_head['error'] = $lang['page_error']; include_once('inc/header.php'); include_once('inc/pages.php'); } } } else if ($_REQUEST['id']) { // An ID is sent require_once('lang/'.IDIOMA.'/info.php'); define('ID', (int)$_REQUEST['id']); $param = '?id='.ID; // Declare sent parameters as constants if ($_REQUEST['pr']) { define('PR', $_REQUEST['pr']); } // Priority if ($_REQUEST['pt']) { define('PT', $_REQUEST['pt']); } // Checkpoint if ($_REQUEST['re']) { define('RE', $_REQUEST['re']); } // Results if ($_REQUEST['hx']) { define('HX', $_REQUEST['hx']); } // Chkpoint help if ($_REQUEST['hl']) { define('HL', $_REQUEST['hl']); } // Manual if ($_REQUEST['in']) { define('IN', $_REQUEST['in']); } // Report if ($_REQUEST['an']) { // Register results define('AN', $_REQUEST['an']); $param .= '&an=1'; } DB_Query('select', 'todo'); if ($OK == 1) { if ($_POST['resulta']) { // Form to register result sent DB_Query('update'); } $New_Resumen = new Resumen; $opt_head['form'] = URL; if ($_REQUEST['pt']) { // Check a guideline $opt_head['bread'] = 'pauta'; $opt_head['bar'] = 'icons'; include_once('inc/header.php'); $New_Resumen->Navega('pauta'); require_once('inc/content.php'); } else if ($_REQUEST['pr']) { // Check a priority if (PR == 1) { define ('_A', 'A'); } else if (PR == 2) { define ('_A', 'AA'); } else if (PR == 3) { define ('_A', 'AAA'); } $opt_head['bread'] = 'priori'; $opt_head['bar'] = 'icons'; include_once('inc/header.php'); $New_Resumen->Navega('prioridad'); require_once('inc/content.php'); } else if ($_REQUEST['in']) { // Generate report $opt_head['bread'] = 'informe'; $opt_head['bar'] = 'resumen'; include_once('inc/header.php'); $New_Resumen->Form_Info(); } else { // ID without parameters $opt_head['bread'] = 'resumen'; $opt_head['bar'] = 'info'; include_once('inc/header.php'); $New_Resumen->Results(); } } else { $opt_head['error'] = 'No existe una revisión con ese ID.'; include_once('inc/header.php'); include_once('inc/pages.php'); } } else { // Start page $borrar = @mysql_query("DELETE FROM ".DBTABLE." WHERE revision IS NOT NULL AND to_days(now())-to_days(revision) > 7"); $borrar2 = @mysql_query("DELETE FROM ".DBTABLE." WHERE revision IS NULL AND to_days(now())-to_days(fecha) > 0"); if (mysql_affected_rows() != 0) { $optimizar = @mysql_query("OPTIMIZE TABLE ".DBTABLE); } include_once('inc/header.php'); include_once('inc/pages.php'); } include_once('inc/footer.php'); ?>