diff --git a/_unused-files/h.js b/_unused-files/h.js index 46bf1f3..8030e01 100644 --- a/_unused-files/h.js +++ b/_unused-files/h.js @@ -43,21 +43,21 @@ H.prototype.get = function(key, defaultValue){ H.prototype.setHP = function(id, curHP, maxHP){ curHP = curHP || 0; maxHP = maxHP || 0; - var hp = this.getMainBox().find('#hpKey_'+id); + const hp = this.getMainBox().find('#hpKey_' + id); if(hp.length < 1){ return false; } - var hpA = $('img:eq(1)', hp); - var hpB = $('img:eq(2)', hp); - var redHP = 0.33; // меньше 30% красный цвет - var yellowHP = 0.66; // меньше 60% желтый цвет, иначе зеленый + const hpA = $('img:eq(1)', hp); + const hpB = $('img:eq(2)', hp); + const redHP = 0.33; // меньше 30% красный цвет + const yellowHP = 0.66; // меньше 60% желтый цвет, иначе зеленый if(curHP > maxHP){ curHP = maxHP; } - var text = curHP + '/' + maxHP; - var lengthHP = 170 - (text.length - 1) * 8; - var sizeFirst = Math.round((lengthHP / maxHP) * curHP); - var sizeSecond = lengthHP - sizeFirst; + const text = curHP + '/' + maxHP; + const lengthHP = 170 - (text.length - 1) * 8; + const sizeFirst = Math.round((lengthHP / maxHP) * curHP); + const sizeSecond = lengthHP - sizeFirst; hpA.attr('width', sizeFirst); hpB.attr('width', sizeSecond); if(curHP / maxHP < redHP){ @@ -116,15 +116,19 @@ H.prototype.sdOptionsDefault = { H.prototype._sd = function(options){ options = $.extend({}, this.sdOptionsDefault, options); - var m = $('
').css('width',options.width); - var t = $('
@@ -267,22 +269,22 @@ if(isset($_POST['leaveZv'])) {
@@ -705,7 +705,7 @@ if(in_array($me_room, $ar_150)){ $me_150 = 1; }
- if(!in_array($serch_room, $ar_all)){ }
+// if(!in_array($serch_room, $ar_all)){ }
echo '
diff --git a/luka_shop.php b/luka_shop.php index 73de893..e5bcc9e 100644 --- a/luka_shop.php +++ b/luka_shop.php @@ -96,8 +96,8 @@ mysql_query("UPDATE `inventory` set `maxdur` = '$vsego',massa='$mas' WHERE `type "; die(); } -?> \ No newline at end of file diff --git a/podzem/connect.php b/podzem/connect.php index d3f4836..c3eacd9 100644 --- a/podzem/connect.php +++ b/podzem/connect.php @@ -14,4 +14,3 @@ if (!$google) { $_REQUEST[$k] = htmlspecialchars(mysql_real_escape_string($v), NULL, ""); } } -?> \ No newline at end of file diff --git a/podzem/raschet_bot.php b/podzem/raschet_bot.php index 1e71353..0f25621 100644 --- a/podzem/raschet_bot.php +++ b/podzem/raschet_bot.php @@ -159,4 +159,4 @@ else if($rt["n$loc2"]=='10.10.10'){$ob2 = "bez_san"; $b_n2 = "Безголовы if($rt["n$loc2"]=='1' or $rt["n$loc2"]=='2' or $rt["n$loc2"]=='3' or $rt["n$loc2"]=='4' or $rt["n$loc2"]=='5' or $rt["n$loc2"]=='6' or $rt["n$loc2"]=='7' or $rt["n$loc2"]=='8' or $rt["n$loc2"]=='9' or $rt["n$loc2"]=='10' or $rt["n$loc2"]=='11' or $rt["n$loc2"]=='12' or $rt["n$loc2"]=='13' or $rt["n$loc2"]=='14'){$k_b2 = 1; } else if($rt["n$loc2"]=='1.1' or $rt["n$loc2"]=='1.2' or $rt["n$loc2"]=='1.3' or $rt["n$loc2"]=='2.2' or $rt["n$loc2"]=='2.3' or $rt["n$loc2"]=='3.3' or $rt["n$loc2"]=='9.9' or $rt["n$loc2"]=='10.10'){$k_b2 = 2;} else if($rt["n$loc2"]=='1.1.1' or $rt["n$loc2"]=='1.1.2' or $rt["n$loc2"]=='1.1.3' or $rt["n$loc2"]=='1.2.2' or $rt["n$loc2"]=='1.3.2' or $rt["n$loc2"]=='1.3.3' or $rt["n$loc2"]=='2.2.2' or $rt["n$loc2"]=='2.2.3' or $rt["n$loc2"]=='2.3.3' or $rt["n$loc2"]=='3.3.3' or $rt["n$loc2"]=='1.2.3' or $rt["n$loc2"]=='9.9.9' or $rt["n$loc2"]=='10.10.10'){$k_b2 = 3;} -?> + diff --git a/podzem_brat.php b/podzem_brat.php index bea03c2..626f1a1 100644 --- a/podzem_brat.php +++ b/podzem_brat.php @@ -4,4 +4,3 @@ while($rbb=mysql_fetch_array($frt)){ addchp (''.$user["login"].' поднял предмет "'.$mis.'". ','{[]}'.nick::id($rbb["user_id"])->short().'{[]}'); } -?> \ No newline at end of file diff --git a/podzem_dialog.php b/podzem_dialog.php index 16b1612..cbe306a 100644 --- a/podzem_dialog.php +++ b/podzem_dialog.php @@ -22,7 +22,7 @@ if($fd['location'] == '28' and $fd['name']=='Канализация 1 этаж' BODY { FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; - margin: 0px 0px 0px 0px; + margin: 0 0 0 0; scrollbar-face-color: #e3ac67; scrollbar-highlight-color: #e0c3a0; @@ -37,13 +37,13 @@ BODY { background-color: #E4F2DF; border-style: solid; border-width: 2px; border-color: #77c3fc position: absolute; - left: 0px; - top: 0px; + left: 0; + top: 0; visibility: hidden; cursor:hand; } a.menuItem { -border: 0px solid #000000; +border: 0 solid #000000; background-color: #484848; color: #000000; display: block; diff --git a/podzem_mod.php b/podzem_mod.php index e426e57..12c6729 100644 --- a/podzem_mod.php +++ b/podzem_mod.php @@ -320,5 +320,5 @@ $s.=' ';
}
/////////////////////////////////////////////////////////
-?>
+
diff --git a/rep_shop.php b/rep_shop.php
index e678f72..684cf39 100644
--- a/rep_shop.php
+++ b/rep_shop.php
@@ -10,8 +10,8 @@ if($user['battle'] != 0) { header('location: fbattle.php'); die(); }
if(isset($_GET['otdel'])) {
$otdel = mysql_real_escape_string((int)$_GET['otdel']);
-} else {
- #$otdel = 6;
+//} else {
+// #$otdel = 6;
}
@@ -75,8 +75,6 @@ if(($_GET['set'] || $_POST['set'])) {
}
$allcost=$_POST['count']*$dress['point'];
mysql_query("INSERT INTO `delo` (`author`, `pers`, `text`, `type`, `date`) VALUES ('0','{$user['id']}','\"".$user['login']."\" купил товар: \"".$dress['name']."\" ".$dresscount."id:(".$dressid.") [0/".$dress['maxdur']."] за ".$allcost." реп. ',1,'".time()."')");
- } else {
-
}
}
else {
@@ -109,9 +107,9 @@ if(($_GET['set'] || $_POST['set'])) {
}
");
//////////////////////////////////////////////////////
}
-?>
\ No newline at end of file
diff --git a/tmp/pma.php b/tmp/pma.php
deleted file mode 100644
index cd5e7d0..0000000
--- a/tmp/pma.php
+++ /dev/null
@@ -1,1254 +0,0 @@
- http://osalabs.com
-
- Light standalone PHP script for quick and easy access MySQL databases.
- http://phpminiadmin.sourceforge.net
-
- Dual licensed: GPL v2 and MIT, see texts at http://opensource.org/licenses/
-*/
-
- $ACCESS_PWD='passw0rd'; #!!!IMPORTANT!!! this is script access password, SET IT if you want to protect you DB from public access
-
- #DEFAULT db connection settings
- # --- WARNING! --- if you set defaults - it's recommended to set $ACCESS_PWD to protect your db!
- $DBDEF=array(
- 'user'=>"user42163_onli",#required
- 'pwd'=>"1W7y2E8u", #required
- 'db'=>"user42163_onli", #optional, default DB
- 'host'=>"localhost",#optional
- 'port'=>"",#optional
- 'chset'=>"utf8",#optional, default charset
- );
- $IS_COUNT=false; #set to true if you want to see Total records when pagination occurs (SLOWS down all select queries!)
- $DUMP_FILE=dirname(__FILE__).'/pmadump'; #path to file without extension used for server-side exports (timestamp, .sql/.csv/.gz extension added) or imports(.sql)
-file_exists($f=dirname(__FILE__) . '/phpminiconfig.php')&&require($f); // Read from config (easier to update)
-if (function_exists('date_default_timezone_set')) date_default_timezone_set('UTC');#required by PHP 5.1+
-
-//constants
- $VERSION='1.9.161116';
- $MAX_ROWS_PER_PAGE=50; #max number of rows in select per one page
- $D="\r\n"; #default delimiter for export
- $BOM=chr(239).chr(187).chr(191);
- $SHOW_D="SHOW DATABASES";
- $SHOW_T="SHOW TABLE STATUS";
- $DB=array(); #working copy for DB settings
-
- $self=$_SERVER['PHP_SELF'];
-
- session_set_cookie_params(0, null, null, false, true);
- session_start();
- if (!isset($_SESSION['XSS'])) $_SESSION['XSS']=get_rand_str(16);
- $xurl='XSS='.$_SESSION['XSS'];
-
- ini_set('display_errors',0); #turn on to debug db or script issues
- error_reporting(E_ALL ^ E_NOTICE);
-
-//strip quotes if they set
- if (get_magic_quotes_gpc()){
- $_COOKIE=array_map('killmq',$_COOKIE);
- $_REQUEST=array_map('killmq',$_REQUEST);
- }
-
- if ($_REQUEST['login']){
- if ($_REQUEST['pwd']!=$ACCESS_PWD){
- $err_msg="Invalid password. Try again";
- }else{
- $_SESSION['is_logged']=true;
- loadcfg();
- }
- }
-
- if ($_REQUEST['logoff']){
- check_xss();
- $_SESSION = array();
- savecfg();
- session_destroy();
- $url=$self;
- if (!$ACCESS_PWD) $url='/';
- header("location: $url");
- exit;
- }
-
- if (!$_SESSION['is_logged']){
- if (!$ACCESS_PWD) {
- $_SESSION['is_logged']=true;
- loadcfg();
- }else{
- print_login();
- exit;
- }
- }
-
- if ($_REQUEST['savecfg']){
- check_xss();
- savecfg();
- }
-
- loadsess();
-
- if ($_REQUEST['showcfg']){
- print_cfg();
- exit;
- }
-
- //get initial values
- $SQLq=trim(b64d($_REQUEST['q']));
- $page=$_REQUEST['p']+0;
- if ($_REQUEST['refresh'] && $DB['db'] && preg_match('/^show/',$SQLq) ) $SQLq=$SHOW_T;
-
- if (db_connect('nodie')){
- $time_start=microtime_float();
-
- if ($_REQUEST['phpinfo']){
- ob_start();phpinfo();$html=ob_get_clean();preg_match("/]*>(.*?)<\/body>/is",$html,$m);
- $sqldr=' '.$m[1].' ';
- }else{
- if ($DB['db']){
- if ($_REQUEST['shex']){
- print_export();
- }elseif ($_REQUEST['doex']){
- check_xss();do_export();
- }elseif ($_REQUEST['shim']){
- print_import();
- }elseif ($_REQUEST['doim']){
- check_xss();do_import();
- }elseif ($_REQUEST['dosht']){
- check_xss();do_sht();
- }elseif (!$_REQUEST['refresh'] || preg_match('/^select|show|explain|desc/i',$SQLq) ){
- if ($SQLq)check_xss();
- do_sql($SQLq);#perform non-select SQL only if not refresh (to avoid dangerous delete/drop)
- }
- }else{
- if ( $_REQUEST['refresh'] ){
- check_xss();do_sql($SHOW_D);
- }elseif ($_REQUEST['crdb']){
- check_xss();do_sql('CREATE DATABASE `'.$_REQUEST['new_db'].'`');do_sql($SHOW_D);
- }elseif ( preg_match('/^(?:show\s+(?:databases|status|variables|process)|create\s+database|grant\s+)/i',$SQLq) ){
- check_xss();do_sql($SQLq);
- }else{
- $err_msg="Select Database first";
- if (!$SQLq) do_sql($SHOW_D);
- }
- }
- }
- $time_all=ceil((microtime_float()-$time_start)*10000)/10000;
-
- print_screen();
- }else{
- print_cfg();
- }
-
-function do_sql($q){
- global $dbh,$last_sth,$last_sql,$reccount,$out_message,$SQLq,$SHOW_T;
- $SQLq=$q;
-
- if (!do_multi_sql($q)){
- $out_message="Error: ".mysqli_error($dbh);
- }else{
- if ($last_sth && $last_sql){
- $SQLq=$last_sql;
- if (preg_match("/^select|show|explain|desc/i",$last_sql)) {
- if ($q!=$last_sql) $out_message="Results of the last select displayed:";
- display_select($last_sth,$last_sql);
- } else {
- $reccount=mysqli_affected_rows($dbh);
- $out_message="Done.";
- if (preg_match("/^insert|replace/i",$last_sql)) $out_message.=" Last inserted id=".get_identity();
- if (preg_match("/^drop|truncate/i",$last_sql)) do_sql($SHOW_T);
- }
- }
- }
-}
-
-function display_select($sth,$q){
- global $dbh,$DB,$sqldr,$reccount,$is_sht,$xurl;
- $rc=array("o","e");
- $dbn=$DB['db'];
- $sqldr='';
-
- $is_shd=(preg_match('/^show\s+databases/i',$q));
- $is_sht=(preg_match('/^show\s+tables|^SHOW\s+TABLE\s+STATUS/',$q));
- $is_show_crt=(preg_match('/^show\s+create\s+table/i',$q));
-
- if ($sth===FALSE or $sth===TRUE) return;#check if $sth is not a mysql resource
-
- $reccount=mysqli_num_rows($sth);
- $fields_num=mysqli_field_count($dbh);
-
- $w='';
- if ($is_sht || $is_shd) {$w='wa';
- $url='?'.$xurl."&db=$dbn";
- $sqldr.="
- MySQL Server:
- · Show Configuration Variables
- · Show Statistics
- · Show Processlist ";
- if ($is_shd) $sqldr.="· ";
- $sqldr.=" ";
- }
- if ($is_sht){
- $abtn=""; - if ($is_sht) $sqldr.="Database: · Show Table Status"; - $sqldr.="
-
-
-
- selected tables ";
- $sqldr.=$abtn."";
- }
-
- $sqldr.="
© 2004-2016 Oleg Savchuk
-
-
-Access protected by password-
-
-
-
-
-DB Connection Settings- -\n$sql"); - return $sth; -} - -function db_array($sql, $dbh1=NULL, $skiperr=0, $isnum=0){#array of rows - $sth=db_query($sql, $dbh1, $skiperr); - if (!$sth) return; - $res=array(); - if ($isnum){ - while($row=mysqli_fetch_row($sth)) $res[]=$row; - }else{ - while($row=mysqli_fetch_assoc($sth)) $res[]=$row; - } - return $res; -} - -function db_row($sql){ - $sth=db_query($sql); - return mysqli_fetch_assoc($sth); -} - -function db_value($sql,$dbh1=NULL,$skiperr=0){ - $sth=db_query($sql,$dbh1,$skiperr); - if (!$sth) return; - $row=mysqli_fetch_row($sth); - return $row[0]; -} - -function get_identity($dbh1=NULL){ - $dbh1=db_checkconnect($dbh1); - return mysqli_insert_id($dbh1); -} - -function get_db_select($sel=''){ - global $DB,$SHOW_D; - if (is_array($_SESSION['sql_sd']) && $_REQUEST['db']!='*'){//check cache - $arr=$_SESSION['sql_sd']; - }else{ - $arr=db_array($SHOW_D,NULL,1); - if (!is_array($arr)){ - $arr=array( 0 => array('Database' => $DB['db']) ); - } - $_SESSION['sql_sd']=$arr; - } - return @sel($arr,'Database',$sel); -} - -function chset_select($sel=''){ - global $DBDEF; - $result=''; - if ($_SESSION['sql_chset']){ - $arr=$_SESSION['sql_chset']; - }else{ - $arr=db_array("show character set",NULL,1); - if (!is_array($arr)) $arr=array(array('Charset'=>$DBDEF['chset'])); - $_SESSION['sql_chset']=$arr; - } - - return @sel($arr,'Charset',$sel); -} - -function sel($arr,$n,$sel=''){ - foreach($arr as $a){ -# echo $a[0]; - $b=$a[$n]; - $res.=""; - } - return $res; -} - -function microtime_float(){ - list($usec,$sec)=explode(" ",microtime()); - return ((float)$usec+(float)$sec); -} - -/* page nav - $pg=int($_[0]); #current page - $all=int($_[1]); #total number of items - $PP=$_[2]; #number if items Per Page - $ptpl=$_[3]; #page url /ukr/dollar/notes.php?page= for notes.php - $show_all=$_[5]; #print Totals? -*/ -function get_nav($pg, $all, $PP, $ptpl, $show_all=''){ - $n=' '; - $sep=" $n|$n\n"; - if (!$PP) $PP=10; - $allp=floor($all/$PP+0.999999); - - $pname=''; - $res=''; - $w=array('Less','More','Back','Next','First','Total'); - - $sp=$pg-2; - if($sp<0) $sp=0; - if($allp-$sp<5 && $allp>=5) $sp=$allp-5; - - $res=""; - - if($sp>0){ - $pname=pen($sp-1,$ptpl); - $res.="$w[0]"; - $res.=$sep; - } - for($p_p=$sp;$p_p<$allp && $p_p<$sp+5;$p_p++){ - $first_s=$p_p*$PP+1; - $last_s=($p_p+1)*$PP; - $pname=pen($p_p,$ptpl); - if($last_s>$all){ - $last_s=$all; - } - if($p_p==$pg){ - $res.="$first_s..$last_s"; - }else{ - $res.="$first_s..$last_s"; - } - if($p_p+1<$allp) $res.=$sep; - } - if($sp+5<$allp){ - $pname=pen($sp+5,$ptpl); - $res.="$w[1]"; - } - $res.=" \n"; - - if($pg>0){ - $pname=pen($pg-1,$ptpl); - $res.="$w[2] $n|$n "; - $pname=pen(0,$ptpl); - $res.="$w[4]"; - } - if($pg>0 && $pg+1<$allp) $res.=$sep; - if($pg+1<$allp){ - $pname=pen($pg+1,$ptpl); - $res.="$w[3]"; - } - if ($show_all) $res.=" ($w[5] - $all) "; - - return $res; -} - -function pen($p,$np=''){ - return str_replace('%p%',$p, $np); -} - -function killmq($value){ - return is_array($value)?array_map('killmq',$value):stripslashes($value); -} - -function savecfg(){ - $v=$_REQUEST['v']; - $_SESSION['DB']=$v; - unset($_SESSION['sql_sd']); - - if ($_REQUEST['rmb']){ - $tm=time()+60*60*24*30; - newcookie("conn[db]", $v['db'],$tm); - newcookie("conn[user]",$v['user'],$tm); - newcookie("conn[pwd]", $v['pwd'],$tm); - newcookie("conn[host]",$v['host'],$tm); - newcookie("conn[port]",$v['port'],$tm); - newcookie("conn[chset]",$v['chset'],$tm); - }else{ - newcookie("conn[db]", FALSE,-1); - newcookie("conn[user]",FALSE,-1); - newcookie("conn[pwd]", FALSE,-1); - newcookie("conn[host]",FALSE,-1); - newcookie("conn[port]",FALSE,-1); - newcookie("conn[chset]",FALSE,-1); - } -} - -// Allow httponly cookies, or the password is stored plain text in a cookie -function newcookie($n,$v,$e){$x;return setcookie($n,$v,$e,$x,$x,!!$x,!$x);} - -//during login only - from cookies or use defaults; -function loadcfg(){ - global $DBDEF; - - if( isset($_COOKIE['conn']) ){ - $_SESSION['DB']=$_COOKIE['conn']; - }else{ - $_SESSION['DB']=$DBDEF; - } - if (!strlen($_SESSION['DB']['chset'])) $_SESSION['DB']['chset']=$DBDEF['chset'];#don't allow empty charset -} - -//each time - from session to $DB_* -function loadsess(){ - global $DB; - - $DB=$_SESSION['DB']; - - $rdb=$_REQUEST['db']; - if ($rdb=='*') $rdb=''; - if ($rdb) { - $DB['db']=$rdb; - } -} - -function print_export(){ - global $self,$xurl,$DB,$DUMP_FILE; - $t=$_REQUEST['rt']; - $l=($t)?"Table $t":"whole DB"; - print_header(); -?> - Export-
- Structure
-- Data -
-
-
-
- (to export as csv - go to 'show tables' and export just ONE table)
-
-
-- - - - - - - - - "Dump on Server" exports to file: Import DB-
-
-
-
-
-
-
-
-- - - \n"; -} - -function tmp_name() { - if ( function_exists('sys_get_temp_dir')) return tempnam(sys_get_temp_dir(),'pma'); - - if( !($temp=getenv('TMP')) ) - if( !($temp=getenv('TEMP')) ) - if( !($temp=getenv('TMPDIR')) ) { - $temp=tempnam(__FILE__,''); - if (file_exists($temp)) { - unlink($temp); - $temp=dirname($temp); - } - } - return $temp ? tempnam($temp,'pma') : null; -} - -function hs($s){ - return htmlspecialchars($s, ENT_COMPAT|ENT_HTML401,'UTF-8'); -} -function eo($s){//echo+escape - echo hs($s); -} - -function b64e($s){ - return base64_encode($s); -} -function b64d($s){ - return base64_decode($s); -} -?> diff --git a/tower.php b/tower.php index a80e016..1090a54 100644 --- a/tower.php +++ b/tower.php @@ -14,7 +14,7 @@ class predbannik_bs { var $turnir_id = 0; var $turnir_info = 0; - function predbannik_bs() { + function __construct() { global $mysql, $user; $this->mysql = $mysql; $this->userid = $user; diff --git a/towerin.php b/towerin.php index 91b0158..3b7925d 100644 --- a/towerin.php +++ b/towerin.php @@ -111,7 +111,7 @@ if($_POST['attack']) { $jert['id'] = $arha['id']; } else { $jert['battle'] = 0; - $jert['id'] = $jert['id']; + #$jert['id'] = $jert['id']; ?!?!?!?!?!?! } $bot = 1; } @@ -274,8 +274,9 @@ if($user['hp'] <= 0) { header('Location: tower.php'); die(); } .H3 { color: #8f0000; font-family: Arial; font-size: 12pt; font-weight: bold; } |