Проверить випку:
(отсутствует)
diff --git a/site_content/css/shit_style.css b/site_content/css/shit_style.css
index c64f837..60e1380 100644
--- a/site_content/css/shit_style.css
+++ b/site_content/css/shit_style.css
@@ -71,6 +71,7 @@ a {
.vip-card-text {
color: whitesmoke;
text-align: right;
+ font-family: tf2secondary;
}
.player-in-list {
diff --git a/site_content/images/vip/freevip.jpg b/site_content/images/vip/freevip.jpg
new file mode 100644
index 0000000..3f815f2
Binary files /dev/null and b/site_content/images/vip/freevip.jpg differ
diff --git a/site_content/js/API.js b/site_content/js/API.js
index fbde86c..15ce4b3 100644
--- a/site_content/js/API.js
+++ b/site_content/js/API.js
@@ -122,6 +122,7 @@ function bind_ServerAboutReportPlayer_Close(){
$('#Modal_ServerAboutReportPlayer_Close').click(async function (ev) {
ev.preventDefault();
$('#Modal_ServerAboutReportPlayer').modal('hide');
+ $('#Modal_ServerAbout').modal('show');
});
$("#Modal_ServerAboutReportPlayer_send").click(async function (ev) {
@@ -129,18 +130,34 @@ function bind_ServerAboutReportPlayer_Close(){
$("#Modal_ServerAboutReportPlayer_error").html("");
if($('#Modal_ServerAboutReportPlayer_reason').val().length < 32){
$("#Modal_ServerAboutReportPlayer_error").html("У тебя причина говно, сделай ее более красочной. Опиши подробнее где тебя трогали.");
+ } else {
+ fetch("https://tf2.pblr-nyk.pro/player_api/v1/report", {headers: {'Cache-Control':'no-cache'}, method:"GET"})
+ .then(res => res.json())
+ .then(res => {
+ if ("error" in res && "allow" in res) {
+ $("#Modal_ServerAboutReportPlayer_error").html(`Следующий репорт доступен через ${res.kd} секунд!`);
+ } else if ("error" in res) {
+ $("#Modal_ServerAboutReportPlayer_error").html(res.error);
+ return;
+ } else if ("allow" in res && res.allow == true) {
+ fetch(`https://tf2.pblr-nyk.pro/player_api/v1/report?server=${$('#Modal_ServerAboutReportPlayer_srv').text()}&id=${$('#Modal_ServerAboutReportPlayer_id').text()}&text=${$('#Modal_ServerAboutReportPlayer_reason').val()}`, {headers: {'Cache-Control':'no-cache'}, method:"POST"})
+ .then(res => res.json())
+ .then(res => {
+ $("#Modal_ServerAboutReportPlayer_error").html("Донос отправлен!");
+ });
+ }
+ })
+ .catch(err => {$("#Modal_ServerAboutReportPlayer_error").html("Ошибка получения");});
}
//$("#Modal_ServerAboutReportPlayer_error").html("ЛОХ");
});
}
function bind_ServerAboutReportPlayerButton(id){
- console.log(id);
$(id).click(async function (ev) {
ev.preventDefault();
$('#Modal_ServerAbout').modal('hide');
let data = ev.currentTarget.dataset.id.replaceAll("_",".").split("|", 2);
- console.log(data);
Modal_Fill_Report(data[0], data[1]);
$('#Modal_ServerAboutReportPlayer').modal('show');
});
@@ -148,6 +165,8 @@ function bind_ServerAboutReportPlayerButton(id){
function Modal_Fill_Report(srv, player_id){
$(`#Modal_ServerAboutReportPlayer_name`).html(api_response.servers[srv].players[player_id].name);
+ $(`#Modal_ServerAboutReportPlayer_srv`).html(srv);
+ $(`#Modal_ServerAboutReportPlayer_id`).html(api_response.servers[srv].players[player_id].id);
}
function bind_ServerAboutButton(srv_name){
@@ -389,8 +408,8 @@ function FillServices(data) {
const ping_time = 90;
const text = `
`;
- console.log(`${((new Date()).getTime() / 1000) - data.updates.qiwi_bot}`);
- console.log(`${((new Date()).getTime() / 1000) - data.updates.steam_bot}`);
+ //console.log(`${((new Date()).getTime() / 1000) - data.updates.qiwi_bot}`);
+ //console.log(`${((new Date()).getTime() / 1000) - data.updates.steam_bot}`);
if(data.updates.qiwi_bot && ((new Date()).getTime() / 1000) - data.updates.qiwi_bot < ping_time) {
document.getElementById("Footer_Text").insertAdjacentHTML("beforeend", text.replace("{service_id}","Footer_Services_QIWI"));
diff --git a/site_content/js/Player_API.js b/site_content/js/Player_API.js
index d6524c4..cb5c1ed 100644
--- a/site_content/js/Player_API.js
+++ b/site_content/js/Player_API.js
@@ -9,7 +9,9 @@ class CurrentUser {
.then(response => response.json())
.then(response => {
if ("error" in response) {
- console.log("Cannot fetch current user");
+ console.log(response.error);
+ $("#Header_CurrentUser").html("Ошибка получения данных профиля! ");
+ $("#Header_Logout").html("(Обнови страницу для релога)")
return;
}
document.getElementById("Header_CurrentUser").href = "#";
@@ -306,9 +308,10 @@ function ReconstructVipSection(data) {
$("#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"],
- ["VIP (1 неделя)", 75, "20 рефов", "site_content/images/vip/VIP_7_DAYS.jpg", "seven_day"],
- ["VIP (1 день)", 20, "5 рефов", "site_content/images/vip/VIP_1_DAY.jpg", "day"]
+ ["1 месяц", 150, "1 ключ", "site_content/images/vip/VIP_1_MOUNTH.jpg", "month"],
+ ["1 неделя", 75, "20 рефов", "site_content/images/vip/VIP_7_DAYS.jpg", "seven_day"],
+ ["1 день", 20, "5 рефов", "site_content/images/vip/VIP_1_DAY.jpg", "day"],
+ ["1 день", 0, "бесплатно", "site_content/images/vip/freevip.jpg", "free"]
);
let vip_select;
@@ -321,7 +324,6 @@ function ReconstructVipSection(data) {
${price_array[select][0]}
-
${price_array[select][1]} Рублей
${price_array[select][2]}
@@ -332,16 +334,28 @@ function ReconstructVipSection(data) {
$(vip_select).appendTo("#Section_VIP_buttons");
$(`#Section_VIP_buttons_${price_array[select][4]}`).click(async function (ev) {
ev.preventDefault();
- $("#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]);
+ if(price_array[select][4] != "free"){
+ $("#Modal_SelectPayMethod_PayButtons").show(0);
+ $("#Modal_SelectPayMethod_GetFreeButtons").hide(0);
+ $("#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]);
+ } else {
+ $("#Modal_SelectPayMethod_PayButtons").hide(0);
+ $("#Modal_SelectPayMethod_GetFreeButtons").show(0);
+ }
$('#Modal_SelectPayMethod').modal('show');
return false;
});
}
}
+$("#Modal_SelectPayMethod_GetFreeButton_Check").click(async function (ev) {
+ ev.preventDefault();
+ alert("пошел нахуй");
+});
+
//secret egg
let konami_code = "";
let activated = false;