示例#1
0
 /**
  * 登录指定用户
  * @param  integer $uid 用户ID
  * @return boolean      ture-登录成功,false-登录失败
  */
 public function login($uid)
 {
     /* 检测是否在当前应用注册 */
     $user = $this->field(true)->find($uid);
     if (!$user) {
         //未注册
         /* 在当前应用中注册用户 */
         $Api = new UserApi();
         $info = $Api->info($uid);
         $user = $this->create(array("nickname" => $info[1], "status" => 1));
         $user["uid"] = $uid;
         if (!$this->add($user)) {
             $this->error = "前台用户信息注册失败,请重试!";
             return false;
         }
     } elseif (1 != $user["status"]) {
         $this->error = "用户未激活或已禁用!";
         //应用级别禁用
         return false;
     }
     /* 登录用户 */
     $this->autoLogin($user);
     /* 登录历史 */
     history($uid);
     /* 登录购物车处理函数 */
     addintocart($uid);
     //记录行为
     action_log("user_login", "member", $uid, $uid);
     return true;
 }
示例#2
0
文件: lotery.php 项目: ehmedov/www
 function pay_for_3($summ)
 {
     // оплата если 3 из 5 угадано
     global $user;
     mysql_query("update users set money = money + '" . $summ . "' where id = " . $user['id'] . ";");
     history($user['login'], 'Билет выиграл (3 из 5 угадано)', $summ . " Зл.", $user['remote_ip'], 'Лотерея Хаоса');
 }
