Bonjour vous trouverez ci dessous une pièce jointe du programme que je devrais réaliser
voici le code qu'on a fait
et voici les erreurs qu il nous a donné
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108 <?php echo'<form name="form1" method="post">'; echo'nbr users :<select name="s1">'; echo'<option name="s11" selected="selected"> 0 </option>'; echo'<option name="s12"> < 1% </option>'; echo'<option name="s13"> 1- 10 % </option>'; echo'<option name="s14"> 10% + </option>'; echo'</select><br />'; echo'outage :<select name="s2">'; echo'<option name="s21"> no outage </option>'; echo'<option name="s22"> < 1 hour </option>'; echo'<option name="s23"> 1-4 hour </option>'; echo'<option name="s24"> > 4 hour </option>'; echo'</select> <br />'; echo'impact :<select name="s3">'; echo'<option name="s31"> none/ workaround </option>'; echo'<option name="s32"> reduced perfomance/response times </option>'; echo'<option name="s33"> intermittent </option>'; echo'<option name="s34"> system unavailable/unable to work </option>'; echo'</select> <br />'; echo'busniess sensitivity :<select name="s4">'; echo'<option name="s41"> minimal impact </option>'; echo'<option name="s42"> medium </option>'; echo'<option name="s43"> high impact </option>'; echo'<option name="s44"> >external customer impact/ brand damage </option>'; echo'<option name="s43"> legal or regulatory compliance issues </option>'; echo'</select> <br />'; echo'severité :<input type="text" name="tb1" />'; echo'<input type=button name="b2" value="afficher la séverité" />'; echo'</form>'; $s1=$_POST['s1']; $s2=$_POST['s2']; $s3=$_POST['s3']; $s4=$_POST['s4']; $x = 0; $y = 0; $z = 0; $a = 0; $s = 0; switch ($_POST['s1']){ case "0": $x=0;break; case " < 1% ": $x = 1; break; case "1- 10 %": $x=2; break; case "10% +": $x=3; break; } switch ($_POST['s2']){ case "no outage": $y=0;break; case " < 1 hour " : $y=1;break; case "1-4 hour": $y=2;break; case "> 4 hour": $y=3;break; } switch ($_POST['s3']){ case "none/workaround": $z=0;break; case " reduced perfomance/response times": $z=1;break; case " intermittent ": $z=2;break; case "system unavaible/unable to work": $z=3;break; } switch($_POST['s4']){ case"minimal impact": $a=0;break; case " medium ": $a=1;break; case "high impact": $a=2;break; case "external customer impact/ brand damage": $a=3;break; case " legal or regulatory compliance issues ": $a=8;break; } $s=$x+$y+$z+$a; echo '<script language=javascript> '; if ($s>=0 || $s=1){ echo 'document.form1.tb1.value = "trés basse*"'; } else{ if($s >=2 || $s=3) { echo'document.form1.tb1.value =" basse"'; } } if($s>=4 || $s=5){ echo'document.form1.tb1.value =" moyenne"'; } if($s>=6 || $s=7){ echo'document.form1.tb1.value =" majeure"'; } if($s>=8){ echo'document.form1.tb1.value =" critique"'; } echo'</script>'; ?>
Code X : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 Notice: Undefined index: s1 in c:\program files\easyphp1-8\www\mail\severité.php on line 34 Notice: Undefined index: s2 in c:\program files\easyphp1-8\www\mail\severité.php on line 36 Notice: Undefined index: s3 in c:\program files\easyphp1-8\www\mail\severité.php on line 37 Notice: Undefined index: s4 in c:\program files\easyphp1-8\www\mail\severité.php on line 38 Notice: Undefined index: s1 in c:\program files\easyphp1-8\www\mail\severité.php on line 45 Notice: Undefined index: s2 in c:\program files\easyphp1-8\www\mail\severité.php on line 55 Notice: Undefined index: s3 in c:\program files\easyphp1-8\www\mail\severité.php on line 66 Notice: Undefined index: s4 in c:\program files\easyphp1-8\www\mail\severité.php on line 76
Dans l'espoir que vous y jetiez un coup d'œil
Merci d avance
Partager