90 lines
3.9 KiB
PHP
90 lines
3.9 KiB
PHP
<?php
|
|
session_start();
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
// REQUIRED ////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
require_once("conf/settings.php");
|
|
require_once("conf/db_struct.php");
|
|
require_once(COMPOSER_LOADER);
|
|
|
|
require_once(FUNCTIONS_DIR_PATH.'functions.php');
|
|
require_once(FUNCTIONS_DIR_PATH.'dbSqlManager.php');
|
|
|
|
require_once(FUNCTIONS_DIR_PATH.'functions_generals.php');
|
|
require_once(FUNCTIONS_DIR_PATH.'functions_tmp_files.php');
|
|
|
|
require_once(FUNCTIONS_DIR_PATH.'functions_clients.php');
|
|
require_once(FUNCTIONS_DIR_PATH.'functions_contrats_types.php');
|
|
require_once(FUNCTIONS_DIR_PATH.'functions_contrats.php');
|
|
require_once(FUNCTIONS_DIR_PATH.'functions_legumes.php');
|
|
require_once(FUNCTIONS_DIR_PATH.'functions_lieux.php');
|
|
require_once(FUNCTIONS_DIR_PATH.'functions_livraisons.php');
|
|
require_once(FUNCTIONS_DIR_PATH.'functions_paniers_groupes.php');
|
|
require_once(FUNCTIONS_DIR_PATH.'functions_paniers_types.php');
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
// SMARTY //////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
$GLOBALS['smarty'] = new Smarty();
|
|
$GLOBALS['smarty']->loadFilter('output', 'trimwhitespace');
|
|
|
|
$GLOBALS['smarty']->assign('site_name',SITE_NAME);
|
|
$GLOBALS['smarty']->assign('online_repo',ONLINE_REPOSITORY);
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
// CONNECTION A LA BASE DE DONNEES /////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////////
|
|
if(!$GLOBALS['db_admin']['man']) {
|
|
// CREATION DU DB MANAGER APP
|
|
$GLOBALS['db_admin']['man'] = new dbSqlManager;
|
|
$GLOBALS['db_admin']['man']->setDbConf(
|
|
$GLOBALS['db_admin']['type'],
|
|
$GLOBALS['db_admin']['db'],
|
|
$GLOBALS['db_admin']['user'],
|
|
$GLOBALS['db_admin']['pwd'],
|
|
$GLOBALS['db_admin']['host']
|
|
);
|
|
$r = $GLOBALS['db_admin']['man']->connect();
|
|
if($r!==true) die("ERREUR : impossible de se connecter à la base de donnée '".$GLOBALS['db_admin']['db']."' ! (".$r.")");
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
// JS / CSS / FUNCTIONS FILES //////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
$cssFiles = array(
|
|
PUBLIC_HTML_ADMIN.'libs/bootstrap-3.3.5/css/bootstrap.min.css',
|
|
PUBLIC_HTML_ADMIN.'libs/bootstrap_modal/bootstrap_modal.css',
|
|
PUBLIC_HTML_ADMIN.'libs/bootstrap_glyphicons/bootstrap_glyphicons.css',
|
|
PUBLIC_HTML_ADMIN.'libs/bootstrap_tooltip_popover/bootstrap_tooltip_popover.css',
|
|
PUBLIC_HTML_ADMIN.'libs/jquery-ui-bootstrap/css/custom-theme/jquery-ui-1.10.3.custom.css',
|
|
PUBLIC_HTML_ADMIN.'libs/intl-tel-input/build/css/intlTelInput.css',
|
|
PUBLIC_HTML_ADMIN.'css/admin.css'
|
|
);
|
|
|
|
$jsFiles = array(
|
|
PUBLIC_HTML_ADMIN.'libs/jquery/jquery-2.1.4.min.js',
|
|
PUBLIC_HTML_ADMIN.'libs/bootstrap-3.3.5/js/bootstrap.min.js',
|
|
PUBLIC_HTML_ADMIN.'libs/jquery-ui-1.11.4/jquery-ui.min.js',
|
|
PUBLIC_HTML_ADMIN.'libs/jquery.ui.autocomplete.html.js',
|
|
PUBLIC_HTML_ADMIN.'libs/moment/moment.js',
|
|
PUBLIC_HTML_ADMIN.'libs/bootstrap_modal/bootstrap_modal.js',
|
|
PUBLIC_HTML_ADMIN.'libs/bootstrap_tooltip_popover/bootstrap_tooltip_popover.js',
|
|
PUBLIC_HTML_ADMIN.'libs/intl-tel-input/build/js/intlTelInput.js',
|
|
PUBLIC_HTML_ADMIN.'js/functions.js',
|
|
PUBLIC_HTML_ADMIN.'js/navSecondBar.js'
|
|
);
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
// ACTION & REF ////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
$action = false;
|
|
if(isset($_REQUEST['action'])) $action = strval( $_REQUEST['action'] );
|
|
|
|
$id = false;
|
|
if(isset($_REQUEST["ref"]) && (int)$_REQUEST["ref"]>0) $id = intval($_REQUEST["ref"]);
|