示例#3
0
文件: kvest.php 项目: ehmedov/www
if ($take == 36) {
    if ($db['kwest'] != 35) {
        $msg = "Ошибка, не пытайтесь взломать игру :)!";
    } else {
        $my_prof_sql = mysql_query("SELECT * FROM person_proff WHERE person=" . $db["id"] . " and proff=5");
        $my_prof = mysql_fetch_array($my_prof_sql);
        if ($my_prof["navika"] >= 150) {
            $ItTake = "Щит Забытого Бога";
            $buyitem = mysql_fetch_array(mysql_query("SELECT * FROM paltar WHERE name='" . $ItTake . "'"));
            if ($buyitem) {
                mysql_query("INSERT INTO inv(owner,object_id,object_type,object_razdel,wear,iznos,iznos_max,noremont) VALUES ('" . $login . "','" . $buyitem['id'] . "','" . $buyitem['object'] . "','obj','0','0','10','1')");
            }
            mysql_query("UPDATE users SET kwest=36, naqrada=naqrada+300, exp=exp+3500 WHERE login='******'");
            $msg = "Вы получили <u>\"{$ItTake}\"</u>, 3500 опыта и 300 ед. награды<br>";
            mysql_query("INSERT INTO inv(owner,object_id,object_type,object_razdel,gift,wear,gift_author) VALUES('" . $login . "','8','medal','medal','1','0','WWW.MEYDAN.AZ')");
            history($login, "Подземелья Призраков", $msg, $ip, $login);
        } else {
            $msg = "Задания еще не выполнена!<br> <font color=#000000>Не хватает: " . (int) (150 - $my_prof["navika"]) . "</font>";
        }
    }
}
echo "<center><b style='color:#ff0000'>&nbsp;{$msg}</b></center>";
echo "<fieldset style='WIDTH: 100%; border:1px ridge;'>";
echo "<legend><b>Получить задание</b> - <font color=#000000>Награды: <b>{$db['naqrada']} ед.</b></font></legend>\n<table width=100% cellspacing=0 cellpadding=5>\n<tr>\n<td><div align='justify'>";
$db = mysql_fetch_array(mysql_query("SELECT * FROM users WHERE login='******' limit 1"));
if ($db['kwest'] == 0) {
    echo "<center>Здравствуйте, <b>{$login}</b>.</center> Я так понимаю, что в <b>" . strtoupper($db["city_game"]) . " ' е</b> вы недавно, так как раньше я вас не видел. \n\t\tНадеюсь, вам понравился наш великий город и вы останетесь здесь надолго. \n\t\t<br>Город у нас большой: есть арена для тренировок, магазин, в котором можно приобрести боевую амуницию, оружие, разнообразные свитки и эликсиры.\n\t\tКстати, о магазине... Вам необходимо купить доспехи. Если вы их еще не купили, без них находится в нашем городе крайне опасно! Кстати, захватите в Магазине Магии свитки!\n\t\t<center><b>Так что направляйтесь в магазин!</b> </center>";
    echo "<center><input class=lbut type=button value='Получить Квест №1!' onclick='window.location.href=\"?take=1\"'></center>";
} elseif ($db['kwest'] == 1) {
    echo "<center><b style='color:#ff0000'>Вы получили <u>Квест №1</u></b>.</center>Для его выполнения вам предстоит добраться, через кровожадных монстров в подземелье, \n\t\tдо <b>Оранжерея</b> и найти там <b>Александрит</b>.\n\t\t<br>После этого придите сюда для получения бонуса.";
    echo "<br><center><input class=lbut type=button value='Получить бонус за Квест №1' onclick='window.location.href=\"?take=2\"'></center>";
示例#4
0
							<label for="exp-month">Expiration Date:</label>
							<input id="exp-month" class="field-input" placeholder="Month" name="exp-month" required />
							<input id="exp-year" class="field-input" placeholder="Year" name="exp-year" required />
						</div>
						<div class="field">
							<label for="val-code">Validation Code (?):</label>
							<input id="val-code" class="field-input" name="val-code"/>
						</div>
						<div class="field dark-bottom">
							<label for="zip-code">Zip/Postal Code:</label>
							<input id="zip-code" class="field-input" name="zip" required />
						</div>
						<input type="submit" id="create-payment-btn" name="Create Payment Method" value="Create Payment Method">
						<h4 class="terms-text">By Clicking Confirm, you agree to FireFall's Terms &amp; Conditions</h4>
					</div>
				</form>
			</div>
		</div>
		<div id="history-page">
			<?php 
history();
?>
		</div>
		<div id="formResponse">Credit card added successfully</div>
	</div>

	<!-- JavaScript at the bottom for fast page loading -->
	<script src="js/jquery-1.9.1.min.js"></script>
	<script src="js/script.js"></script>
</body>
</html>
示例#5
0
文件: opt.php 项目: ehmedov/www
<?php

$site_n = htmlspecialchars(addslashes($_POST['site_n']));
$history_n = htmlspecialchars(addslashes($_POST['history_n']));
if (empty($site_n)) {
    ?>
	<table border=0 class=inv width=500 height=120>
	<tr valign=top><td align=left>
	<form name='chin' action='main.php?act=clan&do=2&a=opt' method='post'>
		<b>Сайт:</b> <input type=text name='site_n' value='<?php 
    echo $clan_site;
    ?>
' class=new size=30><BR><BR>
		<b>Легенда клана:</b><BR>
		<textarea cols=80 rows=15 class=new name='history_n'><?php 
    echo $history;
    ?>
</textarea><BR>
		<input type=submit value=" Сохранить " class=new>
	</form>
	</td></tr>
	</table>
	<?php 
} else {
    if ($db["glava"] == 1) {
        $history = str_replace("\n", "<BR>", $history_n);
        $result = mysql_query("UPDATE clan SET site='" . $site_n . "',story='" . $history . "' WHERE name_short='" . $clan_s . "'");
        history($login, 'Настройки клана', 'Ханства ' . $clan_t, $db['remote_ip'], "Глава: " . $login);
        echo "Настройки клана изменены удачно.";
    }
}
示例#6
0
文件: chgpass.php 项目: ehmedov/www
<?php

include "key.php";
$login = $_SESSION['login'];
$target = htmlspecialchars(addslashes($_POST['target']));
$new_pass = htmlspecialchars(addslashes($_POST['new_pass']));
if (!empty($target)) {
    $S = "select * from users where login='******'";
    $q = mysql_query($S);
    $res = mysql_fetch_array($q);
    if (!$res) {
        print "ѕерсонаж <B>" . $target . "</B> не найден в базе данных.";
        die;
    }
    if ($res['login'] == "—ќ«ƒј“≈Ћ№") {
        print "–едактирование богов запрещено высшей силой!";
        die;
    }
    if ($db["adminsite"] != 5) {
        if ($res['adminsite'] >= 5 || $res["admin_level"] >= 9) {
            print "ѕерсонаж <B>" . $target . "</B> не найден в базе данных.";
            die;
        }
    }
    $sql = "UPDATE users SET password='******' WHERE login='******'";
    $result = mysql_query($sql);
    history($target, "—менили пароль", $reson, $ip, $login);
    history($login, "—менил пароль", $reson, $ip, $target);
    print "ѕерсонаж <B>" . $target . "</B> успешно обновлен.";
}
示例#7
0
文件: rep.php 项目: ehmedov/www
                                    case 9:
                                        $magic_id = 218;
                                        break;
                                    case 10:
                                        $magic_id = 132;
                                        break;
                                }
                            }
                        }
                    }
                }
            }
            if ($magic_id) {
                mysql_query("INSERT INTO inv(owner,object_id,object_type,object_razdel,wear,iznos,iznos_max) VALUES ('" . $login . "','" . $magic_id . "','scroll','magic','0','0','1')");
                mysql_query("UPDATE inv SET is_modified=0 WHERE id={$item_id}");
                history($login, 'Сняли Заточку', $object["object_type"] . "-" . $object["is_modified"] . "[" . $magic_id . "]", $ip, 'Ремонтная мастерская');
                $mess = "Удачно";
            }
        } else {
            $mess = "Это оружие не было заточено!";
        }
    } else {
        $mess = "Предмет не найден в рюкзаке...";
    }
}
//----------------------------------------------------------------------------------------------
$platina = sprintf("%01.2f", $db["platina"]);
$money = sprintf("%01.2f", $db["money"]);
$naqrada = sprintf("%01.2f", $db["naqrada"]);
?>
<SCRIPT LANGUAGE="JavaScript" SRC="scripts/magic-main.js"></SCRIPT>
示例#8
0
文件: security.php 项目: ehmedov/www
 if (trim($new_mail) == '') {
     $ok = false;
     $mess = 'Задан пустой почтовый адрес.';
 }
 if (!preg_match('#^[a-z0-9.!\\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\\s]+\\.+[a-z]{2,6}))$#si', $new_mail)) {
     $ok = false;
     $mess = "Ошибка. Неверно введен почтовый адрес.";
 }
 if ($old_mail != $db["email"]) {
     $ok = false;
     $mess = "Ошибка. Старый почтовый адрес указан неверно.";
 }
 if ($ok) {
     $date = date("d.m.Y H:i");
     mysql_query("UPDATE info SET email='" . $new_mail . "' WHERE id_pers='" . $db["id"] . "'");
     history($login, "Был сменен E-mail", $date, $ip, "Анкета");
     $mail = $db["email"];
     $subject = "Смена e-mail у персонажа {$login}";
     $message = "<b>Здраствуйте, {$login}!</b><br/><br/>";
     $message .= "Кто-то с ip-адреса <b>{$ip}</b> {$date} был сменен e-mail, указанный при регистрации персонажа <b>{$login}</b> он-лайн игры <b>WWW.MEYDAN.AZ</b>.<br/>";
     $message .= "<br><b>Новый e-mail</b>: {$new_mail}<br/><br/><br/><br/>";
     $message .= "<b style='color:green'>С уважением. администрация WWW.MEYDAN.AZ.</b>";
     $headers = 'MIME-Version: 1.0' . "\r\n";
     $headers .= 'Content-type: text/html; charset=windows-1251' . "\r\n";
     $headers .= 'From: WWW.MEYDAN.AZ <*****@*****.**>' . "\r\n";
     if (mail($db["email"], $subject, $message, $headers)) {
         $mess .= "<b style='color:#ff0000'>Внимание! Письмо с паролем будет отправлено на почту указанный в анкете в течении 5 минут.</b><br/>";
     } else {
         $mess .= "<b style='color:#ff0000'>Внимание! Не удалось отправить пароль на e-mail, указанный в анкете!</b><br/>";
     }
     $mess .= 'Почтовый адрес успешно сменен.';
示例#9
0
文件: artmag.php 项目: ehmedov/www
                $db["platina"] = $db["platina"] - $price;
                $msg = "Вы удачно купили " . ($item_count ? $counts . ' шт ' : '') . " <b>&laquo;" . $name . "&raquo;</b> за <b>" . $price . " Пл.</b>";
                history($login, 'Купил ' . ($item_count ? $counts . ' шт ' : ''), $msg, $ip, 'Магазин магии');
            }
        } else {
            if ($r["type"] == "ability") {
                if ($db["clan"] && $db["glava"]) {
                    if ($db["platina"] >= $price_gos) {
                        $have = mysql_num_rows(mysql_query("SELECT * FROM abils WHERE tribe='" . $db["clan"] . "' and item_id='" . $item . "'"));
                        if (!$have) {
                            mysql_query("INSERT INTO abils (item_id,tribe, m_iznos) values ('" . $r["id"] . "','" . $db["clan"] . "','" . $r["iznos_max"] . "')");
                            mysql_query("UPDATE users SET platina=platina-{$price_gos} WHERE login='******'");
                            mysql_query("UPDATE scroll SET {$city}={$city}-1 WHERE id='" . $item . "'");
                            $db["platina"] = $db["platina"] - $price_gos;
                            $msg = "Вы удачно купили <b>&laquo;{$name}&raquo;</b> за <b>" . $price . " Пл.</b>";
                            history($login, "Купил ", $msg, $ip, 'Магазин магии');
                        } else {
                            $msg = "Вы уже купили {$name}";
                        }
                    } else {
                        $msg = "У вас нет такой суммы!";
                    }
                } else {
                    $msg = "Вы не состоите ни в каком клане!";
                }
            }
        }
        $otdel = $buy;
    }
}
$money = sprintf("%01.2f", $db["money"]);
示例#10
0
文件: kupon.php 项目: ehmedov/www
                $kupon_type = 0;
                $str_his = "100AZN";
                break;
            case 1:
                $max_win = 1000;
                $object_id = 427;
                $kupon_type = 1;
                $str_his = "10AZN";
                break;
        }
        $str = "Выигрышный Купон: Вы являетесь Участником Новогоднего Джекпота. Максимальный Выигрыш " . $max_win . " Пл. У Вас " . $kupon_count . " купона...";
        for ($i = 1; $i <= $kupon_count; $i++) {
            mysql_query("INSERT INTO inv (owner, object_id, object_type, object_razdel, msg, gift, gift_author, term) VALUES ('" . $res['login'] . "', '" . $object_id . "', 'flower', 'other', 'Вы являетесь Участником Джекпота', 1, 'WWW.Oldmeydan.Pe.Hu', '" . (time() + 3600 * 24 * 30) . "')");
            mysql_Query("INSERT INTO bank_member (user_id, type) VALUES ('" . $res["id"] . "', '" . $kupon_type . "');");
        }
        history($res["login"], 'Купон -$str_his', $str, $res["remote_ip"], 'Купон-$str_his');
        mysql_query("INSERT INTO pochta(user, whom, text, subject) VALUES ('Путешественник','" . $res["login"] . "','" . $str . "','Выигрышный Купон')");
        say($res["login"], $str, $res["login"]);
        say("toall_news", "Воин <b>" . $res["login"] . "</b> получил {$kupon_count} выигрышных купонов!", $res["login"]);
        echo "ok";
    } else {
        echo "User Not Found";
    }
} else {
    ?>
	<br>
	<br>
	<form name='action' action='main.php?act=inkviz&spell=kupon' method='post'>
		<table border=0 width=500>
			<tr><td>Логин:</td><td><input type=text name="target" class=new size=30></td></tr>
			<tr><td>Количество купонов:</td><td><input type=text name="kupon_count" class=new size=30></td></tr>
示例#11
0
                    <li><a class='logout' href='includes/logout.php'>Log ud</a></li>
                </ul>
            </div>
        </div>

        <div id="main">
            <div class="header">
                <h1>Min historik</h1>
                <h2>Viser din historik for deltagelse i projekter</h2>
            </div>

            <div class="content">
                <h2 class="content-subhead"></h2>

                <p> <?php 
    history($mysqli);
    ?>
 </p>
            </div>
        </div>
    </div>

    <script src="js/ui.js"></script>
        <?php 
} else {
    ?>
            <p>
                <span class="error">Du har ikke rettigheder til at komme ind på siden.</span> Gå venligst tilbage til <a href="index.php">login siden</a>.
            </p>
        <?php 
}
示例#12
0
                $a[] = 1;
            }
        }
        if (!in_Array(0, $a)) {
            foreach ($item_array[$item_id] as $currentValue) {
                mysql_query("DELETE FROM inv WHERE inv.object_type='wood' and inv.owner='" . $login . "' and inv.object_id=" . $currentValue["item"] . " LIMIT " . $currentValue["count"]);
            }
            $buy_item = mysql_fetch_array(mysql_query("SELECT * FROM paltar WHERE id='" . $item_id . "'"));
            if ($buy_item["object"] == "spear") {
                $del_time = time() + 30 * 24 * 3600;
            }
            mysql_query("LOCK TABLES inv WRITE");
            mysql_query("INSERT INTO `inv` (`id`, `owner`, `img`, `object_id`, `object_type`, `object_razdel`, `term`, `name`,  `mass`, `price`, `gos_price`, `min_sila`, `min_lovkost`, `min_udacha`, `min_power`, `min_intellekt`, `min_vospriyatie`, `min_level`, `min_sword_vl`, `min_staff_vl`, `min_axe_vl`, `min_fail_vl`, `min_knife_vl`, `min_spear_vl`,`min_fire`,`min_water`,`min_air`,`min_earth`,`min_svet`,`min_tma`,`min_gray`,`add_fire`, `add_water`, `add_air`, `add_earth`, `add_svet`, `add_tma`, `add_gray`, `add_sila`, `add_lovkost`, `add_udacha`, `add_intellekt`, `add_duxovnost`, `add_hp`, `add_mana`, `protect_head`, `protect_arm`, `protect_corp`, `protect_poyas`, `protect_legs`, `protect_rej`, `protect_drob`, `protect_kol`, `protect_rub`, `protect_fire`, `protect_water`, `protect_air`, `protect_earth`, `protect_svet`, `protect_tma`, `protect_gray`,`protect_mag`,`protect_udar`, `shieldblock`, `krit`, `akrit`, `uvorot`, `auvorot`, `parry`, `counter`, `add_rej`, `add_drob`, `add_kol`, `add_rub`, `ms_udar`, `ms_krit`, `ms_mag`, `ms_fire`, `ms_water`, `ms_air`, `ms_earth`, `ms_svet`, `ms_tma`, `ms_gray`, `ms_rej`, `ms_drob`, `ms_kol`, `ms_rub`, `iznos_max`, `min_attack`, `max_attack`, `proboy`, `add_oruj`, `add_sword_vl`, `add_staff_vl`, `add_axe_vl`, `add_fail_vl`, `add_knife_vl`, `add_spear_vl`, `need_orden`, `sex`, `art`, `podzemka`, `is_personal`, `personal_owner`, `noremont`, `two_hand`, `second_hand`,  `add_fire_att`, `add_air_att`, `add_watet_att`, `add_earth_att`, `edited`) \n\t\t\t\tVALUES (NULL, '" . $login . "','" . $buy_item["img"] . "' ,'" . $buy_item["id"] . "', '" . $buy_item["object"] . "', 'obj', '" . $del_time . "', '" . $buy_item["name"] . "', '" . $buy_item["mass"] . "', '" . $buy_item["price"] . "', '" . $buy_item["price"] . "', '" . $buy_item["min_sila"] . "', '" . $buy_item["min_lovkost"] . "', '" . $buy_item["min_udacha"] . "', '" . $buy_item["min_power"] . "', '" . $buy_item["min_intellekt"] . "', '" . $buy_item["min_vospriyatie"] . "', '" . $buy_item["min_level"] . "', '" . $buy_item["min_sword_vl"] . "', '" . $buy_item["min_staff_vl"] . "', '" . $buy_item["min_axe_vl"] . "', '" . $buy_item["min_fail_vl"] . "', '" . $buy_item["min_knife_vl"] . "', '" . $buy_item["min_spear_vl"] . "', '" . $buy_item["min_fire"] . "','" . $buy_item["min_water"] . "','" . $buy_item["min_air"] . "','" . $buy_item["min_earth"] . "','" . $buy_item["min_svet"] . "','" . $buy_item["min_tma"] . "','" . $buy_item["min_gray"] . "', '" . $buy_item["add_fire"] . "', '" . $buy_item["add_water"] . "', '" . $buy_item["add_air"] . "', '" . $buy_item["add_earth"] . "', '" . $buy_item["add_svet"] . "', '" . $buy_item["add_tma"] . "', '" . $buy_item["add_gray"] . "', '" . $buy_item["add_sila"] . "', '" . $buy_item["add_lovkost"] . "', '" . $buy_item["add_udacha"] . "', '" . $buy_item["add_intellekt"] . "', '" . $buy_item["add_duxovnost"] . "', '" . $buy_item["add_hp"] . "', '" . $buy_item["add_mana"] . "', '" . $buy_item["protect_head"] . "', '" . $buy_item["protect_arm"] . "', '" . $buy_item["protect_corp"] . "', '" . $buy_item["protect_poyas"] . "', '" . $buy_item["protect_legs"] . "', '" . $buy_item["protect_rej"] . "', '" . $buy_item["protect_drob"] . "', '" . $buy_item["protect_kol"] . "', '" . $buy_item["protect_rub"] . "', '" . $buy_item["protect_fire"] . "', '" . $buy_item["protect_water"] . "', '" . $buy_item["protect_air"] . "', '" . $buy_item["protect_earth"] . "', '" . $buy_item["protect_svet"] . "', '" . $buy_item["protect_tma"] . "', '" . $buy_item["protect_gray"] . "', '" . $buy_item["protect_mag"] . "', '" . $buy_item["protect_udar"] . "','" . $buy_item["shieldblock"] . "','" . $buy_item["krit"] . "', '" . $buy_item["akrit"] . "', '" . $buy_item["uvorot"] . "', '" . $buy_item["auvorot"] . "', '" . $buy_item["parry"] . "', '" . $buy_item["counter"] . "', '" . $buy_item["add_rej"] . "', '" . $buy_item["add_drob"] . "', '" . $buy_item["add_kol"] . "', '" . $buy_item["add_rub"] . "', '" . $buy_item["ms_udar"] . "', '" . $buy_item["ms_krit"] . "', '" . $buy_item["ms_mag"] . "', '" . $buy_item["ms_fire"] . "', '" . $buy_item["ms_water"] . "', '" . $buy_item["ms_air"] . "', '" . $buy_item["ms_earth"] . "', '" . $buy_item["ms_svet"] . "', '" . $buy_item["ms_tma"] . "', '" . $buy_item["ms_gray"] . "', '" . $buy_item["ms_rej"] . "', '" . $buy_item["ms_drob"] . "', '" . $buy_item["ms_kol"] . "', '" . $buy_item["ms_rub"] . "', '" . $buy_item["iznos_max"] . "', '" . $buy_item["min_attack"] . "', '" . $buy_item["max_attack"] . "', '" . $buy_item["proboy"] . "','" . $buy_item["add_oruj"] . "' ,'" . $buy_item["add_sword_vl"] . "', '" . $buy_item["add_staff_vl"] . "', '" . $buy_item["add_axe_vl"] . "', '" . $buy_item["add_fail_vl"] . "', '" . $buy_item["add_knife_vl"] . "', '" . $buy_item["add_spear_vl"] . "', '" . $buy_item["need_orden"] . "', '" . $buy_item["sex"] . "', '" . $buy_item["art"] . "', '1', '" . $buy_item["is_personal"] . "', '" . $buy_item["personal_owner"] . "', '" . $buy_item["noremont"] . "', '" . $buy_item["two_hand"] . "', '" . $buy_item["second_hand"] . "',  '" . $buy_item["add_fire_att"] . "', '" . $buy_item["add_air_att"] . "', '" . $buy_item["add_watet_att"] . "', '" . $buy_item["add_earth_att"] . "', '" . $buy_item["edited"] . "');");
            mysql_query("UNLOCK TABLES");
            $msg = "Вы удачно купили <b>&laquo;" . $buy_item["name"] . "&raquo;</b>";
            history($login, 'Купил', $buy_item["name"], $db["remote_ip"], 'Ледяной магазин');
        }
    }
}
//************************************************************
echo "<h3>Магазин НОВРУЗ-БАЙРАМ </h3>";
$money = sprintf("%01.2f", $db["money"]);
$platina = sprintf("%01.2f", $db["platina"]);
$doblest = sprintf("%01.2f", $db["doblest"]);
echo "\n<table width=100% cellspacing=0 cellpadding=0 border=0>\n<tr>\n<td align=left>У вас в наличии: <b>" . $money . "</b> Зл. <b>" . $platina . "</b> Пл. <b>" . $doblest . "</b> Доблесть </td>\n<td align=center nowrap><font color=red>" . $msg . "</font></td>\n<td align=right nowrap>\n\t<INPUT TYPE=button value=\"Обновить\" onClick=\"location.href='main.php?act=none'\">\n \t<INPUT TYPE=button value=\"Вернуться\" onClick=\"location.href='main.php?act=go&level=novruz_go';\">\n</td>\n</tr>\n</table><hr>\n\n<table border=0 width=100%>\n<tr><td colspan=2>" . ($err_msg ? "<font color=#ff0000>Не хватает: " . $err_msg . "</font>" : "") . "</td></tr>\n<tr>\n    <td valign=top nowrap>";
include "player.php";
echo "\n    </td>\n    <td valign=top width=100%>";
if (!$_GET['otdel']) {
    $_GET['otdel'] = 'obj';
}
$db["vip"] = 0;
示例#13
0
文件: molch15.php 项目: ehmedov/www
        $hours = floor(SILENT / 60);
        $minutes = SILENT - $hours * 60;
        if ($hours > 0) {
            if ($hours == 2 || $hours == 24) {
                $hours_d = "{$hours} часа";
            } else {
                $hours_d = "{$hours} часов";
            }
            $minutes_d = "";
        } else {
            $hours_d = "";
            $minutes_d = "{$minutes} минут";
        }
        $pref = $db["sex"];
        if ($pref == "female") {
            $prefix = "а";
        } else {
            $prefix = "";
        }
        if ($reason != "") {
            $reason_text = "<b>Причина:</b> <i>" . $reason . "</i>";
        } else {
            $reason_text = "";
        }
        say("toall", "<font color=#40404A>Смерть Души <b>&quot" . $login . "&quot</b> использовал{$prefix} заклятие молчания на персонажа <b>&quot" . $res['login'] . "&quot</b> на {$hours_d} {$minutes_d}. {$reason_text}</font>", $login);
        history($target, "Молчанка на 15 мин.", $reason_text, $ip, $login);
        history($login, "Молчанка на 15 мин.", $reason_text, $ip, $target);
        $time_d = $hours_d . "  " . $minutes_d;
        echo "Кляп засунут в рот <b>" . $target . "</b>. Он будет молчать " . $time_d;
    }
}
示例#14
0
文件: api.php 项目: rebdrup/foosball
$action = $_REQUEST['action'];
switch ($action) {
    case 'players':
        echo json_encode(players());
        break;
    case 'update':
        echo json_encode(updateStats(time(), $_REQUEST['team1'], $_REQUEST['team2'], $_REQUEST['scores']));
        break;
    case 'reset':
        resetStats();
        break;
    case 'ranking':
        echo json_encode(ranking());
        break;
    case 'history':
        echo json_encode(history());
        break;
    case 'log':
        echo json_encode(gameLog());
        break;
    case 'match':
        if (isset($_REQUEST['team2'])) {
            echo json_encode(match($_REQUEST['team1'], $_REQUEST['team2']));
        } else {
            echo json_encode(bestMatch($_REQUEST['team1']));
        }
        break;
    case 'profile':
        echo json_encode(profile($_REQUEST['id']));
        break;
}
示例#15
0
文件: 85.php 项目: ehmedov/www
$target = htmlspecialchars(addslashes($_POST['target']));
$login = $_SESSION['login'];
$noname = $_POST['noname'];
if (!empty($target)) {
    $QUERY = mysql_query("SELECT * FROM users WHERE login='******'");
    $data = mysql_fetch_array($QUERY);
    if ($data["travm"] != '0') {
        $t_stat = $data["travm_stat"];
        $o_stat = $data["travm_old_stat"];
        $SQ = mysql_query("UPDATE users SET {$t_stat}={$t_stat}+{$o_stat},travm='0', travm_stat='', travm_var='', travm_old_stat='' WHERE login='******'");
        $pref = $db["sex"];
        if ($pref == "female") {
            $prefix = "а";
        } else {
            $prefix = "";
        }
        if ($noname == "") {
            $noname_cl = $login;
        } else {
            if ($noname == 1) {
                $noname_cl = "Высшая сила";
            }
        }
        say("toall", "Представитель порядка <b>&laquo;" . $noname_cl . "&raquo;</b> вылечил{$prefix} персонажа <b>&laquo;" . $target . "&raquo;</b>", $login);
        echo "Персонаж <b>" . $target . "</b> теперь здоров.";
        history($target, "Вылечили", $reson, $data["remote_ip"], $noname_cl);
        history($login, "Вылечил", $reson, $db["remote_ip"], $target);
    } else {
        echo "Персонаж <b>" . $target . "</b> не травмирован.";
    }
}
示例#16
0
<?php

