Delete unused code.

This commit is contained in:
lopar 2018-03-02 14:40:18 +02:00
parent 7093cf8861
commit ec4b01e4fc
5 changed files with 10 additions and 340 deletions

View File

@ -1,270 +0,0 @@
<html>
<head>
<title>Бойцовский Клуб</title>
<meta content="бойцовский, клуб, oldbbk, игра, online" http-equiv="keywords" name="keywords">
<meta content="Бойцовский Клуб oldbbk" http-equiv=description name="description">
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<script>
top.server="http://goldpaladin.ru";
function get_mainframe() {return top.frames['main']; }
function get_maindoc() { return this.document; }
var main_uid= 'main';</script>
<script language=javascript>
//<!--
var CtrlPress = false;
var SoundOff = true;
var VolumeControl=25;
var chScroll = true;
function soundD(){
if (top.frames['bottom'].document.getElementById('soundM').innerHTML=='' && SoundOff==false){
if (navigator.userAgent.match(/MSIE/)) {
// IE gets an OBJECT tag
musicTag='<object id="flashsound" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="1" height="1"><param name="movie" value="sound/Sound.swf?LevelVolume='+VolumeControl+'" /><param name="quality" value="high" /></object>';
}
else {
musicTag='<embed name="flashsound" src="sound/Sound.swf?LevelVolume='+VolumeControl+'" quality="best" width="1" height="1" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
}
top.frames['bottom'].document.getElementById('soundM').innerHTML=musicTag;
}
}
function AddTo(login){
if (CtrlPress){
login=login.replace('%', '%25');
while(login.indexOf('+')>=0) login=login.replace('+', '%2B');
while(login.indexOf('#')>=0) login=login.replace('#', '%23');
while(login.indexOf('?')>=0) login=login.replace('?', '%3F');
window.open('inf.php?login='+login, '_blank')
}
else {
var o=top.frames['main'].Hint3Name;
if ((o != null)&&(o != "")) {
top.frames['main'].document.all(o).value=login;
top.frames['main'].document.all(o).focus();
} else {
top.frames['bottom'].window.document.F1.text.focus();
top.frames['bottom'].document.forms[0].text.value='to ['+login+'] '+top.frames['bottom'].document.forms[0].text.value;
}
}
}
function AddToPrivate(login, nolookCtrl){
if (CtrlPress && !nolookCtrl) {
login=login.replace('%', '%25');
while (login.indexOf('+')>=0) login=login.replace('+', '%2B');
while (login.indexOf('#')>=0) login=login.replace('#', '%23');
while (login.indexOf('?')>=0) login=login.replace('?', '%3F');
window.open('inf.php?login='+login, '_blank')
} else {
top.frames['bottom'].window.document.F1.text.focus();
top.frames['bottom'].document.forms[0].text.value='private ['+login+'] ' + top.frames['bottom'].document.forms[0].text.value;
}
}
function setCookie(name, value) {document.cookie=name+"="+escape(value)+"; path=/";}
function getCookie(Name) {
var search=Name + "="
if (document.cookie.length > 0){
offset=document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end=document.cookie.indexOf(";", offset)
if (end == -1) end=document.cookie.length
return unescape(document.cookie.substring(offset, end))
}
}}
var rnd=Math.random();
//-- Смена хитпоинтов
var delay = 3; // Каждые n увеличение HP на 1%
var Mdelay = 12;
var redHP = 0.33; // меньше 30% красный цвет
var yellowHP = 0.66; // меньше 60% желтый цвет, иначе зеленый
var TimerOn = -1; // id таймера
var tkHP, maxHP;
function setHP(value, max) {
tkHP=value; maxHP=max;
if (TimerOn>=0) { clearTimeout(TimerOn); TimerOn=-1; }
setHPlocal();
}
function p(text, type) {
top.frames['chat'].p(text,type);
}
function show_new(id) {
top.frames['chat'].document.getElementById(''+id+'').style.color = "Red";
}
function setHPlocal() {
if (tkHP>maxHP) { tkHP=maxHP; }
var sz1 = Math.round((149/maxHP)*tkHP);
var sz2 = 150 - sz1;
if (top.frames['main'].document.getElementById('HP')) {
top.frames['main'].document.HP1.width=sz1;
top.frames['main'].document.HP2.width=sz2;
if (tkHP/maxHP < redHP) {
top.frames['main'].document.HP1.src='i/1red.gif';
} else {
if (tkHP/maxHP < yellowHP) {
top.frames['main'].document.HP1.src='i/1yellow.gif';
} else {
top.frames['main'].document.HP1.src='i/1green.gif';
}
}
var s = top.frames['main'].document.all("HP").innerHTML;
top.frames['main'].document.all("HP").innerHTML = s.substring(0, s.lastIndexOf(':')+1) + Math.round(tkHP)+"/"+maxHP;
}
tkHP = (tkHP+(maxHP/100));
if (tkHP<maxHP) {
TimerOn=setTimeout('setHPlocal()', delay*1000);
} else {
TimerOn=-1;
}
}
//-- Обновление чата
var ChatTimerID=-1; // id таймера для чата
var ChatDelay=15; // через сколько сек. рефрешить чат
var ChatNormDelay=15; // через сколько сек. рефрешить чат при нормальном обновлении
var ChatSlowDelay=60; // через сколько сек. рефрешить чат при медленном обновлении
var ChatOm=false; // фильтр сообщений в чате
var ChatSys=false; // фильтр системных сообщений в чате
var ChatSlow=false; // обновление чата раз в минуту
var ChatTranslit=false; // преобразование транслита
var lid=0; // номер последнего сообщения в чате
function RefreshChat(){
var s='&lid='+lid;
if (ChatOm) { s=s+'&om=1'; }
if (ChatSys) { s=s+'&sys=1'; }
if (ChatTimerID>=0) { clearTimeout(ChatTimerID); }
ChatTimerID=setTimeout('RefreshChat()', ChatDelay*1000);
top.frames['refreshed'].location='ch.php?show='+Math.random()+s;
}
// останавливает обновление чата
function StopRefreshChat(){
if(ChatTimerID>=0){clearTimeout(ChatTimerID); }
ChatTimerID=-1;
}
// сбрасывает таймер счетчика
function NextRefreshChat(){
if (ChatTimerID>=0) {clearTimeout(ChatTimerID); }
ChatTimerID=setTimeout('RefreshChat()', ChatDelay*1000);
}
// Прокрутка текста чата вниз
function srld(){
if(chScroll == true){
top.frames['chat'].window.scrollBy(0, 65000);
}
}
// Установка lid
function slid(newlid){
var o=top.frames['bottom'].F1;
if (o) {lid=newlid;o.lid.value=newlid;}
}
// Перезагружаем список online, делаем это не сразу, а с паузой
var OnlineDelay=12; // пауза в сек. перед релоудом списка online
var OnlineTimerOn=-1; // id таймера
var OnlineOldPosition=0; // Позиция списка перед релоудом
var OnlineStop=true; // ручное обновление чата
function rld(now) {
if (OnlineTimerOn < 0 || now) {
var tm=now ? 2000 : OnlineDelay*1000;
OnlineTimerOn=setTimeout('onlineReload('+now+')', tm);
}
}
function onlineReload(now) {
if (OnlineTimerOn >= 0) clearTimeout(OnlineTimerOn);
OnlineTimerOn=-1;
if (! OnlineStop || now) {
top.frames['online'].location='ch.php?online='+Math.round(Math.random()*100000);
//top.frames['online'].navigate('ch.php?online='+Math.round(Math.random()*100000));
}
rld();
}
var changeroom=1;
var localroom=1;
setInterval(function (){
if (localroom!=changeroom){
localroom=changeroom;
top.frames['online'].location='ch.php?online='+Math.round(Math.random()*100000);
}
}, 5000);
//-- Очистка чата
var ChatClearTimerID=-1; // id таймера для чата
var ChatClearDelay=900; // через сколько сек. чистим чат
var ChatClearSize=10000; // Сколько байт оставляем после чистки
function RefreshClearChat(){
if (ChatClearTimerID>=0) { clearTimeout(ChatClearTimerID); }
ChatClearTimerID=setTimeout('RefreshClearChat()', ChatClearDelay*1000);
var s=top.frames['chat'].document.all("mes").innerHTML;
var s2=top.frames['chat'].document.all("mes_sys").innerHTML;
if (s.length > ChatClearSize) { // Надо чистить чат
var j=s.lastIndexOf('<BR>', s.length-ChatClearSize);
top.frames['chat'].document.all("mes").innerHTML=s.substring(j, s.length);
}
if (s2.length > ChatClearSize) { // Надо чистить системные
var j2=s2.lastIndexOf('<BR>', s2.length-ChatClearSize);
top.frames['chat'].document.all("mes_sys").innerHTML=s2.substring(j2, s2.length);
}
}
//-- Прочие функции
var oldlocation='';
function cht(nm){
if (oldlocation == '') {
oldlocation=top.frames['main'].location.href;
var i=oldlocation.indexOf('?', 0);
if (i>0) { oldlocation=oldlocation.substring(0, i) }
}
//top.frames['main'].navigate(nm);
top.frames['main'].location=nm;
}
function returned(){
if (oldlocation != '') { top.frames['main'].location=oldlocation+'?tmp='+Math.random(); oldlocation=''; }
else { top.frames['main'].location='main.php?edit='+Math.random() }
}
function myscroll(){
OnlineOldPosition=top.frames['online'].document.body.scrollTop;
}
function CLR1(){
top.frames["bottom"].document.F1.text.value='';
top.frames["bottom"].document.F1.text.focus();
}
function CLR2(){
top.frames['chat'].document.all("mes").innerHTML='';
top.frames['chat'].document.all("oMenu").style.top="0px";
}
function strt(){// Начинаем
ChatTimerID=setTimeout('RefreshChat()', 1000);
OnlineTimerOn=setTimeout('onlineReload(true)', 2*1000);
ChatClearTimerID=setTimeout('RefreshClearChat()', ChatClearDelay*1000);
}
var user=getCookie("battle");
if ((user == null)||(user == "")) {
document.write('<body>Внимание! РС РёР»Рё РЅРµ ввели ваш логин/пароль РЅР° титульной странице или РІ вашем браузере отключена поддержка Cookie. Необходимо РёС… включить (это абсолютно безопасно!) для продолжения РёРіСЂС‹.<BR>');
document.write('Рменю браузера Internet Explorer выберите "Сервис" => "Свойства обозревателя" перейдите РЅР° закладку "Конфиденциальность" Рё передвиньте ползунок РІ положение "Средний". И попробуйте СЃРЅРѕРІР° зайти СЃ <A HREF="/">титульной страницы</A>.<BR>Рбраузере IE версии 5 меню: "Сервис" => "Свойства обозревателя" => "Безопасность" => "Интернет" РєРЅРѕРїРєР° "Другой" => файлы "cookie"<BR>Если Сѓ вас IE 4-Р№ версии, возможно вам РЅРµ удастся зайти, СЃ проблемой этой версии браузера РјС СЂР°Р±РѕС‚Р°РµРј, РЅРѕ РїРѕРєР° единственным решением является: обновление браузера РґРѕ 5-Р№ или 6-Р№ версии.<BR>Если ничего РЅРµ помогает, проверьте настройки вашего FireWall, если РѕРЅ установлен, СРѕ может РЅРµ пропускать активные страницы Рё cookie.</BODY>');
}
else {
//if (document.all && document.all.item && !window.opera && !document.layers) {
document.write(
'<frameset rows="37, *, 30">' +
'<frame src="top_menu.php" scrolling="no" noresize="noresize" FRAMEBORDER="0" MARGINWIDTH="0" MARGINHEIGHT="0">' +
'<frameset rows="72%, *, 0">' +
'<frame name="main" src="main.php?top=' + rnd + '" style="border-bottom-width: 2px; border-bottom-style:solid; border-bottom-color:#B0B0B0">' +
'<frameset cols="*,263">' +
'<frame id="chat" name="chat" src="buttons.php?ch=' + rnd + '" scrolling="yes" FRAMEBORDER="0" MARGINWIDTH="3" MARGINHEIGHT="3">' +
'<frame name="online" src="ch.php?online=' + rnd + '" scrolling="yes" FRAMEBORDER=' + frmval + ' BORDER="0" MARGINWIDTH="3" MARGINHEIGHT="0" ' + addstyle + '>' +
'</frameset>' +
'<frame name="refreshed" scrolling="no" noresize="noresize" src="refreshed.html">' +
'</frameset>' +
'<frame name="bottom" scrolling="no" noresize="noresize" src="buttons.php?' + rnd + '">' +
'</frameset>');
/*} else { alert("You must use Internet Explorer 4.0 or higher"); history.back(-1);
}*/
//rld();
}
//-->
</script><noscript><span style="color:#ff0000">Внимание!</span> Рвашем браузере отключена поддержка JavaScript. Необходимо их включить (это абсолютно безопасно!) для продолжения игры.<br />Рменю браузера Internet Explorer выберите "Сервис" => "Свойства обозревателя" перейдите на закладку "Безопасность". Для зоны <b>Интернет</b> нажмите кнопку "Другой". Установите уровень безопасности "Средний", этого достаточно. Или же, в списке параметров найдите раздел "Сценарии" и там нужно разрешить выполнение Активных сценариев.<br /><span style="color:#ff0000">Attention!</span> Your browser does not support JavaScript. To continue the game, please turn the support on (it's absolutely safe).<br />In the Internet Explorer browser menu choose "Tools" => "Internet Options" and go to "Security". For the <b>Internet</b> zone press the "Custom level" button. State the "Medium", this will be enough. You can also find the "Scripting" page in the list of the parameters and allow Active Scripting there.</noscript></body></html>

View File

@ -289,21 +289,6 @@ if ($header) {
return {x: x, y: y};
}
function translate() {
var strarr;
strarr = document.F1.text.value.split(' ');
for (var k = 0; k < strarr.length; k++) {
if (strarr[k].indexOf("http://") < 0 && strarr[k].indexOf('@') < 0 && strarr[k].indexOf("www.") < 0 && !(strarr[k].charAt(0) == ":" && strarr[k].charAt(strarr[k].length - 1) == ":")) {
if ((k < strarr.length - 1) && (strarr[k] == "to" || strarr[k] == "private") && (strarr[k + 1].charAt(0) == "[")) {
while ((k < strarr.length - 1) && (strarr[k].charAt(strarr[k].length - 1) != "]")) k++;
} else {
strarr[k] = convert(strarr[k])
}
}
}
document.F1.text.value = strarr.join(' ');
}
function trns() {
var strarr;
strarr = document.F1.text.value.split(' ');
@ -336,9 +321,6 @@ if ($header) {
function subm() {
t = top.frames['chat'].currenttab;
$('input[name="chtype"]:hidden').val(t);
if (top.ChatTranslit) {
translate();
}
}
var b___filter_on = new Image;

View File

@ -141,16 +141,15 @@ include("config.php");
} else {
document.write(
'<frameset rows="45, *, 30">' +
'<frame src="top_menu.php" scrolling="no" noresize="noresize" FRAMEBORDER="0" MARGINWIDTH="0" MARGINHEIGHT="0">' +
'<frameset rows="72%, *, 0">' +
'<frame name="main" src="main.php?top=' + rnd + '" style="border-bottom-width: 2px; border-bottom-style:solid; border-bottom-color:#B0B0B0">' +
'<frameset cols="*,263">' +
'<frame id="chat" name="chat" src="buttons.php?ch=' + rnd + '" scrolling="yes" FRAMEBORDER="0" MARGINWIDTH="3" MARGINHEIGHT="3">' +
'<frame name="online" src="ch.php?online=' + rnd + '" scrolling="yes" FRAMEBORDER=' + frmval + ' BORDER="0" MARGINWIDTH="3" MARGINHEIGHT="0" ' + addstyle + '>' +
'</frameset>' +
'<frame name="refreshed" scrolling="no" noresize="noresize" src="refreshed.html">' +
'</frameset>' +
'<frame name="bottom" scrolling="no" noresize="noresize" src="buttons.php?' + rnd + '">' +
'<frame src="top_menu.php" scrolling="no" noresize="noresize" FRAMEBORDER="0" MARGINWIDTH="0" MARGINHEIGHT="0">' +
'<frameset rows="72%, *">' +
'<frame name="main" src="main.php?top=' + rnd + '" style="border-bottom-width: 2px; border-bottom-style:solid; border-bottom-color:#B0B0B0">' +
'<frameset cols="*,263">' +
'<frame id="chat" name="chat" src="buttons.php?ch=' + rnd + '" scrolling="yes" FRAMEBORDER="0" MARGINWIDTH="3" MARGINHEIGHT="3">' +
'<frame name="online" src="ch.php?online=' + rnd + '" scrolling="yes" FRAMEBORDER=' + frmval + ' BORDER="0" MARGINWIDTH="3" MARGINHEIGHT="0" ' + addstyle + '>' +
'</frameset>' +
'</frameset>' +
'<frame name="bottom" scrolling="no" noresize="noresize" src="buttons.php?' + rnd + '">' +
'</frameset>');
}
</script>

View File

@ -5,7 +5,7 @@
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
include "functions.php";
if ($user['room'] != 401) { header("Location: main.php"); die(); }
if ($user['battle'] > 0) { header('Location: battle.php'); die(); }
if ($user['battle'] > 0) { header('Location: fbattle.php'); die(); }
class hellround {

View File

@ -1,41 +0,0 @@
<html lang="ru" xmlns="http://www.w3.org/1999/html">
<head>
<link rel="stylesheet" type="text/css" href="design/css/fight.css"/>
<script language="JavaScript">
function rslength() { // изменяет размер строки ввода текста
var size = document.body.clientWidth-(2*30)-66-256-30;
if (size<100) { size=100 }
document.F1.text.width = size;
document.all('T2').width = size;
}
window.onresize=rslength;
</script>
</head>
<body onload="rslength()">
<form action="http://c.capitalcity.old-dark.ru/ch.php" target="refreshed" method="GET" name="F1" onsubmit="subm(); top.NextRefreshChat();">
<div id="bk-buttons-center">
<table border="0" width="100%" height="30" cellspacing="0" cellpadding="0">
<tr>
<td width="800" id="T2">
<input type="text" id="ssmtext" name="text" maxlength="200" size="70" style="width:100%" width="800">
</td>
<td valign="top" align="right">
<div id="bk-buttons-panel-right">
<a class="buttons" href="javascript:void(0)" onclick="document.forms[0].submit()" title="Добавить текст в чат"><img src="design/i/buttons/say2.gif" width="30" height="30" border="0" alt="Добавить текст в чат"></a>
<a class="buttons" href="javascript:void(0)" onclick="clearc();" title="Очистить строку ввода"><img src="design/i/buttons/erase.gif" width="30" height="30" border="0" alt="Очистить строку ввода"></a>
<a class="buttons" href="javascript:void(0)" onclick="sw_filter();" title="(выключено) Показывать в чате только сообщения адресованные мне"><img src="design/i/buttons/b___filter_off.gif" width="30" height="30" border="0" name="b___filter" alt="(выключено) Показывать в чате только сообщения адресованные мне"></a>
<a class="buttons" href="javascript:void(0)" onclick="sw_sys();" title="(выключено) Показывать в чате системные сообщения"><img src="design/i/buttons/b___sys_off.gif" width="30" height="30" border="0" name="b___sys" alt="(выключено) Показывать в чате системные сообщения"></a>
<a class="buttons" href="javascript:void(0)" onclick="sw_slow();" title="(выключено) Медленное обновление чата (раз в минуту)"><img src="design/i/buttons/b___slow_off.gif" width="30" height="30" border="0" name="b___slow" alt="(выключено) Медленное обновление чата (раз в минуту)"></a>
<a class="buttons" href="javascript:void(0)" onclick="sw_translit();" title="(выключено) Преобразовывать транслит в русский текст (правила перевода см. в энциклопедии)"><img src="design/i/buttons/b___translit_off.gif" width="30" height="30" border="0" name="b___translit" alt="(выключено) Преобразовывать транслит в русский текст (правила перевода см. в энциклопедии)"></a>
<a class="buttons" href="javascript:void(0)" onclick="smiles()" title="Смайлики"><img src="design/i/buttons/b___smile.gif" width="30" height="30" border="0" alt="Смайлики"></a>
<a class="buttons" href="javascript:void(0)" onclick="SoundB()" title="Р—РІСѓРєРё"><img src="design/i/buttons/zvuk_off.gif" id="but_sound" width="30" height="30" border="0"></a>
<a class="buttons" href="javascript:void(0)" title="Настройки/Инвентарь"><img src="design/i/buttons/a___inv.gif" width="30" height="30" border="0" alt="Настройки/Инвентарь" onclick="top.cht(&#39;main.php?edit=&#39;+Math.random())"></a>
<a class="buttons" href="http://c.capitalcity.old-dark.ru/forum.php" target="_blank" title="Форум"><img src="design/i/buttons/a__forum.gif" width="30" height="30" border="0" alt="Форум"></a>
<a class="buttons" href="javascript:void(0)" title="Выход из игры"><img src="design/i/buttons/a___ext.gif" width="30" height="30" border="0" alt="Выход из игры" onclick="if (confirm(&#39;Выйти из игры?&#39;)) top.window.location=&#39;index.php?exit=1&#39;"></a>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>