fork download
  1. if(isset($_GET['u']) && !empty($_GET['u']))
  2. {
  3. $user= $_GET["u"];
  4. $result = mysqli_query($connection, "SELECT * FROM `login` WHERE `id`='{$user}' LIMIT 1");
  5. if(mysqli_num_rows($result)==1)
  6. {
  7. $row = mysqli_fetch_array($result);
  8. $username = $row['username'];
  9. $id = $row['id'];
  10. }
  11. else
  12. {
  13. echo 'error 404.';
  14. }
  15. if(isset($_GET['u']) && !empty($_GET['u']))
  16. {
  17. $check = mysqli_query($connection, "SELECT * FROM friend WHERE me='$globalid' AND friend='$id' OR me='$id' AND friend='$globalid'");
  18. if(mysqli_num_rows($check)==1)
  19. {
  20. echo 'V dryzyah!';
  21. }
  22. else {
  23. $from_query = mysqli_query($connection, "SELECT * FROM req WHERE 'from'='$id' AND 'to'='$globalid'");
  24. $to_query = mysqli_query($connection, "SELECT * FROM req WHERE 'from'='$globalid' AND 'to'='$id'");
  25. if(mysqli_num_rows($from_query) ==1)
  26. {
  27. echo 'Add or No';
  28. }
  29. elseif(mysqli_num_rows($to_query) ==1)
  30. {
  31. echo 'Otmena zayavki';
  32. }
  33. else {
  34. echo 'Send REQ';
  35. }
  36. }
  37.  
  38. }
  39. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
if(isset($_GET['u']) && !empty($_GET['u']))
^
Main.java:1: error: class, interface, or enum expected
if(isset($_GET['u']) && !empty($_GET['u']))
  ^
Main.java:1: error: class, interface, or enum expected
if(isset($_GET['u']) && !empty($_GET['u']))
   ^
Main.java:4: error: class, interface, or enum expected
      $result = mysqli_query($connection, "SELECT * FROM `login` WHERE `id`='{$user}' LIMIT 1");
      ^
Main.java:5: error: class, interface, or enum expected
      if(mysqli_num_rows($result)==1)
      ^
Main.java:8: error: class, interface, or enum expected
    $username = $row['username'];
    ^
Main.java:8: error: unclosed character literal
    $username = $row['username'];
                     ^
Main.java:8: error: unclosed character literal
    $username = $row['username'];
                              ^
Main.java:9: error: class, interface, or enum expected
    $id = $row['id'];
    ^
Main.java:9: error: unclosed character literal
    $id = $row['id'];
               ^
Main.java:9: error: unclosed character literal
    $id = $row['id'];
                  ^
Main.java:10: error: class, interface, or enum expected
  }
  ^
Main.java:13: error: unclosed character literal
   echo 'error 404.';
        ^
Main.java:13: error: unclosed character literal
   echo 'error 404.';
                   ^
Main.java:18: error: class, interface, or enum expected
    if(mysqli_num_rows($check)==1)
    ^
Main.java:20: error: unclosed character literal
      echo 'V dryzyah!';
           ^
Main.java:20: error: unclosed character literal
      echo 'V dryzyah!';
                      ^
Main.java:24: error: class, interface, or enum expected
      $to_query   = mysqli_query($connection, "SELECT * FROM req WHERE 'from'='$globalid' AND 'to'='$id'");
      ^
Main.java:25: error: class, interface, or enum expected
      if(mysqli_num_rows($from_query) ==1)
      ^
Main.java:27: error: unclosed character literal
        echo 'Add or No';
             ^
Main.java:27: error: unclosed character literal
        echo 'Add or No';
                       ^
Main.java:31: error: unclosed character literal
        echo 'Otmena zayavki';
             ^
Main.java:31: error: unclosed character literal
        echo 'Otmena zayavki';
                            ^
Main.java:34: error: unclosed character literal
        echo 'Send REQ';
             ^
Main.java:34: error: unclosed character literal
        echo 'Send REQ';
                      ^
25 errors
stdout
Standard output is empty