<?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' => 'D-link  |  Partner',
    // preloading 'log' component
    'preload' => array('log'),
    // autoloading model and component classes
    'import' => array(
        'application.models.*',
        'application.components.*',
        'application.extensions.yii-mail.YiiMailMessage',
        'application.extensions.coco.*',
    ),
    'modules' => array(
        // uncomment the following to enable the Gii tool

        'gii' => array(
            'class' => 'system.gii.GiiModule',
            'password' => '@run',
            // If removed, Gii defaults to localhost only. Edit carefully to taste.
            'ipFilters' => array('116.68.74.202', '::1'),
        ),
        /* hybrid authmodul fb,google plus,yahoo */
        'hybridauth' => array(
            'baseUrl' => 'http://' . $_SERVER['SERVER_NAME'] . '/hybridauth',
            'withYiiUser' => true, // Set to true if using yii-user
            "providers" => array(
                "openid" => array(
                    "enabled" => false
                ),
                "yahoo" => array(
                    "enabled" => false
                ),
                "linkedin" => array(
                    "enabled" => false,
                ),
                "google" => array(
                    "enabled" => true,
                    "keys" => array("id" => "35962916088.apps.googleusercontent.com", "secret" => "WrhnlXnEDukED_VSNDLrpQMA"),
                    "scope" => ""
                ),
                "facebook" => array(
                    "enabled" => true,
                    "keys" => array("id" => "287318184720723", "secret" => "1c7ab2fcaa2b6d6ab8600768d343b5b3"),
                    "scope" => "email,publish_stream",
                    "display" => ""
                ),
                "twitter" => array(
                    "enabled" => true,
                    "keys" => array("key" => "QNwklE8dTqnTy53ftD0Wxw", "secret" => "7Dz1Xq3kjdNQaq03ekcrqJuQohyKk0zhvGJS9iBM8nI")
                )
            )
        ),
    /* --------------------------------------- */
    ),
    // application components
    'components' => array(
        'simpleImage' => array(
            'class' => 'application.extensions.imageresize.CSimpleImage',
        ),
        'file' => array(
            'class' => 'application.extensions.cfile.CFile',
        ),
        'user' => array(
            'class' => 'application.components.EWebUser',
            // enable cookie-based authentication
            'allowAutoLogin' => true,
        ),
        'phpThumb' => array(
            'class' => 'ext.EPhpThumb.EPhpThumb',
        //'options'=>array(optional phpThumb specific options are added here)
        ),
        'clientScript' => array(
            //'class' => 'application.extensions.CClientScriptMinify',
            //'minifyController' => '/minify',
            'packages' => array(
                'jquery' => array(
                    'baseUrl' => '',
                    'js' => array('js/jquery-1.11.3.min.js'),
                    'coreScriptPosition' => CClientScript::POS_HEAD
                ), 
                /*'jquery.ui' => array(
                    'baseUrl' => '',
                    'js' => array('js/jquery-ui.min.js'),
                    'depends' => array('jquery'),
                    'coreScriptPosition' => CClientScript::POS_END
                ), */
            ),
        ),
        // 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(
//            'connectionString' => 'sqlite:' . dirname(__FILE__) . '/../data/testdrive.db',
//        ),
        // uncomment the following to use a MySQL database
//        'db' => array(
//            'connectionString' => 'mysql:host=localhost;dbname=dlinkmea_dlink',
//            'emulatePrepare' => true,
//            'username' => 'dlinkmea_dlink',
//            'password' => 'MP2Ezj3s',
//            'charset' => 'utf8',
//            'tablePrefix' => 'ptp',
//        ),
         /*'db' => array(
            'connectionString' => 'mysql:host=localhost;dbname=dlinkmea_secure_partner',
            'emulatePrepare' => true, 
            'username' => 'dlinkmea_partner',
	        'password' => '1Wc_sn%P3^xa',
            'charset' => 'utf8',
            'tablePrefix' => 'ptp',
        ),*/
        'db' => array(
            'connectionString' => 'mysql:host=localhost;dbname=blskysoftware_dlink_partner',
            'emulatePrepare' => true,
            'username' => 'blskysoftware_dlink',
            'password' => 'gf&FcJX?Etb9', 
            'charset' => 'utf8',
            'tablePrefix' => 'ptp',
        ),
        'errorHandler' => array(
            // use 'site/error' action to display errors
            'errorAction' => 'site/error',
        ),
        'log' => array(
            'class' => 'CLogRouter',
            'routes' => array(
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning',
                ),
            // uncomment the following to show log messages on web pages
            /*
              array(
              'class'=>'CWebLogRoute',
              ),
             */
            ),
        ),
        'mail' => array(
            'class' => 'application.extensions.yii-mail.YiiMail',
            //'transportType' => 'php',
            //'transportType' => 'smtp',
            /* 'transportOptions' => array(
              'host' => 'dlinkmea.com',
              'username' => 'messagesender@dlinkmea.com',
              'password' => 'peterpan122',
              'port' => 25,
              ), */
//            'transportOptions' => array(
//                //'host'=>'dlinkmea.com',
//                'host' => 'lists.dlinkmea.com',
//                //'encryption'=>'tls',
//                'username' => 'relay@lists.dlinkmea.com',
//                'password' => 'r3l@ydlink',
//                'port' => 25,
//            //'port'=>465
//            ),
            'transportOptions' => array(
                'host'=>'server.dlinkmea.com',
                'username' => 'noreply@me.dlink.com',
                'password' => 'Dmea@2121',
                'port'=>25,
            ),
            'viewPath' => 'application.views.mail',
            'logging' => true,
            'dryRun' => false
        ),
        
        
        /*'request' => array(
           //'class' => 'application.components.HttpRequest',
            //'enableCsrfValidation' => true,
             'class' => 'HttpRequest',
           'noCsrfValidationRoutes' => array(
            '^productGuide/uploadimage.*$',
            '^user/ExportUsers.*$',
            ),
            'enableCsrfValidation' => true,
        ),*/
    ),
    // application-level parameters that can be accessed
    // using Yii::app()->params['paramName']
    'params' => array(
        // this is used in contact page
        'adminEmail' => array('relay@lists.dlinkmea.com' => 'D-Link Portal'),
        //array(Yii::app()->params['adminEmail'] => 'Dlink Portal');
        'defaultPageSize' => '20'
    ),
    'behaviors' => array(
        'runEnd' => array(
            'class' => 'application.components.WebApplicationEndBehavior',
        ),
    ),
);
