Прикручиваем шаблон. Хороним идиотские ошибки.
This commit is contained in:
parent
354499f885
commit
47147182fb
194
fbattle.php
194
fbattle.php
@ -21,122 +21,114 @@ if (isset($user['id'])) {
|
||||
include('./classes/battle_new.class.php');
|
||||
|
||||
$fbattle = new fbattle($user['battle']);
|
||||
Template::header('fbattle');
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<meta charset="utf-8">
|
||||
<script type="text/javascript" src="js/ZeroClipboard.js"></script>
|
||||
<script type="text/javascript" src="js/sl2.js"></script>
|
||||
<script type="text/javascript" src="js/ch.js"></script>
|
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
||||
<script src="js/tooltip.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="css/tooltip.css"/>
|
||||
<SCRIPT>
|
||||
function refreshPeriodic() {
|
||||
<?php if($fbattle->battle) { ?>location.href = '<?=$_SERVER['PHP_SELF']?>?batl=<?=$_REQUEST['batl']?>';//reload();
|
||||
<?}?>
|
||||
const timerID = setTimeout("refreshPeriodic()", 20000);
|
||||
<script type="text/javascript" src="js/ZeroClipboard.js"></script>
|
||||
<script type="text/javascript" src="js/sl2.js"></script>
|
||||
<script type="text/javascript" src="js/ch.js"></script>
|
||||
<script src="js/tooltip.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="css/tooltip.css"/>
|
||||
<script>
|
||||
function refreshPeriodic() {
|
||||
<?php if($fbattle->battle) { ?>location.href = '<?=$_SERVER['PHP_SELF']?>?batl=<?=$_REQUEST['batl']?>';//reload();
|
||||
<?}?>
|
||||
const timerID = setTimeout("refreshPeriodic()", 20000);
|
||||
}
|
||||
|
||||
timerID = setTimeout("refreshPeriodic()", 20000);
|
||||
let Hint3Name = '';
|
||||
|
||||
function findlogin(title, script, name) {
|
||||
document.all("hint3").innerHTML = '<table width=100% cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: pointer" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>' +
|
||||
'<form action="' + script + '" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><INPUT TYPE=hidden name=sd4 value="6"><td colspan=2>' +
|
||||
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD width=50% align=right><INPUT TYPE=text NAME="' + name + '"></TD><TD width=50%><INPUT TYPE="submit" value=" »» "></TD></TR></TABLE></FORM></td></tr></table>';
|
||||
document.all("hint3").style.visibility = "visible";
|
||||
document.all("hint3").style.left = 100;
|
||||
document.all("hint3").style.top = 100;
|
||||
document.all(name).focus();
|
||||
Hint3Name = name;
|
||||
}
|
||||
|
||||
let attack = false;
|
||||
let defend = false;
|
||||
|
||||
function check() {
|
||||
if ((!attack) || (!defend)) {
|
||||
alert('Блок или удар не выбран.');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
timerID = setTimeout("refreshPeriodic()", 20000);
|
||||
</SCRIPT>
|
||||
<script>
|
||||
let Hint3Name = '';
|
||||
function Prv(logins) {
|
||||
top.frames['bottom'].window.document.F1.text.focus();
|
||||
top.frames['bottom'].document.forms[0].text.value = logins + top.frames['bottom'].document.forms[0].text.value;
|
||||
}
|
||||
|
||||
function findlogin(title, script, name) {
|
||||
document.all("hint3").innerHTML = '<table width=100% cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: pointer" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>' +
|
||||
'<form action="' + script + '" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><INPUT TYPE=hidden name=sd4 value="6"><td colspan=2>' +
|
||||
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD width=50% align=right><INPUT TYPE=text NAME="' + name + '"></TD><TD width=50%><INPUT TYPE="submit" value=" »» "></TD></TR></TABLE></FORM></td></tr></table>';
|
||||
document.all("hint3").style.visibility = "visible";
|
||||
document.all("hint3").style.left = 100;
|
||||
document.all("hint3").style.top = 100;
|
||||
document.all(name).focus();
|
||||
Hint3Name = name;
|
||||
}
|
||||
function setattack() {
|
||||
attack = true;
|
||||
}
|
||||
|
||||
let attack = false;
|
||||
let defend = false;
|
||||
function setdefend() {
|
||||
defend = true;
|
||||
}
|
||||
|
||||
function check() {
|
||||
if ((!attack) || (!defend)) {
|
||||
alert('Блок или удар не выбран.');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function refreshPeriodic() {
|
||||
<?php if($fbattle->battle) { ?>location.href = '<?=$_SERVER['PHP_SELF']?>?batl=<?=$_REQUEST['batl']?>'; <? } ?>
|
||||
const timerID = setTimeout("refreshPeriodic()", 30000);
|
||||
}
|
||||
|
||||
function Prv(logins) {
|
||||
top.frames['bottom'].window.document.F1.text.focus();
|
||||
top.frames['bottom'].document.forms[0].text.value = logins + top.frames['bottom'].document.forms[0].text.value;
|
||||
}
|
||||
timerID = setTimeout("refreshPeriodic()", 30000);
|
||||
|
||||
function setattack() {
|
||||
attack = true;
|
||||
}
|
||||
function checksubmit() {
|
||||
const ajaxload = 1;
|
||||
if (ajaxload > 0) {
|
||||
let enemy =;
|
||||
let batl =;
|
||||
const tac_at = $('input[name=attack]:checked').val();
|
||||
const att = "&attack=" + $('input[name=attack]:checked').val();
|
||||
const def = $('input[name=defend]:checked').val();
|
||||
|
||||
function setdefend() {
|
||||
defend = true;
|
||||
}
|
||||
|
||||
function refreshPeriodic() {
|
||||
<?php if($fbattle->battle) { ?>location.href = '<?=$_SERVER['PHP_SELF']?>?batl=<?=$_REQUEST['batl']?>'; <? } ?>
|
||||
const timerID = setTimeout("refreshPeriodic()", 30000);
|
||||
}
|
||||
|
||||
timerID = setTimeout("refreshPeriodic()", 30000);
|
||||
|
||||
function checksubmit() {
|
||||
const ajaxload = 1;
|
||||
if (ajaxload > 0) {
|
||||
let enemy =;
|
||||
let batl =;
|
||||
const tac_at = $('input[name=attack]:checked').val();
|
||||
const att = "&attack=" + $('input[name=attack]:checked').val();
|
||||
const def = $('input[name=defend]:checked').val();
|
||||
|
||||
if (tac_at >= 1 && def >= 1) {
|
||||
$.ajax({
|
||||
url: "fbattle.php",
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: "batl=" + batl + "&myid=1053012363" + att + "&defend=" + def + "&enemy=" + enemy + "",
|
||||
success: function (html) {
|
||||
$("body").html(html);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
alert('Выберите зону атаки и блока!');
|
||||
$("#at").prop("disabled", false);
|
||||
}
|
||||
} else {
|
||||
document.f1.submit();
|
||||
}
|
||||
}
|
||||
|
||||
$("document").ready(function () {
|
||||
$('#refresh').click(function () {
|
||||
if (tac_at >= 1 && def >= 1) {
|
||||
$.ajax({
|
||||
url: "fbattle.php",
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: "batl=" + batl + "&myid=1053012363" + att + "&defend=" + def + "&enemy=" + enemy + "",
|
||||
success: function (html) {
|
||||
$("body").html(html);
|
||||
}
|
||||
});
|
||||
});
|
||||
$(".tooltip").tipTip({maxWidth: "auto", edgeOffset: 0, fadeIn: 300, fadeOut: 500});
|
||||
});
|
||||
</script>
|
||||
<style type="text/css">
|
||||
span {
|
||||
font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
} else {
|
||||
alert('Выберите зону атаки и блока!');
|
||||
$("#at").prop("disabled", false);
|
||||
}
|
||||
} else {
|
||||
document.f1.submit();
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onLoad="top.setHP(<?= $user['hp'] ?>,<?= $user['maxhp'] ?>)">
|
||||
}
|
||||
|
||||
$("document").ready(function () {
|
||||
$('#refresh').click(function () {
|
||||
$.ajax({
|
||||
url: "fbattle.php",
|
||||
cache: false,
|
||||
success: function (html) {
|
||||
$("body").html(html);
|
||||
}
|
||||
});
|
||||
});
|
||||
$(".tooltip").tipTip({maxWidth: "auto", edgeOffset: 0, fadeIn: 300, fadeOut: 500});
|
||||
});
|
||||
</script>
|
||||
<style type="text/css">
|
||||
span {
|
||||
font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<div id="hint3" class="ahint"></div>
|
||||
<form action="<?= $_SERVER['PHP_SELF'] ?>" method="POST" name="f1" id="f1">
|
||||
<table width=100% cellspacing=0 cellpadding=0 border=0>
|
||||
@ -542,12 +534,8 @@ $fbattle = new fbattle($user['battle']);
|
||||
</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<div id="oMenu" onmouseout="closeMenu()"
|
||||
style="position: absolute; border: 1px solid #666; background-color: #CCC; display: none; "></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
db::c()->query('UNLOCK TABLES');
|
||||
?>
|
Loading…
Reference in New Issue
Block a user