<?php
//****************************************************************************
//
// Copyright (C) 2001 Eric SEIGNE <hide@address.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
//****************************************************************************
//
// For more informations, get to the project's main source file.
//
// Description Main configuration file.
//
//****************************************************************************
if(!defined("__config_php__")):
define("__config_php__", "1");
//----------------------------------------------------------------------------
// constants
//----------------------------------------------------------------------------
define("PROG_NAME", "Bradabra");
define("PROG_VER", "2.0.5 beta");
define("PROG_TITLE", PROG_NAME." v".PROG_VER);
define("PROG_WEB", "http://bradabra.sourceforge.net/");
define("CREATOR_NAME", "Eric SEIGNE");
define("CREATOR_EMAIL", "hide@address.com");
define("CREATOR_WEB", "http://www.rycks.com/");
define("COOKIENAME_LOGIN", PROG_NAME."_cookie_login");
define("COOKIENAME_SID", PROG_NAME."_cookie_sid");
define("FORMS_ENCTYPE", "application/x-www-form-urlencoded");
define("REGEXP_NEWLINE", "\r\n|\n|\r");
define("DIR_ARCHIVES", "archives");
define("DIR_IMAGES", "images");
define("ARCHIVEPREFIX_INVOICE", "F");
define("ARCHIVEPREFIX_QUOTATION", "D");
define("ARCHIVESUFFIXLEN", "5");
define("IMG_BACK", "obj_back.gif");
define("IMG_DIR", "obj_dir.gif");
define("IMG_FILE", "obj_file.gif");
define("IMG_HTML", "obj_html.gif");
define("IMG_LINK", "obj_link.gif");
define("IMG_PROGLOGO", "bradabra.gif");
define("IMG_PDF", "obj_pdf.gif");
define("IMG_UNKNOWN", "obj_unknown.gif");
define("IMG_XML", "obj_xml.gif");
define("TABLE_BORDERSIZE", "4");
define("IMG_TABLE_CORNER_1", "table_c1.gif");
define("IMG_TABLE_CORNER_2", "table_c2.gif");
define("IMG_TABLE_CORNER_3", "table_c3.gif");
define("IMG_TABLE_CORNER_4", "table_c4.gif");
define("IMG_TABLE_BORDER_HORZ", "table_bh.gif");
define("IMG_TABLE_BORDER_VERT", "table_bv.gif");
//----------------------------------------------------------------------------
// colors sheme
//----------------------------------------------------------------------------
define("COL_BACK", "#00608E"); // darkest blue
define("COL_TEXT", "#FFFFFF");
define("COL_PAGETITLE", "#000000");
define("COL_HARDTEXT", "#FFFF00"); // yellow
define("COL_LINK", "#A3B9CF");
define("COL_LINKV", "#A3B9CF");
define("COL_LINKA", "#0099FF"); // light blue
define("COL_FRAME", "#0099FF"); // light blue
define("COL_TABLEHEADER", "#FF9933"); // light orange
define("COL_TABLEHEADER_TEXT", "#000000");
define("COL_LISTHEADER", "#00406E");
define("COL_LISTROW1", "#00507E");
define("COL_LISTROW2", "#005B8A");
//----------------------------------------------------------------------------
// RedirArray
//----------------------------------------------------------------------------
$RedirArray = array(
//Dest Relative link
"archives", "modules/archives/archives.php",
"archives_search", "modules/archives/search.php",
"archives_browser", "modules/archives/browser.php",
"browser", "modules/browser/browser.php",
"config", "config/config.php",
"config_modif_user", "config/modif_user.php",
"contacts", "modules/contacts/contacts.php",
"contacts_modif", "modules/contacts/modif.php",
"contacts_modif_cat", "modules/contacts/modif_cat.php",
"contacts_pad", "modules/contacts/pad.php",
"convert", "modules/convert/convert.php",
"convert_popup", "javascript:PopupConverter();",
"invoices_new", "modules/invoices/new.php",
"items", "modules/items/items.php",
"items_modif", "modules/items/modif.php",
"items_modif_cat", "modules/items/modif_cat.php",
"items_pad", "modules/items/pad.php",
"main", "",
"main_login", "login.php",
"main_home", "home.php",
"quotations_new", "modules/quotations/new.php"
);
//----------------------------------------------------------------------------
// Internal modules - CODING RESTRICTIONS
// .An internal module name must be one of the above
// $RedirArray destination name.
// .ID must be OCTAL numbers and UNIQUES.
//
// NOTE
// .If a user has INTMODS_FULLACCESS access, this means
// that all modules are authorized.
//
// WARNING
// .ID numbers must be UNIQUE at all !
// For example, if you decide to remove a module
// (0x00000004, "contacts") and adding an another one,
// DO NOT re-use the "contacts" ID 0x00000004, NEVER !
// Unless in the case of re-adding "contacts" module.
// .Maximum ID value is 0x40000000, not 0x80000000 (because
// of the _signed_ integer type in sql database).
// So maximum of internal modules is 31 (not 32).
//
// CODING HINTS
// .When you want to remove a module, it is recommended not
// to delete the line entry from $InternalArray, just
// comment it to avoid very bad mistakes
// (i.e. ID doubling).
// .You can insert separators, a separator ID is 0 (null).
//----------------------------------------------------------------------------
define("INTMODS_FULLACCESS", (int)0xFFFFFFFF); // [JC] - the "(int)" is because of the _signed_ integer type in sql database, i would prefer to use real unsigned type but postgresql seems to not support them.
@include $include_path."lang.php";
$InternalModules = array(
array("id"=>(int)0x00000001, "name"=>"contacts", "caption"=>$lang["Contacts"]),
array("id"=>(int)0x00000002, "name"=>"items", "caption"=>$lang["Items"]),
array("id"=>(int)0x00000004, "name"=>"quotations_new", "caption"=>$lang["Quotation"]),
array("id"=>(int)0x00000008, "name"=>"invoices_new", "caption"=>$lang["Invoice"]),
array("id"=>(int)0x00000000, "name"=>"", "caption"=>""),
array("id"=>(int)0x00000010, "name"=>"archives_search", "caption"=>$lang["Search"]),
array("id"=>(int)0x00000020, "name"=>"convert_popup", "caption"=>$lang["Converter"])
// [JC] - just for testing...
//array("id"=>(int)0x00000040, "name"=>"archives_browser", "caption"=>$lang["Archives"])
);
endif;
?>