public static function current_user_allowed()
 {
     add::load_functions('network');
     if (current_ip_in_network()) {
         return true;
     } else {
         return false;
     }
 }
    $C->incs_dir = $C->root_dir . '/includes';
}
# Merge config declared class directories
$C->classes_dirs = array_merge(array($C->incs_dir . '/classes'), isset($C->classes_dirs) ? is_array($C->classes_dirs) ? $C->classes_dirs : (array) $C->classes_dirs : array(), array($C->add_dir . '/classes'));
# Set these rarely used directory variables
if (!isset($C->configs_dir)) {
    $C->configs_dir = $C->incs_dir . '/configs';
}
if (!isset($C->views_dir)) {
    $C->views_dir = $C->incs_dir . '/views';
}
if (!isset($C->caches_dir)) {
    $C->caches_dir = $C->incs_dir . '/caches';
}
# Load the common functions
add::load_functions('common');
# Just initialize the variables according to the environment status
add::environment_status(true);
/**
 * Set the exception emails
 *
 * @see http://code.google.com/p/add-mvc-framework/issues/detail?id=38
 *
 *
 */
if (isset($C->developer_emails)) {
    if (is_string($C->developer_emails)) {
        e_add::$email_addresses = $C->developer_emails;
    } else {
        if (is_object($C->developer_emails) || is_array($C->developer_emails)) {
            e_add::$email_addresses = implode(", ", (array) $C->developer_emails);
 /**
  * load the libraries
  *
  */
 public static function load_components()
 {
     add::load_functions('url');
 }
}
/**
 * void redirect_query(array $new_query,bool $merge_current=true)
 * redirects to the new query string, die()s in the process
 * @param array $new_query
 * @param boolean $merge_current true to include current $_GET with $new_query
 * @todo support string on $new_query
 * @uses redirect()
 *
 * @deprecated see add::redirect_query()
 */
function redirect_query($new_query, $merge_current = true)
{
    trigger_error("Deprecated redirect_query function", E_USER_DEPRECATED);
    add::redirect_query($new_query, $merge_current);
}
/**
 * salt_string($string,$salt = DEFAULT_SALT)
 * Salt a string $salt
 * @param string $string the string to salt
 * @param string $salt the secret salt
 */
function salt_string($string, $salt = DEFAULT_SALT)
{
    if (!defined('DEFAULT_SALT')) {
        throw new Exception("DEFAULT_SALT is not defined");
    }
    return sha1($string . $salt);
}
add::load_functions('network');