IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage PHP Discussion :

unexpected ';' dans un formulaire


Sujet :

Langage PHP

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Profil pro
    Étudiant
    Inscrit en
    Avril 2010
    Messages
    127
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Avril 2010
    Messages : 127
    Par défaut unexpected ';' dans un formulaire
    Bonsoir

    Je monte actuellement un formulaire de génération de fiche, en gros selon les informations entrées, l'utilisateur récupère un texte contenant ces informations (le texte étant formaté, etc).

    Avec l'aide d'un membre de ce forum, j'ai abouti à:

    http://warforum-jdr.com/genprez/presentation.php

    (le système d'ajout en question étant vers le bas de page)

    Cette version en ligne ne contient pas le code qui génère le problème pour lequel je suis ici. Le code qui suit, par contre, est le code complet contenant ce qui pose problème:

    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&eacute;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" >&Acirc;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&egrave;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&eacute;part: <br /></td>
                <td valign="top" align="left"><input name="depart" type="text" id="depart"></td>
              </tr>   
    		  <tr>
                <td valign="top" align="right" >Fr&eacute;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&egrave;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&egrave;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&egrave;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&eacute;tence de d&eacute;part (et leurs descriptions !) (<a href="http://warforum-jdr.com/wiki-v2/doku.php?id=1.5_competences" target=_blank>r&egrave;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&eacute;c&eacute;d&eacute; 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&eacute;n&eacute;rer la pr&eacute;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
    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).'
    </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>'; } ?>
    Lorsqu'on se rend sur la page, l'erreur suivante est affichée:

    Parse error: syntax error, unexpected ';' in presentation_generator.php on line 229
    La zone qui pose problème (contenant la ligne 229):

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    $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);
    Je ne vois malheureusement pas ce qui pose problème, apparemment il n'y a pas de ; en trop ou en moins, si ?

    Merci d'avance

  2. #2
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Par défaut
    les parentheses de tes while ne sont pas fermées.
    N'oubliez pas de consulter les FAQ PHP et les cours et tutoriels PHP

  3. #3
    Membre confirmé
    Profil pro
    Étudiant
    Inscrit en
    Avril 2010
    Messages
    127
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Avril 2010
    Messages : 127
    Par défaut
    Bonsoir

    En effet, c'est tout de suite plus logique ^^

    Nous arrivons ainsi au problème suivant: je veux récupérer les valeurs entrées dans ces champs. Si j'utilise:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    |  **'.stripslashes($pdcname1[$i]).'**    |  '.stripslashes($pdcname2[$i]).'  |  0  |
    Cela donne:



    Si j'utilise:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    |  **'.stripslashes($pdcname1).'**    |  '.stripslashes($pdcname2).'  |  0  |
    J'obtiens les mots "array" aux endroits où devraient s'afficher les valeurs

    Enfin, si j'utilise:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    |  **'.stripslashes($pdcname1[]).'**    |  '.stripslashes($pdcname2[]).'  |  0  |
    Fatal error: Cannot use [] for reading
    Je ne vois donc pas comment faire

    Merci d'avance

  4. #4
    jnore
    Invité(e)
    Par défaut
    Certainement parce que $_POST['pdcname1'][$i] et $_POST['pdcname2'][$i] doivent retourner des tableaux:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    $pdcname1[] = $_POST['pdcname1'][$i];
    ...
    $pdcname2[] = $_POST['pdcname2'][$i];

  5. #5
    Membre confirmé
    Profil pro
    Étudiant
    Inscrit en
    Avril 2010
    Messages
    127
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Avril 2010
    Messages : 127
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    $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);
    ce n'est pas le cas actuellement ? Ou faut-il rajouter des [$i] aux var_dump ?

  6. #6
    jnore
    Invité(e)
    Par défaut
    var_dump ne fait qu'afficher le contenu des variables. s'il s'agit de tableau, tu en auras tout le contenu à l'affichage, ce qui fait que tu as la notion de 'array' qui apparait.
    Il te faut plutot connaître les index de tes tableaux, par ex:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
     
    echo  $pdcname2[0] ;

  7. #7
    Membre confirmé
    Profil pro
    Étudiant
    Inscrit en
    Avril 2010
    Messages
    127
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Avril 2010
    Messages : 127
    Par défaut
    Bonjour

    Je reviens relancer le sujet car j'ai de nouveau des problèmes avec le générateur.

    Le code qui pose problème:

    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
    ^  Inventaire (Encombrement: '.stripslashes($enc2).' )                          ^^^^^';
    foreach(array_keys($arma1) as $val1) {
    	echo '
    |  Icone  |  **'.stripslashes($arma1[$val1]).'**    |  '.stripslashes($arma2[$val1]).'  |  '.stripslashes($arma3[$val1]).'  |';
    	}
    foreach(array_keys($usu1) as $val2) {
    	echo '
    |  Icone  |  **'.stripslashes($usu1[$val2]).'**  |||';
    	}
     
    	if(empty($sort1[1]))
    { echo '';
    }
    else{ echo'|< 50em >|
    ^  Inventaire (Encombrement: '.stripslashes($enc2).' )                          ^^';
    foreach(array_keys($sort1) as $val3) {
    	echo '
    |  **'.stripslashes($sort1[$val3]).'**    |  '.stripslashes($sort2[$val3]).'    |';
    	}
    }
     
     
    echo '
     
    <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         ^';
    foreach(array_keys($pdcname1) as $val4) {
    	echo '
    |  **'.stripslashes($pdcname1[$val4]).'**    |  '.stripslashes($pdcname2[$val4]).'  |  0  |';
    	}
    Si je génère le code, j'obtiens:

    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
    ^  Inventaire (Encombrement: 1 )                          ^^^^^<br />
    <b>Warning</b>:  array_keys() [<a href='function.array-keys'>function.array-keys</a>]: The first argument should be an array in <b>/home/warjdr/domains/warforum-jdr.com/public_html/genprez/presentation_generator.php</b> on line <b>394</b><br />
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/warjdr/domains/warforum-jdr.com/public_html/genprez/presentation_generator.php</b> on line <b>394</b><br />
    <br />
    <b>Warning</b>:  array_keys() [<a href='function.array-keys'>function.array-keys</a>]: The first argument should be an array in <b>/home/warjdr/domains/warforum-jdr.com/public_html/genprez/presentation_generator.php</b> on line <b>398</b><br />
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/warjdr/domains/warforum-jdr.com/public_html/genprez/presentation_generator.php</b> on line <b>398</b><br />
     
     
    <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 :** 
     
    === Dévotion religieuse ===
     
    ^  Dieu      ^  Points de dévotions disponibles           ^  Points de dévotions dépensés         ^<br />
    <b>Warning</b>:  array_keys() [<a href='function.array-keys'>function.array-keys</a>]: The first argument should be an array in <b>/home/warjdr/domains/warforum-jdr.com/public_html/genprez/presentation_generator.php</b> on line <b>437</b><br />
    <br />
    <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/warjdr/domains/warforum-jdr.com/public_html/genprez/presentation_generator.php</b> on line <b>437</b><br />
    Coté variables:

    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
    // Recup variables inventaires //
    	$i=-1;
    	while($_POST['arma1'][++$i])
    	{
        $arma1[] = $_POST['arma1'][$i];
    	}
    	$i=-1;
    	while($_POST['arma2'][++$i])
            {
        $arma2[] = $_POST['arma2'][$i];
    	}
    	$i=-1;
    	while($_POST['arma3'][++$i])
            {
        $arma3[] = $_POST['arma3'][$i];
    	}
    	$i=-1;
    	while($_POST['usu1'][++$i])
            {
        $usu1[] = $_POST['usu1'][$i];
    	}
    	// Fin recup variables inventaire //
    	// Recup variables PDC //
    	$i=-1;
    	while($_POST['pdcname1'][++$i])
    	{
        $pdcname1[] = $_POST['pdcname1'][$i];
    	}
    	$i=-1;
    	while($_POST['pdcname2'][++$i])
            {
        $pdcname2[] = $_POST['pdcname2'][$i];
    	}
    	// Fin recup variables PDC //
    	// Recup variables sorts //
    	$i=-1;
    	while($_POST['sort1'][++$i])
    	{
        $sort1[] = $_POST['sort1'][$i];
    	}
    	$i=-1;
    	while($_POST['sort2'][++$i])
            {
        $sort2[] = $_POST['sort2'][$i];
    	}
    	// Fin recup variables sorts //
    Il doit y avoir quelque chose de mal écrit qui fait buguer toute la suite, mais je ne vois pas quoi :s

    La page:
    http://warforum-jdr.com/genprez/presentation.php

    Le code:

    presentation.php (correspondant au header):
    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
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <title>Warhammer JDR: Jeu de r&ocirc;le par forum</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="stylegenprez.css" rel="stylesheet" type="text/css" />
    <!-- Ajout dynamique de champs-->
    <script src="http://warforum-jdr.com/genprez/champsdynoyau.js">
    </script>
    <script type="text/javascript">
    <!-- Ajout champs pdc-->
    function Constructpdc(){
        var monfieldset=document.getElementById('Croyances');
        var pdc1=$C({"obj":"input","type":"text","name":"pdcname1[]","size":"15","maxlenght":"255","value":"Nom Dieu","onclick":function(){this.value='';}} );
    	 $Close(pdc1,monfieldset);
    	 var pdc2=$C({"obj":"input","type":"text","name":"pdcname2[]","size":"3","maxlenght":"2"} );
        $Close(pdc2,monfieldset);
     var pdc3=$C({"obj":"br"} );
        $Close(pdc3,monfieldset);
    }
     
    <!-- Fin ajout champs pdc-->
    <!-- Ajout champs armes-->
     
    function Constructarma(){
        var monfieldset=document.getElementById('Armesarmures');
     
        var pdc1=$C({"obj":"input","type":"text","name":"arma1[]","size":"20","maxlenght":"255","value":"Nom arme/armure","onclick":function(){this.value='';}} );
    	$Close(pdc1,monfieldset);
     
    	var pdc2=$C({"obj":"input","type":"text","name":"arma2[]","size":"20","maxlenght":"255","value":"Caractéristiques","onclick":function(){this.value='';}} );
        $Close(pdc2,monfieldset); 
     
    	var pdc3=$C({"obj":"input","type":"text","name":"arma3[]","size":"20","maxlenght":"255","value":"Autres","onclick":function(){this.value='';}} );
        $Close(pdc3,monfieldset); 
     
    var pdc4=$C({"obj":"br"} );
        $Close(pdc4,monfieldset);
    }
     
    <!-- Fin ajout champs armes-->
    <!-- Ajout champs objets usuels-->
     
    function Constructusu(){
        var monfieldset=document.getElementById('objusu');
     
        var pdc1=$C({"obj":"input","type":"text","name":"usu1[]","size":"20","maxlenght":"255","value":"Objet usuel","onclick":function(){this.value='';}} );
    	$Close(pdc1,monfieldset);
     
    }
     
    <!-- Fin ajout champs objets usuels-->
    <!-- Ajout champs sorts-->
     
    function Constructsort(){
        var monfieldset=document.getElementById('sorts');
     
        var pdc1=$C({"obj":"input","type":"text","name":"sort1[]","size":"15","maxlenght":"255","value":"Nom du sort","onclick":function(){this.value='';}} );
    	$Close(pdc1,monfieldset);
    	var pdc2=$C({"obj":"input","type":"text","name":"sort2[]","size":"20","maxlenght":"255","value":"Effets du sort","onclick":function(){this.value='';}} );
    	$Close(pdc2,monfieldset);
     
    }
     
    <!-- Fin ajout champs sorts-->
    </script>
     
    <!-- Calcul des caract du profil-->
    <script type="text/javascript">
    function computeResult(colonne) 
    {
    	var elmt_form = document.getElementById('form1');
    	var resultat  = elmt_form.elements['result' + colonne];
     
    	var value1 = elmt_form.elements[colonne + '1'].value;
    	var value2 = elmt_form.elements[colonne + '2'].value;
    	var value3 = elmt_form.elements[colonne + '3'].value;
     
    	if (!isNaN(value1) && !isNaN(value2) && !isNaN(value3)) {
    		resultat.value = parseInt(value1, 10) + parseInt(value2, 10) + parseInt(value3, 10);
    	}
     
     
     
    	else {
    		alert('Une valeur a mal été enregistrée ou il manque une valeur');
    	}
    }
    </script>
    <!-- Anti-abus des PC-->
    <script type="text/javascript">
    function ma_verification(champ)
    {
        if(parseInt(champ.value,10) >= 0 && parseInt(champ.value,10) <= 3)
         {
             var elmt_form = document.getElementById('form1');
     
              var champ1 = elmt_form.elements['for2'].value;
              var champ2 = elmt_form.elements['end2'].value;
    		  var champ3 = elmt_form.elements['hab2'].value;
    		  var champ4 = elmt_form.elements['char2'].value;
    		  var champ5 = elmt_form.elements['int2'].value;
    		  var champ6 = elmt_form.elements['ini2'].value;
    		  var champ7 = elmt_form.elements['par2'].value;
    		  var champ8 = elmt_form.elements['att2'].value;
     
    		 champ1 = champ1 == "" ? 0 : champ1;
    		 champ2 = champ2 == "" ? 0 : champ2;
    		 champ3 = champ3 == "" ? 0 : champ3;
    		 champ4 = champ4 == "" ? 0 : champ4;
    		 champ5 = champ5 == "" ? 0 : champ5;
    		 champ6 = champ6 == "" ? 0 : champ6;
    		 champ7 = champ7 == "" ? 0 : champ7;
    		 champ8 = champ8 == "" ? 0 : champ8;
     
     
              var total = parseInt(champ1,10) + parseInt(champ2,10) + parseInt(champ3,10) + parseInt(champ4,10) + parseInt(champ5,10) + parseInt(champ6,10) + parseInt(champ7,10) + parseInt(champ8,10);
              if(total > 5)
              {
                   alert("Vous ne disposez que de 5 PC initiaux, vous ne pouvez pas en utiliser plus ;) ");
                   champ.value = 0;
                   champ.focus();
              }
              else
              {
     
     
              }
    		  }
         else
         {
               alert("Vous ne pouvez pas investir plus de 3 PC dans une même caractéristique au départ");
               champ.value = 0;
               champ.focus();        
         }
     
     
    }
     
    </script>
    <!-- Anti-abus des bonus malus de classe-->
    <script type="text/javascript">
    function ma_verification2(champ)
    {
         if(parseInt(champ.value,10) >= -2 && parseInt(champ.value,10) <= 2)
         {
         }
         else
         {
              alert("Le bonus/malus indiqué semble trop élevé");
              champ.value = 0;
              champ.focus();
         }
    }
     
    </script>
    <script language="Javascript">
    // ==================
    //	Activations - Désactivations du champs sorcier
    // ==================
    function GereControle(Controleur, Controle, Masquer) {
    var objControleur = document.getElementById(Controleur);
    var objControle = document.getElementById(Controle);
    	if (Masquer=='1')
    		objControle.style.visibility=(objControleur.checked==true)?'visible':'hidden';
    	else
    		objControle.disabled=(objControleur.checked==true)?false:true;
    	return true;
    }
    </script>
    </head>
    <body style="background-image:url(http://i40.tinypic.com/nwgdh1.jpg); background-attachment: fixed; background-repeat: no-repeat;">
    <?php
    require('../traceIP/trace_ip.php');
    ?>
    	    <table width="950" align="center" border="0" style="background-color:#929B98;">
    	      <tr>
    	        <td width="300"><div class="heading">
    	      <p>Warhammer JDR</p>
    	              <blockquote>
    	                <blockquote>
    	                  <p>G&eacute;n&eacute;rateur de personnage</p>
                        </blockquote>
                  </blockquote>
     
                </div>
    	          <p align="left"><em><br />
                Cette page vous permet, gr&acirc;ce &agrave; une interface claire et rapide, de cr&eacute;er votre personnage de A &agrave; Z, de mani&egrave;re assist&eacute;e et pas &agrave; pas. Suivez les &eacute;tapes une &agrave; une, et vous g&eacute;n&egrave;rerez le code complet correspondant &agrave; la fiche de votre personnage, mise en page, qui n'attendra qu'une validation de la part des MJ. </em><br />
                <strong>Veuillez remplir - enti&egrave;rement - ce formulaire pour g&eacute;n&eacute;rer votre fiche personnage simplement. Les (?) sont des infobulles d'aide qui vous seront utiles, lisez-les en pointant votre souris dessus.</strong></p></td>
      <td width="193" style="padding-left:15px" align="center">
    <?php
    include("../menu.php");
    ?>
    		<br>
     
    </td>
              </tr>
          </table>
          <?php
    	require("presentation_generator.php");
    	form_meta("presentationfinale.php");
    ?>   
    </body>
    </html>
    Le générateur complet:

    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
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    <?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&eacute;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" >&Acirc;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&egrave;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&eacute;part: <br /></td>
                <td valign="top" align="left"><input name="depart" type="text" id="depart"></td>
              </tr>   
    		  <tr>
                <td valign="top" align="right" >Fr&eacute;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&egrave;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&egrave;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&egrave;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&eacute;tence de d&eacute;part (et leurs descriptions !) (<a href="http://warforum-jdr.com/wiki-v2/doku.php?id=1.5_competences" target=_blank>r&egrave;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 (<a href="http://warhammer-jdr.kalikoba.com/shop.php" target=_blank>La liste des objets par magasin</a>)<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">
    	<fieldset id=\'Armesarmures\'>
                <legend>Armes et armures:</legend>
                <input type=\'button\' value=\'Ajouter un objet\' onclick="Constructarma()" /><br />
             </fieldset>
    		 
    	<fieldset id=\'objusu\'>
                <legend>Objets usuels:</legend>
                <input type=\'button\' value=\'Ajouter un objet\' onclick="Constructusu()" /><br />
             </fieldset>
    			<br></td>
              </tr>
    		 
    		  <tr>
                <td valign="top" align="right"></td>
                <td valign="top" align="left">
    <fieldset id=\'Croyances\'>
                <legend>Croyance religieuse (<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=\'Constructpdc()\' /><br />
             </fieldset>	<br>
              </tr>
    		  <tr>
                <td valign="top" align="right" ><input type="checkbox" id="chkb_10" onClick="GereControle(\'chkb_10\', \'texte_10\', \'1\');" CHECKED>&nbsp;<label for="chkb_10">Décochez si vous n\'êtes pas une carrière magique </label>:<br /></td>
                <td valign="top" align="left"><fieldset id=\'sorts\'>
                <legend>Grimoire de sorts (<a href="http://warforum-jdr.com/wiki-v2/doku.php?id=magie" target=_blank>Domaines de Magie et sorts disponibles</a>):</legend>
                <input type=\'button\' id="texte_10" value=\'Ajouter un sort\' onclick=\'Constructsort()\' /><br />
             </fieldset><br \></td>
              </tr>
    		  <tr>
                <td valign="top" align="right" >Autres (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&eacute;c&eacute;d&eacute; 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&eacute;n&eacute;rer la pr&eacute;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'];
    	// Recup variables inventaires //
    	$i=-1;
    	while($_POST['arma1'][++$i])
    	{
        $arma1[] = $_POST['arma1'][$i];
    	}
    	$i=-1;
    	while($_POST['arma2'][++$i])
            {
        $arma2[] = $_POST['arma2'][$i];
    	}
    	$i=-1;
    	while($_POST['arma3'][++$i])
            {
        $arma3[] = $_POST['arma3'][$i];
    	}
    	$i=-1;
    	while($_POST['usu1'][++$i])
            {
        $usu1[] = $_POST['usu1'][$i];
    	}
    	// Fin recup variables inventaire //
    	// Recup variables PDC //
    	$i=-1;
    	while($_POST['pdcname1'][++$i])
    	{
        $pdcname1[] = $_POST['pdcname1'][$i];
    	}
    	$i=-1;
    	while($_POST['pdcname2'][++$i])
            {
        $pdcname2[] = $_POST['pdcname2'][$i];
    	}
    	// Fin recup variables PDC //
    	// Recup variables sorts //
    	$i=-1;
    	while($_POST['sort1'][++$i])
    	{
        $sort1[] = $_POST['sort1'][$i];
    	}
    	$i=-1;
    	while($_POST['sort2'][++$i])
            {
        $sort2[] = $_POST['sort2'][$i];
    	}
    	// Fin recup variables sorts //
    	$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).'/'.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
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
     
     
    <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).'/'.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 : 20 Jetons de Nowel (pour event Nowel) |
    <html><br></html>
    |< 50em >|
    ^  Inventaire (Encombrement: '.stripslashes($enc2).' )                          ^^^^^';
    foreach(array_keys($arma1) as $val1) {
    	echo '
    |  Icone  |  **'.stripslashes($arma1[$val1]).'**    |  '.stripslashes($arma2[$val1]).'  |  '.stripslashes($arma3[$val1]).'  |';
    	}
    foreach(array_keys($usu1) as $val2) {
    	echo '
    |  Icone  |  **'.stripslashes($usu1[$val2]).'**  |||';
    	}
     
    	if(empty($sort1[1]))
    { echo '';
    }
    else{ echo'|< 50em >|
    ^  Inventaire (Encombrement: '.stripslashes($enc2).' )                          ^^';
    foreach(array_keys($sort1) as $val3) {
    	echo '
    |  **'.stripslashes($sort1[$val3]).'**    |  '.stripslashes($sort2[$val3]).'    |';
    	}
    }
     
     
    echo '
     
    <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         ^';
    foreach(array_keys($pdcname1) as $val4) {
    	echo '
    |  **'.stripslashes($pdcname1[$val4]).'**    |  '.stripslashes($pdcname2[$val4]).'  |  0  |';
    	}
     
     
     
    echo '
     
     
    ==== Autres ====
     
    __**Au MJ: merci de mettre les éventuels points de croyance dans le cadre ci-dessus**__
     
    '.stripslashes($autre).'
    </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>'; } ?>
    Je me demande si ce n'est pas à cause des $val1, $val2, etc

  8. #8
    Membre confirmé
    Profil pro
    Étudiant
    Inscrit en
    Avril 2010
    Messages
    127
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Avril 2010
    Messages : 127
    Par défaut
    Bonjour

    J'ai compris l'erreur via la remarque de quelqu'un: si on n'entre aucun champs, ca mettra l'erreur. J'utilise donc des:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    if(empty($variable[1]))
    { echo '';
    }
    else {
    echo''
    }
    et le problème est réglé

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 10
    Dernier message: 08/09/2009, 10h14
  2. Forcer la saisie en MAJ dans un Formulaire
    Par lolos dans le forum IHM
    Réponses: 4
    Dernier message: 12/08/2003, 11h57
  3. Réponses: 3
    Dernier message: 19/03/2003, 16h19
  4. Réponses: 2
    Dernier message: 12/02/2003, 16h26
  5. [CR][Access] intégrer un viewer dans un formulaire access
    Par nicolak dans le forum SAP Crystal Reports
    Réponses: 7
    Dernier message: 13/01/2003, 16h52

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo