Advertisement
Guest User

Untitled

a guest
Nov 29th, 2015
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.71 KB | None | 0 0
  1. <br/>
  2. <table class="table table-bordered table-hover">
  3.         <thead>
  4.             <tr>
  5.                 <th>ID</th>
  6.                 <th>Megrendelő neve:</th>
  7.                 <th>Megrendelő lakcíme:</th>
  8.                 <th>Megrendelő telefonszáma:</th>
  9.                 <th>Megrendelő e-mail címe:</th>
  10.                 <th>Művelet:</th>
  11.             </tr>
  12.         </thead>
  13.         <tbody>
  14.  
  15. <?php
  16. include './config.php';
  17. $res=$conn->query("select * from megrendelok");
  18. while ($row = $res->fetch_assoc()) {
  19. ?>
  20.  
  21.             <tr>
  22.                 <td><?php echo $row['id']; ?></td>
  23.                 <td><?php echo $row['megrendelonev']; ?></td>
  24.                 <td><?php echo $row['megrendelocim']; ?></td>
  25.                 <td><?php echo $row['megrendelotel']; ?></td>
  26.                 <td><?php echo $row['megrendelomail']; ?></td>
  27.                 <td> <a class="btn btn-warning btn-sm" data-toggle="modal" data-target="#myModal<?php echo $row['id']; ?>">
  28.                     <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
  29.                    
  30.                     <a class="btn btn-danger btn-sm"
  31.                        data-toggle="modal" data-target="#myModal">
  32.                    
  33.                     <span class="glyphicon glyphicon-trash" aria-hidden="true"></span></a>
  34.                    
  35.                     <!-- Modal -->
  36.                         <div class="modal fade" id="myModal<?php echo $row['id']; ?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel<?php echo $row['id']; ?>">
  37.                           <div class="modal-dialog" role="document">
  38.                             <div class="modal-content">
  39.                               <div class="modal-header">
  40.                                 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  41.                                 <h4 class="modal-title" id="myModalLabel<?php echo $row['id']; ?>">Megrendelő adatainak szerkesztése</h4>
  42.                               </div>
  43.                               <div class="modal-body">
  44.                                   <form>
  45.                                       <div class="form-group">
  46.                                           <label for="nev">Megrendelő neve</label>
  47.                                           <input type="text" class="form-control" id="nev<?php echo $row['id']; ?>" value="<?php echo $row['megrendelonev']; ?>">
  48.                                       </div>
  49.                                       <div class="form-group">
  50.                                           <label for="cim">Megrendelő címe</label>
  51.                                           <input type="text" class="form-control" id="cim<?php echo $row['id']; ?>" value="<?php echo $row['megrendelocim']; ?>">
  52.                                       </div>
  53.                                       <div class="form-group">
  54.                                           <label for="tel">Megrendelő telefonszáma</label>
  55.                                           <input type="text" class="form-control" id="tel<?php echo $row['id']; ?>" value="<?php echo $row['megrendelotel']; ?>">
  56.                                       </div>
  57.                                       <div class="form-group">
  58.                                           <label for="mail">Megrendelő e-mail címe</label>
  59.                                           <input type="text" class="form-control" id="mail<?php echo $row['id']; ?>" value="<?php echo $row['megrendelomail']; ?>">
  60.                                       </div>
  61.                                       <div class="form-group">
  62.                                           <label for="akti">Aktív</label>
  63.                                           <input type="text" class="form-control" id="aktiv<?php echo $row['id']; ?>" value="<?php echo $row['aktiv']; ?>">
  64.                                       </div>
  65.                                      
  66.                                   </form>
  67.                            
  68.                               </div>
  69.                               <div class="modal-footer">
  70.                                 <button type="button" class="btn btn-default" data-dismiss="modal">Mégsem</button>
  71.                                 <button id="updatedata"type="button" onclick="updatedata('<?php echo $row['id']; ?>')"class="btn btn-primary">Módosítások mentése</button>
  72.                               </div>
  73.                             </div>
  74.                           </div>
  75.                         </div>
  76.                    
  77.                 </td>
  78.             </tr>
  79.                    
  80.                 </td>
  81.              <?php
  82.  
  83.  
  84. }  
  85. ?>            
  86. </tr>
  87.        
  88.         </tbody>
  89.     </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement