}
else if($db["orden"]==1 && $db["admin_level"]>=10){
$S="select * from characters where login='$target'";
$q=mysql_query($S);
$res=mysql_fetch_array($q);
if(!$res){
print "Персонаж
$target не найден в базе данных.";
die();
}
$sql = "INSERT INTO inv(owner,object_id,object_type,object_razdel,gift,wear,gift_author) VALUES('$target','$orden_num','medal','thing','1','0','$login')";
$result = mysql_query($sql);
$pref=$db["sex"];
if($pref=="female"){
$prefix="а";
}
else{
$prefix="";
}
$d=date("d.m.y H:i");
$city = $db["city_game"];
$time = time();
$room = $db["room"];
$masseg= "
Паладин "$login" наградил$prefix персонажа "$target" орденом.";
mysql_query("INSERT INTO chat(date,name,room,msg,class,date_stamp,city) VALUES('$d','','$room','$masseg','sys','$time','$city')");
print "Персонаж награжден.";
}
?>