battles/magic/svitok2.php
2018-01-28 18:40:49 +02:00

32 lines
1005 B
PHP

<?php
session_start();
if ($_SESSION['uid'] == null) header("Location: index.php");
include "config.php";
include "functions.php";
if($user['align'] != 2.99) { header("Location: ../index.php"); }
$aaaa=$_POST['go'];
print "bbb=$aaaa";
if ($_POST['go']) {
$from=$_POST['from'];
$to=$_POST['to'];
$u = mysql_query("SELECT id FROM `users` WHERE `id` >= '$from' and `id` <= '$to' ;");
while ($us = mysql_fetch_array($u))
{
print "a=$i";
$i=$us['id'];
mysql_query("insert into `inventory` (name, duration, maxdur, cost, img, owner, magic, type, present, massa, otdel ) values ('Букет Подснежников','0','2','0','1marta_gift4.gif','".$i."','48','50','Администрация','1','6') ;");
}
}
?>
<form action="svitok1.php" method=POST>
от <input type=text name=from value=''>
до <input type=text name=to value=''>
<input type=hidden name=go value='1'>
<INPUT TYPE="submit" value="поехали" name="cp">
</form>