| 12
 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
 
 |  
 
<html>
    <head>
        <title> Particulier  </title>
        <link rel="stylesheet" media="screen" type="text/css"
              title="styleparticulier" href="particule.css" />
 
     </head>
 
 
<?php
 
// permet de recuprer IDCabinet d'un client ou numero
      $idetifiantClient = $_POST['identif'];
 
 
    //  echo 'identifiant client:'.$idetifiantClient;
 
  // affichage resenseignement lie à un client
 
$cnx = odbc_connect("DSN_carann","root","")or die ("impossible de se connecter a la base");
 
// recherche par nom
    $choix = $_POST['choix'];
 
    if(isset ($choix)){
 
        switch($choix){
 
            // recherche par nom
            case "nom":
                if(isset ($idetifiantClient)){
                      $sql = " select * from Client as CLT ,ClientParticulier as CLTP where CLTP.Nom like '$idetifiantClient' and
     CLT.IDCabinet = CLTP.IDCabinet";
                }
 
                break ;
 
            case "numero":
 
                if(isset ($idetifiantClient)){
                     $sql = " select * from Client as CLT ,ClientParticulier as CLTP where CLT.IDCabinet like '$idetifiantClient' and
     CLT.IDCabinet = CLTP.IDCabinet";
                }
 
 
 
                break;
 
 
        }
    }
    else
        {
         echo 'erreur de parametre';
        }
 
 
 
 
 
 
?>
 
 
        <fieldset class="renseignement">
 
    <legend>Renseignements</legend>
 
 
<?php
     $requete = odbc_do($cnx,$sql)or die (odbc_error());
 
 
         while ($result=odbc_fetch_object($requete)){
 
			 $numeroClient = $result->IDCabinet;
 
      ?>
 
  <label class="gen">Nom:</label>
 
    <label class="valeur">
        <?php
 
                 if(isset($result->Nom)){
 
 
              echo $result->Nom;
 
 
                 }
 
 
 
           ?>
         </label><br />
 
         <label class="gen">Prenom:</label>
 
    <label class="valeur">
        <?php
 
                     if(isset($result->Prenom)){
 
 
              echo $result->Prenom;
 
 
                 }
 
          ?>
 
        </label><br />
 
		 <label class="gen">Date de Naissance:</label>
          <label class="valeur">
         <?php
 
                    if(!empty($result->Datedenaissance)){
 
 
          //    echo "<b>".$result->Datedenaissance."</b> <br />";
 
                 require("fonction.php");
                 $naissance = (string) $result->Datedenaissance ;
 
                datefr($naissance);
 
                    }
 
               ?>
 
 
 
 
 
 
 
 
         </label><br />
 
<?php
 
// ici aussi çà peut poser un problème 
 
  $lienClientPolice =$result->Numdansclient;
 
 
  // ici se termine la premiere requete 
 
           }
?>
 
 
<!-- deuxieme fieldset avec parametre de transition $lienClientPolice -->
 
<fieldset class="contrat">
        <legend>Contrats</legend>
 
        <table class="souscontrat" >
 
            <thead>
                <th>Types de contrats</th>
                 <th>Compagnie</th>
                <th>Numéro Contrat</th>
                <th>Echéance</th>
                  <th>Fractionnement</th>
                    <th>Date Effet</th>
                    <th>Date Résiliation</th>
                     <th>Informations</th>
                      <th>Etat Contentieux</th>
                      <th>Détails</th>
            </thead>
            <tbody>
 
                <?php
 
               // echo 'lien client:'.$lienClientPolice."<br />";
 
                $sql2 = " select Num ,Codetypedegestion,datecreation, Typedepolice ,CodeCompagnie , NumPolice ,Codeetatpolice, DateEcheance,Codefractionnement,DenominationClient,Dossiercomplet,Codetypedepaiement,
                    Dateeffet , DateResiliation,CommentaireResiliation,CodeCtx , CodeUtilisateur,Revision,dateperte ,Datedernieravenant ,Dernierevisite,CodeCTRContrat,
                    montantprimeannuelleTTC , Indiceorigine from Police where Codeclient like'$lienClientPolice'";
 
                     $requete4 = odbc_do($cnx, $sql2)or die (odbc_error());
 
                      while ($result7=odbc_fetch_object($requete4)){
 
 
                          ?>
 
                    <tr>
 
                   <?php
 
 
 
 
                          // type de police
       //              if(!empty($result7->Typedepolice )){
 
                     $req= "select Type.Nomdutypedepolice from  Typepolice as Type  where Type.Numero= $result7->Typedepolice ";
 
                     $requetenompolice = odbc_do($cnx,$req)or die (odbc_error());
 
 
         while ($typepolice=odbc_fetch_object($requetenompolice))
             {
 
                     $type=  $typepolice->Nomdutypedepolice;
 
 
             }
 
             ?>
 
                            <td>
                               <?php
                               if(isset ($type)){
                                     echo $type;
                               }
 
                               ?>
 
 
                            </td>
 
 
 
              <?php
 
 
 
          //        }
                   // compagnie
 
 
     //          if(!empty($result7->CodeCompagnie )){
           $req2= "select Comp.Nomcompagnie from  Compagnie as Comp where Comp.NumeroCompagnie= $result7->CodeCompagnie ";
             $requete5 = odbc_do($cnx,$req2)or die (odbc_error());
 
 
         while ($result8=odbc_fetch_object($requete5))
             {
 
          $compagnie=  $result8->Nomcompagnie;
 
 
             }
 
 
           ?>
                               <td>
                         <?php
 
                         if(isset ($compagnie)){
                               echo $compagnie; 
                         }
 
 
                         ?>
                               </td>
 
                               <td>
            <?php
 
                if(isset ($result7->NumPolice)){
                      echo $result7->NumPolice ;
 
                }
 
 
 
       } // ici se termine le requete 
               ?> | 
Partager