Guest User

Untitled

a guest
Jan 17th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.88 KB | None | 0 0
  1. $sql = "SELECT firstname, lastname, email, phone, username, password, status,
  2. memberview, statuschangedate FROM csvdata ORDER BY lastname ";
  3.  
  4. $sth= $DBH->prepare($sql);
  5. $sth->execute();
  6.  
  7. while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
  8. code
  9. }
  10.  
  11. $sql = "SELECT firstname, lastname, email, phone, username, password, status, memberview, statuschangedate FROM csvdata ORDER BY lastname ";
  12. $sth= $DBH->prepare($sql);
  13. $sth->execute();
  14. $i = 0;
  15. echo "<table class='alltable'>
  16. <tr class='firsttr' style='background:gray;'>
  17. <td>First Name </td>
  18. <td>Last Name </td>
  19. <td>Email </td>
  20. <td>Phone </td>
  21. <td>Username </td>
  22. <td>Password </td>
  23. <td>Status </td>
  24. <td>Memberview</td>
  25. <td>Status Change Date</td>
  26. <td>#</td>
  27. </tr>
  28.  
  29. ";
  30. $j = 0;
  31. while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
  32. $csvfirst = $row;
  33. $csvfirstname = $csvfirst['firstname'];
  34. $csvlastname = $csvfirst['lastname'];
  35. $csvemail = $csvfirst['email'];
  36. $csvphone = $csvfirst['phone'];
  37. $csvusername = $csvfirst['username'];
  38. $csvpassword= $csvfirst['password'];
  39. $csvstatus = $csvfirst['status'];
  40. $csvmemberview = $csvfirst['memberview'];
  41. $csvstatuschange = $csvfirst['statuschangedate'];
  42.  
  43. $memberfirstnamearray[$j] = $csvfirstname;
  44. $memberlastnamearray[$j] = $csvlastname;
  45. $memberemailarray[$j] = $csvemail;
  46. $memberphonearray[$j] = $csvphone;
  47. $j++;
  48. $i++;
  49.  
  50. echo "
  51. <tr>
  52. <td>
  53. $csvfirstname
  54. </td>
  55. <td>
  56. $csvlastname
  57. </td>
  58. <td>
  59. $csvemail
  60. </td>
  61. <td>
  62. $csvphone
  63. </td>
  64. <td>
  65. $csvusername
  66. </td>
  67. <td>
  68. $csvpassword
  69. </td>
  70. <td>
  71. $csvstatus
  72. </td>
  73. <td>
  74. $csvmemberview
  75. </td>
  76. <td>
  77. $csvstatuschange
  78. </td>
  79. <td>
  80. $i
  81. </td>
  82.  
  83. </tr>
  84. ";
  85.  
  86. }
  87. $_SESSION['firstnameexport'] = $memberfirstnamearray;
  88. $_SESSION['lastnameexport'] = $memberlastnamearray;
  89. $_SESSION['emailexport'] = $memberemailarray;
  90. $_SESSION['phoneexport'] = $memberphonearray;
  91. $_SESSION['num'] = $j;
  92. echo "
  93. </table>";
  94.  
  95. }
  96.  
  97. 'id', 'int(11)', 'NO', 'PRI', NULL, 'auto_increment'
  98. 'firstname', 'varchar(105)', 'YES', '', NULL, ''
  99. 'lastname', 'varchar(105)', 'YES', '', NULL, ''
  100. 'email', 'varchar(105)', 'YES', '', NULL, ''
  101. 'phone', 'varchar(105)', 'YES', '', NULL, ''
  102. 'username', 'varchar(105)', 'YES', '', NULL, ''
  103. 'password', 'varchar(105)', 'YES', '', NULL, ''
  104. 'status', 'varchar(105)', 'YES', '', NULL, ''
  105. 'memberview', 'varchar(105)', 'YES', '', NULL, ''
  106. 'statuschangedate', 'varchar(105)', 'YES', '', NULL, ''
  107. 'notes', 'varchar(1000)', 'YES', '', NULL, ''
  108. 'customernotes', 'varchar(1000)', 'YES', '', NULL, ''
  109.  
  110. <script>
  111. $(".viewall").click(function () {
  112.  
  113. //dropdown.bind('change', function(){
  114. //$(".alltable").slideDown(0,function(){
  115. //});
  116. $(".alltable").css("display", "table");
  117. $(".alltable tr").css("display", "table-row");
  118. $(".alltable td").css("display", "table-cell");
  119. //$(".alltable tr").slideDown(0,function(){
  120. //});
  121. //$(".alltable td").slideDown(0,function(){
  122. //});
  123. });
  124. $(".closeall").click(function () {
  125.  
  126. //dropdown.bind('change', function(){
  127. /*$(".alltable").slideUp(200,function(){
  128. });*/
  129. $(".alltable").css("display", "none");
  130. $(".alltable tr").css("display", "none");
  131. $(".alltable td").css("display", "none");
  132. /*$(".alltable tr").slideUp(200,function(){
  133. });
  134. $(".alltable td").slideUp(200,function(){
  135. });*/
  136. });
  137.  
  138. </script>
Add Comment
Please, Sign In to add comment