include "key.php";
$login = $_SESSION['login'];
$target = htmlspecialchars(addslashes($_POST['target']));
if (!empty($target)) {
    $S = "select * from users where login='******'";
    $q = mysql_query($S);
    $res = mysql_fetch_array($q);
    if (!$res) {
        print "ѕерсонаж <B>" . $target . "</B> не найден в базе данных.";
        die;
    }
    $boy = mysql_query("select * from teams where player='" . $target . "'");
    $result = mysql_fetch_array($boy);
    mysql_query("DELETE FROM teams WHERE battle_id='" . $result['battle_id'] . "'");
    mysql_query("DELETE FROM zayavka WHERE creator = '" . $result['battle_id'] . "'");
    mysql_query("UPDATE users SET zayavka=0 WHERE login = '******'");
    //mysql_query("UPDATE battles SET status='finished' WHERE creator_id='".$result['battle_id']."'");
    //$ClearZayavkaTime = mysql_query("DELETE FROM timeout WHERE battle_id = '".$res['battle']."'");
    //$ClearBattle = 		mysql_query("DELETE FROM battles WHERE creator_id = '".$result['battle_id']."'");
    //$Update= mysql_query("UPDATE users SET battle = '0', battle_pos = '', battle_team = '', battle_opponent = ''  WHERE battle='".$res['battle']."'");
    //$Update= mysql_query(" UPDATE users SET battle_opponent = ''  WHERE battle_opponent='".$target."'");
    //echo "UPDATE users SET battle = '0', battle_pos = '', battle_team = '', battle_opponent = ''  WHERE battle='".$res['battle']."'";
    history($login, "Zayafkani pozmaq", "", $ip, $login);
    echo "OK";
}
示例#17
0
function back()
{
    history(-1);
}
示例#18
0
文件: cave_shop.php 项目: ehmedov/www
//-------------------------------Продать Все------------------------------------------------------
if ($_GET['action'] == "sellconf_all" && is_numeric($_GET['item'])) {
    $item_id = (int) $_GET['item'];
    $type = $_GET["type"];
    $q = mysql_query("SELECT runa.*, count(*) as co FROM inv LEFT JOIN runa ON runa.id=inv.object_id WHERE inv.owner='" . $login . "' and inv.object_type='runa' and inv.object_id={$item_id} GROUP by object_id");
    $res = mysql_fetch_array($q);
    if ($res) {
        $name = $res["name"];
        $price = $res["price"];
        $co = $res["co"];
        $price = $price * $co;
        $price1 = sprintf("%01.2f", $price);
        mysql_query("DELETE FROM inv WHERE owner='" . $login . "' and object_type='runa' and inv.object_id={$item_id}");
        mysql_query("UPDATE users SET platina=platina+{$price} WHERE login='******'");
        $msg = "Вы удачно продали все предметы &quot" . $name . "&quot за " . $price1 . " Пл. ({$co} шт.)";
        history($login, 'Продал Все', $msg, $ip, 'Кристальный магазин');
        mysql_query("INSERT INTO com_runa (seller,ip,name,count_runa,platina) VALUES ('{$login}','{$ip}','{$name}',{$co},{$price})");
        $db["platina"] = $db["platina"] + $price;
    } else {
        $msg = "Предмет не найден в вашем рюкзаке!";
    }
}
$money = sprintf("%01.2f", $db["money"]);
$platina = sprintf("%01.2f", $db["platina"]);
$naqrada = sprintf("%01.2f", $db["naqrada"]);
//--------------------------------------------------------------------------------------------
echo "<h3>Кристальный магазин</h3>";
echo "<table width=100%>\n\t<tr>\n\t<td width=100%>\n\t\tУ вас в наличии: <B>" . $money . "</b> Зл. <b>" . $platina . "</b> Пл. <b>" . $naqrada . "</b> Ед.\n\t</td>\n\t<td nowrap>\n\t\t<INPUT TYPE=button onclick=\"location.href='main.php?act=go&level=crypt_go'\" value=\"Вернуться\" >\n\t\t<INPUT TYPE=button onclick=\"location.href='?act=none'\" value=\"Обновить\">\n\t</td>\n\t</tr>\n\t</table>";
echo "<table align=center><tr><td align=center><img src='img/city/priem.jpg'><br>\n<b style=color:#ff0000>{$msg} &nbsp;</b>";
echo "<TABLE WIDTH=100% CELLSPACING=1 CELLPADDING=2 BGCOLOR=#212120 align=center>";
$res = mysql_query("SELECT runa.*,inv.id as ids,inv.iznos,inv.iznos_max,inv.object_id, count(*) as co FROM inv LEFT JOIN runa ON runa.id=inv.object_id WHERE inv.owner='" . $login . "' and inv.object_type='runa' GROUP by object_id");
示例#19
0
文件: functions.php 项目: ehmedov/www
function lose($team, $battle, $phrase)
{
    $date = date("H:i");
    $sql_bat = mysql_query("SELECT zayavka.type,battles.creator_id FROM `battles` LEFT JOIN zayavka on zayavka.creator=battles.creator_id WHERE battles.id={$battle}");
    $B_DAT = mysql_fetch_array($sql_bat);
    mysql_free_result($sql_bat);
    $cr = $B_DAT["creator_id"];
    $zay_type = $B_DAT["type"];
    $boylar = array(3, 4, 101, 5, 6, 102, 11);
    $T = mysql_query("SELECT player,hitted FROM teams WHERE battle_id='" . $cr . "' AND over=0 and team='" . $team . "'");
    while ($DATA = mysql_fetch_array($T)) {
        $player = $DATA["player"];
        $hitted_win = $DATA["hitted"];
        if ($zay_type == 15) {
            mysql_query('UPDATE labirint SET location="29x15", vector="180" WHERE user_id="' . $player . '"');
        }
        if ($zay_type == 88) {
            mysql_query('UPDATE labirint SET location="29x2", vector="180", lose=lose+1 WHERE user_id="' . $player . '"');
        }
        if ($zay_type == 89) {
            mysql_query('UPDATE labirint SET lose=lose+1 WHERE user_id="' . $player . '"');
        }
        //-------------------------------------------------------------------------------------
        $LOSER_QUERY_D = mysql_query("SELECT users.*,zver.energy FROM users LEFT join zver on zver.owner=users.id and zver.sleep=0 WHERE login='******'");
        $LOSER_DATA = mysql_fetch_array($LOSER_QUERY_D);
        mysql_free_result($LOSER_QUERY_D);
        $objects = array();
        $objects[0] = $LOSER_DATA["amulet"];
        $objects[1] = $LOSER_DATA["hand_r"];
        $objects[2] = $LOSER_DATA["armour"];
        $objects[3] = $LOSER_DATA["poyas"];
        $objects[4] = $LOSER_DATA["ring1"];
        $objects[5] = $LOSER_DATA["ring2"];
        $objects[6] = $LOSER_DATA["ring3"];
        $objects[7] = $LOSER_DATA["helmet"];
        $objects[8] = $LOSER_DATA["perchi"];
        $objects[9] = $LOSER_DATA["hand_l"];
        $objects[10] = $LOSER_DATA["boots"];
        $objects[11] = $LOSER_DATA["naruchi"];
        $objects[12] = $LOSER_DATA["rubaxa"];
        $objects[13] = $LOSER_DATA["plash"];
        $objects[14] = $LOSER_DATA["mask"];
        $objects[15] = $LOSER_DATA["pants"];
        $objects[16] = $LOSER_DATA["masdrikon"];
        $objects[17] = $LOSER_DATA["rukavic"];
        $damage = 0;
        shuffle($objects);
        foreach ($objects as $key => $value) {
            if ($value == 0) {
                unset($objects[$key]);
            }
        }
        $new_array = array_values($objects);
        $damage = $new_array[0];
        if ($damage != 0) {
            $GET_F_INV = mysql_query("SELECT paltar.name,inv.iznos_max,inv.iznos FROM inv LEFT JOIN paltar on paltar.id=inv.object_id WHERE inv.id=" . $damage);
            $GET_D = mysql_fetch_array($GET_F_INV);
            mysql_free_result($GET_F_INV);
            $iznos_all = $GET_D["iznos_max"];
            $iznos = $GET_D["iznos"] + 1;
            $obj_name = $GET_D["name"];
            $krit_iznos = $iznos_all - 2;
            if ($iznos >= $krit_iznos && $iznos < $iznos_all) {
                talk($player, "Предмет <b>" . $obj_name . "</b> в критическом состоянии!<BR><small>(на правах рекламы) <b>Ремонтная мастерская</b>. Мы даем вторую жизнь старым вещам!</small>", $LOSER_DATA);
            }
            if ($iznos <= $iznos_all) {
                mysql_query("UPDATE inv SET iznos =iznos+1 WHERE id = '" . $damage . "'");
            }
            if ($iznos_all == 1) {
                unWear($player, $damage);
                mysql_query("DELETE FROM inv WHERE id='" . $damage . "'");
                history($player, 'Пришел в негодность', $obj_name, $LOSER_DATA["remote_ip"], "Бой " . $battle);
                talk($player, "Предмет <b>" . $obj_name . "</b> сломался", $LOSER_DATA);
            } else {
                if ($iznos == $iznos_all) {
                    unWear($player, $damage);
                    talk($player, "Предмет <b>" . $obj_name . "</b> нуждается в ремонте!<BR><small>(на правах рекламы) <b>Ремонтная мастерская</b>. Мы даем вторую жизнь старым вещам!</small>", $LOSER_DATA);
                }
            }
        }
        if ($zay_type == 29) {
            #Пещера Воинов
            mysql_query("UPDATE users SET zayava=0 WHERE login='******'");
            mysql_query("UPDATE war_team SET lose=1 WHERE player='" . $player . "'");
            say("toroom", "<b>{$player}</b> трагически погиб и покидает турнир.", $player);
        }
        if ($zay_type == 99 || $zay_type == 66) {
            mysql_query("UPDATE users SET bs=0,location='', vector='' WHERE login='******'");
            $str = "<span class=date>" . date("d.m.y H:i") . "</span> <script>drwfl('" . $LOSER_DATA['login'] . "','" . $LOSER_DATA['id'] . "','" . $LOSER_DATA['level'] . "','" . $LOSER_DATA['dealer'] . "','" . $LOSER_DATA['orden'] . "','" . $LOSER_DATA['admin_level'] . "','" . $LOSER_DATA['clan_short'] . "','" . $LOSER_DATA['clan'] . "');</script> повержен и выбывает из турнира<BR>";
            mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,"' . $str . '") WHERE `active` = TRUE');
            mysql_Query("DELETE FROM labirint WHERE user_id='" . $player . "'");
            mysql_Query("UPDATE bs_objects SET bs=0,owner='',coord='" . $LOSER_DATA["location"] . "' WHERE owner='" . $player . "'");
            mysql_query("DELETE FROM inv WHERE owner='" . $player . "' and object_razdel='thing' and object_id=24 LIMIT 1");
            say("toroom", "<b>{$player}</b> трагически погиб и покидает турнир.", $player);
        }
        if ($zay_type == 19) {
            //Таинственный Маяк
            $have_hell = mysql_fetch_Array(mysql_Query("SELECT * FROM hellround_pohod WHERE `end` = 0 and `owner`=" . $LOSER_DATA["id"] . ";"));
            $count_wood = $have_hell["volna"];
            for ($i = 0; $i < $count_wood; $i++) {
                mysql_query("INSERT INTO `inv` (`owner`, `object_id`, `object_type`, `object_razdel` ,`iznos`, `iznos_max`) VALUES ('" . $LOSER_DATA['login'] . "', '139','wood','thing','0','1');");
            }
            $count_redkiy = $have_hell["unikal_count"] - 1;
            if ($count_redkiy > 0) {
                for ($i = 0; $i < $count_redkiy; $i++) {
                    mysql_query("INSERT INTO `inv` (`owner`, `object_id`, `object_type`, `object_razdel` ,`iznos`, `iznos_max`) VALUES ('" . $LOSER_DATA['login'] . "', '140','wood','thing','0','1');");
                }
                $str_redkiy = "<b>Редкий Образец</b> x{$count_redkiy}.";
            }
            say("toroom", "<b>" . $LOSER_DATA['login'] . "</b> создал предмет <b>Образец</b> x{$count_wood}. {$str_redkiy}", $LOSER_DATA['login']);
            mysql_Query("UPDATE hellround_pohod SET `end` = 1, `date_out` = " . time() . " WHERE `end` = 0 and `owner`=" . $LOSER_DATA["id"] . ";");
        }
        /*if(in_array($zay_type,$boylar))
        		{
        			//new year
        			//mysql_Query("INSERT INTO inv (owner, object_id, object_type, object_razdel, gift, gift_author, iznos, iznos_max, term) VALUES('".$LOSER_DATA['login']."', '60', 'scroll', 'magic', '1', 'WWW.MEYDAN.AZ', '0', '1', '".(time()+30*24*3600)."');");
        			//talk($LOSER_DATA["login"],"Вы нашли <b>Снежок</b>",$LOSER_DATA);
        			
        			//novruz
        			mysql_Query("INSERT INTO inv (owner, object_id, object_type, object_razdel, gift, gift_author, iznos, iznos_max, term) VALUES('".$LOSER_DATA['login']."', '262', 'scroll', 'magic', '1', 'WWW.MEYDAN.AZ', '0', '1', '".(time()+30*24*3600)."');");
        			talk($LOSER_DATA["login"],"Вы нашли <b>Праздничные яйца</b>",$LOSER_DATA);
        		}*/
        if ($LOSER_DATA["zver_on"]) {
            $exp_minus = rand(1, 4);
            if ($LOSER_DATA["energy"] < $exp_minus) {
                $exp_minus = rand(1, $LOSER_DATA["energy"]);
            }
            mysql_query("UPDATE zver SET energy=energy-{$exp_minus} WHERE owner=" . $LOSER_DATA["id"] . " and sleep=0 ");
        }
        $krov = array("100", "101", "102", "11");
        if (in_array($zay_type, $krov)) {
            $travm = rand(1, 3);
            getTravm($player, $travm);
            include "travm_dis.php";
            $travm_dis = array();
            $travm_dis[1] = $ushib_d_h[rand(0, count($ushib_d_h) - 1)];
            $travm_dis[2] = $ushib_d_c[rand(0, count($ushib_d_c) - 1)];
            $travm_dis[3] = $ushib_d_l[rand(0, count($ushib_d_l) - 1)];
            $phrase = "<span class=date>{$date}</span> <B>" . $player . "</B> получил повреждение: <font color=red>" . $travm_dis[$travm] . "</font>.<BR>";
            battle_log($battle, $phrase);
        }
        if ($zay_type == 20) {
            getTravm($player, 4);
            $phrase = "<span class=date>{$date}</span> <B>" . $player . "</B> получил повреждение: <font color=red>Неличимая травма</font>.<BR>";
            battle_log($battle, $phrase);
        }
        if ($phrase == 0) {
            talk($player, "Бой окончен! Вы проиграли бой. Всего вами нанесено: <b>" . $hitted_win . " HP</b>. Получено опыта: <b>0</b>.", $LOSER_DATA);
        } else {
            if ($phrase == 1) {
                talk($player, "Бой окончен! Ничья! Всего вами нанесено: <b>" . $hitted_win . " HP</b>. Получено опыта: <b>0</b>.", $LOSER_DATA);
            } else {
                if ($phrase == 2) {
                    $travm = rand(1, 3);
                    getTravm($player, $travm);
                    include "travm_dis.php";
                    $travm_dis = array();
                    $travm_dis[1] = $ushib_d_h[rand(0, count($ushib_d_h) - 1)];
                    $travm_dis[2] = $ushib_d_c[rand(0, count($ushib_d_c) - 1)];
                    $travm_dis[3] = $ushib_d_l[rand(0, count($ushib_d_l) - 1)];
                    $phrase = "<span class=date>{$date}</span> <B>" . $player . "</B> получил повреждение: <font color=red>" . $travm_dis[$travm] . "</font>.<BR>";
                    battle_log($battle, $phrase);
                    talk($player, "Бой окончен! Вы проиграли бой. Всего вами нанесено: <b>{$hitted_win} HP</b>. Получено опыта: <b>0</b>.", $LOSER_DATA);
                } else {
                    if ($phrase == 11) {
                        talk($player, "Бой окончен по таймауту! Ничья! Всего вами нанесено: <b>{$hitted_win} HP</b>. Получено опыта: <b>0</b>.", $LOSER_DATA);
                    }
                }
            }
        }
        $all_hp = $LOSER_DATA["hp_all"];
        if ($LOSER_DATA["level"] < 4) {
            setHP($player, $all_hp, $all_hp);
        } else {
            setHP($player, '0', $all_hp);
        }
        $cur_m = $LOSER_DATA["mana"];
        $all_m = $LOSER_DATA["mana_all"];
        setMN($player, $cur_m, $all_m);
    }
    mysql_query("UPDATE users,(SELECT player FROM teams WHERE battle_id='" . $cr . "' AND team='" . $team . "') as upd SET battle='0', " . ($phrase == 1 || $phrase == 11 ? "nich=nich+1" : "lose=lose+1") . ", zayavka=0, battle_opponent='', battle_pos='', battle_team='',fwd='',zver_on=0,oslab=" . (time() + 5 * 60) . " WHERE login=upd.player");
    mysql_query("UPDATE teams SET over = 1 WHERE battle_id='" . $cr . "' and team={$team}");
}
示例#20
0
文件: molch15.php 项目: ehmedov/www
        $hours = floor(SILENT / 60);
        $minutes = SILENT - $hours * 60;
        if ($hours > 0) {
            if ($hours == 2 || $hours == 24) {
                $hours_d = "{$hours} часа";
            } else {
                $hours_d = "{$hours} часов";
            }
            $minutes_d = "";
        } else {
            $hours_d = "";
            $minutes_d = "{$minutes} минут";
        }
        $pref = $db["sex"];
        if ($pref == "female") {
            $prefix = "а";
        } else {
            $prefix = "";
        }
        if ($reason != "") {
            $reson = "<b>Причина:</b> <i>" . $reason . "</i>";
        } else {
            $reson = "";
        }
        say("toall", "Представитель порядка <b>&laquo;" . $login . "&raquo;</b> использовал{$prefix} заклятие молчания на персонажа <b>&laquo;" . $res['login'] . "&raquo;</b> на {$hours_d} {$minutes_d}. {$reson}", $login);
        history($target, "Молчанка на 15 мин.", $reson, $ip, $login);
        history($login, "Молчанка на 15 мин.", $reson, $ip, $target);
        $time_d = $hours_d . "  " . $minutes_d;
        echo "Кляп засунут в рот <b>" . $target . "</b>. Он будет молчать " . $time_d;
    }
}
示例#21
0
function BuildContentPage()
{
    global $groupmode, $phpvars, $page, $logpage, $postlogpage, $GroupModeRefreshInterval, $FileModeRefreshInterval, $FileModeLog, $historymode, $hasusermenu;
    if ($groupmode) {
        currently_downloading($phpvars);
        queued_downloading($phpvars, $page);
        currently_processing($phpvars, $postlogpage);
        queued_processing($phpvars);
        historymain($phpvars);
        logging($phpvars, $logpage);
    } elseif ($historymode) {
        history($phpvars, $page);
    } else {
        filelist($phpvars, $page);
        if ($FileModeLog) {
            echo '<br>';
            logging($phpvars, $logpage);
        }
    }
    serverinfobox($phpvars);
    servercommandbox($phpvars);
    if ($hasusermenu) {
        usermenu($phpvars);
    }
    echo '<div style="display: none" id="updateinterval">' . ($groupmode ? $GroupModeRefreshInterval : $FileModeRefreshInterval) . '</div>';
    echo '<div style="display: none" id="downloadlimit">' . $phpvars['status']['DownloadLimit'] / 1024 . '</div>';
    if (isset($_COOKIE['upload_status'])) {
        echo '<div style="display: none" id="uploadstatushidden">' . $_COOKIE['upload_status'] . '</div>';
    }
    if (isset($_COOKIE['newzbin_status'])) {
        echo '<div style="display: none" id="newzbinstatushidden">' . $_COOKIE['newzbin_status'] . '</div>';
    }
}
示例#22
0
文件: inv.php 项目: ehmedov/www
                            } else {
                                echo "[<a href='?act=magic&spell=" . $dat["ids"] . "'>выпит</a>]";
                            }
                        }
                    }
                }
            }
            echo " <a href='?act=info_magic&item_id=" . $dat["id"] . "'>[info]</a> <a href='?delete=" . $dat["ids"] . "&name=" . $dat["name"] . "'><img src='http://www.meydan.az/img/icon/del.gif' border='0' /></a> ";
            if (in_array($spell_id, $stack)) {
                echo "<a href='?stack=" . $dat["id"] . "'><img src='http://www.meydan.az/img/icon/join.gif' alt='Собрать' style='cursor: hand' border='0' /> ";
            }
            if ($dat["del_time"] > 0) {
                echo "<br/><font style='color:#696969'>Срок: " . $dat["del_time"] . " дн. (до " . date('d.m.y H:i:s', $dat["term"]) . ")</font>";
                if ($term < time()) {
                    mysql_query("DELETE FROM inv WHERE id=" . $dat["id"]);
                    history($login, "Закончился срок годности", $dat["name"], $db["remote_ip"], "Инвентарь");
                }
            }
            echo "<br/><br/>";
        }
        mysql_free_result($sql_inv);
    }
}
?>

	<?php 
