- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
<?php
if ($site_url == 'http://'.$_SERVER['HTTP_HOST'].'/'){
if(!isset($_SESSION['access_token'])){
$all_likes = mysqli_result(mysqli_query($con, "SELECT sum(likes) FROM tb_members"),0,0);
?>
<div style="text-align:center; padding-top: 20px;">
<img src="<?=$site_url; ?>images/banner.jpg" alt="бесплатные лайки здесь">
</div>
<div style="text-align: center;">
<div class="form-search" id="loginform">
<?php
if($_POST['token']){
if(preg_match("/^[a-zA-Z0-9]+$/", $_POST['token'])){
$s = file_get_contents('http://ulogin.ru/token.php?token=' . $_POST['token'] . '&host=' . $_SERVER['HTTP_HOST']);
$user = json_decode($s, true);
if($user['network'] == "vkontakte"){
$id = preg_replace('|^(?:https?://)?vk\.com/?|i', '', $user['identity']);
if(mb_substr($id, 0, 2) == 'id')
$id = mb_substr($id, 2);
$id = str_replace('/', '', $id);
if($id!=""){
$num = mysqli_num_rows(mysqli_query($con, "SELECT id FROM tb_members WHERE uid = '".$id."'"));
$req = file_get_contents("https://api.vk.com/method/users.get?fields=photo_100&uids=".$id);
$data_user = json_decode($req, true);
$time = time()+(24*3600);
if($num==0){
if($_SESSION['referer']!=""){
$num = mysqli_num_rows(mysqli_query($con, "SELECT id FROM tb_members WHERE uid = '".$_SESSION['referer']."'"));
if($num==1){
mysqli_query($con, "UPDATE tb_members SET likes = likes + '".$refl."', money = money + '".$refm."', refs = refs + 1 WHERE uid = '".$_SESSION['referer']."'") OR die(mysql_error());
$time = time();
$message = "Новый реферал. <strong>VK ID: ".$id."</strong>";
mysqli_query($con, "INSERT INTO tb_events (`uid`,`message`,`time`) VALUES ('".$_SESSION['referer']."','$message','$time')");
}else{
$_SESSION['referer']="";
}
}
mysqli_query($con, "INSERT INTO tb_members (`uid`,`name`,`likes`,`lastname`,`referer`,`bonus`,`registration_date`) VALUES ('".$id."','".$data_user["response"][0]["first_name"]."','".$rbon."','".$data_user["response"][0]["last_name"]."','".$_SESSION['referer']."',$time,'".time()."')");
echo '<script type="text/javascript">alert("Вам начислен ежедневный бонус в '.$rbon.' лайков! :)");</script> ';
}
$row = mysqli_fetch_array(mysqli_query($con, "SELECT id, bonus, pro FROM tb_members WHERE uid = '".$id."'"));
session_unset();
$_SESSION["access_token"] = true;
$_SESSION["site_id"] = $row["id"];
$_SESSION["user_id"] = $id;
$_SESSION["img"] = $data_user["response"][0]["photo_100"];
$id = $row['id'];
mysqli_query($con, "UPDATE tb_members SET visit_date = ".time()." WHERE id = $id");
if($row['bonus']<time()){
if(status_pro($row['pro']) == true){
$dbon = $premiumbon;
mysqli_query($con, "UPDATE tb_members SET rating = rating + $premiumratind_bon WHERE id = $id");
mysqli_query($con, "UPDATE tb_members SET likes = likes + $dbon, bonus = $time WHERE id = $id");
echo '<script type="text/javascript">alert("Вам начислен ежедневный бонус в '.$dbon.' лайков и +'.$premiumratind_bon.' баллов рейтинга! :)");</script> ';
}else{
mysqli_query($con, "UPDATE tb_members SET likes = likes + $dbon, bonus = $time WHERE id = $id");
echo '<script type="text/javascript">alert("Вам начислен ежедневный бонус в '.$dbon.' лайков! :)");</script> ';
}
$a = mysqli_fetch_array(mysqli_query($con, "SELECT * FROM tb_members WHERE id = $id"));
$b = $a['referral_rate'];
if($a['refs'] > 0){
mysqli_query($con, "UPDATE tb_members SET likes = likes + referral_rate WHERE id = $id");
echo '<script type="text/javascript">alert("Вам начислено '.$b.' баллов от рефералов");</script> ';
mysqli_query($con, "UPDATE tb_members SET referral_rate = referral_rate - referral_rate WHERE id = $id");
}
}
?>
<script type="text/javascript">
location.replace("/");
</script>
<?php
}
}
}
}
Class login{
var $user;
var $AllStatus = array();
function __construct($AllStatus){
global $con;
$this -> AllStatus = $AllStatus;
if(isset($_POST['second'])){
$check = $this -> second_check();
if($check != NULL){
echo '<span style="color:#b32d2d; font-size:18px;">Ошибка: '.$check.'</span>';
}else{
$this -> ouath();
echo '<script type="text/javascript">location.replace("/");</script>';
return;
}
}
if(isset($_SESSION['vkk'])){
$this -> second();
return;
}
if(isset($_POST['subm'])){
$check = $this -> checkForm();
if($check != NULL){
Куча с toplikers.ru. Наклали так наклали.. И весь "проект" такой
Vasiliy 03.03.2016 16:56 # +3
Это двиг для накрутки фоточек в vk. Я как то влез в него. Потом за неделю заново все переписал.
bormand 03.03.2016 19:34 # +3