Bonjour,
j'ai construis une architecture en mvc
dans ma vue un bouton (nouvelle action) est supposé m'emmener ailleurs sauf qu'il m'envoie vers une page blanche!
j'ai donc ouvert une console et il m'affiche cette erreur:
voici l'ensemble de mes fichiers:[10:49:42,514] GET http://doumer.airsystems.thales/PERSO/yq/controller/display_new.php?page=new [HTTP/1.0 500 Internal Server Error 0ms]
index.php
display.php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 <?php ini_set("display_errors", "on"); error_reporting(E_ALL); session_start(); $_SESSION['c'] = "Se connecter"; $_SESSION['i'] = "S'inscrire"; require_once ("controller/display.php"); principal(); ?>
display_new.php
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 <?php session_start(); require ('model/base.php'); require ('model/user.php'); require ('view/view.php'); ini_set("display_errors", "on"); error_reporting(E_ALL); function principal () { mfprincipal(); vfprincipal(); }; function verif_connect() { $login = $_POST['login']; $pass = $_POST['pass']; $_SESSION['c'] = connect($login,$pass); vfprincipal(); }; function new_a () { id_suivant (); fnew (); }; ?>
view.php
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 <?php require_once ("display.php"); $page = $_GET['page']; switch ($page) { case 'actu': principal(); break; case 'new': new_a (); break; }; ?>
aside.php
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180 <?php function vfprincipal () { echo (" <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <link rel='icon' href='view/images/favicon.ico' /> <title>Plan d'Organisation du Travail</title> <meta charset='utf-8'> <script type='text/javascript' src='view/js/principal.js'></script> <link type='text/css' rel='stylesheet' href='view/css/styles/principal.css' /> </head> <body> <header> <img src='view/images/logo_thales.gif' alt='logo THALES' title='THALES'> <h1><span class='ombre'>THALES</span> Air Systems</h1> <a href='controller/display_new.php?page=actu' title='Actualiser'>Actualiser</a> <h2>Plan d'Organisation du Travail</h2> <p id='date&heure'><br /> "); echo (date('l j F Y, H:i')); echo (" </p> </header> <body> <section> <article> <table> <tr> <th>ID</th> <th>Theme Bis (JPB)</th> <th>Contact(s)</th> <th>Results</th> <th>Problem or Positive point</th> <th>The Recommandations</th> <th>Actions (to implement<br />the candidates lessons learnt)</th> <th>Departement</th> <th>Will be<br />exploited ? (Y/N)</th> <th>Priority</th> <th>Responsible</th> <th>Number<br />workers</th> <th>State</th> <th>Submit<br />Date</th> <th>Solve<br />Date</th> <th>Started work<br />Date</th> <th>Verified<br />Date</th> <th>Last<br />Analysis<br />Date</th> <th>Reject<br />Date</th> <th>Target<br />Date</th> <th>Closure<br />Date</th> <th>Results of the<br />Action</th> <th>Comments</th> <th>DO</th> </tr>"); while ($line = mysql_fetch_array($_SESSION ['result'], MYSQL_ASSOC)) { echo "\t<tr>\n"; foreach ($line as $col_value) { echo "\t\t<td>$col_value</td>\n"; } echo "\t</tr>\n"; } echo "</table>\n </article> "; include ("view/templates/aside.php"); echo (" </section> </body> </html> "); }; function fnew () { echo (" <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <link rel='icon' href='view/images/favicon.ico' /> <title>Plan d'Organisation du Travail</title> <meta charset='utf-8'> <link type='text/css' rel='stylesheet' href='view/css/styles/new.css' /> </head> <body> <header> <img src='view/images/logo_thales.gif' alt='logo THALES' title='THALES'> <h1><span class='ombre'>THALES</span> Air Systems</h1> <a href='controller/display_new.php?page=actu' title='Retour'>Retour</a> <h2>Create, Update or Delete action</h2> <p id='date&heure'><br /> "); echo (date('l j F Y, H:i')); echo (" </p> </header> <body> <section> <article> <p id='idnom'>ID :</p> <p id='encadre'> "); echo $_SESSION['id']; echo(" </p> <fieldset> <legend>CREATE ACTION</legend> <form> <label for='dep' class='gr1'>Departement :</label> <select name='dep' /> <option value='sw'>SW</option> <option value='system'>System</option> <option value='am'>Ameliorations</option> <option value='other'>Other</option> </select> <label for='tb' class='gr1'>Theme Bis(JPB) :</label> <input name='tb' type='text' /> <br /> <label> for='prob' class='gr2'>Problem or Positive point :</label> <textarea name='prob' cols='20'rows='5' ></textarea> <label> for='res' class='gr2'>The Results :</label> <textarea name='res' cols='20'rows='5' ></textarea> <br /> <label> for='con' class='gr3'>Contact(s) :</label> <textarea name='con' cols='20'rows='5' ></textarea> <label> for='rec' class='gr3'>The Recommandationss :</label> <textarea name='rec' cols='20'rows='5' ></textarea> <br /> <label> for='ac' class='gr4'>Actions (to implement the candidates lessons learnt) :</label> <textarea name='ac' cols='20'rows='5' ></textarea> <label for='resp' class='gr4'>Responsible :</label> <input name='resp' type='text' /> <label for='nbw' class='gr4'>Number of workers :</label> <input name='nbw' type='number' /> <br /> <label for='s' class='gr5'>State :</label> <select name='s' /> <option value='submitted'>Submitted</option> <option value='solved'>Solved</option> <option value='verified'>Verified</option> <option value='analysed'>Analysed</option> <option value='reject'>Reject</option> <option value='started'>Started work</option> <option value='closed'>Closed</option> </select> <label for='e' class='gr5'>Will be exploited :</label> <input name='e' type='text' /> <label for='pr' class='gr5'>Priority :</label> <input name='pr' type='number' /> <br /> <label for='tb' class='gr1'>Theme Bis(JPB) :</label> <input name='tb' type='text' /> </form> </fieldset> </article> </section> </body> </html> "); };
et base.php
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 <aside> <button id="connect"> <?php echo $_SESSION['c']; ?> </button> <form id="fc" method="post" action="controller/display_new.php?page=connect"> <label for="login">Your login</label> <input name="login" type="text" /><br /> <label for="pass">Your password</label> <input name="pass" type="pass" /><br /> <input type='submit' value='Valider'> </form> <br /> <button id="ins"><?php echo $_SESSION['i']; ?></button> <form id="fi" method="post" action="controller/display_new.php?page=ins"> <label for="login">Your login</label> <input name="login" type="text" /><br /> <label for="pass">Your password</label> <input name="pass" type="pass" /><br /> <label for="name">Your name</label> <input name="name" type="text" /><br /> <input type='submit' value='Valider'> </form> <form action="controller/display_new.php" method="get"> <input type="submit" value="Nouvelle action" /> <input name='page' style='visibility:hidden;' value='new' > </form> <button><a href="controller/display.php?page=new">Nouvelle action</button> </aside><aside> <button id="connect"> <?php echo $_SESSION['c']; ?> </button> <form id="fc" method="post" action="controller/display_new.php?page=connect"> <label for="login">Your login</label> <input name="login" type="text" /><br /> <label for="pass">Your password</label> <input name="pass" type="pass" /><br /> <input type='submit' value='Valider'> </form> <br /> <button id="ins"><?php echo $_SESSION['i']; ?></button> <form id="fi" method="post" action="controller/display_new.php?page=ins"> <label for="login">Your login</label> <input name="login" type="text" /><br /> <label for="pass">Your password</label> <input name="pass" type="pass" /><br /> <label for="name">Your name</label> <input name="name" type="text" /><br /> <input type='submit' value='Valider'> </form> <form action="controller/display_new.php" method="get"> <input type="submit" value="Nouvelle action" /> <input name='page' style='visibility:hidden;' value='new' > </form> <button><a href="controller/display.php?page=new">Nouvelle action</button> </aside>
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 <?php function mfprincipal() { require("configsql.php"); $link = mysql_connect ($hote,$log,$pwd) or die("Erreur de connexion: ".mysql_error()); mysql_select_db($bd,$link); $req = "select ac.id, ac.themebis(jpb), con.name, ac.results, ac.problemorpositivepoint, am.therecommandations, am.actions, dep.name, dec.willbeexploited, dec.priority, pers.responsible, pers.numworkers, statut.libelle, d.submitdate, d.solvedate, d.starteddate, d.verifdate,d.lastanalysisdate, d.rejectdate, d.targetdate, d.closuredate, am.resultsoftheaction, com.comments from action ac, ameliorations am, contact con, comments com, dates d, decision dec, departement dep, personne pers,statut inner join d on ac.id = d.id# inner join am on ac.id = am.id# inner join dep on ac.id = dep.id# inner join dec on ac.id = dec.id# inner join con on ac.id = con.id# inner join com on ac.id = com.id# inner join pers on ac.id = pers.id# inner join statut on ac.id = statut.id# order by asc ac.id"; $_SESSION['result'] = mysql_query ($req, $link); }; function id_suivant () { require("configsql.php"); $link = mysql_connect ($hote,$log,$pwd) or die("Erreur de connexion: ".mysql_error()); mysql_select_db($bd,$link); $_SESSION['id'] = mysqli_insert_id($link) + 1; }; ?>
Partager