Размер файла: 764B
- <?php
- include 'inc/db.php';
- include 'inc/1.php';
- if (($user['admin']<1) && ($user['moder']<1)){header("Location: /index.php"); exit;}
- $irw=intval($_GET['id']);
- if (!$_GET['id']){header("Location: /index.php"); exit;}
- $a=mysql_query("SELECT * FROM `forum_t` WHERE `razdel` = '0'");
- $b=1;
- $count=0;
- while ($f=mysql_fetch_assoc($a)){
- $o=($b%2);
- $d=mysql_query("SELECT * FROM `forum_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='fokr.php?to=$yo[id]&id=$irw'>".htmlspecialchars($yo['name'])."</a></div>";}
- $b++;
- }
- echo "<div class='p0'><a href='newr.php?id=0'>Новый раздел</a></div>";
- include_once 'inc/foot.php';
- ?>