0) || ($_SERVER['HTTP_HOST'] === $LOCAL_SITE_DOMAIN) )) { ini_set('error_reporting', E_ALL); // All errors trigger reporting. ini_set('display_errors', 'On'); // It's a local version, so errors can be displayed with no problem. ini_set('max_execution_time', 120); // It's average execution time. It can be set longer on the real version. ini_set('session.save_path', $SITE_PATH.'sessions'); // Just a configuration issue. Such directory should be present and writable. $IS_DEVELOPER_SYSTEM = false; $IS_LOCAL_DEVELOPER_SYSTEM = true; $SERVER_PATH_CRM_SITE = $HTTPS_SERVER_PATH; // Below are settings for the test PayPal account. $PAYPAL_USER_NAME = "igor.yakovets-facilitator_api1.gmail.com"; $PAYPAL_USER_PWD = "XFQWP8J43NMZSPXG"; $PAYPAL_USER_KEY = "Aueowvee7t6wjo8K4T-GGs3wJvPQAN.HoA0q9UxlaIjuo.XuvgeknZ2O"; $REAL_PAYMENTS = false; // false is test mode // A test version of Converge Merchant. $CONVERGE_MERCHANT_ID = '000127'; $CONVERGE_USER_ID = 'ssltest'; $CONVERGE_PIN = 'IERAOBEE5V0D6Q3Q6R51TG89XAIVGEQ3LGLKMKCKCVQBGGGAU7FN627GPA54P5HR'; $CONVERGE_REAL_MODE = false; // Attention, it looks like a real version of Amazon!!! $AMAZON_ACCESS_KEY_ID = "AKIA3GJPCHP5DY6UQQOV"; $AMAZON_SECRET_ACCESS_KEY = "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"; $AMAZON_BUCKET_NAME = "showmark"; $AMAZON_BUCKET_REGION = "us-east-1"; $AMAZON_BUCKET_NAME_PRODUCTS = "showmark-products"; // This backend does exist. define('IMAGEMAGICK_PATH_TO_CONVERT_CMD', '"c:/Program Files/ImageMagick-7.1.0-Q16-HDRI/convert.exe" '); // Path to ImageMagick convert utility with a following space symbol. $BACKUP_DIRECTORY_PREFIX = 'E:/showmark-local-test-backups/'; $BACKUP_DB_AMOUNT_LIMIT = 5; $BACKUP_CORRECTION_PATH = $BACKUP_DIRECTORY_PREFIX; // TaxJar settings sandbox $TAXJAR_API_KEY = '8444f647b1843c4d25d3cda7f0df4107'; $TAXJAR_API_URL = 'https://api.sandbox.taxjar.com/v2/'; // Sandbox URL } // -------------------------------------------- // real settings for production website elseif (isset($_SERVER['HTTP_HOST']) && (strpos($_SERVER['HTTP_HOST'], $CRM_SITE_DOMAIN) > 0) || ($_SERVER['HTTP_HOST'] == $CRM_SITE_DOMAIN)) { ini_set('display_errors', 'Off'); // We do not show any errors on the real production website. $REAL_PAYPAL_PAYMENTS = true; // false is test mode // Real PayPal settings. $PAYPAL_USER_NAME = "info_api1.showmark.com"; $PAYPAL_USER_PWD = "9L5GGJP52XAPGMS9"; $PAYPAL_USER_KEY = "Au0fCB3ohHcjU2SmQs-HoKVyTAJqA51f5cA3xsLkC3dKGRzW8EIg1lXK"; $IS_DEVELOPER_SYSTEM = false; // it's real system, no test // Real Converge Merchant Settings. $CONVERGE_MERCHANT_ID = '762366'; $CONVERGE_USER_ID = 'webpage1'; $CONVERGE_PIN = '65WG1DIIEZP25U57QORB6DTTG5NOI7YTA4KJVWGNHV0UT1BZWBG8DMPNAJ5KKGCO'; $CONVERGE_REAL_MODE = true; // Real Amazon Connection Settings. $AMAZON_ACCESS_KEY_ID = "AKIA3GJPCHP5DY6UQQOV"; $AMAZON_SECRET_ACCESS_KEY = "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"; $AMAZON_BUCKET_NAME = "showmark"; $AMAZON_BUCKET_REGION = "us-east-1"; // following Amazon settings for storage of products // *** ML - it looks like using Amazon for any storage of products has been deprecated. // $AMAZON_BUCKET_NAME_PRODUCTS = "showmark-products"; // not used, no such bucket $AMAZON_URL_PREFIX = "https://showmark.s3.amazonaws.com/"; $AMAZON_URL_PREFIX_PRODUCTS = "https://showmark-products.s3.amazonaws.com/"; // // following settings define where SQL daily backup stored // the cron job for a backup set under root user - as only root has access to /backup // $BACKUP_DIRECTORY_PREFIX = '/backup/fast_backups/'; $BACKUP_CORRECTION_PATH = '/backup/fast_backups/'; // that will be subtracted, so in S3 it will start from fast_backups_tryout // TaxJar settings. $TAXJAR_API_KEY = '35e6076f3f0f118cf4e2e8e5b3730776'; $TAXJAR_API_URL = 'https://api.taxjar.com/v2/'; // Production URL define('IMAGEMAGICK_PATH_TO_CONVERT_CMD', '/usr/local/bin/convert '); if (PHP_OS_FAMILY === 'Linux') $MYSQLDUMP_EXECUTABLE_DIRECTORY = '/usr/bin/'; // for some reason doesnt' work on LW server without it if (PHP_OS_FAMILY === 'Linux') $OPENSSL_EXECUTABLE_DIRECTORY = '/opt/cpanel/ea-openssl11/bin/'; // for some reason doesnt' work on LW server without it } else { echo "Died - TEST config defined.[".$_SERVER['HTTP_HOST'].']'; die ("Remote hosting configuration mismatch"); } /** * Function that returns database connection information * * @param bool $is_local_db - Whether to return local or remote database connection details * @param bool $is_archive_db - Whether to return connection details for an archive database * @param bool $is_mantis_db - Whether to return connection details for the Mantis database * @return array - Returns an associative array with connection details (host, user, db, pass) */ function GetDBConnectInfo($is_local_db = true, $is_archive_db = false, $is_mantis_db = false) { global $LOCAL_SITE_DOMAIN; $result = array(); // Check if the request is coming from the local site domain if(isset($_SERVER['HTTP_HOST']) && ($_SERVER['HTTP_HOST'] == $LOCAL_SITE_DOMAIN)) { if($is_archive_db) { // Archive database connection details for local environment $result['host'] = "localhost"; $result['user'] = "shmarchi_user"; $result['db'] = "shmarchi_db"; $result['pass'] = 'lizaakolvatestKepselXAgreenmood'; $result['pass'] = substr($result['pass'], 14, 8); // Extracts a portion of the password } elseif($is_mantis_db) { // Mantis database connection details for local environment $result['host'] = "localhost"; $result['user'] = "supportm_user"; $result['db'] = "supportm_base"; $result['pass'] = 'test1234'; } else { // Default local database connection $result['host'] = "localhost"; //:3308 $result['user'] = "showmark_user"; $result['db'] = "showmark_26_09_24"; $result['pass'] = 'test1234'; } } else { if($is_archive_db) { // Archive database connection details for remote environment $result['host'] = "192.168.10.3"; $result['user'] = "shmarchi_user"; $result['db'] = "shmarchi_db"; $result['pass'] = '9jDGe5H$#%GqgQ%G$j52c8fPC?q[k#VluDVG5#d&f$2'; $result['pass'] = substr($result['pass'], 19, 12); } elseif($is_local_db) { // Default remote database connection $result['host'] = "192.168.10.3"; $result['user'] = "showmark_user"; $result['db'] = "showmark_db"; $result['pass'] = '8Bn131OXW30a'; // echo "Remote database connection details are being used.
"; // $result['pass'] = '73}hi)n!@3pFMc8Bn(3=OXW^0a3SMs%QP$pD*M'; // $result['pass'] = substr($result['pass'], 14, 12); } elseif($is_mantis_db) { // Mantis database connection details for remote environment $result['host'] = "localhost"; $result['user'] = "supportm_user"; $result['db'] = "supportm_base"; $result['pass'] = 'k5f32Ft[7Fpn1etJPM2635INnO4KLmuFwsC5sKH'; $result['pass'] = substr($result['pass'], 15, 15); } else { // Default remote database connection $result['host'] = "192.168.10.3"; $result['user'] = "showmark_user"; $result['db'] = "showmark_db"; $result['pass'] = '73}hi)n!@3pFMc8Bn(3=OXW^0a3SMs%QP$pD*M'; $result['pass'] = substr($result['pass'], 14, 12); } } return $result; }