mysql_close();
?>
	<?php 
include "bottom.php";
?>
示例#23
0
文件: blok.php 项目: ehmedov/www
    $q = mysql_query("select * from users where login='******'");
    $res = mysql_fetch_array($q);
    if (!$res) {
        echo "ѕерсонаж <B>" . $target . "</B> не найден в базе данных.";
        die;
    }
    if ($res['login'] == "—ќ«ƒј“≈Ћ№") {
        echo "–едактирование богов запрещено высшей силой!";
        die;
    }
    if ($db["adminsite"] != 5) {
        if ($res['adminsite'] >= 5 || $res["admin_level"] >= 9) {
            echo "ѕерсонаж <B>{$target}</B> не найден в базе данных.";
            die;
        }
    }
    $chas = date("H");
    $vaxt = date("d.m.Y H:i:s", mktime($chas - $GSM));
    mysql_query("UPDATE users SET blok='1',blok_reason='" . $reason . " (" . $vaxt . ", " . $login . ")',metka='' WHERE login='******'");
    mysql_query("DELETE FROM online WHERE login='******'");
    $pref = $db["sex"];
    if ($pref == "female") {
        $prefix = "а";
    } else {
        $prefix = "";
    }
    say("toall", "<font color=#40404A>—мерть ƒуши <b>&laquo;" . $login . "&raquo;</b> отрубил{$prefix} голову персонажа <b>&laquo;" . $target . "&raquo;</b></font>.", $login);
    echo "ѕерсонаж <B>{$target}</B> казнен.";
    history($_POST['target'], " ј«Ќ≈Ќ", $reson, $ip, $login);
    history($login, " ј«Ќ»Ћ персонажа {$target}", $reson, $ip, $target);
}
 /**
  * @param $event
  */
 public function onReactivated($event)
 {
     history()->log($this->history_slug, 'trans("history.backend.users.reactivated") ' . $event->user->name, $event->user->id, 'check', 'bg-green');
 }
