BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

manage_linked.php 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. declare(strict_types=1);
  3. authorize();
  4. include(SERVER_ROOT.'/sections/user/linkedfunctions.php');
  5. if (!check_perms('users_mod')) {
  6. error(403);
  7. }
  8. $UserID = (int) $_REQUEST['userid'];
  9. switch ($_REQUEST['dupeaction']) {
  10. case 'remove':
  11. unlink_user($_REQUEST['removeid']);
  12. break;
  13. case 'update':
  14. if ($_REQUEST['target']) {
  15. $Target = $_REQUEST['target'];
  16. $DB->query("
  17. SELECT ID
  18. FROM users_main
  19. WHERE Username LIKE '".db_string($Target)."'");
  20. if (list($TargetID) = $DB->next_record()) {
  21. link_users($UserID, $TargetID);
  22. } else {
  23. error("User '$Target' not found.");
  24. }
  25. }
  26. $DB->query("
  27. SELECT GroupID
  28. FROM users_dupes
  29. WHERE UserID = '$UserID'");
  30. list($GroupID) = $DB->next_record();
  31. if ($_REQUEST['dupecomments'] && $GroupID) {
  32. dupe_comments($GroupID, $_REQUEST['dupecomments']);
  33. }
  34. break;
  35. default:
  36. error(403);
  37. }
  38. echo '\o/';
  39. header("Location: user.php?id=$UserID");