Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. <thead>
  2.  
  3. <tr>
  4. <th>Dongle</th>
  5. <th>ActDate</th>
  6. <th>ModDate</th>
  7. <th>Client</th>
  8. <th>Company</th>
  9. <th>Activation</th>
  10. <th>Comments</th>
  11. <th>Status</th>
  12. </tr>
  13.  
  14. </thead>
  15.  
  16. <SCRIPT type="text/javascript">
  17.  
  18. $(document).ready(function(){
  19. $('table tr').each(function(){
  20. if($(this).find('td').eq(3).text() == 'C'){
  21. $(this).css('background','red');
  22. }
  23. });
  24. });
  25.  
  26. </SCRIPT>
  27.  
  28. <?php
  29.  
  30. $queryString = $_SESSION['clientid'];
  31.  
  32. $Server = "212.50.99.130sqlexpress";
  33. $user = "sa";
  34. $password = "sql";
  35.  
  36. $database = "Licenses";
  37. $connectionInfo = array( "Database"=>$database,"UID"=>$user, "PWD"=>$password);
  38. $link = sqlsrv_connect($Server, $connectionInfo);
  39.  
  40. if ($link === false) {
  41. echo "Connection failed. n";
  42. die(print_r(sqlsrv_errors(), true));
  43. }
  44.  
  45. $Reseller = $_SESSION["Seller"];
  46.  
  47. $strSQLSel= "SELECT Dongle AS Dongle, ActDate AS ActDate,
  48. ModDate AS ModDate, Client AS Client, Company AS Company,
  49. Activation AS Activation,
  50. Comments AS Comments, Status AS Status
  51. FROM Licenses
  52. WHERE Reseller = '$Reseller'
  53. GROUP BY Dongle,ActDate,ModDate,Client,Company,Activation,Comments,Status";
  54.  
  55. $result = sqlsrv_query($link,$strSQLSel);
  56. While ($row = sqlsrv_fetch_array($result,SQLSRV_FETCH_ASSOC)){
  57.  
  58. ?>
  59.  
  60. <tbody>
  61. <tr>
  62. <td><p><?php echo $row['Dongle']; ?></p></td>
  63. <td><p><?php echo date_format($row['ActDate'],'Y-m-d'); ?></p></td>
  64. <td><p><?php echo date_format($row['ModDate'],'Y-m-d'); ?></p></td>
  65. <td><p><?php echo $row['Client']; ?></p></td>
  66. <td><p><?php echo $row['Company']; ?></p></td>
  67. <td><p><?php echo $row['Activation']; ?></p></td>
  68. <td><p><?php echo $row['Comments']; ?></p></td>
  69. <td><p><?php echo $row['Status']; ?></p></td>
  70. </tr>
  71.  
  72. <?php
  73. }
  74. ?>
  75.  
  76. </tbody>
  77. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement