<? include('header.php'); ?>
<div class="menucenter">
<?$user=text($_SESSION["username"]);?>

        <table class='reyt' border="0" cellpadding="0" cellspacing="0" width="100%">
          <thead>
            <tr>
              <th></th>
              <th><b>Форум</b></th>
             
              <th><b>Сообщений</b></th>
              <th colspan='2'><b>Последнее сообщение</b></th>
            </tr>
          </thead>
             <thead style='background:#f5f5b5;'>
            <tr>
              <td colspan="6" style='color:#135b11; font:11px Tahoma; padding:4px; padding-left:15px;'>НОВОСТИ И ПРЕДЛОЖЕНИЯ</td>
            </tr>
          </thead>
          <tbody>

          <?
            $res_f=mysql_query("
            select *,
            (SELECT count(id) FROM forum where razdel=forum_tema.id and tema='1') as tem,
            (SELECT count(id) FROM forum where razdel=forum_tema.id and tema='0') as comm,
            (SELECT ogl FROM forum where razdel=forum_tema.id ORDER BY id  DESC limit 1) as end_comm,
            (SELECT data FROM forum where razdel=forum_tema.id ORDER BY id  DESC limit 1) as end_date,
            (SELECT user FROM forum where razdel=forum_tema.id ORDER BY id  DESC limit 1) as end_user
            from forum_tema where user='admin' and razdel='1'
            ");
            while ($row = mysql_fetch_assoc($res_f)){?>
            <tr>
              <td style='width:40px; height:45px;'><img src='images/groupe.png' style='padding-left:5px; padding-right:5px;'></td>
              <td width="480">
                <a class='tems' href="forum1.php?ad=<?=$row["id"]?>"><?=$row["ogl"]?></a>
                <div style='font:11px Tahoma; color:#89a688;'><?=$row["text"]?></div>
              </td>
             
              <td align="center" style='background-color:#f8f7ee; font:11px Tahoma;'><?=$row["comm"]?></td>
              <td width="280" align="center" style='padding-left:10px;'>
                <div style='font:bold 11px Tahoma; padding-bottom:1px; padding-top:5px;'><?=$row["end_comm"]?></div>
                <div style='color:#6ba816; font:11px Tahoma; padding-bottom:1px;'><?=$row["end_date"]?></div>
                </td>
<td width="150"  align='left' style='padding-left:10px;'>
<div style='font:11px Tahoma; color:#89a688; padding-bottom:2px;'><b>
       <?if($row["end_user"]=='admin' or $row["end_user"]=='porezon') {  echo 'Администрация'; }else{ echo $row["end_user"]; }?></b></div>
              </td>
            </tr>

		   <?}?>

             <thead style='background:#f5f5b5;'>
            <tr>
              <td colspan="6" style='color:#135b11; font:11px Tahoma; padding:4px; padding-left:15px;'>ТЕХНИЧЕСКИЕ ВОПРОСЫ</td>
            </tr>
          </thead>

<?
            $res_f=mysql_query("
            select *,
            (SELECT count(id) FROM forum where razdel=forum_tema.id and tema='1') as tem,
            (SELECT count(id) FROM forum where razdel=forum_tema.id and tema='0') as comm,
            (SELECT ogl FROM forum where razdel=forum_tema.id ORDER BY id  DESC limit 1) as end_comm,
            (SELECT data FROM forum where razdel=forum_tema.id ORDER BY id  DESC limit 1) as end_date,
            (SELECT user FROM forum where razdel=forum_tema.id ORDER BY id  DESC limit 1) as end_user
            from forum_tema where user='admin' and razdel='2'
            ");
            while ($row = mysql_fetch_assoc($res_f)){?>
            <tr>
              <td style='width:40px; height:45px;'><img src='images/groupe.png' style='padding-left:5px; padding-right:5px;'></td>
              <td width="480">
                <a class='tems' href="forum1.php?ad=<?=$row["id"]?>"><?=$row["ogl"]?></a>
                <div style='font:11px Tahoma; color:#89a688;'><?=$row["text"]?></div>
              </td>
              <td align="center" style='background-color:#f8f7ee; font:11px Tahoma;'><?=$row["comm"]?></td>
              <td width="280" align="center" style='padding-left:10px;'>
                <div style='font:bold 11px Tahoma; padding-bottom:1px; padding-top:5px;'><?=$row["end_comm"]?></div>
                <div style='color:#6ba816; font:11px Tahoma; padding-bottom:1px;'><?=$row["end_date"]?></div>
                </td>
<td width="150"  align='left' style='padding-left:10px;'>
<div style='font:11px Tahoma; color:#89a688; padding-bottom:2px;'><b>
       <?if($row["end_user"]=='admin' or $row["end_user"]=='porezon') {  echo 'Администрация'; }else{ echo $row["end_user"]; }?></b></div>
              </td>
            </tr>

		   <?}?>


             <thead style='background:#f5f5b5;'>
            <tr>
              <td colspan="6" style='color:#135b11; font:11px Tahoma; padding:4px; padding-left:15px;'>ОБЩЕНИЕ</td>
            </tr>
          </thead>



            <?
            $res_f=mysql_query("
            select *,
            (SELECT count(id) FROM forum where razdel=forum_tema.id and tema='1') as tem,
            (SELECT count(id) FROM forum where razdel=forum_tema.id and tema='0') as comm,
            (SELECT ogl FROM forum where razdel=forum_tema.id ORDER BY id  DESC limit 1) as end_comm,
            (SELECT data FROM forum where razdel=forum_tema.id ORDER BY id  DESC limit 1) as end_date,
            (SELECT user FROM forum where razdel=forum_tema.id ORDER BY id  DESC limit 1) as end_user
            from forum_tema where user='admin' and razdel='3'
            ");
            while ($row = mysql_fetch_assoc($res_f)){?>
            <tr>
              <td style='width:40px; height:45px;'><img src='images/groupe.png' style='padding-left:5px; padding-right:5px;'></td>
              <td width="480">
                <a class='tems' href="forum1.php?ad=<?=$row["id"]?>"><?=$row["ogl"]?></a>
                <div style='font:11px Tahoma; color:#89a688;'><?=$row["text"]?></div>
              </td>
          
              <td align="center" style='background-color:#f8f7ee; font:11px Tahoma;'><?=$row["comm"]?></td>
              <td width="280" align="center" style='padding-left:10px;'>
                <div style='font:bold 11px Tahoma; padding-bottom:1px; padding-top:5px;'><?=$row["end_comm"]?></div>
                <div style='color:#6ba816; font:11px Tahoma; padding-bottom:1px;'><?=$row["end_date"]?></div>
                </td>
<td width="150"  align='left' style='padding-left:10px;'>
<div style='font:11px Tahoma; color:#89a688; padding-bottom:2px;'><b>
       <?if($row["end_user"]=='admin' or $row["end_user"]=='porezon') {  echo 'Администрация'; }else{ echo $row["end_user"]; }?></b></div>
              </td>
            </tr>

		   <?}?>
          </tbody>
        </table>
<br>
<div class="logforum">

<center><big>Правила форума:</big></b3></center>
<font color="#009933">На форуме разрешено:</font> общение, помощь другим пользователям, помощь проекту.<br>
<font color="#FF0000">На форуме запрещено:</font> флуд, оскобрление других пользователей, реклама, создание похожих тем.

<br><br><center>
Если <b>Mодератор</b> заметел нарушение, он должен удалить тему/сообщение с нарушением. А нарушителя предупредить о том, что за вторым нарушением последует полный бан на форуме.
<br><br>
Если пользователь нарушает правила неоднократно, <b>Модератор</b> должен заблокировать его.</center>
<br><br>
<center>
Подробнее о правилах можно узнать в разделе: Правила форума.
</center>
</div>
<?include('footer.php');?>


