Файл: l2ps_v5/itog/event.php
Строк: 29
<?
include_once("ini.php");
mysql_query("TRUNCATE TABLE peklowin ") or die("Сука не пашет!");
$qi = mysql_query("SELECT * FROM `peklo` WHERE `ok`='pk' ORDER BY `kol` DESC LIMIT 1; ");
while($row=mysql_fetch_array($qi))
{
mysql_query("INSERT INTO
`peklowin` SET
`usr` = '$row[usr]',
`sila` = '0.25',
`ok` = 'ataka'");
}
$qis = mysql_query("SELECT * FROM `peklo` WHERE `ok`='pvp' ORDER BY `kol` DESC LIMIT 1; ");
while($rowee=mysql_fetch_array($qis))
{
mysql_query("INSERT INTO
`peklowin` SET
`usr` = '$rowee[usr]',
`sila` = '0.25',
`ok` = 'pvp'");
}
$qiss = mysql_query("SELECT * FROM `peklo` WHERE `ok`='pvpc' ORDER BY `kol` DESC LIMIT 1; ");
while($roweee=mysql_fetch_array($qiss))
{
mysql_query("INSERT INTO
`peklowin` SET
`usr` = '$roweee[usr]',
`sila` = '0.25',
`ok` = 'pvpc'");
}
$qiq = mysql_query("SELECT * FROM `peklo` WHERE `ok`='mob' ORDER BY `kol` DESC LIMIT 1; ");
while($rows=mysql_fetch_array($qiq))
{
mysql_query("INSERT INTO
`peklowin` SET
`usr` = '$rows[usr]',
`sila` = '0.15',
`ok` = 'lov'");
}
$qiqi = mysql_query("SELECT * FROM `peklowin` WHERE `ok`='ataka' ");
($rowe=mysql_fetch_array($qiqi));
$qiqa = mysql_query("SELECT * FROM `peklowin` WHERE `ok`='lov' ");
($rowa=mysql_fetch_array($qiqa));
$qiqaq = mysql_query("SELECT * FROM `peklowin` WHERE `ok`='pvp' ");
($rowaa=mysql_fetch_array($qiqaq));
$qiqaqq = mysql_query("SELECT * FROM `peklowin` WHERE `ok`='pvpc' ");
($rowaaa=mysql_fetch_array($qiqaqq));
$date=date("d.m.y");
mysql_query("INSERT INTO `news` VALUES ('', 'Итоги еженедельного конкурса пекло', ' Победитель PK боев - ".$rowe[usr]." <br/>Победитель PVP боев - ".$rowaa[usr]." <br/> Охотник на монстров - ".$rowa[usr]." <br/> Враждующий член клана - ".$rowaaa[usr]." <br/>', '".$date."', 'ПИРАТ')") or die(mysql_error());
mysql_query("TRUNCATE TABLE peklo ") or die("Сука не пашет!");
///////////////////////////////////////////////олимпиада////////////////////////////////////////////////////////
$qi = mysql_query("SELECT * FROM `olimpiada` WHERE `kol`>'0' ORDER BY `kol` DESC ");
$avto=mysql_num_rows($qi);
while($row=mysql_fetch_array($qi))
{
$pob[] = $row[usr];
$kol[] = $row[kol];
}
$date=date("d.m.y");
mysql_query("INSERT INTO `news` VALUES ('', 'Олимпиада', 'Победителем олимпиады этой недели стал: <br/>1место - $pob[0] - 3 Coin of Luck ($kol[0] Медалей)<br/> 2место - $pob[1] - 20,000,000 Аден ($kol[1] Медалей)<br/> 3место - $pob[2] - 5,000,000 Аден ($kol[2] Медалей)', '".$date."' , 'John')") or die(mysql_error());
$udatasf=mysql_query("SELECT * FROM `users` WHERE `udata0`='$pob[0]'");
$udatasf= mysql_fetch_array($udatasf);
$udataf38=$udatasf['udata38'];
$udataf38=$udataf38+3;
mysql_query("UPDATE `users` SET `udata38`='$udataf38' WHERE `udata0`='$pob[0]'");
$udatasff=mysql_query("SELECT * FROM `users` WHERE `udata0`='$pob[1]'");
$udatasff= mysql_fetch_array($udatasff);
$udataff8=$udatasff['udata8'];
$udataff8=$udataff8+20000000;
mysql_query("UPDATE `users` SET `udata8`='$udataff8' WHERE `udata0`='$pob[1]'");
$udatasfff=mysql_query("SELECT * FROM `users` WHERE `udata0`='$pob[2]'");
$udatasfff= mysql_fetch_array($udatasfff);
$udatafff8=$udatasfff['udata8'];
$udatafff8=$udatafff8+5000000;
mysql_query("UPDATE `users` SET `udata8`='$udatafff8' WHERE `udata0`='$pob[2]'");
mysql_query("TRUNCATE TABLE olimpiada ") or die("Сука не пашет!");
///////////////////////////////////////////////7 печатий////////////////////////////////////////////////////////
$qi = mysql_query("SELECT * FROM `7pe4` WHERE `kol`>'0' ORDER BY `kol` DESC ");
$avto=mysql_num_rows($qi);
while($row=mysql_fetch_array($qi))
{
$pob7[] = $row[usr];
$kol7[] = $row[kol];
}
$date=date("d.m.y");
mysql_query("INSERT INTO `news` VALUES ('', 'Фестиваль Семь Печатей', 'Победителем Фестиваля Семи Печатей этой недели стал:<br/>
1место - $pob7[0] - 1,000 Античных Аден ($kol7[0] Gemstone)<br/>
2место - $pob7[1] - 500 Античных Аден ($kol7[1] Gemstone)<br/>
3место - $pob7[2] - 250 Античных Аден ($kol7[2] Gemstone)', '".$date."' , 'Священник')") or die(mysql_error());
$udatasf=mysql_query("SELECT * FROM `users` WHERE `udata0`='$pob7[0]'");
$udatasf= mysql_fetch_array($udatasf);
$udataf32=$udatasf['udata32'];
$udataf32=$udataf32+1000;
mysql_query("UPDATE `users` SET `udata32`='$udataf32' WHERE `udata0`='$pob7[0]'");
$udatasff=mysql_query("SELECT * FROM `users` WHERE `udata0`='$pob7[1]'");
$udatasff= mysql_fetch_array($udatasff);
$udataff32=$udatasff['udata32'];
$udataff32=$udataff32+500;
mysql_query("UPDATE `users` SET `udata32`='$udataff32' WHERE `udata0`='$pob7[1]'");
$udatasfff=mysql_query("SELECT * FROM `users` WHERE `udata0`='$pob7[2]'");
$udatasfff= mysql_fetch_array($udatasfff);
$udatafff32=$udatasfff['udata32'];
$udatafff32=$udatafff32+250;
mysql_query("UPDATE `users` SET `udata32`='$udatafff32' WHERE `udata0`='$pob7[2]'");
mysql_query("TRUNCATE TABLE 7pe4 ") or die("Сука не пашет!");
//////////////////////////////////////////рыболовы/////////////////////////////////////////////////
$qi = mysql_query("SELECT * FROM `eventfish` WHERE `kol`>'0' ORDER BY `kol` DESC ");
$avto=mysql_num_rows($qi);
while($row=mysql_fetch_array($qi))
{
$pob1[] = $row[usr];
$kol1[] = $row[kol];
}
$date=date("d.m.y");
mysql_query("INSERT INTO `news` VALUES ('', 'Евент Рыболова', 'Победителем Рыболовного Конкурса этой недели стал: <br/>1 место - $pob1[0] - 5 Coin of Luck ($kol1[0] Рыб) <br/> 2 место - $pob1[1] - 1 Coin of Luck ($kol1[1] Рыб) <br/> 3 место - $pob1[2] - 20,000,000 аден ($kol1[2] Рыб)', '".$date."' , 'Владимир')") or die(mysql_error());
$udatasf=mysql_query("SELECT * FROM `users` WHERE `udata0`='$pob1[0]'");
$udatasf= mysql_fetch_array($udatasf);
$udataf38=$udatasf['udata38'];
$udataf38=$udataf38+5;
mysql_query("UPDATE `users` SET `udata38`='$udataf38' WHERE `udata0`='$pob1[0]'");
$udatasff=mysql_query("SELECT * FROM `users` WHERE `udata0`='$pob1[1]'");
$udatasff= mysql_fetch_array($udatasff);
$udataff38=$udatasff['udata38'];
$udataff38=$udataff38+1;
mysql_query("UPDATE `users` SET `udata38`='$udataff38' WHERE `udata0`='$pob1[1]'");
$udatasfff=mysql_query("SELECT * FROM `users` WHERE `udata0`='$pob1[2]'");
$udatasfff= mysql_fetch_array($udatasfff);
$udatafff8=$udatasfff['udata8'];
$udatafff8=$udatafff8+20000000;
mysql_query("UPDATE `users` SET `udata8`='$udatafff8' WHERE `udata0`='$pob1[2]'");
mysql_query("TRUNCATE TABLE eventfish ") or die("Сука не пашет!");
mysql_query("DELETE FROM `item` WHERE `uda4`='Olimpiad Medal' ");
mysql_query("DELETE FROM `sklad` WHERE `uda4`='Olimpiad Medal' ");
//////////////////////////////////////////////////////////////////////////////////
?>