Компьютерный форум OSzone.net  

Компьютерный форум OSzone.net (http://forum.oszone.net/index.php)
-   Программирование и базы данных (http://forum.oszone.net/forumdisplay.php?f=21)
-   -   Помощь по обменнику (http://forum.oszone.net/showthread.php?t=271181)

test.hack@vk 01-11-2013 22:43 2245675

Помощь по обменнику
 
Доброго дня, прошу помочь тех кто сталкивался с обменниками для ВК и т.д
Не работает кнопка завершить регистрацию, помогите пожалуйста

Тест: Перейти

Код на регистрацию:

Код:

/*!
 * users.js
 * http://monty-tool.ru/
 *
 * Copyright 2012, Ruslan S.
 *
 * Date: Tue Oct 09 19:40:02
 */

$(document).ready(function() {
 $('body').append('\
  <div id="loading"><div id="load"></div></div>\
  <div id="error_head"></div>\
  <input type="hidden" id="this_url">\
  <input type="hidden" value="1" id="this_wnd">\
 ');
});

var users = {
 box_login: function() {
  box._open({
  width: 610,
  text: '\
    <div id="box_overflow">\
    <div id="box_title_text">Авторизация</div>\
    <div onclick="box._close();" id="box_title_closed">Закрыть</div>\
    </div>\
    <div id="box_title_div_text">\
    <div id="box_title_text_bold">Введите Ваш логин и пароль.</div>\
    <div id="box_title_text_nobold">Обратите внимание, что в данную форму НЕ нужно вводить данные от своей страницы ВК.</div>\
    </div>\
    <div id="box_error_i"></div>\
    <div id="box_center">\
    <div id="box_center_inner">\
      <div class="box_label">Ваш логин</div>\
      <div>\
      <input type="text" onfocus="if($(this).val() == \'Введите логин\'){$(this).val(\'\').removeClass(\'placeholder\')}" onblur="if($(this).val() == \'\'){$(this).val(\'Введите логин\').addClass(\'placeholder\')}" value="Введите логин" class="placeholder" id="loginq">\
      </div>\
      <div class="box_label password">Ваш пароль</div>\
      <div>\
      <input type="password" onfocus="if($(this).val() == \'Введите пароль\'){$(this).val(\'\').removeClass(\'placeholder\')}" onblur="if($(this).val() == \'\'){$(this).val(\'Введите пароль\').addClass(\'placeholder\')}" value="Введите пароль" class="placeholder" id="passwordq">\
      <div onclick="users.login()" id="login_enter" class="box_button_first_wrap"><div id="login_enter_inner" class="box_buttons box_button_first">Войти в систему</div></div>\
      <div id="new_reg"><a href="javascript://" onclick="users.box_reg()" class="box_buttons box_button_first"><b>Регистрация</b></a></div>\
      </div>\
    </div>\
    </div>\
  ',
  nt: 1
  });
  setTimeout(function() {
  $('#loginq, #passwordq').keydown(function(event) {
    var keyCode = event.which;
    if(keyCode == 13) $('#login_enter').click();
  });
  }, 100);
 },
 box_reg: function() {
  box._open({
  width: 610,
  text: '\
    <div id="box_overflow">\
    <div id="box_title_text">Регистрация</div>\
    <div onclick="box._close();" id="box_title_closed">Закрыть</div>\
    </div>\
    <div style="overflow: hidden" id="new_user_box">\
    <div id="box_error_i"></div>\
    <div id="box_center">\
      <div id="box_center_inner">\
      <div class="box_label">Ваша ссылка на страницу ВК</div>\
      <div>\
        <input type="text" onfocus="if($(this).val() == \'Введите свою ссылку\'){$(this).val(\'\').removeClass(\'placeholder\')}" onblur="if($(this).val() == \'\'){$(this).val(\'Введите свою ссылку\').addClass(\'placeholder\')}" value="Введите свою ссылку" class="placeholder" id="vk_url">\
        <div id="hide_reg" style="display: none">\
        <div class="box_label new_login">Придумайте логин</div>\
        <input maxlength="30" type="text" id="new_login">\
        <div class="box_label new_password">Придумайте пароль</div>\
        <input maxlength="50" type="password" id="new_password">\
        </div>\
        <div id="rbtn"><div id="reg_enter" class="box_button_first_wrap"><div id="reg_enter_inner" class="box_buttons box_button_first">Продолжить</div></div></div>\
      </div>\
      </div>\
    </div>\
    </div>\
    <div style="display: none; margin-top: 10px; margin-left: 580px;" id="new_user_box2">\</div>\
  ',
  nt: 1
  });
  setTimeout(function() {
  $('#reg_enter').click(function() {
    if($('#vk_url').val().indexOf('vk.com/') > -1 && $('#vk_url').val().length >= 9) {
    $('#hide_reg').fadeIn(400);
    $('#rbtn').html('<div id="reg_enter" onclick="users.reg()" class="box_button_first_wrap"><div id="reg_enter_inner" class="box_buttons box_button_first">Продолжить</div></div>');
    }
    else {
    $('#vk_url').focus();
    $('#vk_url').addClass('error_field');
    setTimeout(function() {
      $('#vk_url').removeClass('error_field');
    }, 4000);
    }
  });
  $('#vk_url, #new_login, #new_password').keydown(function(event) {
    var keyCode = event.which;
    if(keyCode == 13) $('#reg_enter').click();
  });
  }, 100);
 },
 login: function() {
  $('#box_error_i').html('');
  $('#login_enter_inner').html('<div class="upload_inv"></div>');
  $.post('/login.php', {
  __login: $('#loginq').val(),
  __password: $('#passwordq').val()
  }, function(data) {
  var response = data;
  $('#login_enter_inner').html('Войти в систему');
  if(response == '!login') {
    $('#passwordq').removeClass('error_field');
    $('#loginq').focus();
    $('#loginq').addClass('error_field');
    $('#box_title_div_text').show();
    setTimeout(function() {
    $('#loginq').removeClass('error_field');
    }, 4000);
  } else if(response == '!password') {
    $('#loginq').removeClass('error_field');
    $('#passwordq').focus();
    $('#passwordq').addClass('error_field');
    $('#box_title_div_text').show();
    setTimeout(function() {
    $('#passwordq').removeClass('error_field');
    }, 4000);   
  } else if(response == '!info') {
    $('#box_error_i').html('<div id="box_error_red" class="height_big"><div id="title">Не удается войти.</div><div id="text">Пожалуйста, проверьте правильность написания <b>логина</b> и <b>пароля</b>.</div></div>');
    $('#box_title_div_text').hide();
  } else if(response == 1) {
    $('#login_enter_inner').html('<div class="upload_inv"></div>');
    location.href='/';
  }
  });
 },
 reg: function() {
  $('#reg_enter_inner, #reg_enter_innerq').html('<div class="upload_inv"></div>');
  $('#box_error_i').html('');
  $.post('/reg.php', {
  __login: $('#new_login').val(),
  __password: $('#new_password').val(),
  __vk: $('#vk_url').val(),
  __tz: hours_result
  }, function(data) {
  var response = data;
  $('#reg_enter_inner').html('Продолжить');
  $('#reg_enter_innerq').html('Завершить регистрацию');
  if(response == '!vk') {
    $('#vk_url').focus();
    $('#vk_url').addClass('error_field');
    setTimeout(function() {
    $('#vk_url').removeClass('error_field');
    }, 4000);
  } else if(response == '!vk_blocked') {
    $('#box_error_i').html('<div id="box_error_reg_red">К сожалению, но Ваша страница находится в черном списке сайта.</div>');
    } else if(response == '!login') {
    $('#new_login').focus();
    $('#new_password').removeClass('error_field');
    $('#new_login').addClass('error_field');
    setTimeout(function() {
    $('#new_login').removeClass('error_field');
    }, 4000);     
  } else if(response == '!password') {
    $('#new_password').focus();
    $('#new_login').removeClass('error_field');
    $('#new_password').addClass('error_field');
    setTimeout(function() {
    $('#new_password').removeClass('error_field');
    }, 4000);     
  } else if(response.split('|')[3] == '!vk_error') {
    var vk_url = response.split('|')[0];
    var vk_name = response.split('|')[1];
    var vk_surname = response.split('|')[2];
    $('#box_error_i').html('<div id="box_error_reg_red"><a target="_blank" href="http://vk.com/'+vk_url+'"><b>'+vk_name+' '+vk_surname+'</b></a> уже зарегистрирован.</div>');
    $('#vk_url').focus();
    $('#vk_url').addClass('error_field');
    setTimeout(function() {
    $('#vk_url').removeClass('error_field');
    }, 4000); 
  } else if(response == '!login_b') {
    users.reg_back();
    $('#box_error_i').html('<div id="box_error_reg_red">К сожалению, но логин <b>'+$('#new_login').val()+'</b> уже занят. Придумайте другой.</div>');
    $('#new_login').addClass('error_field');
    setTimeout(function() {
    $('#new_login').removeClass('error_field');
    }, 4000);   
  } else if(response == '!db') {
    users.reg_back();
    $('#box_error_i').html('<div id="box_error_reg_red">Не удалось соединиться с сервером. Попробуйте позднее.</div>');
  } else if(response.split('|')[3] == '!friend') {
    var vk_url = response.split('|')[0];
    var vk_name = response.split('|')[1];
    var vk_surname = response.split('|')[2];
    $('#new_user_box').animate({marginLeft: '-405px', opacity: 0}, 400);
    setTimeout(function() {
    $('#new_user_box').hide();
    $('#new_user_box2').show().animate({marginLeft: 0}, 400);
    $('#new_user_box2').html('<div class="friend_add" id="box_title_text_nobold"><b>Убедите нас, что <a target="_blank" href="http://vk.com/'+vk_url+'">'+vk_name+' '+vk_surname+'</a> это Вы!</b> <br />Для этого подпишитесь на</b> <a target="_blank" href="http://vk.com/id165428049">Данила Калашникова</a>. После завершения, можете отписаться.</div> <div align="center"><div id="reg_enterq" onclick="users.reg()" class="box_button_first_wrap"><div id="reg_enter_innerq" class="box_buttons box_button_first">Завершить регистрацию</div></div> <div onclick="users.reg_back()" class="box_button_back">вернуться назад</div></div>');
    }, 300);
  } else if(response == 1) {
    $('#reg_enter_inner, #reg_enter_innerq').html('<div class="upload_inv"></div>');
    location.href = '/';
  }
  });
 },
 reg_back: function() {
  $('#new_user_box').animate({marginLeft: 0, opacity: 1}, 400);
  setTimeout(function() {
  $('#new_user_box').show();
  $('#new_user_box2').hide().animate({marginLeft: '580px'}, 400);
  }, 200);
 },
 notifications: function() {
  $.getJSON('/notifications/notifications', function(data) {
    var response = data;
    if(response) {
    if(response.msg) {
      if(response.points) {
      if(response.act == 'plus') set_points(1, response.points);
      else if(response.act == 'minus') set_points(2, response.points);
      }
      wnd_bottom._show({
      title: response.title,
      text: response.text,
      icon: response.icon,
      image: response.icon,
      src: response.image,
      });
    }
    }
    notif_check = setTimeout(function() {users.notifications()}, 8000);
  });
 },
 error_head: function(text) {
  $('#error_head').fadeIn(400).html(text);
  setTimeout(function() {
  $('#error_head').fadeOut(400);
  }, 3500);
 }
}

var nav = {
 go: function(a, b, c, d) {
  url = c ? c : $(a).attr('href');
  if(!d) nav.loader(1);
  $.get(url, function(data) {
  response = data;
  content_page = response.match(/<div id="page">([\s\S]*)<\/div>/i);
  title_page = response.match(/<title>(.*?)<\/title>/i);
  login_page = response.match(/var login = ([0-9]+)/i);
  $('#footer').hide();
  nav.loader(0);
  // если вход не выполнен
  if(login_page) {
    if(login_page[1] == 0) {
    window.location.href = '/';
    return false;
    }
  }
 
  if(content_page) {
    document.title = title_page[1].toString();
    $('#page').html(content_page[0].toString());
    $('#this_url').val(url);
    if(history.pushState) history.pushState(null, null, url);
    else {}
    $.getScript('/js/all.js?'+Math.random());
    $.getScript('/js/admin.js?'+Math.random());
  } else users.error_head('Сервис временно недоступен. Попробуйте позднее');
  $('#ref_input_url input').val() ? $('#ref_input_url input').select() : '';
  });
 },
 loader: function(a) {
  a ? $('#loading').show().css({position: 'fixed', top: ($(window).height()/2 - 64), left: ($(window).width() - 64)/2}) : $('#loading').hide();
 }
}



Время: 06:56.

Время: 06:56.
© OSzone.net 2001-