Файл: usersreload.php
Строк: 30
<?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");
echo'<div class="p">Ошибка! Пользователь с таким логином и паролем не зарегистрирован, или пароль/логин неверен! <a href="index.php">На главную</a><br>';exit;
}else{
$req = mysql_query("SELECT * FROM `users` WHERE `udata33` = '' ");
while($r = mysql_fetch_array($req)){
if($r[udata26]=="ork" and $r[udata27]=="wizard"){
$udata33="Адепт";
mysql_query("UPDATE `users` SET `udata33`='$udata33' WHERE `udata26`='ork' AND `udata27`='wizard' AND `udata33`='' ");
}
if($r[udata26]=="human" and $r[udata27]=="fighert"){
$udata33="Воин";
mysql_query("UPDATE `users` SET `udata33`='$udata33' WHERE `udata26`='human' AND `udata27`='fighert' AND `udata33`='' ");
}
if($r[udata26]=="ork" and $r[udata27]=="fighert"){
$udata33="Орк Боец";
mysql_query("UPDATE `users` SET `udata33`='$udata33' WHERE `udata26`='ork' AND `udata27`='fighert' AND `udata33`='' ");
}
if($r[udata26]=="human" and $r[udata27]=="wizard"){
$udata33="Мистик";
mysql_query("UPDATE `users` SET `udata33`='$udata33' WHERE `udata26`='human' AND `udata27`='wizard' AND `udata33`='' ");
}
if($r[udata26]=="kamael" and $r[udata27]=="fighert"){
$udata33="Грешник";
mysql_query("UPDATE `users` SET `udata33`='$udata33' WHERE `udata26`='kamael' AND `udata27`='fighert' AND `udata33`='' ");
}
if($r[udata26]=="gnom" and $r[udata27]=="fighert"){
$udata33="Подмастерье";
mysql_query("UPDATE `users` SET `udata33`='$udata33' WHERE `udata26`='gnom' AND `udata27`='fighert' AND `udata33`='' ");
}
if($r[udata26]=="elf" and $r[udata27]=="fighert"){
$udata33="Светлый воин";
mysql_query("UPDATE `users` SET `udata33`='$udata33' WHERE `udata26`='elf' AND `udata27`='fighert' AND `udata33`='' ");
}
if($r[udata26]=="elf" and $r[udata27]=="wizard"){
$udata33="Светлый мистик";
mysql_query("UPDATE `users` SET `udata33`='$udata33' WHERE `udata26`='elf' AND `udata27`='wizard' AND `udata33`='' ");
}
if($r[udata26]=="darkelf" and $r[udata27]=="wizard"){
$udata33="Темный мистик";
mysql_query("UPDATE `users` SET `udata33`='$udata33' WHERE `udata26`='darkelf' AND `udata27`='wizard' AND `udata33`='' ");
}
if($r[udata26]=="darkelf" and $r[udata27]=="fighert"){
$udata33="Темный воин";
mysql_query("UPDATE `users` SET `udata33`='$udata33' WHERE `udata26`='darkelf' AND `udata27`='fighert' AND `udata33`='' ");
}
}
$req = mysql_query("SELECT * FROM `users` WHERE `udata33` = '' ");
$r = mysql_num_rows($req);
echo"Готово) $r осталось";
}
include_once"files/down.php";
?>