<?php

/**
 * @package     JohnCMS
 * @link        http://johncms.com
 * @copyright   Copyright (C) 2008-2011 JohnCMS Community
 * @license     LICENSE.txt (see attached file)
 * @version     VERSION.txt (see attached file)
 * @author      http://johncms.com/about
 */
defined('_IN_JOHNCMS') or die('Error: restricted access');
?>

<div class="soc">
<h2 style="text-align:center;">    
<!-- uSocial -->
<script async src="https://usocial.pro/usocial/usocial.js?v=6.1.3.1" data-script="usocial" charset="utf-8"></script>
<div class="uSocial-Share" data-pid="9cbf6f6b2f375a8ac353c3abd80992e9" data-type="share" data-options="round-rect,style1,default,absolute,horizontal,size32,eachCounter1,counter0" data-social="vk,ok,fb,gPlus,mail,twi" data-mobile="vi,wa,telegram"></div>
<!-- /uSocial -->
</div>
<?
// Рекламный блок сайта
echo '
<div class="phdr">Реклама</a></div>'; 
if (!empty($cms_ads[2])) {
    
    echo '<div class="gmenu">'. $cms_ads[2] . '</div>';
 
}
?>
<br>
</div>


    <div class="col-lg-3 col-md-3 hidden-sm hidden-xs" style="padding-left: 0;">
        	<div class="sidebar">
        	  <?
			 if (!$user_id) {
			  echo '
			  <div class="phdr">Авторизация</div>
			  <div class="gmenu"><form action="login.php" method="post"><p>' . $lng['login_name'] . ':<br/>' .
            '<input type="text" class="form-control" name="n" value="' . htmlentities($user_login, ENT_QUOTES, 'UTF-8') . '" maxlength="20"/>' .
            '<br/>' . $lng['password'] . ':<br/>' .
            '<input type="password" class="form-control" name="p" maxlength="20"/></p>' .
            '<p><input class="btn btn-default center-block" style="width:100%" type="submit" value="' . $lng['login'] . '"/></p>' .
            '</form>';
			echo '<form action="registration.php" method="post"><input class="btn btn-default center-block" style="width:100%" type="submit"  value="' . $lng['registration'] . '"></div><br />';
			  } else {
				  
				  }
			    ?>  <div class="phdr">Активисты форума</div>
             <?
			function get_top($order = 'postforum') {
    $req = mysql_query("SELECT * FROM `users` WHERE `$order` > 0 ORDER BY `$order` DESC LIMIT 9");

    if (mysql_num_rows($req)) {
        $out = '';
        while ($res = mysql_fetch_assoc($req)) {
            $out .= $i % 2 ? '<div class="list1">':'<div class="list1">'  ;
            $out .= functions::display_user($res, array ('header' => ('<tr><span class="badge" style = "float:right!important; margin-top: 1px">' . $res[$order]) . '</span>')) . '</div>';
            ++$i;
        }
        return $out;
    } else {
        return '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
    }
}

	     echo get_top('postforum');


	
	
             ?>
             <br />
             <div class="menu"><i class="fa fa-users" aria-hidden="true"></i> <a href="/users/index.php?act=userlist">Пользователи</a></div>
<div class="menu"><i class="fa fa-rss" aria-hidden="true"></i> <a href="/news">Новости сайта</a></div>
            </div>
        </div>
   
     </div></div><div class="clear"></div>
  <footer class="footer">
	© <a href="/"><?=$set['copyright']?></a>  2017
     <a href="/users/index.php?act=online" class="online_link" style="float:right;"><span class="pull-right"><?=counters::online()?></span></a>




</footer>
<?

// Счетчики каталогов
echo '<div class="foot">';
functions::display_counters();
echo '
</div>';
// Рекламный блок сайта
if (!empty($cms_ads[3])) {
     echo '<div class="gmenu"><br />' . $cms_ads[3];
echo '
</div>'; 
}

echo '</body></html>';