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

JavaScript Discussion :

javascript et mysql


Sujet :

JavaScript

  1. #1
    Membre actif
    Homme Profil pro
    salari�
    Inscrit en
    Mars 2011
    Messages
    55
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activit� : salari�
    Secteur : Alimentation

    Informations forums :
    Inscription : Mars 2011
    Messages : 55
    Par d�faut javascript et mysql
    D�sole en me relisant j'ai vu que j'avais fait une faute entre Java et Javascript.

    Donc voila j'ai un script qui calcul 3 input pour afficher le resultat dans un autre input :

    Voici mon script :

    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
     <script language="JavaScript"> 
    <!-- 
    function recalculer() 
    { 
    //déclarons trois variables temporaires 
    var val1=0; 
    var val2=0; 
    var val3=0; 
    var val4=0; 
    var val5=0; 
    var val6=0; 
    // et une variable pour le total 
    var total1=val1+val2+val3+val4; 
    var total2=val1+val2+val3; 
    var total3=val5-val6; 
    //pour les menus, le test n'est pas nécessaire 
    val1=parseInt(document.getElementById('g').value); 
    val2=parseInt(document.getElementById('n').value); 
    val3=parseInt(document.getElementById('p').value); 
    val4=parseInt(document.getElementById('f').value); 
    val5=parseInt(document.getElementById('bc').value); 
    val6=parseInt(document.getElementById('bp').value); 
    //calculons le total 
    total1=val1+val2+val3+val4; 
    total2<ital>=(val1*4)+val2*2+val3; 
    total3=val5-val6; 
    //plaçons-le dans le chmaps resultat 
    document.getElementById('resultat1').value=total1;  
    document.getElementById('resultat2').value=total2;  
    document.getElementById('resultat3').value=total3;  
    //le tour est joué    
    } 
    </script>

    Ensuite voila mon code html avec lequel j'affiche les enregistrements de ma base de donn�e.

    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
     <table </ital>id="table" cellpadding="0" cellspacing="0" class="tabl_view sortable-onload-3 no-arrow rowstyle-alt colstyle-alt paginate-13 max-pages-7 paginationcallback-callbackTest-calculateTotalRating paginationcallback-callbackTest-displayTextInfo sortcompletecallback-callbackTest-calculateTotalRating"> 
        <thead> 
                <tr> 
                    <th class="t_edit">Modifier</th> 
                    <th class="t_del">Suppr</th> 
                    <th class="numid sortable-num">Place</th> 
     
                    <th class="Clubs">Clubs</th> 
                                    <th class="points">Points</th> 
                                                    <th class="points">Joués</th> 
                    <th class="points">Gagné</th> 
                    <th class="points">Perdu</th> 
                    <th class="points">Nul</th> 
                     <th class="points">Forfait</th> 
                    <th class="points">BC</th> 
                    <th class="points">BP</th> 
                    <th class="points">Dif.</th> 
                    <th class="points">Pen.</th> 
     
                </tr> 
        </thead> 
            <tbody><tr> 
                    <td align="left" nowrap="nowrap" class="c_mod"><a href="index.php?page=classement&modif=<?php echo $match['clas_id']; ?>" title="Modifier"><img src="images/editer.png" /></a></td> 
                <td align="left" nowrap="nowrap" class="c_del"><a href="index.php?page=list-classement&suppr=<?php echo $match['clas_id']; ?>" title="Supprimer" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));"><img src="images/corbeille.gif" /></a></td> 
                 <td align="left" nowrap="nowrap" class="t_num"><?php echo $num_ligne++; ?></td> 
           <td align="left" nowrap="nowrap"><?php echo $match['clas_club']; ?></td> 
        <td align="left" nowrap="nowrap"><input name="pts[<?php echo $match['clas_id']; ?>]"  id="resultat2" onchange='affich()' value="<?php echo $match['clas_pts'];?>" size="4" style="vertical-align:middle"/></td> 
                            <td align="left" nowrap="nowrap"><input class="clas" name="jo[<?php echo $match['clas_id']; ?>]" id="resultat1" onchange='affich()'value="<?php echo $match['clas_jo']; ?>" size="4" /></td> 
                    <td align="left" nowrap="nowrap"><input class="clas" name="g[<?php echo $match['clas_id']; ?>]" type="text"  id="g" onchange="recalculer();" value="<?php echo $match['clas_g']; ?>" size="4"></td> 
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[<?php echo $match['clas_id']; ?>]" type="text"  id="n" onchange="recalculer();" value="<?php echo $match['clas_n']; ?>" size="4"></td> 
                    <td align="left" nowrap="nowrap"><input  class="clas"name="p[<?php echo $match['clas_id']; ?>]" type="text"  id="p" onchange="recalculer();" value="<?php echo $match['clas_p']; ?>" size="4"></td> 
                           <td align="left" nowrap="nowrap"><input class="clas" name="f[<?php echo $match['clas_id']; ?>]" type="text"  id="f" onchange="recalculer();" value="<?php echo $match['clas_f']; ?>" size="4"></td> 
                    <td align="left" nowrap="nowrap"><input class="clas" name="bc[<?php echo $match['clas_id']; ?>]" id="bc" type="text" onchange="recalculer();" value="<?php echo $match['clas_bc']; ?>" size="4"/></td> 
                    <td align="left" nowrap="nowrap"><input class="clas" name="bp[<?php echo $match['clas_id']; ?>]" id="bp" type="text" onchange="recalculer();" value="<?php echo $match['clas_bp']; ?>" size="4"/></td> 
                    <td align="left" nowrap="nowrap"><input class="clas" name="dif[<?php echo $match['clas_id']; ?>]"  id="resultat3" onchange='affich()' value="<?php echo $match['clas_dif'];?>" size="4" style="vertical-align:middle"/></td> 
                    <td align="left" nowrap="nowrap"><input class="clas" name="pen[<?php echo $match['clas_id']; ?>]" type="text" value="<?php echo $match['clas_pen']; ?>" size="4"/></td> 
     
              </tr> 
    <?php endwhile; ?> 
            </tbody> 
          </table > 
    </code>
    Donc mon probl�me j'arrive a afficher mon calcul sur la premi�re ligne de ma liste d'enregistrement mais les autres ne font pas le calcul.

    Merci d'avance

  2. #2
    R�dacteur/Mod�rateur

    Avatar de SpaceFrog
    Homme Profil pro
    D�veloppeur Web Php Mysql Html Javascript CSS Apache - Int�grateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 659
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 75
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activit� : D�veloppeur Web Php Mysql Html Javascript CSS Apache - Int�grateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 659
    Billets dans le blog
    1
    Par d�faut
    un id DOIT �tre unique sur une page ...
    Ma page Developpez - Mon Blog Developpez
    Pr�sident du CCMPTP (Comit� Contre le Mot "Probl�me" dans les Titres de Posts)
    Deux r�gles du succ�s: 1) Ne communiquez jamais � quelqu'un tout votre savoir...
    Votre post est r�solu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de D�veloppez !

  3. #3
    Membre actif
    Homme Profil pro
    salari�
    Inscrit en
    Mars 2011
    Messages
    55
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activit� : salari�
    Secteur : Alimentation

    Informations forums :
    Inscription : Mars 2011
    Messages : 55
    Par d�faut
    c'est � dire, d'ou viendrais mon erreur ?

  4. #4
    Expert confirm�
    Avatar de sekaijin
    Homme Profil pro
    Urbaniste
    Inscrit en
    Juillet 2004
    Messages
    4 205
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 61
    Localisation : France, Yvelines (�le de France)

    Informations professionnelles :
    Activit� : Urbaniste
    Secteur : Sant�

    Informations forums :
    Inscription : Juillet 2004
    Messages : 4 205
    Par d�faut
    j'ai rien pan�
    c'est quoi le rapport avec mysql ?
    et c'est sens� faire quoi ?

  5. #5
    R�dacteur/Mod�rateur

    Avatar de SpaceFrog
    Homme Profil pro
    D�veloppeur Web Php Mysql Html Javascript CSS Apache - Int�grateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 659
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 75
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activit� : D�veloppeur Web Php Mysql Html Javascript CSS Apache - Int�grateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 659
    Billets dans le blog
    1
    Par d�faut
    d'apr�s ce que je comprends de ton code tu boucle sen php pour r�diger du code html ...

    Or il me semble bein que dans la boucle tu mets des id fixes ...
    si tu regarde ton code html g�n�r� tu dois te retrouver avec plusieurs �l�ments portant le m�me id, non ?
    Ma page Developpez - Mon Blog Developpez
    Pr�sident du CCMPTP (Comit� Contre le Mot "Probl�me" dans les Titres de Posts)
    Deux r�gles du succ�s: 1) Ne communiquez jamais � quelqu'un tout votre savoir...
    Votre post est r�solu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de D�veloppez !

  6. #6
    Membre actif
    Homme Profil pro
    salari�
    Inscrit en
    Mars 2011
    Messages
    55
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activit� : salari�
    Secteur : Alimentation

    Informations forums :
    Inscription : Mars 2011
    Messages : 55
    Par d�faut
    Voila tous mon code de la page :
    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
    <?php
       if(isset($_GET['suppr']) && is_numeric($_GET['suppr']))
       {
          supprimerclassement($_GET['suppr']);
       }
     
    ?>
    <h1>Liste des Classements</h1>
     
    <div id="manage_tool">
        <a href="index.php?page=classement" title="Ajouter un Match">
            <img src="images/ajouter_data.png" />
            <span>Ajouter</span>
        </a>
     
    </div>
    <?php
     
        affiche_msg_alert('ajout', 'classement');
        
        affiche_msg_alert('conf', 'classement');
    ?>
    <div id="conteneur_tableau" style="text-align:center">
    <form name="match" action="<?php echo _ADMIN_URL.'index.php?page=list-classement'; ?>" id="ajout_dat" method="post">
     <fieldset>
     
      <legend>Saison :
                <select name="saison" onChange="document.match.compet_id.value='';document.match.submit()">
                <?php $result = get_list_classement(); ?>
                <option value="">Tous</option>
     
                <?php while($compete = mysql_fetch_assoc($result)): ?>
                	<?php if (isset($_POST['saison']) && ($compete['clas_saison']==$_POST['saison'])) {$checked='selected';} else {$checked='';}?>
                    <option value="<?php echo $compete['clas_saison'];?>" <?php echo $checked;?>><?php echo $compete['clas_saison'];?> / <?php echo $compete['clas_saison']+1;?></option>
                <?php endwhile; ?>
                </select>
                Championnat :
                <select name="compet_id" onChange="document.match.submit()">
                <?php 
                	if(isset($_POST['saison']) && ($_POST['saison']!='')) $result = get_list_championnat($_POST['saison']); else 
                	{
                		$_POST['compet_id']='';
                		$result = get_list_compete();
                	}
                ?>
                  <option value="">Toutes compétitions</option>
                <?php while($compete = mysql_fetch_assoc($result)): ?>
                	<?php if (isset($_POST['compet_id']) && ($compete['compet_id']==$_POST['compet_id'])) {$checked='selected';} else {$checked='';}?>
                    <option value="<?php echo $compete['compet_id'];?>" <?php echo $checked?>><?php echo $compete['compet_longname']; ?></option>
                <?php endwhile; ?>
          </select>
          </legend>
      <p>&nbsp;</p>
     
     <input type="hidden" name="edition" value="<?php echo (isset($_GET['modif'])) ? $_GET['modif'] : null; ?>" />
      <table id="table" cellpadding="0" cellspacing="0" class="tabl_view sortable-onload-3 no-arrow rowstyle-alt colstyle-alt paginate-13 max-pages-7 paginationcallback-callbackTest-calculateTotalRating paginationcallback-callbackTest-displayTextInfo sortcompletecallback-callbackTest-calculateTotalRating">
        <thead>
                <tr>
                    <th class="t_edit">Modifier</th>
                    <th class="t_del">Suppr</th>
                    <th class="numid sortable-num">Place</th>
     
                    <th class="Clubs">Clubs</th>
                                    <th class="points">Points</th>
                                                    <th class="points">Joués</th>
                    <th class="points">Gagné</th>
                    <th class="points">Perdu</th>
                    <th class="points">Nul</th>
                     <th class="points">Forfait</th>
                    <th class="points">BC</th>
                    <th class="points">BP</th>
                    <th class="points">Dif.</th>
                    <th class="points">Pen.</th>
     
                </tr>
        </thead>
            <tbody>
    <?php
        if (isset($_POST['saison']) && ($_POST['compet_id']!='')) {
        	$result = get_classement($_POST['saison'],$_POST['compet_id']);
        } else {
        }
        $num_ligne = 1;     // initialisation du numero de chaque champs
        while($match = mysql_fetch_assoc($result) ):
    ?>  <script language="JavaScript">
    <!--
    function recalculer()
    {
    //déclarons trois variables temporaires
    var val1=0;
    var val2=0;
    var val3=0;
    var val4=0;
    var val5=0;
    var val6=0;
    // et une variable pour le total
    var total1=val1+val2+val3+val4;
    var total2=val1+val2+val3;
    var total3=val5-val6;
    //pour les menus, le test n'est pas nécessaire
    val1=parseInt(document.getElementById('g').value);
    val2=parseInt(document.getElementById('n').value);
    val3=parseInt(document.getElementById('p').value);
    val4=parseInt(document.getElementById('f').value);
    val5=parseInt(document.getElementById('bc').value);
    val6=parseInt(document.getElementById('bp').value);
    //calculons le total
    total1=val1+val2+val3+val4;
    total2=(val1*4)+val2*2+val3;
    total3=val5-val6;
    //plaçons-le dans le chmaps resultat
    document.getElementById('resultat1').value=total1; 
    document.getElementById('resultat2').value=total2; 
    document.getElementById('resultat3').value=total3; 
    //le tour est joué   
    }
    </script>
                <tr>
                    <td align="left" nowrap="nowrap" class="c_mod"><a href="index.php?page=classement&modif=<?php echo $match['clas_id']; ?>" title="Modifier"><img src="images/editer.png" /></a></td>
                <td align="left" nowrap="nowrap" class="c_del"><a href="index.php?page=list-classement&suppr=<?php echo $match['clas_id']; ?>" title="Supprimer" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));"><img src="images/corbeille.gif" /></a></td>
                 <td align="left" nowrap="nowrap" class="t_num"><?php echo $num_ligne++; ?></td>
           <td align="left" nowrap="nowrap"><?php echo $match['clas_club']; ?></td>
        <td align="left" nowrap="nowrap"><input name="pts[<?php echo $match['clas_id']; ?>]"  id="resultat2" onchange='affich()' value="<?php echo $match['clas_pts'];?>" size="4" style="vertical-align:middle"/></td>
                            <td align="left" nowrap="nowrap"><input class="clas" name="jo[<?php echo $match['clas_id']; ?>]" id="resultat1" onchange='affich()'value="<?php echo $match['clas_jo']; ?>" size="4" /></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="g[<?php echo $match['clas_id']; ?>]" type="text"  id="g" onchange="recalculer();" value="<?php echo $match['clas_g']; ?>" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[<?php echo $match['clas_id']; ?>]" type="text"  id="n" onchange="recalculer();" value="<?php echo $match['clas_n']; ?>" size="4"></td>
                    <td align="left" nowrap="nowrap"><input  class="clas"name="p[<?php echo $match['clas_id']; ?>]" type="text"  id="p" onchange="recalculer();" value="<?php echo $match['clas_p']; ?>" size="4"></td>
                           <td align="left" nowrap="nowrap"><input class="clas" name="f[<?php echo $match['clas_id']; ?>]" type="text"  id="f" onchange="recalculer();" value="<?php echo $match['clas_f']; ?>" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bc[<?php echo $match['clas_id']; ?>]" id="bc" type="text" onchange="recalculer();" value="<?php echo $match['clas_bc']; ?>" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bp[<?php echo $match['clas_id']; ?>]" id="bp" type="text" onchange="recalculer();" value="<?php echo $match['clas_bp']; ?>" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="dif[<?php echo $match['clas_id']; ?>]"  id="resultat3" onchange='affich()' value="<?php echo $match['clas_dif'];?>" size="4" style="vertical-align:middle"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="pen[<?php echo $match['clas_id']; ?>]" type="text" value="<?php echo $match['clas_pen']; ?>" size="4"/></td>
     
              </tr>
    <?php endwhile; ?>
            </tbody>
          </table >
      <p> 
      	<?php
        if (isset($_POST['saison']) && ($_POST['compet_id']!='')) {
        	$result = get_classement($_POST['saison'],$_POST['compet_id']);
        } else {
        	?><center><p>
    	<h1><strong>Veuillez sélectionner une Saison / Compétition</strong></h1></center></p><?php
        }
        $num_ligne = 1;     // initialisation du numero de chaque champs
     
    ?> 
     </fieldset><input type="submit" name="envoyer" value="valider" />
     
     
     </form>
      </p>
     
     
     
    </div>
    Mon script permet d'effectuer le calcul de 3 input " G ; N ; p " Pour afficher le resultat en jo.

  7. #7
    R�dacteur/Mod�rateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Par d�faut
    Citation Envoy� par SpaceFrog Voir le message
    d'apr�s ce que je comprends de ton code tu boucle sen php pour r�diger du code html ...

    Or il me semble bein que dans la boucle tu mets des id fixes ...
    si tu regarde ton code html g�n�r� tu dois te retrouver avec plusieurs �l�ments portant le m�me id, non ?
    V�rifie et montre nous le code html g�n�r� mais pas le PHP.

    A+.

  8. #8
    R�dacteur

    Avatar de Bovino
    Homme Profil pro
    D�veloppeur Web
    Inscrit en
    Juin 2008
    Messages
    23 647
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 55
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activit� : D�veloppeur Web
    Secteur : High Tech - �diteur de logiciels

    Informations forums :
    Inscription : Juin 2008
    Messages : 23 647
    Billets dans le blog
    20
    Par d�faut
    C'est m�me pire...
    Non seulement les lignes du tableau sont g�n�r�es dans une boucle while (donc plusieurs id identiques sont g�n�r�s), mais il semble aussi que le script JavaScript soit lui aussi cr�� � chaque it�ration...
    Pas de question technique par MP !
    Tout le monde peut participer � developpez.com, vous avez une id�e, contactez-moi !
    Mes formations video2brain : La formation compl�te sur JavaScriptJavaScript et le DOM par la pratiquePHP 5 et MySQL : les fondamentaux
    Mon livre sur jQuery
    Module Firefox / Chrome d'int�gration de JSFiddle et CodePen sur le forum

  9. #9
    Membre actif
    Homme Profil pro
    salari�
    Inscrit en
    Mars 2011
    Messages
    55
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activit� : salari�
    Secteur : Alimentation

    Informations forums :
    Inscription : Mars 2011
    Messages : 55
    Par d�faut
    Aurais tu une solution de code pour remplacer ce code actuellement tr�s mal fond� d'apr�s ce que tu dis.
    J'ai essayer de faire avec ce que je lis sur les forums.
    Merci

  10. #10
    Membre actif
    Homme Profil pro
    salari�
    Inscrit en
    Mars 2011
    Messages
    55
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activit� : salari�
    Secteur : Alimentation

    Informations forums :
    Inscription : Mars 2011
    Messages : 55
    Par d�faut
    voila mon code g�ner�e
    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
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="noindex, nofollow">
    <link rel="shortcut icon" href="../favicon.ico" />
    <title>Liste des Classements</title>
     
        <link rel="stylesheet" type="text/css" href="css/default.css" media="screen" />
        <link rel="stylesheet" href="css/tablesort.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="css/paginate.css" type="text/css" media="screen" />
        <link type="text/css" rel="stylesheet" href="css/calendar.css?random=20051112" media="screen"></link>
     
    <link rel="stylesheet" href="css/thickbox.css" type="text/css" media="screen" />
        <script type="text/javascript" src="js/tablesort.js"></script>
        <script type="text/javascript" src="js/calendar.js"></script>
        <script type="text/javascript" src="js/mod_list.js"></script>
        <script type="text/javascript" src="js/Ajax.js"></script>
        <script type="text/javascript" src="js/paginate.js"></script>
    <script type="text/javascript" src="js/jquery.js"></script>
     
    <script type="text/javascript" src="js/thickbox.js"></script>
    	<script language="javascript" type="text/javascript" src="js/jquery.js"></script>
    	<script language="javascript" type="text/javascript" src="js/jquery.coolfieldset.js"></script>
    	<link rel="stylesheet" type="text/css" href="css/jquery.coolfieldset.css" />
    </head>
     
    <body onload='affich()'>
     
    <div id="header_bg">
     
        <div class="wrapper">
     
     
            <div id="header_top">
    		<span class="fr">
     
    		    <a href="index.php?page=gestion-menu" title="Gerer Les menus de navigation">
    			  <img src="./images/gestion_menu.png" />
    		    </a>
    		    <a href="index.php?page=utilisateur" title="Gerer vos utilisateurs ">
    			  <img src="./images/admin.png" />
    		    </a>
     
    		    <a href="../index.php" title="Se Déconnecter">
    			  <img src="./images/deconnect.png" />
    		    </a>
    		    <a href="/shadoo/" target="_blank" title="Se rendre sur le site dans un nouvel onglet">
    			  <img src="./images/visualiser.png" />
    		    </a>
    		</span>
    		  Hello TOTO, Tu es connecté !
     
    	  </div>
     
     
            <div id="titre_logo">
                <a href="index.php" title="Retour Accueil Admin">Partie Administrateur du SCS</a>
            </div>
     
     
    	  <ul id="main_nav">
                <li  > 
    		    <a href="index.php?page=list-equipe" title="Equipe">
    			  <img src="./images/ajouter_equipe.png" />Equipe
    		    </a>
                </li>
     
                <li  >
    		    <a href="index.php?page=list-competition" title="Compétition">
    			  <img src="./images/ballon.png" />Compétition
    		    </a>
                </li>
    		<li  >
    		    <a href="index.php?page=list-joueur" title="Joueur">
    			  <img src="./images/joueur.png" />Joueur
    		    </a>
    		</li>
     
    		<li  >
    		    <a href="index.php?page=list-match" title="Match">
    			  <img src="./images/match.png" />Match
    		    </a>
    <li  >
    		    <a href="index.php?page=list-classement" title="Classement">
    			  <img src="./images/classement.png" />Classement
    		    </a>
    		</li>
            		</li>
     
    		<li  >
    		    <a href="index.php?page=list-guestbook" title="Livre do'r">
    			  <img src="./images/livredor.png" />Livre d'or
    		    </a>
    		</li>
    		<li  >
    		    <a href="index.php?page=list-news" title="News">
    			  <img src="./images/news.png" />News
    		    </a>
    		</li>
     
            </ul>
     
     
        </div><!-- fin div class wrapper -->
     
    </div><!-- fin div header_bg -->
     
    <div id="centre">
     
        <div id="iner_contenu">
     
    	  <script language="JavaScript">
    <!--
    function recalculer()
    {
    //déclarons trois variables temporaires
    var val1=0;
    var val2=0;
    var val3=0;
    var val4=0;
    var val5=0;
    var val6=0;
    // et une variable pour le total
    var total1=val1+val2+val3+val4;
    var total2=val1+val2+val3;
    var total3=val5-val6;
    //pour les menus, le test n'est pas nécessaire
    val1=parseInt(document.getElementById('g').value);
    val2=parseInt(document.getElementById('n').value);
    val3=parseInt(document.getElementById('p').value);
    val4=parseInt(document.getElementById('f').value);
    val5=parseInt(document.getElementById('bc').value);
    val6=parseInt(document.getElementById('bp').value);
    //calculons le total
    total1=val1+val2+val3+val4;
    total2=(val1*4)+val2*2+val3;
    total3=val5-val6;
    //plaçons-le dans le chmaps resultat
    document.getElementById('resultat1').value=total1; 
    document.getElementById('resultat2').value=total2; 
    document.getElementById('resultat3').value=total3; 
    //le tour est joué   
    }
    </script>
    <h1>Liste des Classements</h1>
     
    <div id="manage_tool">
        <a href="index.php?page=classement" title="Ajouter un Match">
            <img src="images/ajouter_data.png" />
            <span>Ajouter</span>
        </a>
     
    </div>
    <div id="conteneur_tableau" style="text-align:center">
    <form name="match" action="/shadoo/adminSC/index.php?page=list-classement" id="ajout_dat" method="post">
     <fieldset>
     
      <legend>Saison :
                <select name="saison" onChange="document.match.compet_id.value='';document.match.submit()">
                            <option value="">Tous</option>
     
                            	                <option value="2010" selected>2010 / 2011</option>
                            </select>
                Championnat :
                <select name="compet_id" onChange="document.match.submit()">
                              <option value="">Toutes compétitions</option>
     
                            	                <option value="45" >Division 2A</option>
                            	                <option value="12" selected>Division 2B</option>
                            	                <option value="14" >Division 3B</option>
                            	                <option value="16" >Seniors Feminine A7</option>
                            	                <option value="15" >Veterans</option>
                            	                <option value="17" >U19 A</option>
     
                            	                <option value="18" >U17 A</option>
                            	                <option value="19" >U15 A</option>
                      </select>
          </legend>
      <p>&nbsp;</p>
     
     <input type="hidden" name="edition" value="" />
      <table id="table" cellpadding="0" cellspacing="0" class="tabl_view sortable-onload-3 no-arrow rowstyle-alt colstyle-alt paginate-13 max-pages-7 paginationcallback-callbackTest-calculateTotalRating paginationcallback-callbackTest-displayTextInfo sortcompletecallback-callbackTest-calculateTotalRating">
        <thead>
     
                <tr>
                    <th class="t_edit">Modifier</th>
                    <th class="t_del">Suppr</th>
                    <th class="numid sortable-num">Place</th>
     
                    <th class="Clubs">Clubs</th>
                                    <th class="points">Points</th>
     
                                                    <th class="points">Joués</th>
                    <th class="points">Gagné</th>
                    <th class="points">Perdu</th>
                    <th class="points">Nul</th>
                     <th class="points">Forfait</th>
                    <th class="points">BC</th>
     
                    <th class="points">BP</th>
                    <th class="points">Dif.</th>
                    <th class="points">Pen.</th>
     
                </tr>
        </thead>
            <tbody>
     
                <tr>
     
                    <td align="left" nowrap="nowrap" class="c_mod"><a href="index.php?page=classement&modif=5" title="Modifier"><img src="images/editer.png" /></a></td>
                <td align="left" nowrap="nowrap" class="c_del"><a href="index.php?page=list-classement&suppr=5" title="Supprimer" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));"><img src="images/corbeille.gif" /></a></td>
                 <td align="left" nowrap="nowrap" class="t_num">1</td>
           <td align="left" nowrap="nowrap">Mussig 2</td>
        <td align="left" nowrap="nowrap"><input name="pts[5]"  id="resultat2" onchange='affich()' value="63" size="4" style="vertical-align:middle"/></td>
                            <td align="left" nowrap="nowrap"><input class="clas" name="jo[5]" id="resultat1" onchange='affich()'value="18" size="4" /></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="g[5]" type="text"  id="g" onchange="recalculer();" value="14" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[5]" type="text"  id="n" onchange="recalculer();" value="3" size="4"></td>
     
                    <td align="left" nowrap="nowrap"><input  class="clas"name="p[5]" type="text"  id="p" onchange="recalculer();" value="1" size="4"></td>
                           <td align="left" nowrap="nowrap"><input class="clas" name="f[5]" type="text"  id="f" onchange="recalculer();" value="0" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bc[5]" id="bc" type="text" onchange="recalculer();" value="63" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bp[5]" id="bp" type="text" onchange="recalculer();" value="17" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="dif[5]"  id="resultat3" onchange='affich()' value="46" size="4" style="vertical-align:middle"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="pen[5]" type="text" value="0" size="4"/></td>
     
              </tr>
     
                <tr>
                    <td align="left" nowrap="nowrap" class="c_mod"><a href="index.php?page=classement&modif=17" title="Modifier"><img src="images/editer.png" /></a></td>
     
                <td align="left" nowrap="nowrap" class="c_del"><a href="index.php?page=list-classement&suppr=17" title="Supprimer" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));"><img src="images/corbeille.gif" /></a></td>
                 <td align="left" nowrap="nowrap" class="t_num">2</td>
           <td align="left" nowrap="nowrap">Triembach/Val 2</td>
        <td align="left" nowrap="nowrap"><input name="pts[17]"  id="resultat2" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                            <td align="left" nowrap="nowrap"><input class="clas" name="jo[17]" id="resultat1" onchange='affich()'value="0" size="4" /></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="g[17]" type="text"  id="g" onchange="recalculer();" value="1" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[17]" type="text"  id="n" onchange="recalculer();" value="1" size="4"></td>
                    <td align="left" nowrap="nowrap"><input  class="clas"name="p[17]" type="text"  id="p" onchange="recalculer();" value="15" size="4"></td>
     
                           <td align="left" nowrap="nowrap"><input class="clas" name="f[17]" type="text"  id="f" onchange="recalculer();" value="0" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bc[17]" id="bc" type="text" onchange="recalculer();" value="0" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bp[17]" id="bp" type="text" onchange="recalculer();" value="0" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="dif[17]"  id="resultat3" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="pen[17]" type="text" value="0" size="4"/></td>
     
              </tr>
     
                <tr>
                    <td align="left" nowrap="nowrap" class="c_mod"><a href="index.php?page=classement&modif=16" title="Modifier"><img src="images/editer.png" /></a></td>
                <td align="left" nowrap="nowrap" class="c_del"><a href="index.php?page=list-classement&suppr=16" title="Supprimer" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));"><img src="images/corbeille.gif" /></a></td>
     
                 <td align="left" nowrap="nowrap" class="t_num">3</td>
           <td align="left" nowrap="nowrap">Hilsenheim 2</td>
        <td align="left" nowrap="nowrap"><input name="pts[16]"  id="resultat2" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                            <td align="left" nowrap="nowrap"><input class="clas" name="jo[16]" id="resultat1" onchange='affich()'value="0" size="4" /></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="g[16]" type="text"  id="g" onchange="recalculer();" value="4" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[16]" type="text"  id="n" onchange="recalculer();" value="2" size="4"></td>
                    <td align="left" nowrap="nowrap"><input  class="clas"name="p[16]" type="text"  id="p" onchange="recalculer();" value="11" size="4"></td>
                           <td align="left" nowrap="nowrap"><input class="clas" name="f[16]" type="text"  id="f" onchange="recalculer();" value="0" size="4"></td>
     
                    <td align="left" nowrap="nowrap"><input class="clas" name="bc[16]" id="bc" type="text" onchange="recalculer();" value="0" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bp[16]" id="bp" type="text" onchange="recalculer();" value="0" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="dif[16]"  id="resultat3" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="pen[16]" type="text" value="0" size="4"/></td>
     
              </tr>
     
                <tr>
                    <td align="left" nowrap="nowrap" class="c_mod"><a href="index.php?page=classement&modif=15" title="Modifier"><img src="images/editer.png" /></a></td>
                <td align="left" nowrap="nowrap" class="c_del"><a href="index.php?page=list-classement&suppr=15" title="Supprimer" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));"><img src="images/corbeille.gif" /></a></td>
                 <td align="left" nowrap="nowrap" class="t_num">4</td>
     
           <td align="left" nowrap="nowrap">Ebersheim 3</td>
        <td align="left" nowrap="nowrap"><input name="pts[15]"  id="resultat2" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                            <td align="left" nowrap="nowrap"><input class="clas" name="jo[15]" id="resultat1" onchange='affich()'value="0" size="4" /></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="g[15]" type="text"  id="g" onchange="recalculer();" value="5" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[15]" type="text"  id="n" onchange="recalculer();" value="1" size="4"></td>
                    <td align="left" nowrap="nowrap"><input  class="clas"name="p[15]" type="text"  id="p" onchange="recalculer();" value="10" size="4"></td>
                           <td align="left" nowrap="nowrap"><input class="clas" name="f[15]" type="text"  id="f" onchange="recalculer();" value="0" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bc[15]" id="bc" type="text" onchange="recalculer();" value="0" size="4"/></td>
     
                    <td align="left" nowrap="nowrap"><input class="clas" name="bp[15]" id="bp" type="text" onchange="recalculer();" value="0" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="dif[15]"  id="resultat3" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="pen[15]" type="text" value="0" size="4"/></td>
     
              </tr>
     
                <tr>
                    <td align="left" nowrap="nowrap" class="c_mod"><a href="index.php?page=classement&modif=14" title="Modifier"><img src="images/editer.png" /></a></td>
                <td align="left" nowrap="nowrap" class="c_del"><a href="index.php?page=list-classement&suppr=14" title="Supprimer" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));"><img src="images/corbeille.gif" /></a></td>
                 <td align="left" nowrap="nowrap" class="t_num">5</td>
     
           <td align="left" nowrap="nowrap">Schoenau/Saasenheim 2</td>
        <td align="left" nowrap="nowrap"><input name="pts[14]"  id="resultat2" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                            <td align="left" nowrap="nowrap"><input class="clas" name="jo[14]" id="resultat1" onchange='affich()'value="0" size="4" /></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="g[14]" type="text"  id="g" onchange="recalculer();" value="7" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[14]" type="text"  id="n" onchange="recalculer();" value="1" size="4"></td>
                    <td align="left" nowrap="nowrap"><input  class="clas"name="p[14]" type="text"  id="p" onchange="recalculer();" value="10" size="4"></td>
                           <td align="left" nowrap="nowrap"><input class="clas" name="f[14]" type="text"  id="f" onchange="recalculer();" value="0" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bc[14]" id="bc" type="text" onchange="recalculer();" value="0" size="4"/></td>
     
                    <td align="left" nowrap="nowrap"><input class="clas" name="bp[14]" id="bp" type="text" onchange="recalculer();" value="0" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="dif[14]"  id="resultat3" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="pen[14]" type="text" value="0" size="4"/></td>
     
              </tr>
     
                <tr>
                    <td align="left" nowrap="nowrap" class="c_mod"><a href="index.php?page=classement&modif=13" title="Modifier"><img src="images/editer.png" /></a></td>
                <td align="left" nowrap="nowrap" class="c_del"><a href="index.php?page=list-classement&suppr=13" title="Supprimer" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));"><img src="images/corbeille.gif" /></a></td>
                 <td align="left" nowrap="nowrap" class="t_num">6</td>
     
           <td align="left" nowrap="nowrap">Elsenheim 2</td>
        <td align="left" nowrap="nowrap"><input name="pts[13]"  id="resultat2" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                            <td align="left" nowrap="nowrap"><input class="clas" name="jo[13]" id="resultat1" onchange='affich()'value="0" size="4" /></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="g[13]" type="text"  id="g" onchange="recalculer();" value="8" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[13]" type="text"  id="n" onchange="recalculer();" value="6" size="4"></td>
                    <td align="left" nowrap="nowrap"><input  class="clas"name="p[13]" type="text"  id="p" onchange="recalculer();" value="4" size="4"></td>
                           <td align="left" nowrap="nowrap"><input class="clas" name="f[13]" type="text"  id="f" onchange="recalculer();" value="0" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bc[13]" id="bc" type="text" onchange="recalculer();" value="0" size="4"/></td>
     
                    <td align="left" nowrap="nowrap"><input class="clas" name="bp[13]" id="bp" type="text" onchange="recalculer();" value="0" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="dif[13]"  id="resultat3" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="pen[13]" type="text" value="0" size="4"/></td>
     
              </tr>
     
                <tr>
                    <td align="left" nowrap="nowrap" class="c_mod"><a href="index.php?page=classement&modif=12" title="Modifier"><img src="images/editer.png" /></a></td>
                <td align="left" nowrap="nowrap" class="c_del"><a href="index.php?page=list-classement&suppr=12" title="Supprimer" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));"><img src="images/corbeille.gif" /></a></td>
                 <td align="left" nowrap="nowrap" class="t_num">7</td>
     
           <td align="left" nowrap="nowrap">Marckolsheim 2</td>
        <td align="left" nowrap="nowrap"><input name="pts[12]"  id="resultat2" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                            <td align="left" nowrap="nowrap"><input class="clas" name="jo[12]" id="resultat1" onchange='affich()'value="0" size="4" /></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="g[12]" type="text"  id="g" onchange="recalculer();" value="9" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[12]" type="text"  id="n" onchange="recalculer();" value="4" size="4"></td>
                    <td align="left" nowrap="nowrap"><input  class="clas"name="p[12]" type="text"  id="p" onchange="recalculer();" value="5" size="4"></td>
                           <td align="left" nowrap="nowrap"><input class="clas" name="f[12]" type="text"  id="f" onchange="recalculer();" value="0" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bc[12]" id="bc" type="text" onchange="recalculer();" value="0" size="4"/></td>
     
                    <td align="left" nowrap="nowrap"><input class="clas" name="bp[12]" id="bp" type="text" onchange="recalculer();" value="0" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="dif[12]"  id="resultat3" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="pen[12]" type="text" value="0" size="4"/></td>
     
              </tr>
     
                <tr>
                    <td align="left" nowrap="nowrap" class="c_mod"><a href="index.php?page=classement&modif=11" title="Modifier"><img src="images/editer.png" /></a></td>
                <td align="left" nowrap="nowrap" class="c_del"><a href="index.php?page=list-classement&suppr=11" title="Supprimer" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));"><img src="images/corbeille.gif" /></a></td>
                 <td align="left" nowrap="nowrap" class="t_num">8</td>
     
           <td align="left" nowrap="nowrap">Kintzheim 2</td>
        <td align="left" nowrap="nowrap"><input name="pts[11]"  id="resultat2" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                            <td align="left" nowrap="nowrap"><input class="clas" name="jo[11]" id="resultat1" onchange='affich()'value="0" size="4" /></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="g[11]" type="text"  id="g" onchange="recalculer();" value="12" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[11]" type="text"  id="n" onchange="recalculer();" value="2" size="4"></td>
                    <td align="left" nowrap="nowrap"><input  class="clas"name="p[11]" type="text"  id="p" onchange="recalculer();" value="4" size="4"></td>
                           <td align="left" nowrap="nowrap"><input class="clas" name="f[11]" type="text"  id="f" onchange="recalculer();" value="0" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bc[11]" id="bc" type="text" onchange="recalculer();" value="0" size="4"/></td>
     
                    <td align="left" nowrap="nowrap"><input class="clas" name="bp[11]" id="bp" type="text" onchange="recalculer();" value="0" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="dif[11]"  id="resultat3" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="pen[11]" type="text" value="0" size="4"/></td>
     
              </tr>
     
                <tr>
                    <td align="left" nowrap="nowrap" class="c_mod"><a href="index.php?page=classement&modif=7" title="Modifier"><img src="images/editer.png" /></a></td>
                <td align="left" nowrap="nowrap" class="c_del"><a href="index.php?page=list-classement&suppr=7" title="Supprimer" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));"><img src="images/corbeille.gif" /></a></td>
                 <td align="left" nowrap="nowrap" class="t_num">9</td>
     
           <td align="left" nowrap="nowrap">Selestat 2</td>
        <td align="left" nowrap="nowrap"><input name="pts[7]"  id="resultat2" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                            <td align="left" nowrap="nowrap"><input class="clas" name="jo[7]" id="resultat1" onchange='affich()'value="0" size="4" /></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="g[7]" type="text"  id="g" onchange="recalculer();" value="15" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[7]" type="text"  id="n" onchange="recalculer();" value="2" size="4"></td>
                    <td align="left" nowrap="nowrap"><input  class="clas"name="p[7]" type="text"  id="p" onchange="recalculer();" value="1" size="4"></td>
                           <td align="left" nowrap="nowrap"><input class="clas" name="f[7]" type="text"  id="f" onchange="recalculer();" value="0" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bc[7]" id="bc" type="text" onchange="recalculer();" value="0" size="4"/></td>
     
                    <td align="left" nowrap="nowrap"><input class="clas" name="bp[7]" id="bp" type="text" onchange="recalculer();" value="0" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="dif[7]"  id="resultat3" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="pen[7]" type="text" value="0" size="4"/></td>
     
              </tr>
     
                <tr>
                    <td align="left" nowrap="nowrap" class="c_mod"><a href="index.php?page=classement&modif=18" title="Modifier"><img src="images/editer.png" /></a></td>
                <td align="left" nowrap="nowrap" class="c_del"><a href="index.php?page=list-classement&suppr=18" title="Supprimer" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));"><img src="images/corbeille.gif" /></a></td>
                 <td align="left" nowrap="nowrap" class="t_num">10</td>
     
           <td align="left" nowrap="nowrap">Bindernheim 3</td>
        <td align="left" nowrap="nowrap"><input name="pts[18]"  id="resultat2" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                            <td align="left" nowrap="nowrap"><input class="clas" name="jo[18]" id="resultat1" onchange='affich()'value="0" size="4" /></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="g[18]" type="text"  id="g" onchange="recalculer();" value="3" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[18]" type="text"  id="n" onchange="recalculer();" value="2" size="4"></td>
                    <td align="left" nowrap="nowrap"><input  class="clas"name="p[18]" type="text"  id="p" onchange="recalculer();" value="8" size="4"></td>
                           <td align="left" nowrap="nowrap"><input class="clas" name="f[18]" type="text"  id="f" onchange="recalculer();" value="0" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bc[18]" id="bc" type="text" onchange="recalculer();" value="0" size="4"/></td>
     
                    <td align="left" nowrap="nowrap"><input class="clas" name="bp[18]" id="bp" type="text" onchange="recalculer();" value="0" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="dif[18]"  id="resultat3" onchange='affich()' value="0" size="4" style="vertical-align:middle"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="pen[18]" type="text" value="0" size="4"/></td>
     
              </tr>
            </tbody>
          </table >
      <p> 
     
     </fieldset><input type="submit" name="envoyer" value="valider" />
     
     
     </form>
      </p>
     
     
     
    </div>
     
        </div>
     
    </div>
     
    <a id="tophover" href="#header_bg" title="Remonter en Haut">
        <img src="./images/remonter.png" />
    </a>
     
    <div id="footer">
        <p>Copyright © 2011 www.sc.selestat.football.free.fr</p>
    </div>
     
    </body>
    </html>

  11. #11
    R�dacteur/Mod�rateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Par d�faut
    Bonjour,

    0-
    var val1=0;
    var val2=0;
    var val3=0;
    var val4=0;
    var val5=0;
    var val6=0;
    // et une variable pour le total
    var total1=val1+val2+val3+val4;
    var total2=val1+val2+val3;
    var total3=val5-val6;
    .

    1-
    Citation Envoy� par jesaye
    J'ai essayer de faire avec ce que je lis sur les forums.
    Tu dois indexer les id comme ce que tu trouves sur ce forum mais pas sur les autres forums et passer l'index en param�tre de la fonction.
    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
    3
    4
    5
    6
    function recalculer(index)
    {
    ...........
    val1=parseInt(document.getElementById('g'+index).value);
    val2=parseInt(document.getElementById('n'+index).value);
    .......
    Code html : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
    3
    4
    ........
    <td align="left" nowrap="nowrap"><input class="clas" name="g[5]" type="text"  id="g5" onchange="recalculer(5);" value="14" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[5]" type="text"  id="n5" onchange="recalculer(5);" value="3" size="4"></td>
     .........

    2-
    <script type="text/javascript" src="js/jquery.js"></script>

    <script type="text/javascript" src="js/thickbox.js"></script>
    <script language="javascript" type="text/javascript" src="js/jquery.js"></script>
    Un seul appel suffit.

    3-
    Comme tu utilises jQuery, pourquoi ne pas le profiter au max ?
    Exemple :
    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    val2=parseInt($('#n'+index).val(),10);// Pour ne pas compter en octal
    A+.

  12. #12
    R�dacteur/Mod�rateur

    Avatar de SpaceFrog
    Homme Profil pro
    D�veloppeur Web Php Mysql Html Javascript CSS Apache - Int�grateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 659
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 75
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activit� : D�veloppeur Web Php Mysql Html Javascript CSS Apache - Int�grateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 659
    Billets dans le blog
    1
    Par d�faut
    Aurais tu une solution de code pour remplacer ce code actuellement tr�s mal fond� d'apr�s ce que tu dis.
    Oui !

    Relis les r�ponses au dessus et modifie ton code en cons�quence...
    N'attends pas que l'on fasse le code pour toi...
    Ma page Developpez - Mon Blog Developpez
    Pr�sident du CCMPTP (Comit� Contre le Mot "Probl�me" dans les Titres de Posts)
    Deux r�gles du succ�s: 1) Ne communiquez jamais � quelqu'un tout votre savoir...
    Votre post est r�solu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de D�veloppez !

  13. #13
    Membre actif
    Homme Profil pro
    salari�
    Inscrit en
    Mars 2011
    Messages
    55
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activit� : salari�
    Secteur : Alimentation

    Informations forums :
    Inscription : Mars 2011
    Messages : 55
    Par d�faut
    Merci, je vais essayer tout sa,
    Petite question sur ce code :
    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    val2=parseInt($('#n'+index).val(),10);// Pour ne pas compter en octal
    le 10 represente quoi ?

  14. #14
    R�dacteur/Mod�rateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Par d�faut
    Citation Envoy� par jesaye Voir le message
    le 10 represente quoi ?
    La base pour la conversion.

  15. #15
    Membre actif
    Homme Profil pro
    salari�
    Inscrit en
    Mars 2011
    Messages
    55
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activit� : salari�
    Secteur : Alimentation

    Informations forums :
    Inscription : Mars 2011
    Messages : 55
    Par d�faut
    oki je vais tester tous sa, faire les modifs et voir sa.

  16. #16
    R�dacteur/Mod�rateur

    Avatar de SpaceFrog
    Homme Profil pro
    D�veloppeur Web Php Mysql Html Javascript CSS Apache - Int�grateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 659
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 75
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activit� : D�veloppeur Web Php Mysql Html Javascript CSS Apache - Int�grateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 659
    Billets dans le blog
    1
    Par d�faut
    sinon par defaut parseInt est en base 8 ...
    Ma page Developpez - Mon Blog Developpez
    Pr�sident du CCMPTP (Comit� Contre le Mot "Probl�me" dans les Titres de Posts)
    Deux r�gles du succ�s: 1) Ne communiquez jamais � quelqu'un tout votre savoir...
    Votre post est r�solu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de D�veloppez !

  17. #17
    Membre actif
    Homme Profil pro
    salari�
    Inscrit en
    Mars 2011
    Messages
    55
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activit� : salari�
    Secteur : Alimentation

    Informations forums :
    Inscription : Mars 2011
    Messages : 55
    Par d�faut
    Que veut dire indexer mes id car je vois que dans mon script il y a + index mais comment faire pour indexer ?

  18. #18
    Membre actif
    Homme Profil pro
    salari�
    Inscrit en
    Mars 2011
    Messages
    55
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activit� : salari�
    Secteur : Alimentation

    Informations forums :
    Inscription : Mars 2011
    Messages : 55
    Par d�faut
    Rien ne marche mais je crois que cela vient du html
    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
    3
    4
    ........
    <td align="left" nowrap="nowrap"><input class="clas" name="g[5]" type="text"  id="g5" onchange="recalculer(5);" value="14" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[5]" type="text"  id="n5" onchange="recalculer(5);" value="3" size="4"></td>
     .........
    Sur mes id j'ai g5, n5 mais comment mettre sa en html
    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    id="g[index]" on change="recalculer(index)
    ?

  19. #19
    R�dacteur/Mod�rateur

    Avatar de SpaceFrog
    Homme Profil pro
    D�veloppeur Web Php Mysql Html Javascript CSS Apache - Int�grateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 659
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 75
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activit� : D�veloppeur Web Php Mysql Html Javascript CSS Apache - Int�grateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 659
    Billets dans le blog
    1
    Par d�faut
    la c'est la faute de ton code php ! tu ne concat�ne pas correctement ta variable php
    Ma page Developpez - Mon Blog Developpez
    Pr�sident du CCMPTP (Comit� Contre le Mot "Probl�me" dans les Titres de Posts)
    Deux r�gles du succ�s: 1) Ne communiquez jamais � quelqu'un tout votre savoir...
    Votre post est r�solu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de D�veloppez !

  20. #20
    Membre actif
    Homme Profil pro
    salari�
    Inscrit en
    Mars 2011
    Messages
    55
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Bas Rhin (Alsace)

    Informations professionnelles :
    Activit� : salari�
    Secteur : Alimentation

    Informations forums :
    Inscription : Mars 2011
    Messages : 55
    Par d�faut
    Comment sa j'ai ce code avec modif apres changement

    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
    <tr>
                    <td align="left" nowrap="nowrap" class="c_mod"><a href="index.php?page=classement&modif=<?php echo $match['clas_id']; ?>" title="Modifier"><img src="images/editer.png" /></a></td>
                <td align="left" nowrap="nowrap" class="c_del"><a href="index.php?page=list-classement&suppr=<?php echo $match['clas_id']; ?>" title="Supprimer" onclick="return(confirm('Etes-vous sûr de vouloir supprimer cette entrée?'));"><img src="images/corbeille.gif" /></a></td>
                 <td align="left" nowrap="nowrap" class="t_num"><?php echo $num_ligne++; ?></td>
           <td align="left" nowrap="nowrap"><?php echo $match['clas_club']; ?></td>
        <td align="left" nowrap="nowrap"><input name="pts[<?php echo $match['clas_id']; ?>]"  id="resultat2" onchange='affich()' value="<?php echo $match['clas_pts'];?>" size="4" style="vertical-align:middle"/></td>
                            <td align="left" nowrap="nowrap"><input class="clas" name="jo[<?php echo $match['clas_id']; ?>]" id="resultat1" onchange='affich()'value="<?php echo $match['clas_jo']; ?>" size="4" /></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="g[<?php echo $match['clas_id']; ?>]" type="text"  id="g" onchange="recalculer(index);" value="<?php echo $match['clas_g']; ?>" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="n[<?php echo $match['clas_id']; ?>]" type="text"  id="n" onchange="recalculer(index);" value="<?php echo $match['clas_n']; ?>" size="4"></td>
                    <td align="left" nowrap="nowrap"><input  class="clas"name="p[<?php echo $match['clas_id']; ?>]" type="text"  id="p" onchange="recalculer(index);" value="<?php echo $match['clas_p']; ?>" size="4"></td>
                           <td align="left" nowrap="nowrap"><input class="clas" name="f[<?php echo $match['clas_id']; ?>]" type="text"  id="f" onchange="recalculer(index);" value="<?php echo $match['clas_f']; ?>" size="4"></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bc[<?php echo $match['clas_id']; ?>]" id="bc" type="text" onchange="recalculer(index);" value="<?php echo $match['clas_bc']; ?>" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="bp[<?php echo $match['clas_id']; ?>]" id="bp" type="text" onchange="recalculer(index);" value="<?php echo $match['clas_bp']; ?>" size="4"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="dif[<?php echo $match['clas_id']; ?>]"  id="resultat3" onchange='affich()' value="<?php echo $match['clas_dif'];?>" size="4" style="vertical-align:middle"/></td>
                    <td align="left" nowrap="nowrap"><input class="clas" name="pen[<?php echo $match['clas_id']; ?>]" type="text" value="<?php echo $match['clas_pen']; ?>" size="4"/></td>
     
              </tr>

Discussions similaires

  1. Ins�rer une Variable javascript dans MySQL
    Par MacUser dans le forum G�n�ral JavaScript
    R�ponses: 5
    Dernier message: 04/08/2008, 18h09
  2. javascript et mysql!
    Par mitnick2006 dans le forum G�n�ral JavaScript
    R�ponses: 3
    Dernier message: 26/05/2008, 09h37
  3. javascript et mysql
    Par schuller dans le forum G�n�ral JavaScript
    R�ponses: 1
    Dernier message: 09/08/2007, 16h55
  4. [JQuery] Javascript et MySQL
    Par Badaboumpanpan dans le forum jQuery
    R�ponses: 12
    Dernier message: 23/06/2007, 10h10
  5. [D�butant] radio button et BDD (javascript/PHP/MySQL)
    Par stringman62 dans le forum G�n�ral JavaScript
    R�ponses: 5
    Dernier message: 12/02/2007, 19h03

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