gsd 2 years ago
parent
commit
a304933320
  1. 94
      index.html
  2. 69
      site_content/js/API.js
  3. 213
      site_content/js/Player_API.js

94
index.html

@ -142,7 +142,7 @@ transition: background-image 1s;" id="main_container">
</div>
</div>
<div class="row justify-content-center">
<div class="col-6 text-center rounded border border-dark" style="background-color: #E2EFDE;">
<div class="col-6 col-sm-10 col-lg-6 text-center rounded border border-dark" style="background-color: #E2EFDE;">
<div class="row">
<div class="col pt-3">
<h4>Правила на которые ты забьёшь х*й</h4>
@ -197,7 +197,7 @@ transition: background-image 1s;" id="main_container">
</div>
</div>
<div class="row row-cols-1 justify-content-center" id="Section_VIP_row_content">
<div class="col-6 text-center rounded border border-dark" style="background-color: #E2EFDE;" id="Section_VIP_col">
<div class="col-6 col-sm-10 col-lg-8 text-center rounded border border-dark" style="background-color: #E2EFDE;" id="Section_VIP_col">
<br>
<h3>Нагибай всех благодаря нашей випки!</h3>
<h6 style="font-family: tf2secondary;">(Смотри не перестарайся)</h6>
@ -244,14 +244,14 @@ transition: background-image 1s;" id="main_container">
<div class="row justify-content-center" id="Profile_Characters">
<!---->
</div>
<div class="row justify-content-center pb-3 pt-3">
<div class="row justify-content-center pt-3">
<div class="col-auto text-center rounded border border-dark" style="background-color: #ff8946; ">
<h2>Профиль</h2>
</div>
</div>
<div class="row row-cols-1 justify-content-center" id="profile_list">
<div class="col-6 text-center rounded border border-dark p-4" style="background-color: #E2EFDE;" id="profile_check">
<h2>Проверь профиль на фактах!</h2>
<div class="row row-cols-1 justify-content-center pt-3" id="profile_list">
<div class="col-6 text-center rounded border border-dark" style="background-color: #E2EFDE;" id="profile_check">
<!--<h2>Проверь профиль на фактах!</h2>
<h6>На этой странице после ввода профиля, появится вся статистика на фактах, наличие банов и их история.</h6>
<h6>Если авторизоваться, то сразу будет твой профиль</h6>
<form id="formProfileSectionInput" action="#check">
@ -261,15 +261,24 @@ transition: background-image 1s;" id="main_container">
<div class="col pt-2"><h6>Ссылка на профиль:</h6></div>
<div class="col"><input class="form-control" type="text" name="steamurl" id="steamurl" required/></div>
<div class="col-12 pt-2">
<button type="button" class="btn btn-danger" id="check_profile_submit_button">Проверить профиль</button><!--data-toggle="modal" data-action="CaptchaModalHandler" data-target="#CaptchaModalHandler"-->
<button type="button" class="btn btn-danger" id="check_profile_submit_button">Проверить профиль</button>#data-toggle="modal" data-action="CaptchaModalHandler" data-target="#CaptchaModalHandler"
</div>
</div>
</div>
</div>
</form>
-->
<!--<span> ></span>
<button type="button" class="btn btn-primary" data-toggle="modal" id="buttonCheck" data-action="CheckProfileCaptcha" data-target="#CheckProfileCaptcha">Проверить свой профиль</button>
<span> <</span>-->
<div class="row row-cols-3 justify-content-center" id="Section_Player_auth">
<div class="col-8 justify-content-center" id="Section_player_check_profile">
<a href=# onclick="document.getElementById('Header_CurrentUser').click();">
<h3>Чтоб увидить статистику своего профиля, наличие бана и прочие, следует авторизоваться через стим.</h3>
<h6>> Авторизоваться <</h6>
</a>
</div>
</div>
</div>
</div>
<div class="row row-cols-1 justify-content-center" id="profile_stats">
@ -366,73 +375,6 @@ transition: background-image 1s;" id="main_container">
</div>
</footer>
<div class="modal fade" id="CheckProfileCaptcha" role="dialog" aria-hidden="true" aria-labelledby="CheckProfileCaptchaLabel" tabindex="-1">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<form id="formProfileChecker">
<div class="modal-header">
<h5 class="modal-title" id="CheckProfileCaptchaLabel">Проверка IQ...</h5>
<button type="button" class="btn-close" data-dismiss="modal" aria-label="Close" id="check_profile_close_button"></button>
</div>
<div class="modal-body">
<div class="row">
<div class="col">
<div class="row">
<div class="col">Смещная картинка:</div>
<div class="col"><img alt="Captcha" src="" class="img-fluid" id="captcha_img"></img></div>
</div>
<div class="row">
<div class="col">Код с картинки:</div>
<div class="col"><input class="form-control" type="text" name="captcha" id="captcha" required/></div>
</div>
<div class="row">
<div class="col">Ссылка на профиль:</div>
<div class="col"><input class="form-control" type="text" name="steamurl" id="steamurl" required/></div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-danger" id="check_profile_submit_button">Проверить данные</button>
</div>
</form>
</div>
</div>
</div>
<div class="modal fade" id="CaptchaModalHandler" role="dialog" aria-hidden="true" aria-labelledby="CaptchaModalHandlerLabel" tabindex="-1">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<form id="formCaptchaHandler" action="#">
<div class="modal-header">
<h5 class="modal-title" id="CaptchaModalHandlerLabel">Проверка ICQ...</h5>
<button type="button" class="btn-close" data-dismiss="modal" aria-label="Close" id="check_captcha_close_button"></button>
</div>
<div class="modal-body">
<div class="row">
<div class="col">
<div class="row">
<div class="col">Смещная картинка:</div>
<div class="col"><img alt="Captcha" src="" class="img-fluid" id="captcha_img"></img></div>
</div>
<div class="row">
<div class="col">Код с картинки:</div>
<div class="col"><input class="form-control" type="text" name="captcha" id="captcha" required/></div>
</div>
<div class="row" id="InvalidCaptchaTextArea">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" id="check_captcha_submit_button">Проверить капчу</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="modal fade" id="Modal_SelectPayMethod" role="dialog" aria-hidden="true" aria-labelledby="Modal_SelectPayMethod_Label" tabindex="-1">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
@ -502,8 +444,8 @@ transition: background-image 1s;" id="main_container">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
integrity="sha384-VHvPCCyXqtD5DqJeNxl2dtTyhF78xXNXdkwX1CZeRusQfRKp+tA7hAShOK/B/fQ2"
crossorigin="anonymous"></script>
<script type="text/javascript" src="site_content/js/API.js?version=6.66v5"></script>
<script type="text/javascript" src="site_content/js/Player_API.js?version=1.76"></script>
<script type="text/javascript" src="site_content/js/API.js?version=6.66v5" async></script>
<script type="text/javascript" src="site_content/js/Player_API.js?version=1.78" async></script>
<script type="text/javascript" src="site_content/js/VIP_API.js?version=1.3"></script>
<script type="text/javascript" src="site_content/js/BackgroundSlides.js?version=9.6"></script>
</body>

