22 lines
825 B
PHP
22 lines
825 B
PHP
<?php
|
|
session_start();
|
|
ini_set('display_errors', 1);
|
|
require_once 'api/php/sql.php';
|
|
require_once 'api/php/api.php';
|
|
define ( 'SMARTY_DIR', 'api/soft/smarty/4.5.2/libs/' );
|
|
require_once SMARTY_DIR . 'Smarty.class.php';
|
|
$smarty = new \Smarty();
|
|
$smarty->compile_dir = '/tmp/cache';
|
|
$smarty->config_dir = 'int/config/';
|
|
$smarty->cache_dir = '/tmp/cache';
|
|
DB::$dsn = 'mysql:dbname=crm;host=localhost';
|
|
DB::$user = 'admin';
|
|
DB::$pass = '25Pfujhtks[Gcb[bfnhjd';
|
|
if (!@$_GET['mod'])$_GET['mod']='main';
|
|
$global_mod=(@$_SESSION['user_id'])?$_GET['mod']:'login';
|
|
require_once 'api/modules/' . $global_mod . '/index.php';
|
|
$smarty->assign('header', 'skin/header.html');
|
|
$smarty->assign('footer', 'skin/footer.html');
|
|
$smarty->assign('mod', $global_mod);
|
|
$smarty->display('api/modules/' . $global_mod . '/index.html', @$_GET['id']);
|
|
?>
|