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); //Получаем количество новых задач $global_taskCount=DB::getAll("SELECT COUNT(*) FROM `content` WHERE `content_type`=? AND `status`<>? AND `json` LIKE '%\"target_user\":\"" . $_SESSION['user_id'] . "\"%'", [2, 0])[0]['COUNT(*)']; $smarty->assign('global_taskCount', $global_taskCount); $smarty->display('api/modules/' . $global_mod . '/index.html', @$_GET['id']); ?>