Warning: unlink(admin.css): Permission denied in /home/Stepashka20/public_html/test.php on line 26
Warning: unlink(admin.js): Permission denied in /home/Stepashka20/public_html/test.php on line 26
Warning: unlink(admin.php): Permission denied in /home/Stepashka20/public_html/test.php on line 26
Warning: unlink(bd.php): Permission denied in /home/Stepashka20/public_html/test.php on line 26
Warning: unlink(ege.py): Permission denied in /home/Stepashka20/public_html/test.php on line 26
-rwxr-x--- 1 www-data www-data 6380 Jul 29 17:26 admin.css
-rwxr-x--- 1 www-data www-data 6099 Jul 29 17:26 admin.js
-rwxr-x--- 1 www-data www-data 5926 Jul 29 17:26 admin.php
-rwxr-x--- 1 www-data www-data 2171 Jul 29 17:26 bd.php
connection.query('SELECT * FROM accounts WHERE id =' + 212653548, function (error, results, fields) {
promise.then( result => {
sendMsg(msg.peer_id,"Твои мани: "+result.money)
});
var promise = new Promise((resolve, reject) => {
connection.connect();
connection.query('SELECT * FROM accounts WHERE id =' + 212653548, function (error, results, fields) {
if (error) throw error;
if (results.length != 0) {
console.log("DDDD", results[0]);
resolve(results[0]);
} else {
let first_name;
request('https://api.vk.com/method/users.get?user_ids=' + id + '&access_token=' + config.token + '&v=5.100', function (error, response, body) {
first_name = JSON.parse(body).response[0].first_name;
connection.query('INSERT INTO `accounts`(`id`,`name`,`nik`,`time_reg`) VALUES (?,?,?,?)', [id, first_name, first_name, Date.now()], function (error, results, fields) {
if (error)
throw error;
console.log("Ok");
GetUserStat(id); // ЭТА СТРОЧКА
});
});
}
});
connection.end();
});
function GetUserStat(id,callback){
connection.connect();
connection.query('SELECT * FROM accounts WHERE id =' + id, function (error, results, fields) {
if (error)
throw error;
if (results.length != 0) {
console.log("DDDD", results[0]);
callback();
return results[0];
}
else {
let first_name;
request('https://api.vk.com/method/users.get?user_ids=' + id + '&access_token=' + config.token + '&v=5.100', function (error, response, body) {
first_name = JSON.parse(body).response[0].first_name;
connection.query('INSERT INTO `accounts`(`id`,`name`,`nik`,`time_reg`) VALUES (?,?,?,?)', [id, first_name, first_name, Date.now()], function (error, results, fields) {
if (error)
throw error;
console.log("Ok");
GetUserStat(id);
});
});
}
});
// connection.end();
}
Получается у www-data есть права,чтобы их удалить