示例#25
0
文件: mount.php 项目: ehmedov/www
if ($db['walktime'] < time()) {
    echo "<script>document.location.href='?action=vixod';</script>";
    die;
}
//------------------------------------
$matrix = array(array(2, 0, 0, 0, 0, 0, 0, 0, 1, 2), array(1, 0, 0, 0, 0, 0, 0, 1, 1, 0), array(1, 0, 0, 0, 0, 0, 0, 1, 0, 0), array(1, 0, 0, 0, 1, 1, 1, 1, 0, 0), array(1, 0, 0, 0, 1, 0, 0, 0, 0, 0), array(1, 1, 0, 0, 1, 0, 0, 0, 0, 0), array(0, 1, 0, 0, 1, 0, 0, 0, 0, 0), array(0, 1, 0, 0, 1, 0, 0, 0, 0, 0), array(0, 1, 1, 1, 1, 1, 1, 0, 0, 0), array(0, 0, 0, 0, 1, 0, 1, 1, 1, 2));
//---------------get money-------------------------------------
if ($_POST["take_money"]) {
    if (isset($_SESSION['captcha_keystring']) && $_SESSION['captcha_keystring'] == $_POST['keystring']) {
        $sel = mysql_fetch_array(mysql_query("SELECT * FROM les WHERE user_id='" . $db["id"] . "' and take='" . $_POST['takemoney'] . "'"));
        if (!$sel) {
            $money = rand($db["level"] * 10, $db["level"] * 15);
            mysql_query("UPDATE users SET money=money+" . $money . " WHERE login='******'");
            mysql_query("INSERT INTO les (user_id, take) VALUES('" . $db["id"] . "','" . $_POST['takemoney'] . "')");
            $money = $money . " Зл.";
            history($login, 'Нашел ', $money, $ip, 'Темный Лес');
            echo "<b style='color:green'>Вы нашли " . $money . " !!!</b>";
        } else {
            echo "<b style='color:#ff0000'>Ничего не произошло!!!</b>";
        }
    } else {
        if ($_SESSION['captcha_keystring'] != $_POST['keystring']) {
            echo "<b style='color:#ff0000'>Ошибка при введении кода!!!</b>";
        }
    }
}
unset($_SESSION['captcha_keystring']);
echo "<div align=right><b style='color:#ff0000'>Ещё: " . convert_time($db['walktime']) . "</b>";
echo "&nbsp; &nbsp; &nbsp;<input type='button' class='btn' onclick=\"window.location='?action=vixod'\" value='Выход'></div>";
//----------------------------------------------------
if (!isset($_SESSION["xy"])) {
示例#26
0
文件: hospital.php 项目: ehmedov/www
        $trmoney[1] = 5;
        $trmoney[2] = 10;
        $trmoney[3] = 15;
        $price = $trmoney[$t];
        if ($db["orden"] == 1) {
            $price = 0;
        }
        if ($db["money"] >= $price) {
            $t_stat = $db["travm_stat"];
            $o_stat = $db["travm_old_stat"];
            $travma = mysql_query("UPDATE users SET {$t_stat}={$t_stat}+{$o_stat},travm='0',money=money-{$price}, travm_stat='', travm_var='', travm_old_stat='' WHERE login='******'");
            $msg = "Бернард вылечил Вашу травму за {$price} Зл.";
            $name2 = "{$price} Зл.";
            $db["travm_var"] = '';
            $db["travm"] = 0;
            history($login, 'Излечился от травмы', $name2, $ip, 'Больница');
        } else {
            $msg = "У Вас недостаточно денег, что бы оплатить услуги Бернарда.";
        }
    } else {
        $msg = "Извините, но у нас Вам делать нечего, Вы абсолютно здоровы!";
    }
}
?>
<script>

