0) {
foreach ($wcag1 as $k => $v) {
if (in_array($mis_puntos[$k], $_REQUEST['box'])) {
$TOTAL[] = $k;
}
}
}
if ($_REQUEST['earl'] || $_REQUEST['earldown']) {
$wcag = array(
11 => '#tech-text-equivalent',
12 => '#tech-redundant-server-links',
13 => '#tech-auditory-descriptions',
14 => '#tech-synchronize-equivalents',
15 => '#tech-redundant-client-links',
21 => '#tech-color-convey',
22 => '#tech-color-contrast',
31 => '#tech-use-markup',
32 => '#tech-identify-grammar',
33 => '#tech-style-sheets',
34 => '#tech-relative-units',
35 => '#tech-logical-headings',
36 => '#tech-list-structure',
37 => '#tech-quotes',
41 => '#tech-identify-changes',
42 => '#tech-expand-abbr',
43 => '#tech-identify-lang',
51 => '#tech-table-headers',
52 => '#tech-table-structure',
53 => '#tech-avoid-table-for-layout',
54 => '#tech-table-layout',
55 => '#tech-table-summaries',
56 => '#tech-abbreviate-labels',
61 => '#tech-order-style-sheets',
62 => '#tech-dynamic-source',
63 => '#tech-scripts',
64 => '#tech-keyboard-operable-scripts',
65 => '#tech-fallback-page',
71 => '#tech-avoid-flicker',
72 => '#tech-avoid-blinking',
73 => '#tech-avoid-movement',
74 => '#tech-no-periodic-refresh',
75 => '#tech-no-auto-forward',
81 => '#tech-directly-accessible',
91 => '#tech-client-side-maps',
92 => '#tech-keyboard-operable',
93 => '#tech-device-independent-events',
94 => '#tech-tab-order',
95 => '#tech-keyboard-shortcuts',
101 => '#tech-avoid-pop-ups',
102 => '#tech-unassociated-labels',
103 => '#tech-linear-tables',
104 => '#tech-place-holders',
105 => '#tech-divide-links',
111 => '#tech-latest-w3c-specs',
112 => '#tech-avoid-deprecated',
113 => '#tech-content-preferences',
114 => '#tech-alt-pages',
121 => '#tech-frame-titles',
122 => '#tech-frame-longdesc',
123 => '#tech-group-information',
124 => '#tech-associate-labels',
131 => '#tech-meaningful-links',
132 => '#tech-use-metadata',
133 => '#tech-site-description',
134 => '#tech-clear-nav-mechanism',
135 => '#tech-nav-bar',
136 => '#tech-group-links',
137 => '#tech-searches',
138 => '#tech-front-loading',
139 => '#tech-bundled-version',
1310 => '#tech-skip-over-ascii',
141 => '#tech-simple-and-straightforward',
142 => '#tech-icons',
143 => '#tech-consistent-style');
$autor = utf8_encode($autor);
$titulo = utf8_encode($titulo);
$Comentario = utf8_encode($Comentario);
$pagina = URL;
//$fecha = substr($fecha, 0, 10);
$fecha = date("Y-m-d", strtotime($fecha));
if (($email != '')) {
$femail = "\n".' ';
}
if (trim($autor) != '') {
$persona = "\n".' ';
$persona .= "\n".' '.$autor.'';
$persona .= $femail;
}
if (trim($titulo) != '' ) {
$tit_informe = "\n".' '.$titulo.'';
}
if (trim($Comentario) != '' ) {
$comen_informe = "\n".' '.$Comentario.'';
}
if ($_REQUEST['earldown']) {
header('Content-Disposition: attachment; filename="sidar.rdf"');
header("Content-type: unknown/unknown");
} else {
header("Content-Type: text/plain; charset=utf-8");
}
echo ''."\n";
echo <<
$tit_informe$comen_informe
$pagina
$fecha
$persona
Hera
http://www.sidar.org/hera/
\n
FIN;
$items[11] = array (1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111);
$items[13] = array (1301, 1302, 1303);
$items[14] = array (1401, 1402, 1403);
$items[32] = array (3201,3202);
$items[33] = array (3301, 3302, 3303);
$items[34] = array (3401, 3402);
$items[62] = array (6201, 6202);
$items[63] = array (6301, 6302, 6303, 6304);
$items[65] = array (6501, 6502);
$items[74] = array (7401, 7402);
$items[75] = array (7501, 7502);
$items[81] = array (8101, 8102, 8103, 8104);
$items[92] = array (9201, 9202);
$items[101] = array (10101, 10102);
$items[112] = array (11201, 11202);
function Asse($v, $mode) {
global $wcag1, $comentarios, $mis_puntos, $puntos, $wcag, $items;
echo ' '."\n";
echo ' '."\n";
if ($mode == 'auto') {
$texto = '';
if (is_array($items[$v])) {
foreach ($items[$v] as $item) {
$texto .= Info($item,$puntos[$item])."
\n ";
}
} else {
$texto .= Info($v,$puntos[$v]);
}
$texto = preg_replace("@
\n $@","",$texto);
echo ' '."\n";
echo ' '.utf8_encode($texto).'
'."\n";
echo ' '."\n";
$que = ($puntos[$v] == 'duda')? 'nose' : $puntos[$v];
$earl_mode = ' '."\n";
if ($v == 32) {
if (($puntos[3201]=='bien') || ($puntos[3201]=='mal')) {
$collec1 = 1;
$earl_by = ' '."\n";
$earl_by .= ' '."\n";
$earl_by .= ' W3C Markup Validator'."\n";
$earl_by .= ' http://validator.w3.org'."\n";
$earl_by .= ' '."\n";
}
if (($puntos[3202]=='bien') || ($puntos[3202]=='mal')) {
$collec2 = 1;
if ($collec1 != 1) {
$earl_by = ' '."\n";
$earl_by .= ' '."\n";
}
$earl_by .= ' '."\n";
$earl_by .= ' W3C CSS Validator'."\n";
$earl_by .= ' http://jigsaw.w3.org/CSSValidator'."\n";
$earl_by .= ' '."\n";
}
if (($collec1 == 1) && ($collec2 != 1)) {
$earl_by .= ' '."\n";
}
if (($collec1 != 1) && ($collec2 != 1)) {
$earl_by = ' '."\n";
} else {
$earl_by .= ' '."\n";
}
} else {
$earl_by = ' '."\n";
}
} else {
echo ' '.utf8_encode($comentarios[$v]).''."\n";
$que = $mis_puntos[$v];
$earl_mode = ' '."\n";
$earl_by = ' '."\n";
}
switch ($que) {
case 'bien':
echo ' '."\n";
break;
case 'mal':
echo ' '."\n";
break;
case 'parcial':
echo ' '."\n";
break;
case 'nose':
echo ' '."\n";
break;
case 'na':
echo ' '."\n";
break;
case 'duda':
echo ' '."\n";
break;
} // End switch
echo $earl_mode;
echo ' '."\n";
echo $earl_by;
echo ' '."\n\n";
} // End function Assert()
foreach ($TOTAL as $k => $v) {
if ($puntos[$v] == $mis_puntos[$v]) {
if ($comentarios[$v] == '') {
Asse($v, 'auto');
} else {
Asse($v, 'manual');
Asse($v, 'auto');
}
} else {
Asse($v, 'manual');
Asse($v, 'auto');
}
}
echo '';
} else if ($_REQUEST['html'] || $_REQUEST['htmldown']) {
function ICONORES($res) {
global $lang;
$res_texto = array (
'bien' => ucfirst($lang['result_pass']),
'mal' => ucfirst($lang['result_fail']),
'duda' => ucfirst($lang['result_notTested']),
'na' => ucfirst($lang['result_notApplicable']),
'parcial' => ucfirst($lang['result_parcial']),
'nose' => ucfirst($lang['result_cannotTell']) );
return ' '.$res_texto[$res].'.';
} // Fin ICONORES
if ($_REQUEST['htmldown']) {
header('Content-Disposition: attachment; filename="sidar.html"');
}
header("Content-type: text/html; charset=iso-8859-1");
$opt_head['bread'] = 'pagina_informe';
$opt_head['form'] = 'pagina_informe';
$opt_head['bar'] = 'pagina_informe';
include('inc/header.php');
?>
'.$titulo.'';
}
?>
-
'.sprintf($lang['informe_html_autor'], $nombre);
if ($email != '') {
echo ' <'.$email.'>';
}
echo "";
}
if ($Comentario != '') {
echo "- ".$lang['informe_html_com']."\n
\n";
echo '- '.stripslashes(nl2br($Comentario))."
\n
\n ";
}
?>
0) {
?>
$v) {
echo '- '.sprintf($lang['informe_html_pto'], $wcag1[$v]).'
'.$wcag[$v].'
'."\n";
echo ICONORES($mis_puntos[$v]);
if ($comentarios[$v] != '') {
echo '
'.stripslashes(nl2br($comentarios[$v])).'';
}
echo "\n\n";
}
?>
Image('img/logohera.jpg',20,22,16,0,'', 'http://www.sidar.org/hera/');
$this->SetFont('Arial','B',14);
$this->SetDrawColor(0,0,0);
$this->SetLineWidth(0.5);
$this->Cell(0,5,$lang['informe_html_tit'],'B',0,'R');
$this->Ln(20);
}
function Footer() {
global $lang;
$this->SetDrawColor(0,0,0);
$this->Line(20,276,200,276);
$this->SetY(-15);
$this->Image('img/logosidar.jpg',20,277,16,0,'', 'http://www.sidar.org/');
$this->Cell(18);
$this->SetFont('Arial','B',10);
$this->Cell(0,5,'Fundación SIDAR');
$this->SetFont('Arial','I',8);
// $this->Cell(0,3,'Página '.$this->PageNo().'/{nb}',0,0,'R');
$tmp = sprintf($lang['informe_html_pag'], $this->PageNo());
$this->Cell(0,3,$tmp.'/{nb}',0,0,'R');
}
function ICONORES($res) {
global $lang;
switch ($res) {
case 'bien':
$res = ucfirst($lang['result_pass']);
$this->SetFillColor(238,255,238);
break;
case 'mal':
$res = ucfirst($lang['result_fail']);
$this->SetFillColor(255,238,246);
break;
case 'duda':
$res = ucfirst($lang['result_notTested']);
$this->SetFillColor(238,249,255);
break;
case 'na':
$res = ucfirst($lang['result_notApplicable']);
$this->SetFillColor(246,246,246);
break;
case 'parcial':
$res = ucfirst($lang['result_parcial']);
$this->SetFillColor(255,238,221);
break;
case 'nose':
$res = ucfirst($lang['result_cannotTell']);
$this->SetFillColor(255,255,255);
break;
}
$this->Cell(0,5,$res,0,1,'',1);
}
} // Fin class
//Creación del objeto de la clase heredada
$pdf=new PDF();
$pdf->SetAuthor('Carlos Benavidez');
$pdf->SetCreator('Hera');
$pdf->SetTitle('HERA - '.$lang['informe_html_tit']);
$pdf->SetSubject($lang['informe_html_txt']);
$pdf->SetAutoPageBreak(1,30);
$pdf->SetMargins(20,30,10);
$pdf->SetFont('Times','',10);
$pdf->AliasNbPages();
$pdf->AddPage();
$pag = sprintf($lang['informe_html_pag'], URL);
$pdf->Cell(0,5,$pag,0,1);
$dia = $lang['informe_html_fecha'].' '.gmdate($lang['formato_fecha'], strtotime($fecha));
$pdf->Cell(0,5,$dia,0,1);
if (trim($_REQUEST['nombre']) != '') {
$aut = sprintf($lang['informe_html_autor'], htmlspecialchars(trim($_REQUEST['nombre'])));
if (trim($_REQUEST['email']) != '') {
$aut .= ' <'.htmlspecialchars(trim($_REQUEST['email'])).'>';
}
$pdf->Cell(0,5,$aut,0,1);
}
if (trim($Comentario) != '') {
$coment = $lang['informe_html_com']." ".stripslashes(trim($Comentario));
$pdf->Cell(0,5,$coment,0,1);
}
$pdf->Ln();
$pdf->SetFont('Arial','B',12);
$pdf->Cell(0,10,$lang['informe_html_h2'],0,1,'C');
$pdf->SetLineWidth();
$pdf->SetDrawColor(153,204,255);
foreach ($TOTAL as $k => $v) {
$pdf->SetFont('Arial','B',10);
$txt = sprintf($lang['informe_html_pto'], $wcag1[$v]).'.';
$pdf->Cell(0,5,$txt,'T',1);
$txt = '';
$txt = preg_replace("/<[^>]*>/", "", $wcag[$v]);
$pdf->SetFont('Times','',10);
$pdf->MultiCell(0,5,$txt);
$txt = '';
$pdf->Ln(2);
$pdf->SetFont('Arial','',10);
$pdf->SetLeftMargin(30);
$pdf->ICONORES($mis_puntos[$v]);
if ($comentarios[$v] != '') {
$pdf->MultiCell(0,5,$comentarios[$v],0,'L',1);
}
$pdf->SetLeftMargin(20);
$pdf->Ln(10);
} // Fin foreach
$pdf->Output('hera.pdf', 'D');
} else if ($_REQUEST['spraw']) {
header("Location: spraw.php?id=".ID."&lang=".IDIOMA);
}
?>