<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => 'TIDANS',
    'language' => 'en',
    'aliases' => array(
	'bootstrap' => realpath(__DIR__ . '/../extensions/yiistrap'), // change if necessary
	// yiiwheels configuration
	'yiiwheels' => realpath(__DIR__ . '/../extensions/yiiwheels'), // change if necessary
    ),
    // preloading 'log' component
    'preload' => array('log'
    // preload the bootstrap component version yii-bootstrap-2.0.3.r329
    ),
    // preloading 'log' component
    // autoloading model and component classes
    'import' => array(
	'application.models.*',
	'application.components.*',
	'application.extensions.yiistrap.helpers.TbHtml',
	'application.modules.auditTrail.models.AuditTrail',

	'application.extensions.phpexcel.PHPExcel',
	'application.extensions.phpexcel.*',
	'application.extensions.phpexcel.PHPExcel.*',
	'application.extensions.phpexcel.PHPExcel.Style.*',
	'application.extensions.phpexcel.PHPExcel.Shared.*',
	'application.extensions.phpexcel.PHPExcel.Shared.PCLZip.*',
	'application.extensions.phpexcel.PHPExcel.Shared.OLE.*',
	'application.extensions.phpexcel.PHPExcel.Shared.OLE.PPS.*',
	'application.extensions.phpexcel.PHPExcel.Shared.Escher.*',
	'application.extensions.phpexcel.PHPExcel.Shared.Escher.DgContainer.*',
	'application.extensions.phpexcel.PHPExcel.Shared.Escher.DgContainer.SpgrContainer.*',
	'application.extensions.phpexcel.PHPExcel.Shared.Escher.DggContainer.*',
	'application.extensions.phpexcel.PHPExcel.Shared.Escher.DggContainer.BstoreContainer.*',
	'application.extensions.phpexcel.PHPExcel.Reader.*',
	'application.extensions.phpexcel.PHPExcel.Reader.Excel5.*',
	'application.extensions.phpexcel.PHPExcel.Reader.Excel2007.*',
	'application.extensions.phpexcel.PHPExcel.Calculation.*',
	'application.extensions.phpexcel.PHPExcel.Calculation.Token.*',
	'application.extensions.phpexcel.PHPExcel.CachedObjectStorage.*',
	'application.extensions.phpexcel.PHPExcel.Cell.*',
	'application.extensions.phpexcel.PHPExcel.Chart.*',
	'application.extensions.phpexcel.PHPExcel.RichText.*',
	'application.extensions.phpexcel.PHPExcel.Worksheet.*',
	'application.extensions.phpexcel.PHPExcel.Writer.*',
	'application.extensions.phpexcel.PHPExcel.Writer.Excel5.*',
	'application.extensions.phpexcel.PHPExcel.Writer.Excel2007.*',
	'application.extensions.phpexcel.PHPExcel.Writer.PDF.*',

	'application.extensions.yiireport.*',
    ),
    'modules' => array(
	// uncomment the following to enable the Gii tool
	'gii' => array(
	    'class' => 'system.gii.GiiModule',
	    'password' => 'P@ssw0rd',
	    // If removed, Gii defaults to localhost only. Edit carefully to taste.
	    'ipFilters' => array('127.0.0.1', '::1'),
	),
    ),
    // application components
    'components' => array(
        'session' => array(
            'class' => 'CDbHttpSession',
            'timeout' => 120 * 60,
        ),
	'user' => array(
	    // enable cookie-based authentication
	    'allowAutoLogin' => true,
	),
	'bootstrap' => array(
	    'class' => 'ext.yiistrap.components.TbApi',
	),
	// yiiwheels configuration
	'yiiwheels' => array(
	    'class' => 'ext.yiiwheels.YiiWheels',
	),
	'authManager' => array(
	    'class' => 'CDbAuthManager',
	    'connectionID' => 'db',
	    'itemTable' => 'authitem',
	    'assignmentTable' => 'authassignment',
	    'itemChildTable' => 'authitemchild',
	),
	// uncomment the following to enable URLs in path-format
	/*
	  'urlManager'=>array(
	  'urlFormat'=>'path',
	  'rules'=>array(
	  '<controller:\w+>/<id:\d+>'=>'<controller>/view',
	  '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
	  '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
	  ),
	  ),
	 */
	'db' => array(
            'class' => 'TIDANSDbConnection',
            "driverName" => "mysql",
            'host' => 'localhost',
            'dbname' => 'tidans',
            'emulatePrepare' => true,
            'username' => 'root',
            'password' => '',//'LSMS@2013!', // SLB           
            'charset' => 'utf8',
            'tablePrefix' => '',       
        ),
	// uncomment the following to use a MySQL database
	/*
	  'db'=>array(
	  'connectionString' => 'mysql:host=localhost;dbname=testdrive',
	  'emulatePrepare' => true,
	  'username' => 'root',
	  'password' => '',
	  'charset' => 'utf8',
	  ),
	 */
	// 'errorHandler' => array(
	//     // use 'site/error' action to display errors
	//     'errorAction' => 'site/error',
	// ),
	'log' => array(
	    'class' => 'CLogRouter',
	    'routes' => array(
		array(
		    'class' => 'CFileLogRoute',
		    'levels' => 'error, warning,info',
                    'logFile' => 'consoleApplication.log'
		),
	    // uncomment the following to show log messages on web pages
	    /*
	      array(
	      'class'=>'CWebLogRoute',
	      ),
	     */
	    ),
	),
    ),
    // application-level parameters that can be accessed
    // using Yii::app()->params['paramName']
    'params' => array(
	// this is used in contact page
		  'email_user_name' => 'noreply-lsms@exchange.slb.com',
          'email_password' => 'ITIraq@2013!',
          'email_set_from_addres' => 'noreply-lsms@exchange.slb.com',
          'email_port' => 25,
          'email_host' => 'Nl0230exchub.mail.slb.com',
          'email_SMTPSecure' => '',
          'support_email' => 'itiraq@slb.com;support@flexsolution.biz',


	'pageSize' => '5',
	'document_allowed_extension'=>array("jpg", "jpeg", "gif", "bmp", "png", "zip", "doc", "docx", "txt", "xls", "xlsx","pdf",'htm'),
    ),
);