function cure()
{
	location.href='?emeliyyat=cure';
}
function talk(phrase)
示例#27
0
文件: zadaniya.php 项目: ehmedov/www
                $msg .= "Вы получили Медал <b>Рыцарь Башни Смерти [1]</b>. ";
            } else {
                $query = mysql_fetch_array(mysql_query("SELECT count(*) FROM inv WHERE owner='" . $login . "' and object_razdel='medal' and object_id=32"));
                if ($query[0] == 0) {
                    mysql_query("INSERT INTO inv (owner,object_id,object_type,object_razdel,iznos_max) VALUES ('{$login}',32,'medal','medal',1);");
                    $msg .= "Вы получили Медал <b>Рыцарь Башни Смерти [2]</b>. ";
                } else {
                    $query = mysql_fetch_array(mysql_query("SELECT count(*) FROM inv WHERE owner='" . $login . "' and object_razdel='medal' and object_id=33"));
                    if ($query[0] == 0) {
                        mysql_query("INSERT INTO inv (owner,object_id,object_type,object_razdel,iznos_max) VALUES ('{$login}',33,'medal','medal',1);");
                        $msg .= "Вы получили Медал <b>Рыцарь Башни Смерти [3]</b>. ";
                    }
                }
            }
            $msg .= "Вы получили 1000.00 Ед. за 100 репутации";
            history($login, "Задания", $msg, $db['remote_ip'], "Задания в Башне");
            $db["reputation"] = $db["reputation"] - 100;
            $db["naqrada"] = $db["naqrada"] + 1000;
        } else {
            $msg = "У Вас нет достаточной репутации!";
        }
    }
}
?>
<TABLE width=100% border=0>
<tr valign=top>
	<td align=right nowrap><INPUT TYPE="button" value="Турнирная арена" style="background-color:#AA0000; color: white;" onclick="location.href='?act=go&level=smert_room';"></td>
	<td width=100%><h3>Задания в Башне</h3></td>
	<td align=right nowrap>
		<input type=button  class=newbut onclick="location.href='main.php?act=none'" value="Обновить">
	</td>
