Файл: LinkUser/LinkUhod.php
Строк: 187
<?php
/**
* @author Mystyle
* @copyright 2013
*/
if(isset($_GET['LinkVet1'])){
if($user['vet1'] == 100){
header("Location: ?LinkUhod");
exit;
}else{
$need=vet($user['vet1']);
if($user['money']>=$need){
$re = 5;
$res = 6;
$rating = rand(1,10)*$user['level'];
update_ruby('money',$need);
update_vet('vet1',$re);
update_vet('vets1',$res);
update_vet('faith',$res);
update_user('rating',$rating);
if($ver10['col2'] == $ver10['col']){
mysql_query("UPDATE `mystyle_zadaniya_user` SET `type` = 'yes' WHERE `limit` = '10' AND `user` = '".$user['id']."'");
}else{
$stc = 1;
mysql_query("UPDATE `mystyle_zadaniya_user` SET `col2` = '".($ver10['col2']+1)."' WHERE `limit` = '10' AND `user` = '".$user['id']."'");
}
if($ver11['col2'] == $ver11['col']){
mysql_query("UPDATE `mystyle_zadaniya_user` SET `type` = 'yes' WHERE `limit` = '11' AND `user` = '".$user['id']."'");
}else{
$stc = 1;
mysql_query("UPDATE `mystyle_zadaniya_user` SET `col2` = '".($ver11['col2']+$stc)."' WHERE `limit` = '11' AND `user` = '".$user['id']."'");
}
header("Location: ?LinkUhod");
exit;
}else{
err_money($need-$user['money']);
}
}
}
if(isset($_GET['LinkVet2'])){
if($user['vet2'] == 100){
header("Location: ?LinkUhod");
exit;
}else{
$need=vet($user['vet2']);
if($user['money']>=$need){
$re = 5;
$res = 6;
$rating = rand(1,10)*$user['level'];
update_ruby('money',$need);
update_vet('vet2',$re);
update_vet('vets2',$res);
update_vet('faith',$res);
update_user('rating',$rating);
if($ver10['col2'] == $ver10['col']){
mysql_query("UPDATE `mystyle_zadaniya_user` SET `type` = 'yes' WHERE `limit` = '10' AND `user` = '".$user['id']."'");
}else{
$stc = 1;
mysql_query("UPDATE `mystyle_zadaniya_user` SET `col2` = '".($ver10['col2']+1)."' WHERE `limit` = '10' AND `user` = '".$user['id']."'");
}
if($ver11['col2'] == $ver11['col']){
mysql_query("UPDATE `mystyle_zadaniya_user` SET `type` = 'yes' WHERE `limit` = '11' AND `user` = '".$user['id']."'");
}else{
$stc = 1;
mysql_query("UPDATE `mystyle_zadaniya_user` SET `col2` = '".($ver11['col2']+$stc)."' WHERE `limit` = '11' AND `user` = '".$user['id']."'");
}
header("Location: ?LinkUhod");
exit;
}else{
err_money($need-$user['money']);
}
}
}
if(isset($_GET['LinkVet3'])){
if($user['vet3'] == 100){
header("Location: ?LinkUhod");
exit;
}else{
$need=vet($user['vet3']);
if($user['money']>=$need){
$re = 5;
$res = 6;
$rating = rand(1,10)*$user['level'];
update_ruby('money',$need);
update_vet('vet3',$re);
update_vet('vets3',$res);
update_vet('faith',$res);
update_user('rating',$rating);
if($ver10['col2'] == $ver10['col']){
mysql_query("UPDATE `mystyle_zadaniya_user` SET `type` = 'yes' WHERE `limit` = '10' AND `user` = '".$user['id']."'");
}else{
$stc = 1;
mysql_query("UPDATE `mystyle_zadaniya_user` SET `col2` = '".($ver10['col2']+1)."' WHERE `limit` = '10' AND `user` = '".$user['id']."'");
}
if($ver11['col2'] == $ver11['col']){
mysql_query("UPDATE `mystyle_zadaniya_user` SET `type` = 'yes' WHERE `limit` = '11' AND `user` = '".$user['id']."'");
}else{
$stc = 1;
mysql_query("UPDATE `mystyle_zadaniya_user` SET `col2` = '".($ver11['col2']+$stc)."' WHERE `limit` = '11' AND `user` = '".$user['id']."'");
}
header("Location: ?LinkUhod");
exit;
}else{
err_money($need-$user['money']);
}
}
}
$vet1 = $user['vet1']*100/100;
$vet2 = $user['vet2']*100/100;
$vet3 = $user['vet3']*100/100;
echo '<ul><li style="border: 1px solid #005f8a; margin: 4px 0; border-radius: 4px;"><div style="padding: 4px;"><div>';
echo '<div class="pt6 fff"><img class="portrait" height="48" width="48" alt="o" src="images/training/veterinar.png"><div>';
echo '<span style="font-weight: bold;">Купола</span><span class="fr"><span class="faith nobr textshadow"><img width="16" height="16" src="images/icons/faith.png" alt="авторитет" title="авторитет"> <span>'.$user['vets1'].'</span></span></span></div>';
echo '<br/>';
echo '<span></span></div><div style="clear: both;"></div><div class="pt6">';
echo '<div><div class="expBorder"><div class="expline" style="width:'.$vet1.'%;"></div>';
echo '</div></div></div></div></div>';
if($user['vet1'] == 100){}else{
echo '<a class="btnwom" href="?LinkUhod&LinkVet1"><img src="images/icons/tick.png"/><span class="fr"><span class="money nobr textshadow"><img width="16" height="16" src="images/icons/coins.png" alt=""/> <span class="required">'.vet($user['vet1']).'</span></span></span>Наколоть</a>';
}
echo '</li><li style="border: 1px solid #005f8a; margin: 4px 0; border-radius: 4px;"><div style="padding: 4px;"><div>';
echo '<div class="pt6 fff"><img class="portrait" height="48" width="48" alt="o" src="images/training/salon.png"><div>';
echo '<span style="font-weight: bold;">Тигр</span><span class="fr">';
echo '<span class="faith nobr textshadow"><img width="16" height="16" src="images/icons/faith.png" alt="авторитет" title="авторитет"> <span>'.$user['vets2'].'</span></span></span></div>';
echo '<br/><span></span>';
echo '</div><div style="clear: both;"></div>';
echo '<div class="pt6"><div>';
echo '<div class="expBorder"><div class="expline" style="width:'.$vet2.'%;"></div>';
echo '</div></div></div></div></div>';
if($user['vet2'] == 100){}else{
echo '<a class="btnwom" href="?LinkUhod&LinkVet2"><img src="images/icons/tick.png"/><span class="fr"><span class="money nobr textshadow"><img width="16" height="16" src="images/icons/coins.png" alt=""/> <span class="required">'.vet($user['vet2']).'</span></span></span>Наколоть</a>';
}
echo '</li><li style="border: 1px solid #005f8a; margin: 4px 0; border-radius: 4px;"><div style="padding: 4px;"><div>';
echo '<div class="pt6 fff"><img class="portrait" height="48" width="48" alt="o" src="images/training/sport.png"><div>';
echo '<span style="font-weight: bold;">Орел</span><span class="fr">';
echo '<span class="faith nobr textshadow"><img width="16" height="16" src="images/icons/faith.png" alt="авторитет" title="авторитет"> <span>'.$user['vets3'].'</span></span></span></div>';
echo '<br/><span></span>';
echo '</div><div style="clear: both;"></div>';
echo '<div class="pt6"><div>';
echo '<div class="expBorder"><div class="expline" style="width:'.$vet3.'%;"></div>';
echo '</div></div></div></div></div>';
if($user['vet3'] == 100){}else{
echo '<a class="btnwom" href="?LinkUhod&LinkVet3"><img src="images/icons/tick.png"/><span class="fr"><span class="money nobr textshadow"><img width="16" height="16" src="images/icons/coins.png" alt=""/> <span class="required">'.vet($user['vet3']).'</span></span></span>Наколоть</a>';
}
echo '</li><li>';
echo '</li><li></li></ul>';
echo '<div class="frame">Каждая наколка дает тебе <span><span class="faith nobr textshadow"><img width="16" height="16" src="images/icons/faith.png" alt="авторитет" title="авторитет"> <span>6</span></span></span></div>';
echo '<div><a class="btn" href="index.php"><img width="16" height="16" src="images/icons/left.png" alt="o"/>Назад</a></div>';
?>