1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>">
<html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>">
<head>
<title>Historique</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script language="JavaScript">
function AfficheDocXML()
{
var Document;
Document = new ActiveXObject("Microsoft.XMLDOM");
Document.async = "false";
var coul = 'blue';
if(Document.load("data.xml"))
{
document.write("Historique de la machine");
document.write("<TABLE BORDER=0 CELLPADDING=0>");
for(i=0;i<Document.documentElement.childNodes.length;i++)
{
document.write ("<TR ALIGN=center>");
for(j=0;j<= 7;j++)
{
if (j < 5) {document.write ("<TD width='10%'>");}
else if (j == 6) {document.write ("<TD width='0%'>");}
else {document.write ("<TD width='30%'>");}
if ((j != 6)&&(j!= 7))
{document.write (Document.documentElement.childNodes(i).childNodes(j).text);}
if (j ==6)
{
coul = Document.documentElement.childNodes(i).childNodes(6).text;
}
if ((j ==7)&&(i !=0))
{
switch (coul)
{
case '1': document.write ("<DIV style='color : #0000FF'>");document.write (Document.documentElement.childNodes(i).childNodes(j).text);document.write ("</DIV>");break;
case '2': document.write ("<DIV style='color : #0055FF'>");document.write (Document.documentElement.childNodes(i).childNodes(j).text);document.write ("</DIV>");break;
case '3': document.write ("<DIV style='color : #00FF00'>");document.write (Document.documentElement.childNodes(i).childNodes(j).text);document.write ("</DIV>");break;
case '4': document.write ("<DIV style='color : #FF0000'>");document.write (Document.documentElement.childNodes(i).childNodes(j).text);document.write ("</DIV>");break;
case '5': document.write ("<DIV style='color : #FF00FF'>");document.write (Document.documentElement.childNodes(i).childNodes(j).text);document.write ("</DIV>");break;
case '6': document.write ("<DIV style='color : #111111'>");document.write (Document.documentElement.childNodes(i).childNodes(j).text);document.write ("</DIV>");break;
case '7': document.write ("<DIV style='color : #111111'>");document.write (Document.documentElement.childNodes(i).childNodes(j).text);document.write ("</DIV>");break;
case '8': document.write ("<DIV style='color : #0055FF'>");document.write (Document.documentElement.childNodes(i).childNodes(j).text);document.write ("</DIV>");break;
case '9': document.write ("<DIV style='color : #FFAA00'>");document.write (Document.documentElement.childNodes(i).childNodes(j).text);document.write ("</DIV>");break;
}
}
document.write ("</TD>");
}
document.write ("</TR>");
}
document.write ("</TABLE>");
}
else
{alert("fichier pas trouvé !");}
}
</script>
</head>
<body >
</body>
<script type='text/javascript'>
AfficheDocXML()
</script>
</html> |