示例#28
0
<?php

include "key.php";
$login = $_SESSION['login'];
$ip = $db["remote_ip"];
$news = htmlspecialchars(addslashes($_POST['news']));
$news = str_replace("&amp;", "&", $news);
if ($news != "") {
    say("toall_news", "<font color=\"#ff0000\">Объявления:</font> <font color=darkblue><b>{$news}</b></font>", $login);
    history($login, "Новость добавлена", $news, $ip, $login);
    echo "<b>Новость добавлена<b>";
}
示例#29
0
    if ($data) {
        $rc = Thread(0, $data, $menu);
    }
    echo $menu;
}
#$f = fopen("/tmp/x","w");
#fputs($f,print_r($_GET,true));
switch ($_GET['task']) {
    case 'getmenu':
        getmenu();
        break;
    case 'savecontent':
        savecontent($_POST);
        break;
    case 'history':
        history($_GET);
        break;
    case 'suche':
        suche($_GET['wort'], $_GET['kat']);
        break;
    case 'newcat':
        newcat($_GET);
        break;
    case 'editcat':
        editcat($_GET['id']);
        break;
    case 'filesearch':
        filesearch();
        break;
    case 'edit':
        getonecontent($_GET['id'], $_GET['edit']);
示例#30
0
 /**
  * 登陆时设置用户的缓存信息
  * @param $userInfo
  * @param $is_forever
  */
 public function setUserCache($userInfo, $is_forever)
 {
     $userData = array('id' => $userInfo['id'], 'username' => $userInfo['username'], 'email' => $userInfo['email'], 'last_login_time' => $userInfo['last_login_time'], 'last_login_ip' => $userInfo['last_login_ip'], 'mobile' => $userInfo['mobile'], 'is_forever' => $is_forever);
     $token = md5($userInfo['email']);
     if ($is_forever) {
         cookie('WINE_USER_INFO_TICKET', $token, 3600 * 24 * 60);
         S($token, $userData, 3600 * 24 * 61);
     } else {
         cookie('WINE_USER_INFO_TICKET', $token, 3600 * 24);
         S($token, $userData, 3600 * 25);
     }
     /* 登录历史 */
     history($userInfo['id']);
     //记录行为
     user_log("用户登录了");
 }