Файл: modules/earn/check/twfavorite.php
Строк: 21
<?
mysql_query("INSERT INTO `done` (`social` ,`type` ,`uid` ,`tid`, `mode`) VALUES ('".$Task['social']."', '".$Task['type']."', '$uid', '$tid', 'done');");
$path = $aa['path'];
if($aa['query']) $path .= '?'.$aa['query'];
preg_match_all('#/status/([0-9]+)#',$path,$bb);
$res = Core::url_get_contents('https://twitter.com/i/expanded/batch/'.$bb[1][0].'?facepile_max=7&include%5B%5D=social_proof&include%5B%5D=ancestors&include%5B%5D=descendants');
if(strpos($res,$CONFIG['Globals']['social:tw'])) $in_array = true;
if($in_array){
echo Ajax::Responce(array('ok'));
$tid = $Task['id'];
$uid = $CONFIG['uid'];
Tasks::ChangeBal($tid,$Task['bal']-$Task['pay']);
mysql_query("UPDATE `users` SET `balance` = balance+".$Task['pay']." WHERE `id` =$uid;");
} else {
echo Ajax::Responce(array('err'));
mysql_query("DELETE FROM `done` WHERE `uid`='$uid' AND `tid`='$tid' AND `mode`='done';");
}