<?

//function _page($href) { $page=$_SESSION['pages_system']->get_page_content($href) ; if ($page['pkey']) $_SESSION['pages_system']->show_page_content($page)  ;}



function _send_mail_to_pattern($to,$pattern,$vars=array(),$options=array()) { if (is_object($_SESSION['mail_system'])) return($_SESSION['mail_system']->send_mail_to_pattern($to,$pattern,$vars,$options)) ; else return(null);}

//function _banner($id,$options=array()) { return($_SESSION['ban_system']->place_banner($id,$options)) ;  }
//function _banner_list($id,$template_name,$options=array()) { return($_SESSION['ban_system']->show_list_items($id,$template_name,$options)) ;  }

//function _BANNER_SYSTEM(){return($_SESSION['ban_system']);}

//function _list($list_name,$id,$fname='obj_name') {return($_SESSION[$list_name][$id][$fname]);}

function _event_reg($name,$comment='',$reffer='',$links_1='',$links_2='',$links_3='',$links_4='',$links_5='',$links_6='',$links_7='',$links_8='',$links_9='',$links_10='')
{  //if (is_array($name)) { $comment=$name['comment'] ; $reffer=$name['reffer'] ; $name=$name['obj_name'] ; }
   //if (is_object($_SESSION['events_system'])) return($_SESSION['events_system']->reg($name,$comment,$reffer,$links_1,$links_2,$links_3,$links_4,$links_5,$links_6,$links_7,$links_8,$links_9,$links_10)) ;
   //else return(0);
}

function _event_comment($id,$text,$options=array())
{  //if (is_object($_SESSION['events_system'])) return($_SESSION['events_system']->add_event_comment($id,$text,$options)) ;
   //else return(0);
}

function _DOT($id)
{ if (!isset($_SESSION['descr_obj_tables'][$id])) $id=$_SESSION['pkey_by_table'][$id] ;
  if ($id and isset($_SESSION['descr_obj_tables'][$id])) return($_SESSION['descr_obj_tables'][$id]) ;
  else                                           return(null) ;
}

function _CUR_PAGE()
{ if (is_object($GLOBALS['_CUR_PAGE'])) return($GLOBALS['_CUR_PAGE']) ;
  else                                  return(null) ;
}

function _table_id($table_name) {return($_SESSION['pkey_by_table'][$table_name]);}




?>