<html>

<head>
     <meta http-equiv='content-type' content='text/html;charset=utf-8'>
     <title>WebBike V1.0</title>
     <link href="style.css" rel="stylesheet" media="screen">
</head>

<body>
     <table>
          <tr>
               <?php
               require 'database.inc.php';
               //session_start();
               //session_register("lg_user");
               //session_register("lg_password");
               //session_register("lg_admin");
               //session_register("lg_menu1");
               //session_register("lg_menu2");
               //session_register("lg_menu3");
               //session_register("lg_menu4");
               //session_register("lg_menu5");
               if (Test_User($lg_user, $lg_password) == TRUE) {
                    if (isset($Type) == False) {
                         $Type = 0;
                    }
                    switch ($Type) {
                         case 0:
                              echo "    <td>sous menu</td>\n";
                              break;
                         case 1:
                              if ($lg_menu1 & 1)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='1' type='submit'>Afficher article</button>\n" .
                                        "      <input type='hidden' name='Type' value='1'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='1'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu1 & 2)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='2' type='submit'>Modifier article</button>\n" .
                                        "      <input type='hidden' name='Type' value='1'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='2'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu1 & 4)
                                   echo "    <td>\n" .
                                        "     <form  action='default.php' method='POST' target='info'>\n" .
                                        "      <button ACCESSKEY='3' type='submit'>Nouvel article</button>\n" .
                                        "      <input type='hidden' name='Type' value='1'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='3'>\n" .
                                        "      <input type='hidden' name='NoVisu' value='0'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu1 & 8)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='4' type='submit'>Copie article</button>\n" .
                                        "      <input type='hidden' name='Type' value='1'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='4'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu1 & 16)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='5' type='submit'>Supprimer article</button>\n" .
                                        "      <input type='hidden' name='Type' value='1'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='5'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              break;
                         case 2:
                              if ($lg_menu2 & 1)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='1' type='submit'>Afficher V&eacute;hicule</button>\n" .
                                        "      <input type='hidden' name='Type' value='2'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='1'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu2 & 2)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='2' type='submit'>Modifier V&eacute;hicule</button>\n" .
                                        "      <input type='hidden' name='Type' value='2'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='2'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu2 & 4)
                                   echo "    <td>\n" .
                                        "     <form  action='default.php' method='POST' target='info'>\n" .
                                        "      <button ACCESSKEY='3' type='submit'>Nouveau V&eacute;hicule</button>\n" .
                                        "      <input type='hidden' name='Type' value='2'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='3'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu2 & 8)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='4' type='submit'>Copie V&eacute;hicule</button>\n" .
                                        "      <input type='hidden' name='Type' value='2'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='4'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu2 & 16)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='5' type='submit'>Supprimer V&eacute;hicule</button>\n" .
                                        "      <input type='hidden' name='Type' value='2'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='5'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              break;
                         case 3:
                              if ($lg_menu3 & 1)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='1' type='submit'>1 Afficher Client</button>\n" .
                                        "      <input type='hidden' name='Type' value='3'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='1'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu3 & 2)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='2' type='submit'>2 Modifier Client</button>\n" .
                                        "      <input type='hidden' name='Type' value='3'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='2'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu3 & 4)
                                   echo "    <td>\n" .
                                        "     <form  action='default.php' method='POST' target='info'>\n" .
                                        "      <button ACCESSKEY='3' type='submit'>3 Nouveau Client</button>\n" .
                                        "      <input type='hidden' name='Type' value='3'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='3'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu3 & 8)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='4' type='submit'>4 Copie Client</button>\n" .
                                        "      <input type='hidden' name='Type' value='3'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='4'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu3 & 16)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='5' type='submit'>5 Supprimer Client</button>\n" .
                                        "      <input type='hidden' name='Type' value='3'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='5'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              break;
                         case 4:
                              if ($lg_menu4 & 1)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='1' type='submit'>1 Factures</button>\n" .
                                        "      <input type='hidden' name='Type' value='4'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='1'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu4 & 2)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='2' type='submit'>2 Devis et offres</button>\n" .
                                        "      <input type='hidden' name='Type' value='4'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='2'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu4 & 4)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='3' type='submit'>3 Commande</button>\n" .
                                        "      <input type='hidden' name='Type' value='4'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='3'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              /*  	 if($lg_menu4&8)
      echo "    <td>\n" .
           "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
           "      <button ACCESSKEY='4' type='submit'>4 Leasing</button>\n" .
           "      <input type='hidden' name='Type' value='4'>\n" .
           "      <input type='hidden' name='Sous_Type' value='4'>\n" .
           "     </form>\n" .
           "    </td>\n";*/
                              if ($lg_menu4 & 16)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='5' type='submit'>5 Facutre rapide</button>\n" .
                                        "      <input type='hidden' name='Type' value='4'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='5'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              break;
                         case 5:
                              if ($lg_menu5 & 1)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='1' type='submit'>1 Comptes</button>\n" .
                                        "      <input type='hidden' name='Type' value='5'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='1'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu5 & 2)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='2' type='submit'>2 Groupes Marchandise</button>\n" .
                                        "      <input type='hidden' name='Type' value='5'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='2'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu5 & 4)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='3' type='submit'>3 TVA</button>\n" .
                                        "      <input type='hidden' name='Type' value='5'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='3'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu5 & 8)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='4' type='submit'>4 Salaires</button>\n" .
                                        "      <input type='hidden' name='Type' value='5'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='4'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              if ($lg_menu5 & 16)
                                   echo "    <td>\n" .
                                        "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                        "      <button ACCESSKEY='5' type='submit'>5 Factures à encaiser</button>\n" .
                                        "      <input type='hidden' name='Type' value='5'>\n" .
                                        "      <input type='hidden' name='Sous_Type' value='5'>\n" .
                                        "     </form>\n" .
                                        "    </td>\n";
                              break;
                         case 6:
                              echo "    <td>\n" .
                                   "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                   "      <button ACCESSKEY='1' type='submit'>1 utilisateurs</button>\n" .
                                   "      <input type='hidden' name='Type' value='6'>\n" .
                                   "      <input type='hidden' name='Sous_Type' value='1'>\n" .
                                   "     </form>\n" .
                                   "    </td>\n";
                              echo "    <td>\n" .
                                   "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                   "      <button ACCESSKEY='2' type='submit'>2 Champs de formulaire</button>\n" .
                                   "      <input type='hidden' name='Type' value='6'>\n" .
                                   "      <input type='hidden' name='Sous_Type' value='2'>\n" .
                                   "     </form>\n" .
                                   "    </td>\n";
                              echo "    <td>\n" .
                                   "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                   "      <button ACCESSKEY='3' type='submit'>3 Champs de recherche</button>\n" .
                                   "      <input type='hidden' name='Type' value='6'>\n" .
                                   "      <input type='hidden' name='Sous_Type' value='3'>\n" .
                                   "     </form>\n" .
                                   "    </td>\n";
                              echo "    <td>\n" .
                                   "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                   "      <button ACCESSKEY='4' type='submit'>4 Rabais</button>\n" .
                                   "      <input type='hidden' name='Type' value='6'>\n" .
                                   "      <input type='hidden' name='Sous_Type' value='4'>\n" .
                                   "     </form>\n" .
                                   "    </td>\n";
                              echo "    <td>\n" .
                                   "     <form  action='recherche.php' method='POST' target='recherche'>\n" .
                                   "      <button ACCESSKEY='5' type='submit'>5 Methodes de payement</button>\n" .
                                   "      <input type='hidden' name='Type' value='6'>\n" .
                                   "      <input type='hidden' name='Sous_Type' value='5'>\n" .
                                   "     </form>\n" .
                                   "    </td>\n";
                              break;
                    }
               }
               ?>
          </tr>
     </table>
</body>

</html>