Файл: waphero.ru/core/mana_health.php
Строк: 8
<?
$now = new Date();
$now.setTime((now.getTime()+now.getTimezoneOffset()*60*1000)+(3*60*60*1000));
$date = $now.getHours();
if($date == 1){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 2){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 3){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 4){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 5){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 6){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 7){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 8){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 9){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 10){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 11){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 12){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 13){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 14){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 15){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 16){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 17){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 18){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 19){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 20){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 21){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 22){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 23){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
if($date == 0){
mysql_query("update `user` set `health` = '".$user['max_health']."' WHERE `id` = '".$user['id']."' LIMIT 1");
}
?>