File size: 658B
<?php
include 'inc/db.php';
include 'inc/1.php';
if ($user['admin']<1){header("Location: /index.php"); exit;}
$irw=intval($_GET['id']);
if (!$_GET['id']){header("Location: /index.php"); exit;}
$a=mysql_query("SELECT * FROM `obmen_t` WHERE `razdel` = '0'");
$b=1;
$count=0;
while ($f=mysql_fetch_assoc($a)){
$o=($b%2);
$d=mysql_query("SELECT * FROM `obmen_t` WHERE `razdel` = '$f[id]'");
echo "<div class='p$o'>- ".htmlspecialchars($f['name'])."</div>";
while ($yo=mysql_fetch_assoc($d)){
echo "<div class='input'>- <a href='ofokr.php?to=$yo[id]&id=$irw'>".htmlspecialchars($yo['name'])."</a></div>";}
$b++;
}
include_once 'inc/foot.php';
?>