game/news_script/index.php

810 lines
46 KiB
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<?php
2022-12-30 19:03:37 +00:00
use Core\Database;
require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . '_incl_data/autoload.php';
2022-06-06 21:30:34 +00:00
$url = explode('?', $_SERVER["REQUEST_URI"]);
$url = explode('/', $url[0]);
2022-12-30 19:03:37 +00:00
Database::init();
2023-01-10 16:29:32 +00:00
/* Пользователь */
2022-12-30 19:03:37 +00:00
$u = mysql_fetch_array(
mysql_query(
'SELECT `id`,`login`,`banned`,`admin`,`clan`,`align`,`level`,`molch1`,`molch2` FROM `users` WHERE `login` = "' . mysql_real_escape_string(
$_COOKIE['login']) . '"')
2022-12-30 19:03:37 +00:00
);
2022-06-06 21:30:34 +00:00
2022-12-30 19:03:37 +00:00
if ($url[2] > 0) {
$_GET['st'] = $url[2];
2022-06-06 21:30:34 +00:00
}
2022-12-30 19:03:37 +00:00
if ($url[2] == 'add') {
$_GET['add_new_st'] = true;
unset($_GET['st']);
2022-06-06 21:30:34 +00:00
}
2022-12-30 19:03:37 +00:00
if ($url[2] == 'p') {
$pal_al = ['1.1', '1.4', '1.5', '1.6', '1.7', '1.75', '1.9', '1.91', '1.92', '1.99'];
$tar_al = ['3.01', '3.05', '3.06', '3.07', '3.075', '3.09', '3.091', '3.092', '3.99'];
2022-06-06 21:30:34 +00:00
2022-12-30 19:03:37 +00:00
if (($u['admin'] > 0 || in_array($u['align'], $pal_al) || in_array($u['align'], $tar_al)) && $url[4] == 'delete') {
mysql_query(
'UPDATE `events_news` SET `delete` = ' . $u['id'] . ' WHERE `id` = ' . (int)$url[5] . ' AND `delete` = 0');
}
2022-06-06 21:30:34 +00:00
}
2022-12-30 19:03:37 +00:00
$add = [1];
2022-06-06 21:30:34 +00:00
2022-12-30 19:03:37 +00:00
if ($u['banned'] > 0 || $u['molch1'] > time() || $u['molch2'] > time()) {
if ($u['admin'] == 0 && $u['banned'] > 0) {
unset($u);
$add[0] = -1;
}
$add[0] = -2;
2022-06-06 21:30:34 +00:00
}
2022-12-30 19:03:37 +00:00
if ($u['level'] < 5) {
$add[0] = -4;
}
if ($add[0] == 1) {
$pac = mysql_fetch_array(
mysql_query(
'SELECT * FROM `events_news` WHERE `comment` > 0 AND `time` > "' . (time(
) - 60) . '" AND `uid` = "' . $u['id'] . '" LIMIT 1'
)
);
if (isset($pac['id'])) {
$add[0] = -3;
}
unset($pac);
2022-06-06 21:30:34 +00:00
}
2022-12-30 19:03:37 +00:00
if ($u['admin'] > 0) {
$add = [1];
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
/* Страница и тип страницы */
2022-12-30 19:03:37 +00:00
if (isset($_GET['page_id'])) {
$p = (int)$_GET['page_id'];
2022-06-06 21:30:34 +00:00
}
2022-12-30 19:03:37 +00:00
if ($p != 1 && $p != 2 && $p != 3 && $p != 4 && $p != 5 && $p != 6 && $p != 7) {
$p = 1;
2022-06-06 21:30:34 +00:00
}
2022-12-30 19:03:37 +00:00
if ($p == 1) {
$p_my = [1, 7];
}
2022-06-06 21:30:34 +00:00
2022-12-30 19:03:37 +00:00
if ($p == 4) {
$p = 1;
2022-06-06 21:30:34 +00:00
}
2022-12-30 19:03:37 +00:00
if (isset($_GET['paged'])) {
$pg = round((int)$_GET['paged']);
2022-06-06 21:30:34 +00:00
}
2022-12-30 19:03:37 +00:00
if ($pg < 0) {
$pg = 0;
2022-06-06 21:30:34 +00:00
}
2022-12-30 19:03:37 +00:00
$pal_al = ['1.1', '1.4', '1.5', '1.6', '1.7', '1.75', '1.9', '1.91', '1.92', '1.99'];
$tar_al = ['3.01', '3.05', '3.06', '3.07', '3.075', '3.09', '3.091', '3.092', '3.99'];
if ($u['admin'] > 0 || in_array($u['align'], $pal_al) || in_array($u['align'], $tar_al)) {
if (isset($_GET['delete']) && isset($_GET['del2'])) {
if (mysql_query(
'UPDATE `events_news` SET `delete` = "' . $u['id'] . '" WHERE `id` = "' . mysql_real_escape_string(
$_GET['delete']
) . '" AND `delete` = 0 LIMIT 1'
)) {
mysql_query(
'UPDATE `events_news` SET `comments` = `comments` - 1 WHERE `id` = "' . mysql_real_escape_string(
$_GET['del2']
) . '" LIMIT 1'
);
}
$_GET['st'] = $_GET['del2'];
}
if ($_POST['s_title'] == 'micronews1' || $_POST['s_title'] == 'micronews2') {
$micid = 1;
if ($_POST['s_title'] == 'micronews1') {
$micid = 1;
} elseif ($_POST['s_title'] == 'micronews2') {
$micid = 2;
}
mysql_query(
'UPDATE `events_mini` SET `text` = "' . mysql_real_escape_string(
$_POST['s_text']
) . '" WHERE `id` = "' . $micid . '" LIMIT 1'
);
//
} elseif (isset($_GET['delete'])) {
mysql_query(
'UPDATE `events_news` SET `delete` = "' . $u['id'] . '" WHERE `id` = "' . mysql_real_escape_string(
$_GET['delete']
) . '" AND `delete` = 0 LIMIT 1'
);
} elseif (isset($_POST['s_id'])) {
if ($_POST['s_id2'] > 0) {
$_GET['st'] = $_POST['s_id2'];
}
mysql_query(
'UPDATE `events_news` SET `title` = "' . mysql_real_escape_string(
$_POST['s_title']
) . '",`text` = "' . mysql_real_escape_string(
$_POST['s_text']
) . '" WHERE `id` = "' . mysql_real_escape_string($_POST['s_id']) . '" LIMIT 1'
);
header('location: ' . $_SERVER['REQUEST_URI']);
die();
} elseif (isset($_GET['add_new_st'])) {
mysql_query(
'INSERT INTO `events_news` (`r`,`time`,`uid`,`title`,`text`) VALUES ("' . mysql_real_escape_string(
$p
2023-01-10 16:29:32 +00:00
) . '","' . time() . '","' . $u['id'] . '","Новая статья","Текст статьи в разработке...")'
2022-12-30 19:03:37 +00:00
);
header('location:https://new-combats.com/n/p/' . $pg . '');
die();
}
2022-06-06 21:30:34 +00:00
}
?>
<!DOCTYPE html>
<html lang="ru-RU">
<head>
2022-12-30 19:03:37 +00:00
<meta name="viewport" content="width=device-width"/>
2023-01-10 16:29:32 +00:00
<title>Новости браузерной онлайн игры Новый «Бойцовский клуб»</title>
2022-12-30 19:03:37 +00:00
<meta name="keywords"
2023-01-10 16:29:32 +00:00
content="бойцовский клуб игра, бойцовский клуб играть, игра бойцовский клуб, старый бойцовский Клуб, бойцовский клуб онлайн игра, бойцовский клуб браузерная игра, играть в бойцовский клуб, игра бк, бк игра, старый бк, играть в бк, бк онлайн игра, новый бк, Легендарный Бойцовский Клуб, легендарный бк, combats, комбатс, combats ru, combats com, OldBK, oldbk ru, oldbk com, олдбк, old bk, олд бк, mycombats, rebk, recombats, oldcombats, obk2"/>
2022-12-30 19:03:37 +00:00
<meta name="description"
2023-01-10 16:29:32 +00:00
content="Последние обновления в игре, сообщения от администрации, даты старта ивентов и другая полезная информация ? для игроков легендарной MMORPG."/>
2022-12-30 19:03:37 +00:00
<link rel="canonical" href="https://new-combats.com/news_script/index.php"/>
<link rel="stylesheet" media="all" href="/news_script/style.css"/>
<style>
hr {
border: 1;
border-bottom: 1px solid #aeaeae;
}
a {
2023-01-10 16:29:32 +00:00
text-decoration: none; /* Отменяем подчеркивание у ссылки */
2022-12-30 19:03:37 +00:00
}
</style>
<script src="/js/jquery.js"></script>
<script>
function drw_wfl(login, orden, rang, clan, level) {
var data = '';
if (login === 'invisible') {
2023-01-10 16:29:32 +00:00
return "<b><i>невидимка</i></b>";
2022-12-30 19:03:37 +00:00
}
if (orden !== '' && orden !== 0) {
data += '<img src="https://img.new-combats.com/i/align/align' + orden + '.gif" border="0" />';
}
if (clan !== '' && clan !== undefined) {
data += '<img src="https://img.new-combats.com/i/clan/' + clan + '.gif" alt="" border="0" />';
}
return data + '<b>' + login + '</b> [' + level + ']<a target="_blank" href="https://new-combats.com/inf.php?login=' + login + '"><img src="https://img.new-combats.com/i/inf.gif" border="0"/></a>';
}
</script>
<?php if ($u['admin'] > 0) { ?>
<script src="https://new-combats.com/inx/ckeditor/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="https://new-combats.com/inx/ckeditor/ckeditor.js"></script>
<link href="sample.css" rel="stylesheet"/>
<script>
function save_new(id, id2) {
if (id < 0) {
id = -id;
$('#save_form').attr('action', 'https://new-combats.com/n/');
$('#s_title').val('micronews' + id);
$('#s_text').val($('#blockmini' + id).html());
$('#save_form').submit();
} else {
<?php if(isset($_GET['st'])) { ?>
$('#save_form').attr('action', 'https://new-combats.com/n/<?=$_GET['st']?>/');
<?php }else{ ?>
$('#save_form').attr('action', 'https://new-combats.com/n/p/<?=$pg?>/');
<?php } ?>
$('#s_title').val($('#editable_title' + id).html());
$('#s_text').val($('#editable' + id).html());
$('#s_id').val(id);
$('#s_id2').val(id2);
$('#save_form').submit();
}
}
</script>
2022-06-06 21:30:34 +00:00
</head>
2022-12-30 19:03:37 +00:00
<?php } ?>
<?php
if ($u['admin'] > 0) {
?>
<form action="../n/?page_id=<?= $p ?>&paged=<?= $pg ?>&st=" id="save_form" method="post">
<input id="s_title" name="s_title" type="hidden">
<input id="s_text" name="s_text" type="hidden">
<input id="s_id" name="s_id" type="hidden">
<input id="s_id2" name="s_id2" type="hidden">
</form>
<?php
2022-06-06 21:30:34 +00:00
}
?>
<div style="max-width:100%;" id="page" class="hfeed">
2022-12-30 19:03:37 +00:00
<header id="branding" role="banner">
<div style="background: #EDE9DA url('https://new-combats.com/news_script/events/top_nq_03.jpg'); height:25;">
<div style="height:25;">
<img src="https://new-combats.com/news_script/top_nq_011.jpg" width="681" height="76"/>
</div>
</div>
<nav style="background:#EDE9DA" id="access" role="navigation">
2023-01-10 16:29:32 +00:00
<p align="left" color="#CD5C5C"><a href="https://new-combats.com/n"><strong><big>Главная</big></strong><br></a><a
href="https://new-combats.com/register"><strong><big>Регистрация в игровом
мире</big></strong><br></a>
2022-12-30 19:03:37 +00:00
<?php if ($u['admin'] > 0) { ?>
2023-01-10 16:29:32 +00:00
<a href="/n/add/<?= $pg ?>/<?= $p ?>"><strong><big>Добавить статью</big></strong></a></p>
2022-12-30 19:03:37 +00:00
<?php } else {
echo "</p>";
} ?>
</nav><!-- #access -->
</header><!-- #branding -->
<div id="main">
<div id="primary">
<div id="content" role="main">
<div class="associated-posts">
<?php
if (isset($_GET['st'])) {
?>
<!-- pnews -->
<?php
2023-01-10 16:29:32 +00:00
//Новостная лента
2022-12-30 19:03:37 +00:00
if ($p == 1) {
$sp = mysql_query(
'SELECT * FROM `events_news` WHERE (`r` = "' . mysql_real_escape_string(
$p_my[0]
) . '" or `r` = "' . mysql_real_escape_string(
$p_my[1]
) . '") AND `delete` = "0" AND `comment` = "0" AND `id` = "' . mysql_real_escape_string(
(int)$_GET['st']
) . '" LIMIT 1'
);
} elseif ($p == 2) {
$sp = mysql_query(
'SELECT * FROM `events_news` WHERE `r` = "' . mysql_real_escape_string(
$p
) . '" AND `delete` = "0" AND `comment` = "0" AND `id` = "' . mysql_real_escape_string(
(int)$_GET['st']
) . '" LIMIT 1'
);
} else {
$sp = mysql_query(
'SELECT * FROM `events_news` WHERE `delete` = "0" AND `comment` = "0" AND `id` = "' . mysql_real_escape_string(
(int)$_GET['st']
) . '" LIMIT 1'
);
}
$pl = mysql_fetch_array($sp);
2022-06-06 21:30:34 +00:00
2022-12-30 19:03:37 +00:00
if (isset($pl['id'])) {
if ($url[3] == 'delete') {
if ($url[4] > 0) {
2023-01-10 16:29:32 +00:00
//Удаляем комментарий
2022-12-30 19:03:37 +00:00
mysql_query(
'UPDATE `events_news` SET `delete` = "1" WHERE `id` = "' . mysql_real_escape_string(
$url[4]
) . '" LIMIT 1'
);
mysql_query(
'UPDATE `events_news` SET `comments` = `comments` - 1 WHERE `id` = "' . mysql_real_escape_string(
$url[2]
) . '" LIMIT 1'
);
} elseif (!isset($url[4])) {
2023-01-10 16:29:32 +00:00
//Удаляем новость
2022-12-30 19:03:37 +00:00
mysql_query(
'UPDATE `events_news` SET `delete` = "1" WHERE `id` = "' . mysql_real_escape_string(
$url[2]
) . '" LIMIT 1'
);
unset($pl);
}
}
}
if (isset($pl['id'])) {
if (isset($u['id']) && $add[0] == 1 && isset($_POST['text_com']) && str_replace(
' ', '', str_replace(' ', '', $_POST['text_com'])
) != '') {
$_POST['text_com'] = htmlspecialchars($_POST['text_com'], null);
2022-12-30 19:03:37 +00:00
if ($u['admin'] == 0) {
$_POST['text_com'] = substr($_POST['text_com'], 0, 2048);
}
$_POST['text_com'] = str_replace("\n", '<br>', $_POST['text_com']);
mysql_query(
'INSERT INTO `events_news` (`login`,`level`,`align`,`clan`,`ip`,`city`,`cityreg`,`r`,`time`,`uid`,`title`,`text`,`comment`) VALUES (
"' . $u['login'] . '",
"' . $u['level'] . '",
"' . $u['align'] . '",
"' . $u['clan'] . '",
"' . $u['ip'] . '",
"' . $u['city'] . '",
"' . $u['cityreg'] . '",
"' . $pl['r'] . '","' . time(
) . '","' . $u['id'] . '","","' . mysql_real_escape_string(
$_POST['text_com']
) . '","' . $pl['id'] . '")'
);
mysql_query(
'UPDATE `events_news` SET `comments` = `comments` + 1 WHERE `id` = ' . $pl['id']);
$pl['comments']++;
if ($p == 1) {
$sp = mysql_query(
'SELECT * FROM `events_news` WHERE (`r` = ' . (int)$p_my[0] . ' or `r` = ' . (int)$p_my[1] . ') AND `delete` = 0 AND `comment` = 0 AND `id` = ' . (int)$_GET['st']);
} elseif ($p == 2) {
$sp = mysql_query(
'SELECT * FROM `events_news` WHERE `r` = ' . (int)$p . ' AND `delete` = 0 AND `comment` = 0 AND `id` = ' . (int)$_GET['st']
);
} else {
$sp = mysql_query(
'SELECT * FROM `events_news` WHERE `delete` = 0 AND `comment` = 0 AND `id` = ' . (int)$_GET['st']
);
}
$pl = mysql_fetch_array($sp);
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td>
<table width="100%" height="29" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="6" height="29"
style="background: url('https://new-combats.com/news_script/events/evn_news_03.gif') no-repeat;"></td>
<td align="left"
style="background: url('https://new-combats.com/news_script/events/evn_news_05.gif') repeat-x;">
<div style="float: left;">
<a style="color: #FFF; font-weight: bold;"
href="https://new-combats.com/n/<?= $pl['id'] ?>/"
rel="bookmark"
id="editable_title<?= $pl['id'] ?>"
<?php if ($u['admin'] > 0){ ?>contenteditable="true"<?php } ?>><?= $pl['title'] ?></a>
</div>
<div style="float: right;">
<a href="https://new-combats.com/n/<?= $pl['id'] ?>/"
title="<?= date('H:i', $pl['time']) ?>" rel="bookmark">
<time class="entry-date"
datetime="<?= date('Y', $pl['time']) ?>-<?= date(
'm', $pl['time']
) ?>-<?= date('d', $pl['time']) ?>T<?= date(
'h', $pl['time']
) ?>:<?= date('i', $pl['time']) ?>:<?= date(
's', $pl['time']
) ?>+00:00" pubdate><?= date(
'd.m.Y', $pl['time']
) ?></time>
</a></div>
<?php if ($u['admin'] > 0) { ?>
<div style="float: right;"><a
2023-01-10 16:29:32 +00:00
href="https://new-combats.com/n/<?= $pl['id'] ?>/delete">Удалить</a>
2022-12-30 19:03:37 +00:00
&nbsp;
</div>
<div style="float: right;">
<a href="javascript:void(0)"
2023-01-10 16:29:32 +00:00
onClick="save_new(<?= $pl['id'] ?>,0)">Сохранить</a>
2022-12-30 19:03:37 +00:00
&nbsp;
</div>
<?php } ?>
<div style="clear: both;"></div>
</td>
<td width="9"
style="background: url('https://new-combats.com/news_script/events/evn_news_07.gif') no-repeat;"></td>
</tr>
</table>
</td>
</tr>
<tr height="100%">
<td bgcolor="#EDE9DA">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1%"
style="background: url('https://new-combats.com/news_script/events/evn_news_12.gif') repeat-y;"></td>
<td width="100%" height="50" style="padding-left: 0px;">
<p<?php if ($u['admin'] > 0) { ?> id="editable<?= $pl['id'] ?>" contenteditable="true"<?php } ?>>
<?= $pl['text'] ?>
</p>
</td>
<td width="1%"
style="background: url('https://new-combats.com/news_script/events/evn_news_13.gif') repeat-y;"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0"
style="background: url('https://new-combats.com/news_script/events/evn_news_17.gif') repeat-x;">
<tr>
<td align="left" width="8"><img
src="https://new-combats.com/news_script/events/evn_news_16.gif"
width="8" height="24"></td>
<td width="100%">
<div style="float: left;position: relative;">
<span class="comments-link"><a
href="https://new-combats.com/n/<?= $pl['id'] ?>/"
2023-01-10 16:29:32 +00:00
title="Прокомментировать запись">Комментарии (<b><?= $pl['comments'] ?></b>)</a></span>
2022-12-30 19:03:37 +00:00
</div>
<div style="float: right;"></div>
<div style="clear: botttom;"></div>
</td>
<td align="right" width="8"><img
src="https://new-combats.com/news_script/events/evn_news_18.gif"
width="0" height="24"></td>
</tr>
</table>
</td>
</tr>
</table>
<?php if ($pl['comments'] > 20) { ?>
<br>
2023-01-10 16:29:32 +00:00
<a href="javascript:void(0)">Показать еще комментарии</a>
2022-12-30 19:03:37 +00:00
<?php } ?>
<br>
<div id="ref_comments"></div>
<!-- -->
<?php
$pxc = ($pl['comments'] - 20);
if ($pxc < 1) {
$pxc = 0;
}
$spc = mysql_query(
'SELECT * FROM `events_news` WHERE `comment` = ' . $pl['id'] . ' AND `delete` = 0 ORDER BY `id` LIMIT ' . $pxc . ' , 20'
);
while ($plc = mysql_fetch_array($spc)) {
?>
<table cellspacing="0" cellpadding="0" width="620" style="margin-left:30" align="center"
border="0">
<tbody>
<tr>
<td bgcolor="#e7dfc4">
<table cellspacing="1" cellpadding="3" width="100%" border="0">
<tbody>
<tr>
<td bgcolor="#f7f3e7">
<table cellspacing="0" cellpadding="1" width="100%" border="0">
<tbody>
<tr>
<td width="620">
<script type="text/javascript">document.write(drw_wfl('<?=$plc['login']?>', <?=(0 + $plc['align'])?>, 0, <?=(0 + $plc['clan'])?>, <?=(0 + $plc['level'])?>));</script>
<?php if ($u['admin'] > 0 || in_array(
$u['align'], $pal_al
) || in_array($u['align'], $pal_al)) { ?>
<div style="float: right;"><a
2023-01-10 16:29:32 +00:00
href="https://new-combats.com/n/<?= $pl['id'] ?>/delete/<?= $plc['id'] ?>">Удалить</a>
2022-12-30 19:03:37 +00:00
&nbsp;
</div>
<div style="float: right;"><a href="javascript:void(0)"
2023-01-10 16:29:32 +00:00
onClick="save_new(<?= $plc['id'] ?>,<?= $pl['id'] ?>)">Сохранить</a>
2022-12-30 19:03:37 +00:00
&nbsp;
</div>
<?php } ?>
</td>
<td align="right" style="color:#CFC59C">
<center><?= date('d.m.Y H:i', $plc['time']) ?></center>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="normaltext" bgcolor="#fbfaf6">
<p<?php if ($u['admin'] > 0) { ?> id="editable<?= $plc['id'] ?>" contenteditable="true"<?php } ?>><?= $plc['text'] ?></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br/>
<?php
if ($u['admin'] > 0) {
?>
<script>
CKEDITOR.disableAutoInline = true;
CKEDITOR.inline('editable<?=$plc['id']?>');
</script>
<?php
}
?>
<?php } ?>
<br>
<?php if ($add[0] == 1) { ?>
<form method="post" action="https://new-combats.com/n/<?= $_GET['st'] ?>/">
<table cellspacing="0" cellpadding="0" width="550" align="center" border="0">
<tbody>
<tr>
<td bgcolor="#e7dfc4">
<table cellspacing="1" cellpadding="3" width="550" border="0">
<tbody>
<tr>
2023-01-10 16:29:32 +00:00
<td bgcolor="#f7f3e7">Добавить комментарий</td>
2022-12-30 19:03:37 +00:00
</tr>
<tr>
<td bgcolor="#fbfaf6">
<textarea name="text_com" id="text_com"
style="border: 1px #EDE9DA solid; width: 548px; max-width: 548px;"
rows="4"></textarea></td>
</tr>
<tr>
<td align="right" bgcolor="#fbfaf6" class="normaltext"><input
type="submit" style="border:1px grey solid;" name="sendbt"
2023-01-10 16:29:32 +00:00
id="sendbt" value="Отправить"/></td>
2022-12-30 19:03:37 +00:00
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</form>
<?php } else {
if ($add[0] == -1) {
2023-01-10 16:29:32 +00:00
echo '<br><center>Необходимо авторизироваться</center>';
2022-12-30 19:03:37 +00:00
} elseif ($add[0] == -2) {
2023-01-10 16:29:32 +00:00
echo '<br><center>Вы заблокированы, либо на Вас наложено заклятие молчания.</center>';
2022-12-30 19:03:37 +00:00
} elseif ($add[0] == -3) {
2023-01-10 16:29:32 +00:00
echo '<br><center>Задержка на отправку комментариев. (Осталось: менее одной минуты)</center>';
2022-12-30 19:03:37 +00:00
} elseif ($add[0] == -4) {
2023-01-10 16:29:32 +00:00
echo '<br><center>Оставлять комментарии разрешено только персонажам достигшим 5-го уровня</center>';
2022-12-30 19:03:37 +00:00
}
} ?>
<a id="cmnt" name="cmnt"></a>
<?php if ($u['admin'] > 0) { ?>
<script>
CKEDITOR.disableAutoInline = true;
CKEDITOR.inline('editable<?=$pl['id']?>');
</script>
<?php } ?>
<br/>
<?php } else {
2023-01-10 16:29:32 +00:00
echo 'Статья не найдена.';
2022-12-30 19:03:37 +00:00
} ?>
<!-- pnews -->
<?php
}elseif ($p != 5 && $p != 6) {
?>
<!-- pnews -->
<?php
if ($p == 1) {
$sp = mysql_query(
'SELECT * FROM `events_news` WHERE (`r` = "' . mysql_real_escape_string(
$p_my[0]
) . '" or `r` = "' . mysql_real_escape_string(
$p_my[1]
) . '") AND `delete` = "0" AND `comment` = "0" ORDER BY `time` DESC LIMIT ' . ((int)(10 * $pg)) . ' , 10'
);
} elseif ($p == 2) {
$sp = mysql_query(
'SELECT * FROM `events_news` WHERE `r` = "' . mysql_real_escape_string(
$p
) . '" AND `delete` = "0" AND `comment` = "0" ORDER BY `time` DESC LIMIT ' . ((int)(10 * $pg)) . ' , 10'
);
} else {
$sp = mysql_query(
'SELECT * FROM `events_news` WHERE `delete` = "0" AND `comment` = "0" ORDER BY `time` DESC LIMIT ' . ((int)(10 * $pg)) . ' , 10'
);
}
while ($pl = mysql_fetch_array($sp)) {
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td>
<table width="100%" height="29" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="8" height="33"
style="background: url('https://new-combats.com/news_script/events/evn_news_03.gif') no-repeat;"></td>
<td align="left"
style="background: url('https://new-combats.com/news_script/events/evn_news_05.gif') repeat-x;">
<div style="float: left;"><a style="color: #FFF; font-weight: bold;"
href="https://new-combats.com/n/<?= $pl['id'] ?>/"
rel="bookmark"
id="editable_title<?= $pl['id'] ?>"
<?php if ($u['admin'] > 0){ ?>contenteditable="true"<?php } ?>><?= $pl['title'] ?></a>
</div>
<div style="float: right;"><a
href="https://new-combats.com/n/<?= $pl['id'] ?>/"
title="<?= date('H:i', $pl['time']) ?>" rel="bookmark">
<time class="entry-date"
datetime="<?= date('Y', $pl['time']) ?>-<?= date(
'm', $pl['time']
) ?>-<?= date('d', $pl['time']) ?>T<?= date(
'h', $pl['time']
) ?>:<?= date('i', $pl['time']) ?>:<?= date(
's', $pl['time']
) ?>+00:00" pubdate><?= date(
'd.m.Y', $pl['time']
) ?></time>
</a></div>
<?php if ($u['admin'] > 0) { ?>
<div style="float: right;"><a
2023-01-10 16:29:32 +00:00
href="https://new-combats.com/n/p/<?= (0 + $pg) ?>/delete/<?= $pl['id'] ?>">Удалить</a>
2022-12-30 19:03:37 +00:00
&nbsp;
</div>
<div style="float: right;"><a href="javascript:void(0)"
2023-01-10 16:29:32 +00:00
onClick="save_new(<?= $pl['id'] ?>,0)">Сохранить</a>
2022-12-30 19:03:37 +00:00
&nbsp;
</div>
<?php } ?>
<div style="clear: both;"></div>
</td>
<td width="6"
style="background: url('https://new-combats.com/news_script/events/evn_news_07.gif') no-repeat;"></td>
</tr>
</table>
</td>
</tr>
<tr height="100%">
<td bgcolor="#EDE9DA">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="background: url('https://new-combats.com/news_script/events/evn_news_12.gif') repeat-y;"></td>
<td width="100%" height="50" style="padding-left: 10px;">
<p<?php if ($u['admin'] > 0) { ?> id="editable<?= $pl['id'] ?>" contenteditable="true"<?php } ?>>
<?= $pl['text'] ?>
</p>
</td>
<td width="1%"
style="background: url('https://new-combats.com/news_script/events/evn_news_13.gif') repeat-y;"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0"
style="background: url('https://new-combats.com/news_script/events/evn_news_17.gif') repeat-x;">
<tr>
<td align="left" width="8">
<img src="https://new-combats.com/news_script/events/evn_news_16.gif"
width="8" height="24">
</td>
<td width="100%">
<div style="float: left;position: relative; top: -2px;">
<span class="comments-link">
<a href="https://new-combats.com/n/<?= $pl['id'] ?>/"
2023-01-10 16:29:32 +00:00
title="Прокомментировать запись">Комментарии (<b><?= $pl['comments'] ?></b>)</a>
2022-12-30 19:03:37 +00:00
</span>
</div>
<div style="float: right;"></div>
<div style="clear: both;"></div>
</td>
<td align="right" width="9">
<img src="https://new-combats.com/news_script/events/evn_news_18.gif"
width="0" height="24"></td>
</tr>
</table>
</td>
</tr>
</table>
<?php
if ($u['admin'] > 0) {
?>
<script>
CKEDITOR.disableAutoInline = true;
CKEDITOR.inline('editable<?=$pl['id']?>');
</script>
<?php
}
?>
<BR>
<?php } ?>
<!-- pnews -->
<?php } ?>
</div>
<?php
if ($p != 5 && $p != 6) {
$cnt = mysql_fetch_array(
mysql_query(
'SELECT COUNT(`id`) FROM `events_news` WHERE `r` = "' . mysql_real_escape_string(
$p
) . '" AND `delete` = "0" AND `comment` = "0"'
)
);
?>
<nav id="nav-below">
<div class="nav-previous"><?php if ($pg + 1 < ceil($cnt[0] / 10)) { ?><a
href="https://new-combats.com/news_script/?paged=<?= ($pg + 1) ?>&page_id=<?= $p ?>">
2023-01-10 16:29:32 +00:00
<span class="meta-nav">&larr;</span> Предыдущие записи</a><?php } ?></div>
2022-12-30 19:03:37 +00:00
<div class="nav-next"><?php if ($pg > 0) { ?><a
href="https://new-combats.com/news_script/?paged=<?= ($pg - 1) ?>&page_id=<?= $p ?>">
2023-01-10 16:29:32 +00:00
Следующие записи <span class="meta-nav">&rarr;</span></a><?php } ?></div>
2022-12-30 19:03:37 +00:00
</nav><!-- #nav-above -->
<?php } ?>
</div><!-- #content -->
</div><!-- #primary -->
<div id="secondary" class="widget-area" style="background:#EDE9DA">
<div id="archives-3" class="widget" style="background:#EDE9DA">
2023-01-10 16:29:32 +00:00
<div style="width:200px; height:0px;" class="widget-title"><font color="blue">Полезные статьи</font>
2022-12-30 19:03:37 +00:00
</div>
<div style="padding:0px;">
<br>
<hr>
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/daily_quest.html" target="_blank"> <strong>Ежедневные
задания</strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/achivki.html" target="_blank"> <strong>Достижения
Персонажа</strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/jori.html" target="_blank"> <strong>Городские Монстры</strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/kredi.html" target="_blank"> <strong>Заработок Кредитов</strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/ekri.html" target="_blank"> <strong>Заработок
Еврокредитов</strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/reliki.html" target="_blank"> <strong>Реликвии Ангела </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/voinka.html" target="_blank"> <strong>Воинственнсть </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/zveri.html" target="_blank"> <strong>Звери/Питомцы </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/runi.html" target="_blank"> <strong>Руны </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/charki.html" target="_blank"> <strong>Чарки </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/hz.html" target="_blank"> <strong>Храм Знаний </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/class_balance.html" target="_blank"> <strong>Классовый
Баланс </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/pisheri.html" target="_blank"> <strong>Подземелья </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/pisherniy_drop.html" target="_blank"> <strong>Пещерный
Дроп/Лут </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/bonusi_statov.html" target="_blank"> <strong>Бонусы
Статов </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/gs.html" target="_blank"> <strong>Героическое Сражение </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/bs.html" target="_blank"> <strong>Башня Смерти </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/boevie_sumki.html" target="_blank"> <strong>Боевые Сумки </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/profilnie_ataki.html" target="_blank"> <strong>Профильные
Атаки </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/podava.html" target="_blank"> <strong>Подавление Защиты от Магии </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/zouzom.html" target="_blank"> <strong>Защита от Урона/Магии в "%" </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/pmk.html" target="_blank"> <strong>ПМК </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/voinskie_priemi.html" target="_blank"> <strong>Воинские
Приемы </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/magicheskie_priemi.html" target="_blank"> <strong>Магические
Приемы </strong></a></br>
2022-12-30 19:03:37 +00:00
<hr class="hr1">
2023-01-10 16:29:32 +00:00
<a href="news_script/lib/svitki_zatochki.html" target="_blank"> <strong>Свитки
Заточки </strong></a></br>
2022-12-30 19:03:37 +00:00
</div>
</div>
</div>
<?php
$mcd1 = mysql_fetch_array(mysql_query('SELECT * FROM `events_mini` WHERE `id` = 1'));
$mcd2 = mysql_fetch_array(mysql_query('SELECT * FROM `events_mini` WHERE `id` = 2'));
?>
<!-- #page -->
</body>
</html>