|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/owens.enteract/inc/ |
Upload File : |
<?php
header('Content-Type: text/html; charset=utf-8');
date_default_timezone_set('America/Los_Angeles');
$scriptName = $_SERVER['SCRIPT_NAME'];
$serverName = $_SERVER['SERVER_NAME'];
//Set protocol to whatever user is using currently
$protocol = "http://";
if (!empty($_SERVER['HTTPS'])) {
if ($_SERVER['HTTPS'] != "off") { $protocol = "https://";}
}
define('PROTOCOL',$protocol);
//Define which libs to load in utils
define("USE_AWS",false); // Whether to use AWS
define("USE_CACHING",true); // Whether to use caching (memcache or file cache)
define("USE_MAPS",false); // Whether to use maps
define("USE_MOBILE",true); // Whether to use mobile
define("USE_RACKSPACE_CDN",false); // Whether to use Rackspace CDN
define("USE_TWITTER",false); // Whether to use Twitter API
define("USE_TUMBLR",false); // Whether to use Twitter API
define("USE_INSTAGRAM",false); // Whether to use Instagram API
// Environment Specific Vars
if (strpos($serverName,"localhost") > -1 || strpos($serverName,"192.168.") > -1){
define('FB_APP_ID','');
define('FB_SECRET_KEY', '');
define('ROOT_LOCATION',"http://".$_SERVER["HTTP_HOST"].substr($_SERVER["SCRIPT_NAME"], 0, strpos($_SERVER["SCRIPT_NAME"], "/deploy/")) . "/deploy/");
define('STATIC_ASSETS_URL',ROOT_LOCATION . "assets/");
define("CACHE_SECONDS",15);
define('ENVIRONMENT',"DEV");
}else if (strpos($scriptName,"/dev") > -1){
define('FB_APP_ID','');
define('FB_SECRET_KEY', '');
define('ROOT_LOCATION',PROTOCOL."tedperezexternal.com/jof/dev/"); // Root location for assets and such
define('STATIC_ASSETS_URL',PROTOCOL."tedperezexternal.com/demo_template/review/assets/"); //Assets are not stored in dev CMS since they share DB
define("CACHE_SECONDS",15);
define('ENVIRONMENT',"DEV");
}else if (strpos($scriptName,"/review") > -1){
define('FB_APP_ID','');
define('FB_SECRET_KEY', '');
define('ROOT_LOCATION',PROTOCOL."tedperezexternal.com/jof/review/");
define('STATIC_ASSETS_URL',ROOT_LOCATION . "assets/");
define("CACHE_SECONDS",60);
define('ENVIRONMENT',"DEV");
}else if (strpos($serverName,"stage.xxxx.com") > -1){
define('FB_APP_ID','');
define('FB_SECRET_KEY', '');
define('ROOT_LOCATION',PROTOCOL."www.theurl.com/appnamestage/");
define('STATIC_ASSETS_URL',PROTOCOL."xxxxxx.com/assets/"); // Look to live site for assets if stage shares CMS/DB/assets
define("CACHE_SECONDS",60); // Cache files long enough to test
define('ENVIRONMENT',"STAGE");
}else{
define('FB_APP_ID','');
define('FB_SECRET_KEY', '');
define('ROOT_LOCATION',PROTOCOL."www.jesse-owens.org/");
define('STATIC_ASSETS_URL',ROOT_LOCATION . "assets/");
define("CACHE_SECONDS",180);
define('ENVIRONMENT',"LIVE");
}
if (USE_TWITTER){
if (ENVIRONMENT == "DEV"){
define('TWITTER_CONSUMER_KEY', 'xxxx');
define('TWITTER_CONSUMER_SECRET', 'xxxx');
define('TWITTER_OAUTH_CALLBACK', ROOT_LOCATION . '_admin/twitter_callback.php');
}else{
define('TWITTER_CONSUMER_KEY', 'xxxx');
define('TWITTER_CONSUMER_SECRET', 'xxxx');
define('TWITTER_OAUTH_CALLBACK', ROOT_LOCATION . '_admin/twitter_callback.php');
}
}
if (USE_TUMBLR){
if (ENVIRONMENT == "DEV"){
define('TUMBLR_BLOG', "xxxx.tumblr.com");
define('TUMBLR_CONSUMER_KEY', 'xxxx');
define('TUMBLR_SECRET_KEY', 'xxxx');
}else{
define('TUMBLR_BLOG', "xxxx.tumblr.com");
define('TUMBLR_CONSUMER_KEY', 'xxxx');
define('TUMBLR_SECRET_KEY', 'xxxx');
}
}
if (USE_INSTAGRAM){
//IG access token never expires so if you're just doing server side scraping go ahead and get this via api console and paste it in here
if (ENVIRONMENT == "DEV"){
define('IG_ACCESS_TOKEN', "xxxx");
}else{
define('IG_ACCESS_TOKEN', "xxxx");
}
}
//Define other vars
define('GOOGLE_API_KEY','XXXXX'); // Google API key necessary for geocoding/maps/etc
define('GOOGLE_ANALYTICS_ID','UA-99999-9'); // Google Analytics ID
define('FLOODLIGHT_SRC','XXXXXXXX'); // Floodlight source
define('CURL_PROXY',''); // Might need to define (especially in FB client) if server has issues communicating
define('FB_ADMIN_LIST','1111047837,2737102'); // Use this for quick moderation access (luke, dave)
define("SALT", "g0z3Pian2"); // DO NOT EVER CHANGE ONCE IN USE! This is just so people can't use run of the mill hash lookup tables for common pws
define("PUBLIC_SALT", "bsf48adsf91wW"); // DO NOT EVER CHANGE ONCE IN USE! Used to make sure server logs don't record raw passwords
define("AUTO_EMAIL", "[email protected]"); // Emails coming from the project
define("ERROR_EMAIL", "[email protected]"); // Sends to whichever devs need to be notified (create project group email for this)
define("DATE_FORMAT_SHORT", "m/d/Y"); // How to display short dates
define("DATE_FORMAT_LONG", "m/d/Y H:i:s"); // How to display long dates
define("MAX_FILESIZE", 21000000); // Largest allowable upload size (20 MB)
define("RESULTS_PER_PAGE",100); // Default setting for how many results to show on a page
//Build path of dynamic assets (assumes either local file storage, AWS or future CDN)
if (USE_AWS){
define("AWS_BUCKET",""); // Bucket used for our AWS stuff
define("AWS_ACCESS_KEY","xxxx"); // AWS access key
define("AWS_SECRET_KEY","xxxx"); // AWS secret key
define("DYNAMIC_ASSETS_URL",PROTOCOL.AWS_BUCKET.".s3.amazonaws.com/"); // Point to S3 for files
}else if (USE_RACKSPACE_CDN){
define("RACKSPACE_DEFAULT_CONTAINER","xxxx"); // Where to put files by default
define("RACKSPACE_USERNAME","xxxx"); // The required username
define("RACKSPACE_API_KEY","xxxx"); // The private API Key (Rackspace treats this like a password)
define("DYNAMIC_ASSETS_URL","xxxx"); // Point to Rackspace CDN
}else{
define("DYNAMIC_ASSETS_URL",STATIC_ASSETS_URL . "uploads/");
}
//Cache vars
if (USE_CACHING){
define('CACHE_PATH','assets/uploads/_tmp/'); // Where to store local cache (/tmp/) is built-in (might not be accessible on all servers)
define("USE_MEMCACHE",false); // Whether to use memcache or not
define("MEMCACHE_PREPEND","p3pRusuruy"); // Keep it so other apps don't interfere with ours
define("MEMCACHE_SERVER",""); // Memcache host
define("MEMCACHE_PORT",11211); // 11211 is standard port
}
//Default meta info that can be overwritten by any page
$metaSiteName = "Jesse Owens Foundation";
$metaTitle = "Jesse Owens Foundation";
$metaDesc = "When friends and family came together in 1980, they wanted to find a way to honor the spirit of a man who strongly believed in his country and the value of its youth. With that spirit in mind, The Jesse Owens Foundation was created.";
$metaKeywords = "Jesse Owens Foundation";
$metaImg = ROOT_LOCATION . "assets/img/fb-1200x630.png";
//DB settings
if (ENVIRONMENT == "DEV"){
if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/__settings/db.php')) {
include($_SERVER['DOCUMENT_ROOT'] . '/__settings/db.php');
} else {
echo "DB CONN FILE DOES NOT EXIST";
}
define('TABLEPRE','demo_');
}else{
define('DB_NAME','');
define('DB_HOST','');
define('DB_USER','');
define('DB_PASS','');
define('TABLEPRE','demo_');
}
//Mail settings wrapped in simple func so we don't load mail garbage unless necessary.
function mailSettings(){
$serverName = $_SERVER['SERVER_NAME'];
include_once("libs/mail/mailer.php");
if (strpos($serverName,"tedperezexternal.com") > -1 || strpos($serverName,"tedperez.com") > -1 || strpos($serverName,"localhost") > -1 || strpos($serverName,"192.") > -1){
if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/__settings/mail.php')) {
include($_SERVER['DOCUMENT_ROOT'] . '/__settings/mail.php');
} else {
echo "MAIL FILE DOES NOT EXIST!";
echo $_SERVER['DOCUMENT_ROOT'] . '/__settings/mail.php';
}
} else{
define("SMTP_AUTH",false); // Enable SMTP authentication
define("SMTP_SECURE",""); // Sets the prefix to the server
define("SMTP_HOST",""); // Host for the SMTP server (entertainment-transactional.mms.entertainment.west.mtvi.com for Paramount)
define("SMTP_PORT",0); // SMTP port (25 is standard)
define("SMTP_USERNAME",""); // SMTP username
define("SMTP_PASSWORD",""); // SMTP password
}
}
?>