<?php
/**
* @author:  Bunzia Alexander <nifus@mail.ru> <http://www.weblancer.net/users/nifus/>
* @copyright: Copyright (c) 2010, Bunzia Alexander
* @version: 1.0
* @license: http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/



if ( !defined("inc_system_users_menu") ){
  define("inc_system_users_menu", 1);
  
  /**
  * Формируем пользовательское меню модуля
  *
  * @return: array 
  */
  function users_menu(){
    include_once(MAIN_SOURCE_PATH.'/modules/users/inc/url.php');
    include_once(MAIN_SOURCE_PATH.'/modules/users/lang/'.MAIN_LANG.'/blocks.php');
    $menu[] = array('url'=>URL_USERS_CONTROL_MEMBERS ,'title' => B_USER_NAME_MODULE);
    //$menu[] = array('url'=> URL_USERS_CONTROL_CONFIG, 'title'=>B_USER_CONTROL_CONFIG);
   // $menu[] = array('url'=> URL_USERS_CONTROL_RANG,  'title'=>B_USER_CONTROL_RANK);
  // $menu[] = array('url'=> URL_USERS_CONTROL_GROUPS,  'title'=>B_USER_CONTROL_GROUP);
    //$menu[] = array('url'=> URL_USERS_CONTROL_POINTS,  'title'=>B_USER_CONTROL_POINTS);
    $menu[] = array('url'=> URL_USERS_CONTROL_MEMBERS,  'title'=>B_USER_CONTROL_MEMBERS);
    return $menu;
  }
  
  
  /**
  * Для события admin_event_htaccess
  *
  */
  function users_htaccess(){
    return array(
      '#^'.MAIN_DIR.'admin/$#i' => array( 'p_name'=>'users_admin_login','act'=>'admin_login' ),
      '#^'.MAIN_DIR.'admin.html$#i' => array( 'p_name'=>'users_admin_login','act'=>'admin_login' ),
      '#^'.MAIN_DIR.'register.html$#i' => array( 'p_name'=>'users_register','act'=>'form' ),
      '#^'.MAIN_DIR.'exit.html$#i' => array( 'p_name'=>'users_profile','act'=>'logout' ),
      '#^'.MAIN_DIR.'profile/([0-9]*)$#i' => array( 'p_name'=>'users_profile','act'=>'profile','uid'=>'$1' ),
      '#^'.MAIN_DIR.'forget.html$#i' => array( 'p_name'=>'users_profile','act'=>'forget_form' ),
   
      //'#^/register.html$#i' => array( 'p_name'=>'users_register','act'=>'form' ),
    );
    
     
  }
}
?>
