if(isset($_GET['u']) && !empty($_GET['u']))
{
$user= $_GET["u"];
$result = mysqli_query($connection, "SELECT * FROM `login` WHERE `id`='{$user}' LIMIT 1");
if(mysqli_num_rows($result)==1)
{
$row = mysqli_fetch_array($result);
$username = $row['username'];
$id = $row['id'];
}
else
{
echo 'error 404.';
}
if(isset($_GET['u']) && !empty($_GET['u']))
{
$check = mysqli_query($connection, "SELECT * FROM friend WHERE me='$globalid' AND friend='$id' OR me='$id' AND friend='$globalid'");
if(mysqli_num_rows($check)==1)
{
echo 'V dryzyah!';
}
else {
$from_query = mysqli_query($connection, "SELECT * FROM req WHERE 'from'='$id' AND 'to'='$globalid'");
$to_query = mysqli_query($connection, "SELECT * FROM req WHERE 'from'='$globalid' AND 'to'='$id'");
if(mysqli_num_rows($from_query) ==1)
{
echo 'Add or No';
}
elseif(mysqli_num_rows($to_query) ==1)
{
echo 'Otmena zayavki';
}
else {
echo 'Send REQ';
}
}
}
}
aWYoaXNzZXQoJF9HRVRbJ3UnXSkgJiYgIWVtcHR5KCRfR0VUWyd1J10pKQp7CiAgICAgICR1c2VyPSAkX0dFVFsidSJdOwogICAgICAkcmVzdWx0ID0gbXlzcWxpX3F1ZXJ5KCRjb25uZWN0aW9uLCAiU0VMRUNUICogRlJPTSBgbG9naW5gIFdIRVJFIGBpZGA9J3skdXNlcn0nIExJTUlUIDEiKTsKICAgICAgaWYobXlzcWxpX251bV9yb3dzKCRyZXN1bHQpPT0xKQogICAgICAgIHsKICAgICRyb3cgPSBteXNxbGlfZmV0Y2hfYXJyYXkoJHJlc3VsdCk7CiAgICAkdXNlcm5hbWUgPSAkcm93Wyd1c2VybmFtZSddOwogICAgJGlkID0gJHJvd1snaWQnXTsKICB9CiAgZWxzZQogIHsKICAgZWNobyAnZXJyb3IgNDA0Lic7CiAgfQogIGlmKGlzc2V0KCRfR0VUWyd1J10pICYmICFlbXB0eSgkX0dFVFsndSddKSkKICAgewogICAgJGNoZWNrID0gbXlzcWxpX3F1ZXJ5KCRjb25uZWN0aW9uLCAiU0VMRUNUICogRlJPTSBmcmllbmQgV0hFUkUgbWU9JyRnbG9iYWxpZCcgQU5EIGZyaWVuZD0nJGlkJyBPUiBtZT0nJGlkJyBBTkQgZnJpZW5kPSckZ2xvYmFsaWQnIik7CiAgICBpZihteXNxbGlfbnVtX3Jvd3MoJGNoZWNrKT09MSkKICAgIHsKICAgICAgZWNobyAnViBkcnl6eWFoISc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgJGZyb21fcXVlcnkgPSBteXNxbGlfcXVlcnkoJGNvbm5lY3Rpb24sICJTRUxFQ1QgKiBGUk9NIHJlcSBXSEVSRSAnZnJvbSc9JyRpZCcgQU5EICd0byc9JyRnbG9iYWxpZCciKTsKICAgICAgJHRvX3F1ZXJ5ICAgPSBteXNxbGlfcXVlcnkoJGNvbm5lY3Rpb24sICJTRUxFQ1QgKiBGUk9NIHJlcSBXSEVSRSAnZnJvbSc9JyRnbG9iYWxpZCcgQU5EICd0byc9JyRpZCciKTsKICAgICAgaWYobXlzcWxpX251bV9yb3dzKCRmcm9tX3F1ZXJ5KSA9PTEpCiAgICAgIHsKICAgICAgICBlY2hvICdBZGQgb3IgTm8nOwogICAgICB9CiAgICAgIGVsc2VpZihteXNxbGlfbnVtX3Jvd3MoJHRvX3F1ZXJ5KSA9PTEpCiAgICAgICB7CiAgICAgICAgZWNobyAnT3RtZW5hIHpheWF2a2knOwogICAgICB9CiAgICAgIGVsc2UgewogICAgICAgIGVjaG8gJ1NlbmQgUkVRJzsKICAgICAgfQogICAgfQoKICB9Cn0=
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