<?php

function error_page($e_message,$type) {
#       include('includes/site_config.php');
        global $Sess_UserId;
        global $Sess_UserType;
        global $Sess_Userlevel;
		global $CONST_TABLE_WIDTH;
	global $CONST_TABLE_CELLSPACING;
	global $CONST_TABLE_CELLPADDING;
    global $SITE_ROOT;
    global $SITE_WWW_ROOT;
    global $CONST_IMAGE_LANG;
    global $link;
	global $TEMPLATE_AFFILIATES;
	global $TEMPLATE_CONTACT;
	global $TEMPLATE_PRIVACY;
	global $TEMPLATE_DISCLAIMER;
	global $TEMPLATE_ABOUTUS;
	global $TEMPLATE_HOME;
	global $TEMPLATE_LOGOUT;
	global $TEMPLATE_SHOPPING;
	global $TEMPLATE_MAILBOX;
	global $TEMPLATE_PROFILE;
	global $TEMPLATE_HOTLIST;
	global $TEMPLATE_INFO;
	global $TEMPLATE_REG3;
	global $TEMPLATE_LOG3;
	global $TEMPLATE_LOST2;
	global $TEMPLATE_SEARCH2;

/*
        # retrieve the template
        $query="SELECT * FROM templates WHERE tpl_description='Member Area'";
        $retval=mysql_query($query,$link) or die(mysql_error());
        $template = mysql_fetch_object($retval);
        $sess_id="PHPSESSID=".session_id(); if (get_magic_quotes_gpc()==0) $template->tpl_header=addslashes($template->tpl_header); eval("\$template->tpl_header=\"$template->tpl_header\";"); print(stripslashes($template->tpl_header));
        print ("<table width='$CONST_TABLE_WIDTH' border='0' cellspacing='$CONST_TABLE_CELLSPACING' cellpadding='$CONST_TABLE_CELLPADDING'>
    <tr> 
      <td class='pageheader'>".ERROR_SECTION_NAME."</td>
    </tr>
    <tr> 
      <td><span class='error'>$type</span> 
	  <p></p>
        <p><b>$e_message</b></p>
        <p>".ERROR_TEXT."</td>
    </tr>
  </table>");

 if (get_magic_quotes_gpc()==0) $template->tpl_footer=addslashes($template->tpl_footer); eval("\$template->tpl_footer=\"$template->tpl_footer\";"); print(stripslashes($template->tpl_footer));
        mysql_close($link);
        exit;
		*/
}
?>