noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
constant.php
Go to the documentation of this file.
00001 <?php
00002 /*
00003  *   This file is part of NOALYSS.
00004  *
00005  *   NOALYSS is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   NOALYSS is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with NOALYSS; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 // Copyright Author Dany De Bontridder danydb@aevalys.eu
00020 
00021 /*! \file
00022  * \brief Contains all the variable + the javascript
00023  * and some parameter
00024  */
00025 require_once ('config.inc.php');
00026 require_once('constant.security.php');
00027 // SVNVERSION
00028 global $version_noalyss;
00029 /*
00030  * Include path
00031  */
00032 $inc_path=get_include_path();
00033 $dirname=dirname(__FILE__);
00034 if ( strpos($inc_path,";") != 0 ) {
00035   $new_path=$inc_path.';'.$dirname;
00036   $os=0;                        /* $os is 0 for windoz */
00037 } else {
00038   $new_path=$inc_path.':'.$dirname;
00039   $os=1;                        /* $os is 1 for unix */
00040 }
00041 set_include_path($new_path);
00042 ini_set ('session.use_cookies',1);
00043 ini_set ('session.use_only_cookies','on');
00044 ini_set ('magic_quotes_gpc','off');
00045 ini_set ('max_execution_time',240);
00046 ini_set ('memory_limit','256M');
00047 ini_set ('default_charset',"UTF-8");
00048 @ini_set ('session.use_trans_sid','on');
00049 @session_start();
00050 
00051 /*
00052  * Ini session
00053  */
00054 
00055 
00056 
00057 global $g_captcha,$g_failed,$g_succeed;
00058 $g_captcha=false;
00059 $g_failed="<span style=\"font-size:18px;color:red\">&#x2716;</span>";
00060 $g_succeed="<span style=\"font-size:18px;color:green\">&#x2713;</span>";
00061 /* uncomment for development */
00062 define ('SVNINFO',6720);
00063 //define ("DEBUG",true);
00064 define ("DEBUG",false);
00065 
00066 $version_noalyss=SVNINFO;
00067 // If you don't want to be notified of the update
00068 // define ("SITE_UPDATE",'');
00069 define ("SITE_UPDATE",'http://www.noalyss.eu/last_version.txt');
00070 define ("SITE_UPDATE_PLUGIN",'http://www.noalyss.eu/plugin_last_version.txt');
00071 
00072 
00073 define ("DBVERSION",115);
00074 define ("MONO_DATABASE",25);
00075 define ("DBVERSIONREPO",15);
00076 define ('NOTFOUND','--not found--');
00077 
00078 define ("MAX_COMPTE",4);
00079 define ('MAX_ARTICLE',5);
00080 define ('MAX_ARTICLE_STOCK',20);
00081 define ('MAX_CAT',15);
00082 define ('MAX_CARD_SEARCH',550);
00083 define ('MAX_FORECAST_ITEM',10);
00084 define ('MAX_PREDEFINED_OPERATION',50);
00085 define ('MAX_COMPTE_CARD',4);
00086 define ('COMPTA_MAX_YEAR',2100);
00087 define ('COMPTA_MIN_YEAR',1900);
00088 define ('MAX_RECONCILE',25);
00089 define ('MAX_QCODE',4);
00090 define ('MAX_SEARCH_CARD',20);
00091 
00092 if ( DEBUG ) {
00093         error_reporting(2147483647);
00094         ini_set("display_errors",1);
00095         ini_set("html_errors",1);
00096 }
00097         else {
00098         error_reporting(0);
00099         ini_set("display_errors",1);
00100         ini_set("html_errors",1);
00101         
00102 }
00103 // Erreur
00104 define ("NOERROR",0);
00105 define ("BADPARM",1);
00106 define ("BADDATE",2);
00107 define ("NOTPERIODE",3);
00108 define ("PERIODCLOSED",4);
00109 define ("INVALID_ECH",5);
00110 define ("RAPPT_ALREADY_USED",6);
00111 define ("RAPPT_NOT_EXIST",7);
00112 define ("DIFF_AMOUNT",8);
00113 define ("RAPPT_NOMATCH_AMOUNT",9);
00114 define ("NO_PERIOD_SELECTED",10);
00115 define ("NO_POST_SELECTED",11);
00116 define ("LAST",1);
00117 define ("FIRST",0);
00118 define ("ERROR",12);
00119 
00120 //!\enum ACTION  defines document_type for action
00121 define('ACTION','1,5,6,7,8');
00122 
00123 //valeurs standardd
00124 define ("YES",1);
00125 define ("NO",0);
00126 define ("OPEN",1);
00127 define ("CLOSED",0);
00128 define ("NOTCENTRALIZED",3);
00129 define ("ALL",4);
00130 
00131 // Pour les ShowMenuComptaLeft
00132 define ("MENU_FACT",1);
00133 define ("MENU_FICHE",2);
00134 define ("MENU_PARAM",3);
00135 
00136 // for the fiche_inc.GetSqlFiche function
00137 define ("ALL_FICHE_DEF_REF", 1000);
00138 
00139 // fixed value for attr_def data
00140 define ("ATTR_DEF_ACCOUNT",5);
00141 define ("ATTR_DEF_NAME",1);
00142 define ("ATTR_DEF_BQ_NO",3);
00143 define ("ATTR_DEF_BQ_NAME",4);
00144 define ("ATTR_DEF_PRIX_ACHAT",7);
00145 define ("ATTR_DEF_PRIX_VENTE",6);
00146 define ("ATTR_DEF_TVA",2);
00147 define ("ATTR_DEF_NUMTVA",13);
00148 define ("ATTR_DEF_ADRESS",14);
00149 define ("ATTR_DEF_CP",15);
00150 define ("ATTR_DEF_PAYS",16);
00151 define ("ATTR_DEF_STOCK",19);
00152 define ("ATTR_DEF_TEL",17);
00153 define ("ATTR_DEF_EMAIL",18);
00154 define ("ATTR_DEF_CITY",24);
00155 define ("ATTR_DEF_COMPANY",25);
00156 define ("ATTR_DEF_FAX",26);
00157 define ("ATTR_DEF_NUMBER_CUSTOMER",30);
00158 define ("ATTR_DEF_DEP_PRIV",31);
00159 define ("ATTR_DEF_DEPENSE_NON_DEDUCTIBLE",20);
00160 define ("ATTR_DEF_TVA_NON_DEDUCTIBLE",21);
00161 define ("ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP",22);
00162 define ("ATTR_DEF_QUICKCODE",23);
00163 define ("ATTR_DEF_FIRST_NAME",32);
00164 
00165 define( 'ATTR_DEF_ACCOUNT_ND_TVA',50);
00166 define('ATTR_DEF_ACCOUNT_ND_TVA_ND',51);
00167 define ('ATTR_DEF_ACCOUNT_ND_PERSO',52);
00168 define ('ATTR_DEF_ACCOUNT_ND',53);
00169 
00170 define ("FICHE_TYPE_CLIENT",9);
00171 define ("FICHE_TYPE_VENTE",1);
00172 define ("FICHE_TYPE_FOURNISSEUR",8);
00173 define ("FICHE_TYPE_FIN",4);
00174 define ("FICHE_TYPE_CONTACT",16);
00175 define ("FICHE_TYPE_EMPL",25);
00176 define ("FICHE_TYPE_ADM_TAX",14);
00177 define ("FICHE_TYPE_ACH_MAR",2);
00178 define ("FICHE_TYPE_ACH_SER",3);
00179 define ("FICHE_TYPE_ACH_MAT",7);
00180 define ("FICHE_TYPE_PROJET",26);
00181 /** -- pour utiliser unoconv démarrer un server libreoffice 
00182  * commande
00183  * libreoffice --headless --accept="socket,host=127.0.0.1,port=2002;urp;" --nofirststartwizard 
00184  * ou
00185  *  unoconv -l -v -s localhost
00186  */
00187 define ('OFFICE','unoconv ');
00188 define ('GENERATE_PDF','YES');
00189 
00190 define ('JS_INFOBULLE','
00191         <DIV id="bulle" class="infobulle"></DIV>
00192         <script type="text/javascript" language="javascript"  src="js/infobulle.js">
00193         </script>');
00194 
00195 
00196 // Sql string
00197 define ("SQL_LIST_ALL_INVOICE","");
00198 
00199 define ("SQL_LIST_UNPAID_INVOICE","  (jr_rapt is null or jr_rapt = '') and jr_valid = true  "
00200        );
00201 
00202 
00203 define ("SQL_LIST_UNPAID_INVOICE_DATE_LIMIT" ,"
00204         where (jr_rapt is null or jr_rapt = '')
00205         and to_date(to_char(jr_ech,'DD.MM.YYYY'),'DD.MM.YYYY') < to_date(to_char(now(),'DD.MM.YYYY'),'DD.MM.YYYY')
00206         and jr_valid = true" );
00207 ?>
 All Data Structures Namespaces Files Functions Variables Enumerations