<?php
include_once("files/zag.php");
include_once("files/ini.php");
$polz=mysql_query("SELECT * FROM `users` WHERE `udata0`='$log' AND `udata1`='$pas' LIMIT 1");
if(mysql_num_rows($polz)==0){
header ("Location: index.php?error");
}else{
echo"Здраствуй! Я тебя обучу магии. Для того чтобы зучить магию ты должен получить профессию.<br/><br/>";
$dir = opendir ("data/mags");
while ($file = readdir ($dir))
{
if (( $file != ".") && ($file != ".."))
{ $file=str_replace(".dat","",$file);
$text = @file("data/mags/$file.dat");
$mag = explode("||",$text[0]);
$name=trim($mag[7]);
$lv=trim($mag[8]);
$mp=trim($mag[1]);
$udar=trim($mag[0]);
$prof=trim($mag[5]);
$info=trim($mag[6]);
$sp=trim($mag[2]);
if($udata33=="$prof"){
if($udata9>="$lv"){
echo"<a href=\"skill.php?&name=$file\">[$name] - $sp SP</a><br/>$info<br/>(Атака: $udar / MP: $mp)<br/>";
}}else
if($profa==$prof){
echo"<a href=\"skill.php?&name=$file\">[$name] - $sp SP</a><br/>$info<br/>(Атака: $udar / MP: $mp)<br/>";
}
}}
}
include_once"files/down.php";
?>