Je n'ai donné que le code en rapport avec ce sur quoi nous discutons, ce qui expliquerait le } tout seul, qui serait une faute de copier coller. Le code complet du générateur fait 435 lignes et n'a pas ce } tout seul:y'a que 41 lignes dans ton code ...
et y'a surtout un
} tout seul à la fin ...
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440 <?php function form_meta($wow) { echo' <form id="form1" method="post" action="'.$wow.'"> <table width="950" align="center" border="0" cellspacing="0" cellpadding="0" class="table" style="background-color:#929B98;"> <tr> <td valign="top" align="right" >Nom & Prénom du personnage: </td> <td valign="top" align="left" ><input name="nomperso" type="text" id="nomperso" size="25" maxlength="255" /></td> </tr> <tr> <td valign="top" align="right" >Sexe: </td> <td valign="top" align="left"> <input type="radio" name="sexe" value="Masculin" id="sexemale" /><label for="sexemale">♂</label> <input type="radio" name="sexe" value="Féminin" id="sexefemelle" /> <label for="sexefemelle">♀</label> <input type="radio" name="sexe" value="Indéfini ou asexué" id="sexeindefini" /> <label for="sexeindefinie"> Indéfini</label> </p> </td> </tr> <tr> <td valign="top" align="right" >Âge du personnage: </td> <td valign="top" align="left"><input name="age" type="text" id="age" size="4" maxlength="4"> ans</td> </tr> <tr> <td valign="top" align="right" >Avatar du personnage (adresse image): </td> <td valign="top" align="left"><input name="avatar" type="text" id="avatar" size="35" maxlength="255"></td> </tr> <tr> <td valign="top" align="right" >Race </td> <td valign="top" align="left"><input name="race" type="text" id="race" size="15" maxlength="255"></td> </tr> <tr> <td valign="top" align="right" >Carrière : <br /></td> <td valign="top" align="left"><input name="carriere" type="text" id="carriere" /></td> </tr> <tr> <td valign="top" align="right" >Lieu de départ: <br /></td> <td valign="top" align="left"><input name="depart" type="text" id="depart"></td> </tr> <tr> <td valign="top" align="right" >Fréquence de jeu: <br /></td> <td valign="top" align="left"><input name="frequence" type="text" id="frequence"></td> </tr> <tr> <td valign="top" align="right" >Description physique du personnage (minimum 15 lignes complètes)<br /></td> <td valign="top" align="left"><textarea name="physique" cols="50" rows="2" id="physique"></textarea></td> </tr> <tr> <td valign="top" align="right" >Description psychologique du personnage (minimum 15 lignes complètes)<br /></td> <td valign="top" align="left"><textarea name="psycho" cols="50" rows="2" id="psycho"></textarea></td> </tr> <tr> <td valign="top" align="right" >Alignement du personnage: </td> <td valign="top" align="left"><input name="align" type="text" id="align" size="25" maxlength="255" /></td> </tr> <tr> <td valign="top" align="right" >Histoire du personnage (avant qu\'il ne commence l\'aventure ici) (minimum 20 lignes complètes)<br /></td> <td valign="top" align="left"><textarea name="histoire" cols="50" rows="2" id="histoire"></textarea></td> </tr> <tr> <td valign="top" align="right" >Vos compétence de départ (et leurs descriptions !) (<a href="http://warforum-jdr.com/wiki-v2/doku.php?id=1.5_competences" target=_blank>règles</a>):<br /></td> <td valign="top" align="left"><textarea name="comp" cols="50" rows="2" id="comp"></textarea></td> </tr> <tr> <td valign="top" align="right" >Votre bourse de pistole de départ: <strong><a title="Souvent 50 pistoles, néanmoins certaines carrières peuvent proposer un petit bonus pécunier au départ. Les Marchands ont quant à eux 4000 pistoles de départ pour couvrir leurs frais d\'ouvertures de magasins et d\'achat d\'objets.">(?)</a></strong><br /></td> <td valign="top" align="left"><input name="bourse" type="text" id="bourse" size="4" maxlength="3"> Pistoles</td> </tr> <tr> <td valign="top" align="right" >Vos dotations initiales <strong><a title="Un personnage non marchand a droit à 2 objets raciaux (armes/armures) qui devront être en lien avec son background, et correspondre à sa vocation ! De plus, ils ne devront pas être exagéré (donc pas de hache à 2000 pistoles en commençant). Ces objets seront vérifiés par le MJ en charge du PJ. Il aura également droit à 5 objets usuels libre au choix. || Un personnage marchand, lui, ne reçoit pas d\'objets de départ, mais une bourse assez conséquente en contrepartie.">(?)</a></strong>:<br /></td> <td valign="top" align="left"> <table border="1" style="border-collapse:collapse"> <tr> <td align="center"><input name="arma1nom" type="text" id="arma1nom" size="20" maxlength="255" value="Nom arme/armure" onclick="this.value=\'\';" /></td> <td align="center"><input name="arma1stat" type="text" id="arma1stat" size="20" maxlength="255" value="Caractéristiques" onclick="this.value=\'\';" /></td> <td align="center"><input name="arma1autre" type="text" id="arma1autre" size="20" maxlength="255" value="Notes" onclick="this.value=\'\';" /></td> </tr> <tr> <td align="center"><input name="arma2nom" type="text" id="arma2nom" size="20" maxlength="255" value="Nom arme/armure" onclick="this.value=\'\';" /></td> <td align="center"><input name="arma2stat" type="text" id="arma2stat" size="20" maxlength="255" value="Caractéristiques" onclick="this.value=\'\';" /></td> <td align="center"><input name="arma2autre" type="text" id="arma2autre" size="20" maxlength="255" value="Notes" onclick="this.value=\'\';" /></td> </tr> <tr> <td align="center"><input name="usu1" type="text" id="usu1" size="20" maxlength="255" value="Objet usuel" onclick="this.value=\'\';" /></td> <td align="center"><input name="usu2" type="text" id="usu2" size="20" maxlength="255" value="Objet usuel" onclick="this.value=\'\';" /></td> </tr> <tr> <td align="center"><input name="usu3" type="text" id="usu3" size="20" maxlength="255" value="Objet usuel" onclick="this.value=\'\';" /></td> <td align="center"><input name="usu4" type="text" id="usu4" size="20" maxlength="255" value="Objet usuel" onclick="this.value=\'\';" /></td> </tr> <tr> <td colspan="2" align="center"><input name="usu5" type="text" id="usu5" size="20" maxlength="255" value="Objet usuel" onclick="this.value=\'\';" /></td> </td> </tr> </table> <br></td> </tr> <tr> <td valign="top" align="right"></td> <td valign="top" align="left"> <fieldset id=\'Croyances\'> <legend>Croyance religieuse <BR />PAS ENCORE FONCTIONNEL, INSCRIVEZ LES INFOS DANS LE CADRE AUTRES TOUT EN BAS (<a href="http://warforum-jdr.com/wiki-v2/doku.php?id=3.7_regles_concernant_les_croyances" target=_blank>Points de croyances</a>):</legend> <input type=\'button\' value=\'Ajouter un Dieu\' onclick=\'Construct()\' /><br /> </fieldset> <br> </tr> <tr> <td valign="top" align="right" >Autres (<a href="http://warforum-jdr.com/wiki-v2/doku.php?id=3.7_regles_concernant_les_croyances" target=_blank>Points de croyances</a>, sorts (si classe sorcier), traits particuliers, notes, etc):<br /></td> <td valign="top" align="left"><textarea name="autre" cols="50" rows="2" id="autre"></textarea><br \></td> </tr> </table> <!-- debut demarche profil --> <table width="950" align="center" border="0" cellspacing="0" cellpadding="0" class="table" align="justify" style="background-color:#929B98;"> <tr > <th scope="col"></th> <th scope="col">FOR</th> <th scope="col">END</th> <th scope="col">HAB</th> <th scope="col">CHAR</th> <th scope="col">INT</th> <th scope="col">INI</th> <th scope="col">PAR</th> <th scope="col">ATT</th> </tr> <tr> <th scope="row">Profil de base</th> <td align="left"><input name="for1" onchange="javascript:computeResult(\'for\');" value="0" size="2" maxlength="2" /></td> <td align="left"><input name="end1" onchange="javascript:computeResult(\'end\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="hab1" onchange="javascript:computeResult(\'hab\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="char1" onchange="javascript:computeResult(\'char\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="int1" onchange="javascript:computeResult(\'int\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="ini1" onchange="javascript:computeResult(\'ini\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="par1" onchange="javascript:computeResult(\'par\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="att1" onchange="javascript:computeResult(\'att\');" value="0" size="2" maxlength="2" /> </td> </tr> <tr> <th scope="row">Vos 5 PC</th> <td align="left"><input name="for2" onchange="javascript:ma_verification(this); computeResult(\'for\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="end2" onchange="javascript:ma_verification(this); computeResult(\'end\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="hab2" onchange="javascript:ma_verification(this); computeResult(\'hab\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="char2" onchange="javascript:ma_verification(this); computeResult(\'char\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="int2" onchange="javascript:ma_verification(this); computeResult(\'int\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="ini2" onchange="javascript:ma_verification(this); computeResult(\'ini\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="par2" onchange="javascript:ma_verification(this); computeResult(\'par\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="att2" onchange="javascript:ma_verification(this); computeResult(\'att\');" value="0" size="2" maxlength="2" /> </td </tr> <tr> <th scope="row">Bonus/malus de classe (malus = nombre précédé d\'un - !)</th> <td align="left"><input name="for3" onchange="javascript:ma_verification2(this); computeResult(\'for\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="end3" onchange="javascript:ma_verification2(this); computeResult(\'end\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="hab3" onchange="javascript:ma_verification2(this); computeResult(\'hab\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="char3" onchange="javascript:ma_verification2(this); computeResult(\'char\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="int3" onchange="javascript:ma_verification2(this); computeResult(\'int\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="ini3" onchange="javascript:ma_verification2(this); computeResult(\'ini\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="par3" onchange="javascript:ma_verification2(this); computeResult(\'par\');" value="0" size="2" maxlength="2" /> </td> <td align="left"><input name="att3" onchange="javascript:ma_verification2(this); computeResult(\'att\');" value="0" size="2" maxlength="2" /> </td </tr> <tr> <th scope="row">Profil final</th> <td align="left"><input id="resultfor" name="resultfor" size="2" maxlength="2" readonly="readonly" /></td> <td align="left"><input id="resultend" name="resultend" size="2" maxlength="2" readonly="readonly" /></td> <td align="left"><input id="resulthab" name="resulthab" size="2" maxlength="2" readonly="readonly" /></td> <td align="left"><input id="resultchar" name="resultchar" size="2" maxlength="2" readonly="readonly" /> </td> <td align="left"><input id="resultint" name="resultint" size="2" maxlength="2" readonly="readonly" /></td> <td align="left"><input id="resultini" name="resultini" size="2" maxlength="2" readonly="readonly" /></td> <td align="left"><input id="resultpar" name="resultpar" size="2" maxlength="2" readonly="readonly" /></td> <td align="left"><input id="resultatt" name="resultatt" size="2" maxlength="2" readonly="readonly" /></td> </tr> </table><br \> <center><input type="submit" value="Générer la présentation" /></center> </form>'; } function generation() { // les différentes variables sont exprimées ici $nomperso = $_POST['nomperso']; $avatar = $_POST['avatar']; $age = $_POST['age']; $sexe = $_POST['sexe']; $race = $_POST['race']; $carriere = $_POST['carriere']; $depart = $_POST['depart']; $frequence = $_POST['frequence']; $physique = $_POST['physique']; $psycho = $_POST['psycho']; $align = $_POST['align']; $histoire = $_POST['histoire']; $comp = $_POST['comp']; $bourse = $_POST['bourse']; $arma1nom = $_POST['arma1nom']; $arma1stat = $_POST['arma1stat']; $arma1autre = $_POST['arma1autre']; $arma2nom = $_POST['arma2nom']; $arma2stat = $_POST['arma2stat']; $arma2autre = $_POST['arma2autre']; $usu1 = $_POST['usu1']; $usu2 = $_POST['usu2']; $usu3 = $_POST['usu3']; $usu4 = $_POST['usu4']; $usu5 = $_POST['usu5']; $i=-1; while($_POST['pdcname1'][++$i] { $pdcname1[] = $_POST['pdcname1'][$i]; } $i=-1; while($_POST['pdcname2'][++$i] { $pdcname2[] = $_POST['pdcname2'][$i]; } var_dump($pdcname1); var_dump($pdcname2); $autre = $_POST['autre']; $resultfor = $_POST['resultfor']; $resultend = $_POST['resultend']; $resulthab = $_POST['resulthab']; $resultchar = $_POST['resultchar']; $resultint = $_POST['resultint']; $resultini = $_POST['resultini']; $resultpar = $_POST['resultpar']; $resultatt = $_POST['resultatt']; $enc1 = $resultend / 2; $enc2 = $enc1 + 1; $enc2 = floor($enc2); $pv = $resultend * 5; echo 'Fenêtre n°1 avec le code à copier sur le forum: <form method="post" action=""><textarea name="code" onFocus="select()" rows="10" cols="70" readonly="readonly"> Nom et Prénom: '.stripslashes($nomperso).' Sexe: '.stripslashes($sexe).' Age: '.stripslashes($age).' ans Race: '.stripslashes($race).' Carrière: '.stripslashes($carriere).' Lieu/ville de départ: '.stripslashes($depart).' Fréquence de jeu: '.stripslashes($frequence).' Profil: FOR '.stripslashes($resultfor).' / END '.stripslashes($resultend).' / HAB '.stripslashes($resulthab).' / CHAR '.stripslashes($resultchar).' / INT '.stripslashes($resultint).' / INI '.stripslashes($resultini).' / PAR '.stripslashes($resultpar).' / ATT '.stripslashes($resultatt).' / PV '.stripslashes($pv).'
Description physique :'.stripslashes($physique).'Description psychologique :'.stripslashes($psycho).' Alignement : '.stripslashes($align).'Historique :'.stripslashes($histoire).'
Compétences : '.stripslashes($comp).' Bourse: '.stripslashes($bourse).' Pistoles || Autres : Inventaire: '.stripslashes($arma1nom).' '.stripslashes($arma2nom).' '.stripslashes($usu1).' '.stripslashes($usu2).' '.stripslashes($usu3).' '.stripslashes($usu4).' '.stripslashes($usu5).'
Autres: '.stripslashes($autre).'
Code pour fiche</textarea></form> '; echo 'Fenêtre n°2 avec le code à copier pour votre signature: <form method=\"post\" action=\"\"><textarea name="codesign" rows="5" cols="70" onFocus="select()" readonly="readonly"> '.stripslashes($nomperso).', '.stripslashes($carriere).' Profil: For '.stripslashes($resultfor).' | End '.stripslashes($resultend).' | Hab '.stripslashes($resulthab).' | Cha '.stripslashes($resultchar).' | Int '.stripslashes($resultint).' | Ini '.stripslashes($resultini).' | Att '.stripslashes($resultatt).' | Par '.stripslashes($resultpar).' | PV '.stripslashes($pv).' Lien Fiche personnage: à demander au MJ </textarea></form> NB: ce code correspond au minimum de ce qu\'on vous demande en signature. Libre à vous d\'ajouter d\'autres informations. '; echo' <br/> <a href="http://warforum-jdr.com">Retour au forum</a>'; } ?>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 <html><p style="text-align: center; font-family: verdana,geneva; font-size: large; font-weight: bold; color: #6a94bd; text-decoration: underline;"></html>Informations générales sur le personnage :<html></p><center></html> |< 50em >| | **Nom et Prénom:** | '.stripslashes($nomperso).' | <html><img src="'.stripslashes($avatar).'" /></html> | | **Age:** | '.stripslashes($age).' ans | ::: | | **Sexe: ** | '.stripslashes($sexe).' | ::: | | **Race: ** | '.stripslashes($race).' | ::: | | **Carrière: ** | '.stripslashes($carriere).' | ::: | | **Lieu/ville de départ:** | '.stripslashes($depart).' | ::: | | **Fréquence de jeu:** | '.stripslashes($frequence).' | ::: | | **MJ:** | **à compléter** | ::: | <html><br></html> ^ FOR ^ END ^ HAB ^ CHAR ^ INT ^ INI ^ ATT ^ PAR ^ PV ^ | '.stripslashes($resultfor).' | '.stripslashes($resultend).' | '.stripslashes($resulthab).' | '.stripslashes($resultchar).' | '.stripslashes($resultint).' | '.stripslashes($resultini).' | '.stripslashes($resultpar).' | '.stripslashes($resultatt).' | '.stripslashes($pv).' | <html><br></html> | **XP disponible:** | 0 | | **PC dépensés:** | 5 | | **PC disponibles:** | 0 | <html><br></center></html> ---- ---- <html><br></html> <html><img align="right" src="http://warforum-jdr.com/images/imgfiches/barre2.jpg" /></html> <html><p style="text-align: center; font-family: verdana,geneva; font-size: large; font-weight: bold; color: #6a94bd; text-decoration: underline;"></html>Description physique :<html></p></html> '.stripslashes($physique).' <html><p style="text-align: center; font-family: verdana,geneva; font-size: large; font-weight: bold; color: #6a94bd; text-decoration: underline;"></html>Description psychologique :<html></p></html> '.stripslashes($psycho).' __Alignement :__ '.stripslashes($align).' <html><p style="text-align: center; font-family: verdana,geneva; font-size: large; font-weight: bold; color: #6a94bd; text-decoration: underline;"></html>Historique du personnage :<html></p></html> '.stripslashes($histoire).' <html><br></html> ---- ---- <html><br></html> <html><img align="left" src="http://warforum-jdr.com/images/imgfiches/barre4.jpg" /></html> <html><p style="text-align: center; font-family: verdana,geneva; font-size: large; font-weight: bold; color: #6a94bd; text-decoration: underline;"></html>Compétences :<html></p></html> '.stripslashes($comp).' <html><br></html> <html><br></html> <html><br></html> <html><br></html> <html><br></html> <html><br></html> ---- ---- <html><br></html> <html><center></html> <html><img src="http://warforum-jdr.com/images/imgfiches/barre3.jpg" /></html> <html><p style="font-family: verdana,geneva; font-size: large; font-weight: bold; color: #6a94bd; text-decoration: underline;"></html>Inventaires et biens du personnage:<html></p></html> | **Bourse:** | '.stripslashes($bourse).' Pistoles || Autres : | <html><br></html> |< 50em >| ^ Inventaire (Encombrement: '.stripslashes($enc2).' ) ^^^^^ | Icone | **'.stripslashes($arma1nom).'** | '.stripslashes($arma1stat).' | '.stripslashes($arma1autre).' | | Icone | **'.stripslashes($arma2nom).'** | '.stripslashes($arma2stat).' | '.stripslashes($arma2autre).' | | Icone | **'.stripslashes($usu1).'** ||| | Icone | **'.stripslashes($usu2).'** ||| | Icone | **'.stripslashes($usu3).'** ||| | Icone | **'.stripslashes($usu4).'** ||| | Icone | **'.stripslashes($usu5).'** ||| <html></center></html> <html><br></html> ===== Parcours ===== ===Quêtes accomplies=== Nom + lien + récompenses obtenues === Classes acquises === === Voie et Classe en cours d\'apprentissage=== **Voie :** <html><br></html> **Classe actuelle :** '.stripslashes($carriere).' === Dévotion religieuse === ^ Dieu ^ Points de dévotions disponibles ^ Points de dévotions dépensés ^ | **'.stripslashes($pdcname1[]).'** | '.stripslashes($pdcname2[]).' | 0 | ==== Autres ==== __**Au MJ: merci de mettre les éventuels points de croyance dans le cadre ci-dessus**__ '.stripslashes($autre).'Il faut bien que l'erreur php soit réglée pour voir si le script fonctionne correctement, si ce n'est pas le cas, le soucis javascript ne serait pas régléPour moi le souci javascript est réglé ...
La tu te bats avec php
Partager