[ create a new paste ] login | about

Link: http://codepad.org/ORqz8qpP    [ raw code | output | fork ]

PHP, pasted on Jan 6:
          <html>
              <head>
                  <link rel="stylesheet" href="thead.css"/>

              <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.js"></script> 
              <script type="text/javascript" src="http://tablesorter.com/__jquery.tablesorter.js"></script> 
              <script type ="text/javascript">

                  $(document).ready(function() 
                      { 
                          $("#myTable").tablesorter(); 
                      } 
                  ); 
              </script>
          </head> 
          <body>  

              <?php
              $_SESSION ['role_id'] = 1;
              if ($_SESSION ['role_id'] == 1) {   ?>
              <table border="1" cellpadding="0" cellspacing="0">

              <table border='1' width='78%' id='myTable' class='tablesorter'>
                              <thead>
                              <tr class= 'header'>
                                  <th>  Booking ID  </th>
                                  <th>  Staff ID     </th>
                                  <th>   Asset ID    </th>
                                  <th>  Start Date    </th>
                                  <th>  End Date      </th>
                                 <th>Collection Date </th>
                                  <th> Actual Return Date </th>

                              </tr> 
                              </thead> 
                                  <tbody>
                   
                         

                                  <tr>
                                      <td><?php echo 123; ?></td>
                                      <td><?php echo 123; ?></td>
                                      <td><?php echo 'asdas'; ?></td>
                                      <td><?php echo '$startdate'; ?></td>
                                      <td><?php echo' $duedate'; ?></td>
                                      <td><?php echo '$collectiondate'; ?></td>
                                      <td><?php echo '$returndate'; ?></td>
                                   </tr>

                                  <tr>
                                      <td><?php echo 456; ?></td>
                                      <td><?php echo 123; ?></td>
                                      <td><?php echo 'asdas'; ?></td>
                                      <td><?php echo '$startdate'; ?></td>
                                      <td><?php echo' $duedate'; ?></td>
                                      <td><?php echo '$collectiondate'; ?></td>
                                      <td><?php echo '$returndate'; ?></td>
                                   </tr>
              
                                  <tr>
                                      <td><?php echo 789; ?></td>
                                      <td><?php echo 123; ?></td>
                                      <td><?php echo 'asdas'; ?></td>
                                      <td><?php echo '$startdate'; ?></td>
                                      <td><?php echo' $duedate'; ?></td>
                                      <td><?php echo '$collectiondate'; ?></td>
                                      <td><?php echo '$returndate'; ?></td>
                                   </tr>
                      </tbody>
                      </table>
              <?php
              }else{ 
                  exit;
              }?>
              </body>
              </html>


Output:

          <html>
              <head>
                  <link rel="stylesheet" href="thead.css"/>

              <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.js"></script> 
              <script type="text/javascript" src="http://tablesorter.com/__jquery.tablesorter.js"></script> 
              <script type ="text/javascript">

                  $(document).ready(function() 
                      { 
                          $("#myTable").tablesorter(); 
                      } 
                  ); 
              </script>
          </head> 
          <body>  

                            <table border="1" cellpadding="0" cellspacing="0">

              <table border='1' width='78%' id='myTable' class='tablesorter'>
                              <thead>
                              <tr class= 'header'>
                                  <th>  Booking ID  </th>
                                  <th>  Staff ID     </th>
                                  <th>   Asset ID    </th>
                                  <th>  Start Date    </th>
                                  <th>  End Date      </th>
                                 <th>Collection Date </th>
                                  <th> Actual Return Date </th>

                              </tr> 
                              </thead> 
                                  <tbody>
                   
                         

                                  <tr>
                                      <td>123</td>
                                      <td>123</td>
                                      <td>asdas</td>
                                      <td>$startdate</td>
                                      <td> $duedate</td>
                                      <td>$collectiondate</td>
                                      <td>$returndate</td>
                                   </tr>

                                  <tr>
                                      <td>456</td>
                                      <td>123</td>
                                      <td>asdas</td>
                                      <td>$startdate</td>
                                      <td> $duedate</td>
                                      <td>$collectiondate</td>
                                      <td>$returndate</td>
                                   </tr>
              
                                  <tr>
                                      <td>789</td>
                                      <td>123</td>
                                      <td>asdas</td>
                                      <td>$startdate</td>
                                      <td> $duedate</td>
                                      <td>$collectiondate</td>
                                      <td>$returndate</td>
                                   </tr>
                      </tbody>
                      </table>
                            </body>
              </html>


Create a new paste based on this one


Comments: