From 03d07b0543f43be48cb6e5718debc305cd6dd3db Mon Sep 17 00:00:00 2001 From: lopar Date: Thu, 13 Dec 2018 01:37:27 +0200 Subject: [PATCH] Big cleaning. --- ratio.php => admin/reset_clan_rates.php | 9 ++- sec1.php | 86 ------------------------- spambase.txt | 1 - top.php | 17 ----- top_menu.php | 24 +++---- tournir.php | 5 +- upload.php | 23 ------- user_anketa.php | 1 - user_gifts.php | 23 ------- users_online.php | 20 ------ whoimin.php | 11 ---- zavis.php | 46 ------------- 12 files changed, 21 insertions(+), 245 deletions(-) rename ratio.php => admin/reset_clan_rates.php (87%) delete mode 100644 sec1.php delete mode 100644 spambase.txt delete mode 100644 top.php delete mode 100644 upload.php delete mode 100644 user_gifts.php delete mode 100644 users_online.php delete mode 100644 whoimin.php delete mode 100644 zavis.php diff --git a/ratio.php b/admin/reset_clan_rates.php similarity index 87% rename from ratio.php rename to admin/reset_clan_rates.php index ec57d22..c86a9dc 100644 --- a/ratio.php +++ b/admin/reset_clan_rates.php @@ -1,6 +1,11 @@ + * Project name: Battles-Game + */ + +require_once "../functions.php"; $id = mysql_query("SELECT * FROM `clans`"); $clans = mysql_num_rows($id); $check = 0; diff --git a/sec1.php b/sec1.php deleted file mode 100644 index 320a3df..0000000 --- a/sec1.php +++ /dev/null @@ -1,86 +0,0 @@ -100 && $_GET['width']<500) $SECURITY_WIDTH = $_GET['width']; - if(is_numeric($_GET['height']) && $_GET['height']>100 && $_GET['height']<500) $SECURITY_HEIGHT = $_GET['height']; - if(is_numeric($_GET['qty']) && $_GET['qty']>2 && $_GET['qty']<10) $SECURITY_NUM_GENSIGN = $_GET['qty']; - -// Ядро - - //session_register('securityCode'); - - $SECURITY_FONT_SIZE = intval($SECURITY_HEIGHT/(($SECURITY_HEIGHT/$SECURITY_WIDTH)*7)); - $SECURITY_NUM_SIGN = intval(($SECURITY_WIDTH*$SECURITY_HEIGHT)/150); - $CODE = array(); - $LETTERS = array('0','1','2','3','4','5','6','7','8','9'); - $FIGURES = array('50','70','90','110','130','150','170','190','210'); - -// Создаем полотно - - $src = imagecreatetruecolor($SECURITY_WIDTH,$SECURITY_HEIGHT); - -// Заливаем фон - - $fon = imagecolorallocate($src,255,255,255); - imagefill($src,0,0,$fon); - - - - -// Если папка шрифтов пуста - - for($i = 0; $i<$SECURITY_NUM_GENSIGN; $i++) - { - - // Ориентир - - $h = 1; - - // Рисуем - - $color = imagecolorallocatealpha($src,$FIGURES[rand(0,sizeof($FIGURES)-1)],$FIGURES[rand(0,sizeof($FIGURES)-1)],$FIGURES[rand(0,sizeof($FIGURES)-1)],rand(10,30)); - $letter = $LETTERS[rand(0,sizeof($LETTERS)-1)]; - $x = (empty($x)) ? $SECURITY_WIDTH*0.1 : $x + ($SECURITY_WIDTH*0.8)/$SECURITY_NUM_GENSIGN+rand(0,$SECURITY_WIDTH*0.01); - $y = ($h == rand(1,2)) ? (($SECURITY_HEIGHT*1)/4) + rand(0,$SECURITY_HEIGHT*0.1) : (($SECURITY_HEIGHT*1)/4) - rand(0,$SECURITY_HEIGHT*0.1); - - // Запоминаем - - $CODE[] = $letter; - if($h == rand(0,10)) $letter = strtoupper($letter); - - // Пишем - - imagestring($src,9,$x,$y,$letter,$color); - } - -// Получаем код - - $_SESSION['securityCode'] = implode('',$CODE); - -// Печать - - if($SECURITY_IMAGE_TYPE == 'PNG') - { - header ("Content-type: image/png"); - imagepng($src); - } - elseif($SECURITY_IMAGE_TYPE == 'JPEG') - { - header ("Content-type: image/jpeg"); - imagejpeg($src); - } - else - { - header ("Content-type: image/gif"); - imagegif($src); - } - - imagedestroy($src); -?> \ No newline at end of file diff --git a/spambase.txt b/spambase.txt deleted file mode 100644 index 377a528..0000000 --- a/spambase.txt +++ /dev/null @@ -1 +0,0 @@ -sebkru|oldbknet|welcombats|mycombats|vipbk|old-dark|recombats|legbk|febk|skycombats|cambats|zagad \ No newline at end of file diff --git a/top.php b/top.php deleted file mode 100644 index ecb4eda..0000000 --- a/top.php +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - Рейтинги - - - ← на главную - -

- -

Рейтинги

- 🏆 Ух ты, пусто! Будет интереснее после открытия! - - - \ No newline at end of file diff --git a/top_menu.php b/top_menu.php index ec7dec2..036933f 100644 --- a/top_menu.php +++ b/top_menu.php @@ -12,27 +12,29 @@ div { margin: 0 auto; overflow: auto; + text-align: right; } - a img { + a { border: 1px solid #fff; transition: box-shadow 0.5s ease; margin: 5px; + padding: 5px; } - a img:hover { + a:hover { box-shadow: 0 0 7px slategray; } -
- - - - - - - - +
+ Анкета + Друзья + Инвентарь + Реликты + Клан + Особые умения + Модераторы + Форум
\ No newline at end of file diff --git a/tournir.php b/tournir.php index 07729b0..a8ebb03 100644 --- a/tournir.php +++ b/tournir.php @@ -1,9 +1,6 @@ - - Результат загрузки файла - - - 1024*3*1024) - { - echo ("Размер файла превышает три мегабайта"); - exit; - } - // Проверяем загружен ли файл - if(is_uploaded_file($_FILES["filename"]["tmp_name"])) - { - // Если файл загружен успешно, перемещаем его - // из временной директории в конечную - move_uploaded_file($_FILES["filename"]["tmp_name"], "/path/to/file/".$_FILES["filename"]["name"]); - } else { - echo("Ошибка загрузки файла"); - } -?> - - diff --git a/user_anketa.php b/user_anketa.php index fba72b4..321c521 100644 --- a/user_anketa.php +++ b/user_anketa.php @@ -4,7 +4,6 @@ if (!isset($_SESSION['uid'])) { header('Location: /index.php'); die(); } -include_once('config.php'); include_once('functions.php'); if ($user['battle'] > 0) { diff --git a/user_gifts.php b/user_gifts.php deleted file mode 100644 index 3d6ac7c..0000000 --- a/user_gifts.php +++ /dev/null @@ -1,23 +0,0 @@ -Сувениры :
'; } - $i = 0; - while($row = mysql_fetch_array($data)) { - $why_gift = mysql_fetch_assoc(mysql_query("SELECT `id` FROM `users` WHERE `login` = '".mysql_real_escape_string($row['present'])."' LIMIT 1")); - echo ''; - $i++; - } - if($i < mysql_num_rows($cnt)) { - echo '
Показать еще подарки'; - } else { - echo '
Подарков больше нет'.$cnt; - } - } -} diff --git a/users_online.php b/users_online.php deleted file mode 100644 index f93cba4..0000000 --- a/users_online.php +++ /dev/null @@ -1,20 +0,0 @@ - - - - -

Активные игроки:

-= ".(time()-60).";"); - -while($v = mysql_fetch_array($online)) -{ - echo "
  • {$v[0]}
  • "; -} -?> - - - \ No newline at end of file diff --git a/whoimin.php b/whoimin.php deleted file mode 100644 index ec0e4af..0000000 --- a/whoimin.php +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/zavis.php b/zavis.php deleted file mode 100644 index e199d97..0000000 --- a/zavis.php +++ /dev/null @@ -1,46 +0,0 @@ -query('SELECT `battle` FROM `users` WHERE `id` = ?i LIMIT 1', $_SESSION['uid']))->fetch_assoc_array(); -if ($user['battle'] != 0) {header('location: fbattle.php'); die();} - -function addchp($text, $who, $room = 0) -{ - global $user; - if ($room == 0) $room = $user['room']; - $fp = fopen("tmp/chat.txt", "a"); //открытие - flock($fp, LOCK_EX); //БЛОКИРОВКА ФАЙЛА - fputs($fp, ":[" . time() . "]:[{$who}]:[" . ($text) . "]:[" . $room . "]\r\n"); //работа с файлом - fflush($fp); //ОЧИЩЕНИЕ ФАЙЛОВОГО БУФЕРА И ЗАПИСЬ В ФАЙЛ - flock($fp, LOCK_UN); //СНЯТИЕ БЛОКИРОВКИ - fclose($fp); //закрытие -} -/** - * FIXME Обращение к определённому персонажу в чате. Ещё сломается, если персонажа не существует. - * addchp('Сообщение об ошибке, ' . $user['login'] . '', '{[]}' . nick::id(10133)->short() . '{[]}'); - */ - -?> - - - - - - - - -

    Сообщение отправлено!

    - - - \ No newline at end of file