Анкета и игровая шапка.

This commit is contained in:
lopar 2018-03-01 22:26:45 +02:00
parent 61b0ca565b
commit a97a29f87d
4 changed files with 48 additions and 220 deletions

9
ch.php
View File

@ -8,8 +8,7 @@ if (!isset($_SESSION['uid'])) {
include_once 'config.php'; include_once 'config.php';
include_once 'functions.php'; include_once 'functions.php';
$user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc(); db::c()->query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $u->i()['id']);
db::c()->query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $user['id']);
//function tolink($buf) /*Штука, убивающая чужие ссылки*/ //function tolink($buf) /*Штука, убивающая чужие ссылки*/
//{ //{
@ -29,7 +28,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
if ($_GET['room'] && (int)$_GET['room'] < 500) { if ($_GET['room'] && (int)$_GET['room'] < 500) {
$user['room'] = (int)$_GET['room']; $user['room'] = (int)$_GET['room'];
} }
if ($user['caveleader'] > 0) { if ($u->i()['caveleader'] > 0) {
$data = mysql_query(' $data = mysql_query('
SELECT SELECT
`align`, `align`,
@ -49,8 +48,8 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
WHERE WHERE
`o`.`id` = `u`.`id` AND `o`.`id` = `u`.`id` AND
(`o`.`date` >= ' . (time() - 90) . ' OR `u`.`in_tower` = 1) AND (`o`.`date` >= ' . (time() - 90) . ' OR `u`.`in_tower` = 1) AND
`o`.`room` = "' . $user['room'] . '" AND `o`.`room` = "' . $u->i()['room'] . '" AND
`u`.`caveleader` = "' . $user['caveleader'] . '" `u`.`caveleader` = "' . $u->i()['caveleader'] . '"
ORDER BY ORDER BY
`u`.`login` `u`.`login`
'); ');

View File

@ -7,6 +7,7 @@
require_once 'config.php'; require_once 'config.php';
require_once 'classes/u.php'; require_once 'classes/u.php';
$u = new u($_SESSION['uid']);
define("HPADDICTIONEFFECT", 33); define("HPADDICTIONEFFECT", 33);
@ -1159,29 +1160,7 @@ $exptable = array(
1500000000 => array(10, 1, 5, 8000, 1, 9999999999), # Это тринадцатый уровень 1500000000 => array(10, 1, 5, 8000, 1, 9999999999), # Это тринадцатый уровень
); );
$RefBonus = array( $rooms = [
"1" => array(5, 0),
"2" => array(10, 10),
"3" => array(20, 40),
"4" => array(30, 60),
"5" => array(40, 80),
"6" => array(100, 120),
"7" => array(150, 200),
"8" => array(200, 300),
"9" => array(400, 1000),
"10" => array(500, 2000),
"11" => array(1000, 4000),
"12" => array(3000, 10000),
"13" => array(10000, 30000),
"14" => array(15000, 40000),
"15" => array(20000, 50000),
"16" => array(30000, 60000),
"17" => array(40000, 70000),
"18" => array(50000, 100000)
);
$rooms = array(
"0" => "Секретная Комната", "0" => "Секретная Комната",
"1" => "Комната Новичков", "1" => "Комната Новичков",
"2" => "Комната Новичков 2", "2" => "Комната Новичков 2",
@ -1394,7 +1373,7 @@ $rooms = array(
"2100" => "Сектор 2100" "2100" => "Сектор 2100"
); ];
//эффективность магии //эффективность магии
$elem_align = array( $elem_align = array(
"a" => array("a" => "1", "e" => "0", "f" => "0.5", "w" => "0.5"), "a" => array("a" => "1", "e" => "0", "f" => "0.5", "w" => "0.5"),

View File

@ -1,194 +1,50 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<HEAD> <HEAD>
<meta content="text/html; charset=utf-8" http-equiv=Content-type> <meta charset="utf-8">
<script src="http://yandex.st/jquery/1.8.0/jquery.min.js" type="text/javascript"></script> <link rel="stylesheet" href="css/main.css">
<style> <style>
.btn0 { * {
background: url(/i/newd/up_right_dec.jpg) no-repeat; margin: 0;
width: 78px; padding: 0;
height: 33px;
margin-top: 1px;
} }
.btn7 { div {
background: url(/i/newd/up_right_dec2.jpg) no-repeat; margin: 0 auto;
width: 19px; overflow: auto;
height: 33px;
} }
.btn2, .btn4, .btn20, .btn5, .btn6 { ul {
cursor: pointer; list-style-type: none;
width: 32px;
height: 33px;
} }
.btn2 { li img {
background: url(/i/newd/up_butt2.jpg) no-repeat 0 -33px;
}
.btn4 {
background: url(/i/newd/up_butt4.jpg) no-repeat 0 -33px;
}
.btn20 {
background: url(/i/newd/m_link1.png) no-repeat 0 -33px;
}
.btn5 {
background: url(/i/newd/up_butt5.jpg) no-repeat 0 -33px;
}
.btn6 {
background: url(/i/newd/up_butt6.jpg) no-repeat 0 -33px;
}
.btn5:hover, .btn6:hover, .btn20:hover, .btn4:hover, .btn2:hover {
background-position: 0 0;
width: 32px;
cursor: pointer;
}
li {
display: inline-block;
float: right; float: right;
}</style> margin: 6px;
<script> border: 1px solid #fff;
setTimeout(function () {
location.href = "plrfr.php"
}, 52161000);
function ShowActions2() {
$('#btn2').removeClass('btn22');
$('#btn2').addClass('btn2');
var o = top.frames['main'].document; -webkit-transition: box-shadow 0.5s ease;
-moz-transition: box-shadow 0.5s ease;
if (o.frames && o.frames['leftmap']) { -o-transition: box-shadow 0.5s ease;
o = o.frames['leftmap'].document; transition: box-shadow 0.5s ease;
}
if (!o.getElementById("actiondiv")) {
newdiv2 = o.createElement("div"),
newdiv2.setAttribute("id", "actiondiv");
newdiv2.setAttribute("style", "display:none;");
newdiv2.setAttribute("style", "z-index:99999;");
o.body.appendChild(newdiv2);
}
var el = o.getElementById("actiondiv");
txt = '<span style="color:#8F0000;font-weight:bold;">Текущие акции<br><br>';
txt += '<table border=0 width=400><tr><td rowspan=2 width="60" valign=top><img alt="" src="/i/action/sale_pictures2.jpg"></td><td style="color:#8F0000;font-weight:bold;"><a href="http://old-dark.ru" target="_blank" style="font-size: 10pt;font-family: Verdana,Arial,Helvetica,Tahoma,sans-serif;color: #038;text-decoration: none;">Акция "Установи изображение"</a></td></tr><tr><td style="font-size: 10pt;font-family: Verdana,Arial,Helvetica,Tahoma,sans-serif;color:black;font-weight:normal;">Спешите! Скидка на установку любых изображений.<br><small><i>Акция действует в настоящий момент c 01/03/2016 00:00 по 15/03/2016 00:00</i></small></td></tr><tr><td colspan=2 height=25><img src="/i/newd/pop/razdelitel1.png"></td></tr></table>';
txt += '<table border=0 width=400><tr><td rowspan=2 width="60" valign=top><img alt="" src="/i/action/sale_junior2.jpg"></td><td style="color:#8F0000;font-weight:bold;">"Подарки новичкам"</td></tr><tr><td style="font-size: 10pt;font-family: Verdana,Arial,Helvetica,Tahoma,sans-serif;color:black;font-weight:normal;">Перейдя на 5й уровень Вы получите ценное долларовое обмундирование в подарок.</td></tr><tr><td colspan=2 height=25><img src="/i/newd/pop/razdelitel1.png"></td></tr></table>';
el.innerHTML = '<table border=0 cellspacing=0 cellpadding=0 width=505><tr><td width=505 style="background-repeat: no-repeat;" background="/i/newd/pop/up_bg.jpg"><img OnClick="document.getElementById(\'actiondiv\').style.display = \'none\';" OnMouseOut="this.src=\'/i/newd/pop/close_butt.jpg\';" OnMouseOver="this.src=\'/i/newd/pop/close_butt_hover.jpg\';" src="/i/newd/pop/close_butt.jpg" align=right></td></tr><tr><td background="/i/newd/pop/bg-y.jpg" align="center">' + txt + '</td></tr><tr><td width=500 height=8 background="/i/newd/pop/down_bg.jpg"></td></tr>';
el.style.display = "";
el.style.position = "absolute";
el.style.width = "550px;";
el.style.left = "50%";
el.style.top = "10%";
el.style.marginLeft = "-275px";
$.get('plrfr.php?save=1');
} }
top.an = 1;
</script>
<script type="text/javascript">
/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-17715832-1']);
_gaq.push(['_trackPageview']);
(function () { li img:hover {
var ga = document.createElement('script'); -webkit-box-shadow: 0 0 7px rgba(255,255,255,0.9);
ga.type = 'text/javascript'; box-shadow: 0 0 7px rgba(255,255,255,0.9);
ga.async = true; }
ga.src = ('https:' === document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; </style>
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
(function (b) {
(function (a) {
"__CF" in b && "DJS" in b.__CF ? b.__CF.DJS.push(a) : "addEventListener" in b ? b.addEventListener("load", a, !1) : b.attachEvent("onload", a)
})(function () {
"FB" in b && "Event" in FB && "subscribe" in FB.Event && (FB.Event.subscribe("edge.create", function (a) {
_gaq.push(["_trackSocial", "facebook", "like", a])
}), FB.Event.subscribe("edge.remove", function (a) {
_gaq.push(["_trackSocial", "facebook", "unlike", a])
}), FB.Event.subscribe("message.send", function (a) {
_gaq.push(["_trackSocial", "facebook", "send", a])
}));
"twttr" in b && "events" in twttr && "bind" in twttr.events && twttr.events.bind("tweet", function (a) {
if (a) {
var b;
if (a.target && a.target.nodeName === "IFRAME")a:{
if (a = a.target.src) {
a = a.split("#")[0].match(/[^?=&]+=([^&]*)?/g);
b = 0;
for (var c; c = a[b]; ++b)if (c.indexOf("url") === 0) {
b = unescape(c.split("=")[1]);
break a
}
}
b = void 0
}
_gaq.push(["_trackSocial", "twitter", "tweet", b])
}
})
})
})(window);
/* ]]> */
</script>
</HEAD> </HEAD>
<body bgcolor="#d7d7d7"> <body>
<table border=0 cellpadding=0 cellspacing=0 width="100%" <div>
style="height: 33px; background: url(/i/newd/bricks_bg.jpg) repeat-x;border-spacing: 0; border-collapse: collapse;"> <ul>
<tr> <li><a href="#"><img src="http://placehold.it/32x32" /></a></li>
<td width=210 style="min-width:210px;" align="left"> <li><a href="/user_anketa.php" title="Анкета"><img src="http://placehold.it/32x32" /></a></li>
<img src="http://capitalcity.old-dark.ru/i/newd/up_left_dec.png"> <li><a href="/blocknote.php" title="Блокнот"><img src="http://placehold.it/32x32" /></a></li>
</td> <li><a href="/friend.php" title="Друзья"><img src="http://placehold.it/32x32" /></a></li>
<td align="center" style="position: relative;min-width: 350px;"> <li><a href="/main.php?edit=1" title="Инвентарь"><img src="http://placehold.it/32x32" /></a></li>
<table border=0 width=350 cellpadding=0 cellspacing=0> </ul>
<tr> </div>
<td align=left width=1><img src="i/newd/up_center_left.png"></td>
<td style="background: url(/i/newd/up_center_bg.jpg) repeat-x;position:relative;vertical-align:top;"
align="center" width=100%>
<!-- RADIO PLACEHOLDER -->
</td>
<td align="right" width=1><img src="i/newd/up_center_right.png"></td>
</tr>
</table>
</td>
<td width=460 style="min-width:460px;">
<ul style="margin: -5px 0 0;">
<li>
<div class="btn7"></div>
</li>
<li><a href="#" onclick="top.cht('/user_anketa.php'); return false;" title="Анкета">
<div class="btn2" title="Анкета"></div>
</a></li>
<li><a href="#" onclick="top.cht('/blocknote.php'); return false;" title="Блокнот">
<div class="btn5" title="Блокнот"></div>
</a></li>
<li><a href="#" onclick="top.cht('/friend.php'); return false;" title="Друзья">
<div class="btn6" title="Друзья"></div>
</a></li>
<li><a href="#" onclick="top.cht('/ref.php'); return false;" title="Заработок">
<div class="btn4" title="Заработок"></div>
</a></li>
<li><a href="#" onclick="top.cht('/main.php?edit=1'); return false;" title="Инвентарь">
<div class="btn20" title="Инвентарь"></div>
</a></li>
<?php if ($user['first'] != 99): ?>
<li><a href="#" OnClick="ShowActions2();">
<div id="btn2" class="btn22" title="Квест"></div>
</a></li>
<?php endif; ?>
<li>
<div class="btn0"></div>
</li>
</ul>
</td>
</tr>
</table>
</body> </body>
</html> </html>

View File

@ -4,25 +4,21 @@ if (!isset($_SESSION['uid'])) {
header('Location: /index.php'); header('Location: /index.php');
die(); die();
} }
include('config.php'); include_once('config.php');
include('functions.php'); include_once('functions.php');
$u = new u($_SESSION['uid']);
if ($u->i()['battle'] > 0) { if ($u->i()['battle'] > 0) {
header('Location: /fbattle.php'); header('Location: /fbattle.php');
die(); die();
} }
$name = filter_input(INPUT_POST, $_POST['name']);
$color = filter_input(INPUT_POST, $_POST['color']);
$hobbie = str_replace("\\n", "<br />", $_POST['hobbie']);
$hobbie = str_replace("\\r", "", $_POST['hobbie']);
$hobbie = str_replace("&lt;br&nbsp;/&gt;", "<br />", $_POST['hobbie']);
if ($_POST['submit']) { if ($name || $color || $hobbie) {
$name = filter_input(INPUT_POST, $_POST['name']);
$color = filter_input(INPUT_POST, $_POST['color']);
// $name = htmlspecialchars($_POST['name'], NULL, 'cp1251');
// $color = htmlspecialchars($_POST['color'], NULL, 'cp1251');
$hobbie = str_replace("\\n", "<br />", $_POST['hobbie']);
$hobbie = str_replace("\\r", "", $_POST['hobbie']);
$hobbie = str_replace("&lt;br&nbsp;/&gt;", "<br />", $_POST['hobbie']);
$simbolcount = strlen($hobbie); $simbolcount = strlen($hobbie);
@ -38,7 +34,6 @@ if ($_POST['submit']) {
db::c()->query('UPDATE `users` SET `realname` = "?s", `color` = "?s", `info` = "?s" WHERE `id` = ?i', $name, $color, $hobbie, $u->i()['id']); db::c()->query('UPDATE `users` SET `realname` = "?s", `color` = "?s", `info` = "?s" WHERE `id` = ?i', $name, $color, $hobbie, $u->i()['id']);
} }
} }
?> ?>
<!doctype html> <!doctype html>
<html> <html>
@ -46,7 +41,6 @@ if ($_POST['submit']) {
<meta charset="utf-8"/> <meta charset="utf-8"/>
<link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/main.css">
<title>Анкета</title> <title>Анкета</title>
</head> </head>
<body> <body>
<a href="main.php"> на главную</a> <a href="main.php"> на главную</a>