Advertisement
Guest User

Untitled

a guest
Aug 14th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.45 KB | None | 0 0
  1. <?
  2. session_start();
  3.  
  4. $for=0;
  5.  
  6.  
  7. if ($_POST['txtUsername'] == $webuser && $_POST['txtPassword'] == $webpass || $_SESSION['auth']==0) {
  8.  
  9. $for++;
  10.  
  11. ?>
  12. <html>
  13. <head>
  14. <style>
  15. body {background:#000000;color:ffffff;text-align:center;font-size:11px;padding-top:100px;}
  16. img.logo {display:block;margin-left:auto;margin-right:auto;}
  17. </style>
  18. <title>Login Required</title>
  19. </head>
  20. <body>
  21. <img class="logo" src="wilcomp.png">
  22. <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
  23. <p><label for="txtUsername">Username:</label>
  24. <br /><input type="text" title="Enter your Username" name="txtUsername" /></p>
  25. <p><label for="txtpassword">Password:</label>
  26. <br /><input type="password" title="Enter your password" name="txtPassword" /></p>
  27. <p><input type="submit" name="Submit" value="Login" /></p>
  28. </form>
  29. </body>
  30. </html>
  31. <?
  32. }
  33. else
  34. {
  35.  
  36. $_SESSION['auth']=1;
  37. mysql_connect(localhost,$username,$password);
  38. @mysql_select_db($database) or die( "Unable to select database");
  39. $query="SELECT * FROM demographics";
  40. $result=mysql_query($query);
  41. $num=mysql_numrows($result);
  42. mysql_close();
  43. echo <<<EOT
  44. <html>
  45. <head>
  46. <script src="sorttable.js"></script>
  47. <style>
  48. table {width:100%;margin: 0px;background: #FFFFFF;border: 1px solid #666;border-collapse: collapse;}
  49. td, th {font-size:12px;border-bottom: 1px solid #333333;padding: 5px 10px;text-align: center;}
  50. th {background: #eeeeee;}
  51. caption {background: #dddddd;margin: 0;border: 1px solid #333333;border-bottom: none;padding: 6px 6px;font-weight: bold;}
  52. body { text-align:center; }
  53. </style>
  54. <title>Demographic Information</title>
  55. </head>
  56. <body>
  57. <b>Change contacted status:</b><br>
  58. ID #: <form style="display: inline;" action="change.php" method="post"><input type="text" size="3" name="c1"> through ID #: <input type="text" size="3" name="c2">
  59. To: <form style="display: inline;" action="change.php" method="post"><select name="id"><option value="0">0</option><option value="1">1</option></select>
  60. <input type="submit"></form>
  61. <br>
  62. <br>
  63. <div align="center">
  64. <table class="sortable" align="center">
  65. <caption>Demographic Information</caption>
  66. <tr>
  67. <th>ID</th>
  68. <th>D.O.A</th>
  69. <th>IP</th>
  70. <th>Business</th>
  71. <th>Address</th>
  72. <th>City</th>
  73. <th>State</th>
  74. <th>ZIP</th>
  75. <th>Website</th>
  76. <th>Phone</th>
  77. <th>Contact</th>
  78. <th>Contact Phone</th>
  79. <th>Email</th>
  80. <th>Contacted</th>
  81. </tr>
  82. EOT;
  83.  
  84.  
  85. $o=1;
  86. $i=0;
  87. while ($i < $num) {
  88. $id=mysql_result($result,$i,"id");
  89. $doa=mysql_result($result, $i, "doa");
  90. $ip=mysql_result($result, $i, "ip");
  91. $business=mysql_result($result, $i, "business");
  92. $address=mysql_result($result, $i,"address");
  93. $city=mysql_result($result, $i, "city");
  94. $state=mysql_result($result, $i, "state");
  95. $zip=mysql_result($result, $i, "zip");
  96. $bsite=mysql_result($result, $i, "bsite");
  97. $phone=mysql_result($result, $i, "phone");
  98. $cname=mysql_result($result, $i, "cname");
  99. $cphone=mysql_result($result, $i, "cphone");
  100. $cemail=mysql_result($result, $i, "cemail");
  101. $contacted=mysql_result($result, $i, "contacted");
  102. echo <<<EOT
  103. <tr>
  104. <td>$id</td>
  105. <td>$doa</td>
  106. <td>$ip</td>
  107. <td>$business</td>
  108. <td>$address</td>
  109. <td>$city</td>
  110. <td>$state</td>
  111. <td>$zip</td>
  112. <td>$bsite</td>
  113. <td>$phone</td>
  114. <td>$cname</td>
  115. <td>$cphone</td>
  116. <td>$cemail</td>
  117. <td>$contacted</td>
  118. </tr>
  119. EOT;
  120. $i++;
  121. }
  122. }
  123. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement