Location: PHPKode > projects > Blandware AtLeap Lite - CMS on PHP > atleaplite/include/constants.php
<?php
/*
 *  Copyright 2008 Blandware (http://www.blandware.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

/**
 * Here some system constants are defined.
 *
 * @package     AtleapLite
 * @author      Roman Puchkovskiy
 * @license     http://www.apache.org/licenses/LICENSE-2.0  Apache License, Version 2.0
 */

// Auth constants

/**
 * Auth is OK, session restored
 */
define('TAUTH_OK',                    0);
/**
 * Auth is OK, new session is created
 */
define('TAUTH_FIRST_TIME',            1);
/**
 * Login does not match password
 */
define('TAUTH_BAD_LOGIN_OR_PASSWORD', 2);
/**
 * Session exists but it's expired
 */
define('TAUTH_SESSION_EXPIRED',       3);

// Resource types

/**
 * Resource type 'file' (stands for resource which has no particular type)
 */
define('RESOURCE_TYPE_FILE', 0);
/**
 * Resource type 'image'
 */
define('RESOURCE_TYPE_IMAGE', 1);
/**
 * Resource type 'document' (currently not used)
 */
define('RESOURCE_TYPE_DOCUMENT', 2);

// Validation constants

/**
 * Minimum length of password
 */
define('MIN_PWD_LEN', 6);

/**
 * Regex for phone fields (for validation)
 */
define('PHONE_REGEX', '/^(\d|[\+\-\(\)\ ])+$/');

// Misc constants (mostly relate to paths and URL rewriting)

/**
 * Name of main script (which is entry point)
 */
define('SCRIPT_BASE', 'index.php');

/**
 * Prefix for URLs to be rewritten
 */
define('RW_PREFIX', "rw/");
/**
 * Postfix for URLs to be rewritten
 */
define('RW_POSTFIX', ".html");
/**
 * Prefix for URLs that address to pages
 */
define('PAGE_PREFIX', "page/");
/**
 * Prefix for URLs that address to news archive
 */
define('NEWS_ARCHIVE_PREFIX', "news/archive");
/**
 * Prefix for URLs that address to list of resources
 */
define('RESOURCES_PREFIX', "resources");
/**
 * Prefix for URLs that address to resources
 */
define('RESOURCE_PREFIX', "resource/");
/**
 * Prefix for URLs that address to categories
 */
define('CATEGORY_PREFIX', "category");
/**
 * Prefix for URLs that address to commodities
 */
define('COMMODITY_PREFIX', "commodity");

/**
 * Name of GET parameter that represents number of page shown by pager
 */
define('PAGE_ID_VAR', 'pageID');

?>
Return current item: Blandware AtLeap Lite - CMS on PHP