69
site_content/js/API.js

@ -36,12 +36,9 @@ $(async function() {
await RequestAPI();
if(window.location.href.endsWith("#RulesSection")){
// trigger event click
document.getElementById('Rules_Button').click();
}
if(window.location.href.endsWith("#VIPSection")){
document.getElementById('Tab_VIP_Button').click();
$("#Rules_Button").trigger("click");
}else if(window.location.href.endsWith("#VIPSection")){
$("#Tab_VIP_Button").trigger("click");
}
});
@ -119,22 +116,21 @@ async function RequestAPI() {
.then(res => {
FillServices(res);
// $('#current_players').text(res.servers.statistic.player_now)
document.getElementById("current_players").innerHTML = res.servers.statistic.player_now;
document.getElementById("max_per_day").innerHTML = res.servers.statistic.player_max;
document.getElementById("servers_works").innerHTML = res.servers.statistic.working_servers + '/' + res.servers.statistic.total_servers;
document.getElementById("uniq_day_players").innerHTML = res.uniq.day;
document.getElementById("uniq_month_players").innerHTML = res.uniq.month;
document.getElementById("uniq_year_players").innerHTML = res.uniq.year;
document.getElementById("ServersSectionLastUpdate").innerHTML = `Информация обновлена: ${UNIX2TIMESTAMP(res.updates.servers)}`;
document.getElementById("AboutSection_discord").innerHTML = `${res.discord_users} ГЕЙмеров `;
document.getElementById("AboutSection_vk").innerHTML = `${res.vk_users} Участников `;
document.getElementById("Section_VIP_users").innerHTML = `${res.vip_players} карликов уже имеют випку!`;
$("#current_players").html(res.servers.statistic.player_now);
$("#max_per_day").html(res.servers.statistic.player_max);
$("#servers_works").html(`${res.servers.statistic.working_servers}/${res.servers.statistic.total_servers}`);
$("#uniq_day_players").html(res.uniq.day);
$("#uniq_month_players").html(res.uniq.month);
$("#uniq_year_players").html(res.uniq.year);
$("#ServersSectionLastUpdate").html(`Информация обновлена: ${UNIX2TIMESTAMP(res.updates.servers)}`);
$("#AboutSection_discord").html(`${res.discord_users} ГЕЙмеров `);
$("#AboutSection_vk").html(`${res.vk_users} Участников `);
$("#Section_VIP_users").html(`${res.vip_players} карликов уже имеют випку!`);
let active = false;
let inactive = false;
let dead = false;
let insert_type = "beforeend";
//active servers
let sorted_servers = Object.keys(res.servers).sort((a, b) => {
return res.servers[b].player_count - res.servers[a].player_count;
@ -145,28 +141,27 @@ async function RequestAPI() {
if (server == `statistic`) {continue;}
if(res.servers[server].status == true && res.servers[server].player_count > 0) {
if(!active) {
document.getElementById("servers_list_v2").insertAdjacentHTML(insert_type,servers_active)
$(servers_active).appendTo("#servers_list_v2");
active = true;
}
document.getElementById("servers_list_v2").insertAdjacentHTML(insert_type,generate_server_card_div(res.servers[server]));
}
else if (res.servers[server].status == true && res.servers[server].player_count == 0) {
if(!inactive) {
document.getElementById("servers_list_v2").insertAdjacentHTML(insert_type,servers_inactive)
$(servers_inactive).appendTo("#servers_list_v2");
inactive = true;
}
document.getElementById("servers_list_v2").insertAdjacentHTML(insert_type,generate_server_card_div(res.servers[server]));
}
$(generate_server_card_div(res.servers[server])).appendTo("#servers_list_v2");
}
for (let sort_id in sorted_servers) {
let server = sorted_servers[sort_id];
if (res.servers[server].status == false) {
if(!dead) {
document.getElementById("servers_list_v2").insertAdjacentHTML(insert_type,servers_dead)
$(servers_dead).appendTo("#servers_list_v2");
dead = true;
}
document.getElementById("servers_list_v2").insertAdjacentHTML(insert_type,generate_server_card_div(res.servers[server]));
$(generate_server_card_div(res.servers[server])).appendTo("#servers_list_v2");
}
}
}).catch((err) => {
@ -182,14 +177,9 @@ function FillFooter(data, api_time, player_api_time){
const text_bad = `<p class="current-profile-text current-profile-text-color-alarm">{text}</p>`;
const text_good = `<p class="current-profile-text current-profile-text-color-normal">{text}</p>`;
while(document.getElementById("Footer_Text").firstChild) {
document.getElementById("Footer_Text").lastChild.remove();
}
document.getElementById("Footer_Text").insertAdjacentHTML("beforeend", text.replace("{text}", `2018-${(new Date()).getFullYear()} | `));
document.getElementById("Footer_Text").insertAdjacentHTML("beforeend", text.replace("{text}", `Факты 13 | `));
document.getElementById("Footer_Text").insertAdjacentHTML("beforeend", text.replace("{text}", `JS: `));
document.getElementById("Footer_Text").insertAdjacentHTML("beforeend", text_good.replace("{text}", `on`));
$("#Footer_Text").empty();
$(text.replace("{text}", `2018-${(new Date()).getFullYear()} | Факты 13 | JS: `)).appendTo("#Footer_Text");
$(text_good.replace("{text}", `on`)).appendTo("#Footer_Text");
document.getElementById("Footer_Text").insertAdjacentHTML("beforeend", text.replace("{text}", ` | API: `));//${api_time} ms
if(api_time == 0) {
@ -236,12 +226,14 @@ function FillCharacters() {
);
let InjectCharacter = ``;
document.getElementById("Main_FunnyСharacters").insertAdjacentHTML("beforeend", `<div class="col-3"></div>`);
$(`<div class="col-3"></div>`).appendTo("#Main_FunnyСharacters");
for (const element in CharactersArray) {
InjectCharacter = `<div class="col"><img class="img-fluid" src="${CharactersArray[element][0]}" onclick="(new Audio('${CharactersArray[element][1]}')).play();"></div>`;
if(CharactersArray[element][2]){
document.getElementById(CharactersArray[element][2]).insertAdjacentHTML("beforeend", `<div class="col-5"></div>`);
$(`<div class="col-5"></div>`).appendTo(`#${CharactersArray[element][2]}`);
//querySelec
//document.getElementById(CharactersArray[element][2]).insertAdjacentHTML("beforeend", `<div class="col-5"></div>`);
document.getElementById(CharactersArray[element][2]).insertAdjacentHTML("beforeend", InjectCharacter);
document.getElementById(CharactersArray[element][2]).insertAdjacentHTML("beforeend", `<div class="col-5"></div>`);
}
@ -262,12 +254,8 @@ function FillRules() {
)
let card = ``;
//const shift = ``;//<div class="col-1 pb-4"></div>`;
//let counter = 1
for(const rule in rules) {
//if(counter == 1){document.getElementById("Rules_List").insertAdjacentHTML("beforeend", shift);}
card = `
<div class="col-4 pb-4">
<div class="card" style="height: 18rem; background-image: url('${rules[rule].image}'); background-size: cover;">
@ -281,10 +269,7 @@ function FillRules() {
</div>
</div>
</div>`
document.getElementById("Rules_List").insertAdjacentHTML("beforeend", card);
//counter++;
//if(counter == 4){counter=1;}
$(card).appendTo("#Rules_List");
}
}

213
site_content/js/Player_API.js

@ -4,24 +4,23 @@ $(async function () {
async function CheckCurrentUser() {
if (!check_cookie_name("steam64")) { return; }
$("#Header_CurrentUser").html(`Получение данных профиля с сервера... ПОДОЖДИ`);
await fetch("https://tf2.pblr-nyk.pro/player_api/v1/current_user", { credentials: "same-origin", headers: { 'Cache-Control': 'no-cache' } })
.then(response => response.json())
.then(response => {
if ("error" in response) {
console.log(response.error);
} else {
var current_user = document.getElementById("Header_CurrentUser");
var current_ban = document.getElementById("Header_CurrentBan");
var logout = document.getElementById("Header_Logout");
current_user.href = "#";
$("#Header_CurrentUser").attr("href", "#");
if (response.ban) {
current_user.innerHTML = `Привет ${response.steam_data.nickname}! У меня хорошие новости!`;
current_ban.innerHTML = "У тебя БАН! (нажми чтоб посмотреть его)";
$("#Header_CurrentUser").html(`Привет ${response.steam_data.nickname}! У меня хорошие новости!`);
$("#Header_CurrentBan").html("У тебя БАН! (нажми чтоб посмотреть его)");
} else {
current_user.innerHTML = `Привет ${response.steam_data.nickname}!`;
$("#Header_CurrentUser").html(`Привет ${response.steam_data.nickname}!`);
}
logout.innerHTML = ` (нажми чтоб выйти)`;
document.getElementById("profile_stats").insertAdjacentHTML("beforeend", FillPlayerInfo(response));
$("#Header_Logout").html(` (нажми чтоб выйти)`);
$("#profile_list").remove();
$(FillPlayerInfo(response)).appendTo("#profile_stats");
ReconstructVipSection(response);
}
})
@ -33,114 +32,8 @@ function check_cookie_name(name) {
else { return false; }
}
let captcha_error_div = `<div class="col" id="ModalCaptchaErrorText"><h6 style="color: red;" id="captcha_error">пук</h6></div>`
let ProfileLinkError_div = `<div class="col" id="ProfileLinkIsNotFull"><h6 style="color: red;" id="profile_error">Долбаеб введи ссылку на профиль!</h6></div>`
console.log("puk");
//buttonCheckProfile
$('#check_captcha_close_button').click(async function (ev) {
ev.preventDefault();
$('#CaptchaModalHandler').modal('hide');
});
document.getElementById("check_profile_submit_button").addEventListener("keypress", async function (ev) {
ev.preventDefault();
console.log(ev.key);
return false;
});
$('#check_profile_submit_button').click(async function (ev) {
//ev.preventDefault();
console.log("check profile button presed");
if (document.getElementById("ProfileLinkIsNotFull")) {
document.getElementById("ProfileLinkIsNotFull").remove();
}
if (!document.forms["formProfileSectionInput"].steamurl.value.startsWith("https://")) {
document.getElementById("formProfileSectionInputHelpText").insertAdjacentHTML("beforeend", ProfileLinkError_div);
//document.getElementById("profile").innerHTML = "Долбаеб введи ссылку на профиль!";
} else {
$('#CaptchaModalHandler').modal('show');
}
return false;
});
async function RefreshCaptcha() {
await fetch("https://tf2.pblr-nyk.pro/player_api/v1/captcha", { method: 'POST' })
.then(response => response.json())
.then(response => {
console.log("captcha id: " + response.id);
// captcha_id = response.id;
// form_captcha.captcha_img.src = "https://tf2.pblr-nyk.pro/player_api/v1/captcha?id=" + response.id;
return response.id;
});
}
$(document).on("show.bs.modal", "#CaptchaModalHandler", async function () {
console.log("setup captcha modal");
let form_url = document.forms["formProfileSectionInput"];
let form_captcha = document.forms["formCaptchaHandler"];
let captcha_id;
const captchaId = await RefreshCaptcha();
captcha_id = captchaId;
form_captcha.captcha_img.src = "https://tf2.pblr-nyk.pro/player_api/v1/captcha?id=" + captchaId;
$('#check_captcha_submit_button').click(async function (ev) {
//ev.preventDefault();
if ($('#ModalCaptchaErrorText')) { $('#ModalCaptchaErrorText').remove(); }
await CheckAndFill(ev);
return false;
});
async function CheckAndFill(event) {
if (form_captcha.captcha.value.length == 0) {
if (!document.getElementById("captcha_error")) {
document.getElementById("InvalidCaptchaTextArea").insertAdjacentHTML("beforeend", captcha_error_div);
}
document.getElementById("captcha_error").innerHTML = "Капчу введи!";
return;
}
$("#check_captcha_close_button").prop("disabled", true);
$("#check_captcha_submit_button").prop("disabled", true);
if (document.getElementById("current_profile")) {
document.getElementById("current_profile").remove();
}
console.log(new Date());
await fetch("https://tf2.pblr-nyk.pro/player_api/v1/player?steam_url=" + form_url.steamurl.value + "&captcha_id=" + captcha_id + "&captcha_code=" + form_captcha.captcha.value)
.then(response => response.json())
.then(response => {
$("#check_captcha_close_button").removeAttr("disabled");
$("#check_captcha_submit_button").removeAttr("disabled");
/////////////////////////////////////////////////////////
if ("error" in response) {
console.log(`id: ${captcha_id} error: ${response}`);
if (!document.getElementById("captcha_error")) {
document.getElementById("InvalidCaptchaTextArea").insertAdjacentHTML("beforeend", captcha_error_div);
}
if (response.error == "incorrect captcha") {
document.getElementById("captcha_error").innerHTML = "Капча невалидна, попробуй снова!";
} else {
document.getElementById("captcha_error").innerHTML = "Ошибка: " + response.error;
}
RefreshCaptcha();
} else if ("detail" in response) {
if (!document.getElementById("captcha_error")) {
document.getElementById("InvalidCaptchaTextArea").insertAdjacentHTML("beforeend", captcha_error_div);
}
document.getElementById("captcha_error").innerHTML = "Ошибка: " + response.detail[0].msg;
RefreshCaptcha();
} else {
console.log(response);
document.getElementById("profile_stats").insertAdjacentHTML("beforeend", FillPlayerInfo(response));
//ReconstructVipSection(response);
$('#check_captcha_close_button').click();
}
form_captcha.captcha.value = '';
});
}
});
let captcha_error_div = `<div class="col" id="ModalCaptchaErrorText"><h6 style="color: red;" id="captcha_error">пук</h6></div>`;
let ProfileLinkError_div = `<div class="col" id="ProfileLinkIsNotFull"><h6 style="color: red;" id="profile_error">Долбаеб введи ссылку на профиль!</h6></div>`;
function CalculateVipEndDate(permition) {
return new Date((permition["UNIX_TIMESTAMP(`reg_date`)"] + permition.amount) * 1000);
@ -199,7 +92,7 @@ function FillPlayerInfo(data) {
player_permition_continue = `(продлить)`;
let date = CalculateVipEndDate(data.permition);// new Date((data.permition["UNIX_TIMESTAMP(`reg_date`)"] + data.permition.amount) * 1000);
player_permition_end_date = date.toLocaleString();
document.getElementById("Modal_SelectPayMethod_CheckVIP_EndDate").innerHTML = `До: ${player_permition_end_date}`;
$("#Modal_SelectPayMethod_CheckVIP_EndDate").html(`До: ${player_permition_end_date}`);
if (date.getTime() - new Date().getTime() > 604800000) {
player_permition_end_date_color_status = `current-profile-text-color-normal`;
} else if (date.getTime() - new Date().getTime() > 259200000) {
@ -227,8 +120,8 @@ function FillPlayerInfo(data) {
`
}
document.getElementById("Modal_SelectPayMethod_CheckVIP_Status").innerHTML = "(имеется)";
document.getElementById("Modal_SelectPayMethod_CheckVIP_Status").style += "color: green;";
$("#Modal_SelectPayMethod_CheckVIP_Status").html("(имеется)");
$("#Modal_SelectPayMethod_CheckVIP_Status").css("color", "green");
player_permition_div = `
<div id="vip_section">
@ -307,7 +200,7 @@ function FillPlayerInfo(data) {
<p>Наиграно: ${UNIX2FACTI_TIME(total_gametime)}</p>
<div class="row">
<div class="col justify-content-end">
<a href="${data.steamids.community_url}" target="_blank"><img class="img-fluid w-25" src="site_content/images/logo/steam.png"></a>
<a href="${data.steamids.community_url}" target="_blank"><img class="img-fluid w-25" src="site_content/images/logo/steam.png" id="CurrentPlayerURL"></a>
</div>
</div>
</div>
@ -351,37 +244,32 @@ function ReconstructVipSection(data) {
$('#Modal_SelectPayMethod_CheckVIP').click(async function (ev) {
ev.preventDefault();
await fetch("https://tf2.pblr-nyk.pro/player_api/v1/player/permitions?steam_url=" + document.forms["formProfileSectionInput"].steamurl.value, { credentials: "same-origin", headers: { 'Cache-Control': 'no-cache' } })
await fetch("https://tf2.pblr-nyk.pro/player_api/v1/player/permitions", { credentials: "same-origin", headers: { 'Cache-Control': 'no-cache' } })
.then(response => response.json())
.then(response => {
if (response.permition) {
document.getElementById("Modal_SelectPayMethod_CheckVIP_Status").innerHTML = "(имеется)";
document.getElementById("Modal_SelectPayMethod_CheckVIP_Status").style += "color: green;";
$("#Modal_SelectPayMethod_CheckVIP_Status").html("(имеется)");
$("#Modal_SelectPayMethod_CheckVIP_Status").css("color", "green");
if (response.permition.amount) {
document.getElementById("Modal_SelectPayMethod_CheckVIP_EndDate").innerHTML = `До: ${CalculateVipEndDate(response.permition).toLocaleString()}`;
$("#Modal_SelectPayMethod_CheckVIP_EndDate").html(`До: ${CalculateVipEndDate(response.permition).toLocaleString()}`);
} else {
document.getElementById("Modal_SelectPayMethod_CheckVIP_EndDate").innerHTML = `бесконечность не предел`;
$("#Modal_SelectPayMethod_CheckVIP_EndDate").html(`бесконечность не предел`);
}
} else {
document.getElementById("Modal_SelectPayMethod_CheckVIP_Status").innerHTML = "(отсутствует)";
document.getElementById("Modal_SelectPayMethod_CheckVIP_Status").style += "color: red;";
document.getElementById("Modal_SelectPayMethod_CheckVIP_EndDate").innerHTML = `Время проверки: ${new Date().toLocaleString()}`;
$("#Modal_SelectPayMethod_CheckVIP_Status").html("(отсутствует)");
$("#Modal_SelectPayMethod_CheckVIP_Status").css("color", "red");
$("#Modal_SelectPayMethod_CheckVIP_EndDate").html(`Время проверки: ${new Date().toLocaleString()}`);
}
});
});
//document.getElementById("Section_VIP_check_profile")?document.getElementById("Section_VIP_check_profile").remove():null;
while (document.getElementById("Section_VIP_buttons").firstChild) {
document.getElementById("Section_VIP_buttons").lastChild.remove();
}
$("#Section_VIP_buttons").empty();
const STEAM_TRADE = "https://steamcommunity.com/tradeoffer/new/?partner=47239992&token=8gNFVl7h";
const QIWI_TRADE = "https://qiwi.com/payment/form/99?currency=643&amount=(AMOUNT)&extra%5B%27comment%27%5D=(COMMENT)&extra%5B%27account%27%5D=79207516287&blocked%5B0%5D=sum&blocked%5B1%5D=account&blocked%5B2%5D=comment";
//STEAM_0%3A0%3A54354355
//"https://qiwi.com/payment/form/99?currency=643&amount=(AMOUNT)&extra%%5B%%27comment%%27%%5D=(COMMENT)&extra%%5B%%27account%%27%%5D=%%2B79207516287&blocked%%5B0%%5D=account";
document.getElementById("Modal_SelectPayMethod_ProfileLink").href = data.steamids.community_url;
document.getElementById("Modal_SelectPayMethod_ProfileName").innerHTML = "Вип будет выдан: " + data.steam_data.nickname;
$("#Modal_SelectPayMethod_ProfileLink").attr("href", data.steamids.community_url);
$("#Modal_SelectPayMethod_ProfileName").html(`Вип будет выдан: ${data.steam_data.nickname}`);
let price_array = new Array(
["VIP (1 месяц)", 150, "1 ключ", "site_content/images/vip/VIP_1_MOUNTH.jpg", "month"],
@ -407,65 +295,36 @@ function ReconstructVipSection(data) {
</div>
</div>
`
document.getElementById("Section_VIP_buttons").insertAdjacentHTML("beforeend", vip_select);
$(vip_select).appendTo("#Section_VIP_buttons");
$(`#Section_VIP_buttons_${price_array[select][4]}`).click(async function (ev) {
ev.preventDefault();
document.getElementById('Modal_SelectPayMethod_QIWI_Button').href = QIWI_TRADE.replace("(AMOUNT)", price_array[select][1]).replace("(COMMENT)", data.steamids.steam2.replace(":", "%3A"));
document.getElementById('Modal_SelectPayMethod_QIWI_Value').innerHTML = `${price_array[select][1]} Рублей`;
document.getElementById('Modal_SelectPayMethod_STEAM_Button').href = STEAM_TRADE;
document.getElementById('Modal_SelectPayMethod_STEAM_Value').innerHTML = price_array[select][2];
$("#Modal_SelectPayMethod_QIWI_Button").attr("href", QIWI_TRADE.replace("(AMOUNT)", price_array[select][1]).replace("(COMMENT)", data.steamids.steam2.replace(":", "%3A")));
$("#Modal_SelectPayMethod_QIWI_Value").html(`${price_array[select][1]} Рублей`);
$("#Modal_SelectPayMethod_STEAM_Button").attr("href", STEAM_TRADE);
$("#Modal_SelectPayMethod_STEAM_Value").html(price_array[select][2]);
$('#Modal_SelectPayMethod').modal('show');
return false;
});
}
}
/*
//Section_VIP_buttons
let vip_select_sample = `
<div class="col">
<div class="card">
<img class="card-img" src="site_content/images/vip/VIP_1_MOUNTH.jpg" alt="Вип на месяц">
<div class="card-img-overlay d-flex flex-column" style="background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.7))">
<a href="#" class="stretched-link" id="Section_VIP_buttons_month"></a>
<div class="mt-auto">
<h5 class="vip-card-text">VIP (1 месяц)</h5>
<hr class="vip-card-text">
<h6 class="vip-card-text">150 Рублей</h6>
<h6 class="vip-card-text">1 Ключ</h6>
</div>
</div>
</div>
</div>
`;
$('#Section_VIP_buttons_month').click(async function(ev) {
ev.preventDefault();
console.log("vip button presed");
document.getElementById('Modal_SelectPayMethod_QIWI_Button').href = QIWI_TRADE;
document.getElementById('Modal_SelectPayMethod_QIWI_Value').innerHTML = "150 Рублей";
document.getElementById('Modal_SelectPayMethod_STEAM_Button').href = STEAM_TRADE;
document.getElementById('Modal_SelectPayMethod_STEAM_Value').innerHTML = "1 Ключ";
$('#Modal_SelectPayMethod').modal('show');
return false;
});
*/
//secret egg
let konami_code = "";
let activated = false;
document.addEventListener('keypress', (event) => {
//$().keypress(function (event) {
//document.addEventListener('keypress', (event) => {
$(":root").keypress(function (event) {
if (activated) { return; }
konami_code += event.key;
if (konami_code.length == 6 || event.key == "-") {
if (konami_code == "nigger") {
activated = true;
document.getElementById("Tab_About").href = "#SecretEgg";
$("#Tab_About").attr("href", "#SecretEgg");
$('.nav-pills a[href="#SecretEgg"]').tab('show');
(new Audio("site_content/sounds/sunboy-ledi-night-16.mp3")).play();
document.getElementById("Nav_MenuButtons").remove()
$("#Nav_MenuButtons").remove();
ChangeBackgoundImage("site_content/images/background/hasbik_dance.jpg");
//$('Tab_Secret_Egg').click();
}

Loading…
Cancel
Save