various small

This commit is contained in:
2023-01-12 05:08:32 +02:00
parent b483b79df5
commit 68fe6ec13e
5 changed files with 46 additions and 82 deletions
+25 -18
View File
@@ -1,13 +1,22 @@
<?php
const GAME = true;
use Core\Config;
use Core\Database;
if (!defined('GAME_VERSION')) {
require_once '_incl_data/autoload.php';
}
function er($e)
{
global $c;
exit('<html><head><meta name="msapplication-config" content="browserconfig.xml"><meta http-equiv="Content-Language" content="ru"><TITLE>Произошла ошибка</TITLE></HEAD><BODY text="#FFFFFF"><p><font color=black>Произошла ошибка: <pre>' . $e . '</pre><b><p><a href="https://' . $c[0] . '/">Назад</b></a><HR><p align="right">(c) <a href="https://' . $c[0] . '/">' . $c[1] . '</a></p></body></html>');
}
include_once('_incl_data/__config.php');
include_once('_incl_data/class/__db_connect.php');
Config::init();
Database::init();
define('IP', UserIp::get());
$u = User::start();
$filter = new Filter();
@@ -24,9 +33,7 @@ if ($u->info['joinIP'] == 1 && $u->info['ip'] != IP) {
er('#Пожалуйста авторизируйтесь с главной страницы');
} elseif (isset($_GET['exit'])) {
setcookie('login', '', time() - 60 * 60 * 24 * 30, '', $c['host']);
setcookie('pass', '', time() - 60 * 60 * 24 * 30, '', $c['host']);
setcookie('login', '', time() - 60 * 60 * 24 * 30);
setcookie('pass', '', time() - 60 * 60 * 24 * 30);
mysql_query('UPDATE `users` SET `online` = ' . (time() - 420) . ' WHERE `id` = ' . $u->info['id']); //520
die('<script>top.location = "https://' . $c['host'] . '/";</script>');
} elseif (!isset($u->info['id'])) {
@@ -62,12 +69,12 @@ $u->stats = $u->getStats($u->info['id'], 0);
<script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script>
var des = 1;
var c = {
let des = 1;
let c = {
noEr: 0,
noErTmr: 0,
url: '<?=$c['host']?>',
img: 'img.new-combats.com',
url: '<?= Config::get('host') ?>',
img: '<?= Config::get('img') ?>',
uid: <?=(0 + $u->info['id'])?>,
login: '<?=$u->info['login']?>',
city: '<?=$u->info['city']?>',
@@ -84,14 +91,14 @@ $u->stats = $u->getStats($u->info['id'], 0);
}, sd4key = "<?=$u->info['nextAct']?>", lafstReg = {}, enterUse = 0;
function ctest(city) {
if (city != c['city']) {
if (city !== c['city']) {
top.location = '/bk';
}
}
function testKey(event) {
if (event.keyCode == 10 || event.keyCode == 13) {
if (top.enterUse == 0) {
if (event.keyCode === 10 || event.keyCode === 13) {
if (top.enterUse === 0) {
chat.subSend();
top.enterUse = 1;
setTimeout('top.enterUse = 0', 1000);
@@ -107,10 +114,10 @@ $u->stats = $u->getStats($u->info['id'], 0);
$(window).error(function () {
return true;
});
var iusrno = {};
let iusrno = {};
function ignoreUser(u) {
if (iusrno[u] == undefined || iusrno[u] == 0) {
if (iusrno[u] === undefined || iusrno[u] === 0) {
$('#main').attr({'src': 'main.php?friends=1&ignore=' + u + ''});
} else {
$('#main').attr({'src': 'main.php?friends=1&ignore=' + u + ''});
@@ -137,7 +144,7 @@ $u->stats = $u->getStats($u->info['id'], 0);
if (!isset($_COOKIE['d1c'])) {
$detect = new MobileDetect;
$deviceType = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer');
$deviceType = $detect->isMobile() ? $detect->isTablet() ? 'tablet' : 'phone' : 'computer';
$_COOKIE['d1c'] = $deviceType;
setcookie('d1c', $deviceType, (time() + 86400));
} else {
@@ -147,7 +154,7 @@ $u->stats = $u->getStats($u->info['id'], 0);
if ($deviceType == 'tablet' || $deviceType == 'phone') {
echo '<script type="text/javascript" src="js/jquery.nicescroll.js"></script>';
?>
<style type="text/css">
<style>
#touchmain {
padding: 0;
border: 0;
@@ -167,7 +174,7 @@ $u->stats = $u->getStats($u->info['id'], 0);
<link href="./js/trainingModals/registration/trainingModalStyles.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
<style>
/* Additional classes examples */
.woman a {
color: #C33;
@@ -1305,4 +1312,4 @@ $u->stats = $u->getStats($u->info['id'], 0);
</body>
</html>
<?php
unset($db);
unset($db);