battles/bt.php

102 lines
2.9 KiB
PHP
Raw Normal View History

2018-01-28 16:40:49 +00:00
<pre>
<?
//error_reporting(E_ALL);
ini_set("display_errors", 1);
/*
function moon_phase($year,$month,$day) {
if ($month == 1) --$day;
else if ($month == 2) $day += 30;
else
{
$day += 28 + ($month-2)*3059/100;
// adjust for leap years
if (!($year & 3)) ++$day;
if (($year%100) == 0) --$day;
}
$g = ($year-1900)%19 + 1;
$e = (11*$g + 18) % 30;
if (($e == 25 && $g > 11) || $e == 24) $e++;
if ((((($e + $day)*6+11)%177)/22 & 7) == 4) {
return true;
}
}
echo moon_phase(date("Y"),date("m"),date("d"));
*/
include "config.php";
include "functions.php";
//if($_GET['rep']) {
// $d = mysql_fetch_array(mysql_query("SELECT * from inventory where owner=0 AND `id`=".$_GET['rep']));
// $dd = mysql_fetch_array(mysql_query("SELECT * FROM `delo` WHERE `text` LIKE '%".$d['id']."%'ORDER BY `id` DESC LIMIT 1"));
// mysql_query("UPDATE inventory SET owner='".$dd['pers']."' WHERE `id`='".$_GET['rep']."';");
//}
//$data = mysql_query("SELECT * from inventory where `owner`='0' OR `owner`=''");
//while($d = mysql_fetch_array($data)) {
// $dd = mysql_fetch_array(mysql_query("SELECT * FROM `delo` WHERE `text` LIKE '%".$d['id']."%'ORDER BY `id` DESC LIMIT 1"));
// echo $d['id']." ".$d['name']." ".$dd['pers']." ".$dd['text']." <a href='?rep=".$d['id']."'>Вернуть ".nick7($dd['pers'])."</a><BR>";
//}
//settravma(2);
// exec("../daemons/arch.php");
$exps = array(
"20" => array (15),
"45" => array (16),
"75" => array (17),
"110" => array (18),
"160" => array (21),
"215" => array (22),
"280" => array (23),
"350" => array (24),
"410" => array (25),
"530" => array (28),
"670" => array (29),
"830" => array (30),
"950" => array (31),
"1100" => array (32),
"1300" => array (33),
"1450" => array (36),
"1650" => array (37),
"1850" => array (38),
"2050" => array (39),
"2200" => array (40),
"2500" => array (41),
"2900" => array (46),
"3350" => array (47),
"3800" => array (48),
"4200" => array (49),
"4600" => array (50),
"5000" => array (51),
"6000" => array (54),
"7000" => array (55),
"8000" => array (56),
"9000" => array (57),
"10000" => array (58),
"11000" => array (59),
"12000" => array (60),
"12500" => array (61),
"14000" => array (64),
"15500" => array (65),
"17000" => array (66),
"19000" => array (67),
"21000" => array (68),
"23000" => array (69),
"27000" => array (70),
"30000" => array (71),
"60000" => array (76),
"75000" => array (77),
"150000" => array (78),
"175000" => array (79) );
echo "<pre>";
$ss = mysql_query("select `id`,`nextup`,`level` FROM `users` WHERE `level` > 0 AND `level` < 8 AND id='6490';");
while($ssd=mysql_fetch_array($ss)) {
undressall($ssd['id']);
mysql_query( "UPDATE `users` SET `sila`='3',`lovk`='3',`inta`='3',`vinos`='".(3+$ssd['level'])."',`intel`='0',`stats` = ".($exps[$ssd['nextup']][0]-12)." WHERE `id`='".$ssd['id']."';"); // ,$ssd['nextup'],"
}
?>