Advertisement
Guest User

Untitled

a guest
Aug 1st, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. if(isset($_COOKIE['ID_lsweb']))
  2. {
  3. $username = $_COOKIE['ID_lsweb'];
  4. $pass = $_COOKIE['Key_lsweb'];
  5. $check = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());
  6. while($info = mysql_fetch_array( $check ))
  7. echo "<br /><br /><div class=\"content_links\">";
  8. echo "Content links for $username:<br />";
  9. if ($info['donor_access'] >= "1" | $info['admin'] >= "1")
  10. {
  11. echo "<a href=\"donors.php\">Donor database</a><br />";
  12. }
  13. if ($info['donation_access'] >= "1" | $info['admin'] >= "1")
  14. {
  15. echo "<a href=\"donations.php\">Donation database</a><br />";
  16. }
  17. if ($info['soldier_access'] >= "1" | $info['admin'] >= "1")
  18. {
  19. echo "<a href=\"soldiers.php\">Soldier database</a><br />";
  20. }
  21. if ($info['admin'] >= "1")
  22. {
  23. echo "<a href=\"users.php\">Admin panel</a><br />";
  24. }
  25. echo "<br /><br />";
  26. echo "<a href=\"members.php\">Return to members.php</a><br /><br />";
  27. echo "</div>";
  28.  
  29. echo "<a href=chpasswd.php>Change Password</a> | <a href=logout.php>Logout</a>";
  30. }
  31. }
  32. }
  33. else
  34.  
  35. //if the cookie does not exist, they are taken to the login screen
  36. {
  37. header("Location: login.php");
  38. }
  39. ?>
  40. </body>
  41. </html>
  42. <?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement