"; if(!isset($_SESSION['detail_variation_session']) && !isset($_SESSION['force_variant_detail'])){ $country = isset($_COOKIE["yidio_user_country_code"]) ? strtoupper($_COOKIE["yidio_user_country_code"]) : ""; if($country == ""){ $country = isset($_SERVER['GEOIP_COUNTRY_CODE']) ? strtoupper($_SERVER['GEOIP_COUNTRY_CODE']) : ""; $utm_campaign_mn = ''; if(isset($_REQUEST['utm_source']) && isset($_REQUEST['utm_campaign'])){ $utm_campaign_mn = $_REQUEST['utm_campaign']; }elseif(!isset($_REQUEST['utm_source']) && (isset($_COOKIE["yidio_utm_campaign"]) && $_COOKIE["yidio_utm_campaign"] != "")){ $utm_campaign_mn = $_COOKIE["yidio_utm_campaign"]; } if($utm_campaign_mn){ //set user country based on campaign when there countries are null or US $uc_arr = explode("-",$utm_campaign_mn); $cc_part = strtoupper($uc_arr[0]); if($cc_part == "CA"){ $country = "CA"; }elseif($cc_part == "WALA"){ $country = "AU"; }elseif($cc_part == "TILL"){ $country = "DE"; }elseif($cc_part == "UK"){ $country = "UK"; }elseif($cc_part == "ZA"){ $country = "ZA"; }elseif($cc_part == "SA"){ $country = "ZA"; } } } if($country == "" || $country == "US"){ $utm_source_exp = ''; $utm_medium_exp = ''; $utm_campaign_exp = ''; if(isset($_REQUEST['utm_source'])){ $utm_source_exp = $_REQUEST['utm_source']; $utm_medium_exp = isset($_REQUEST['utm_medium']) ? $_REQUEST['utm_medium'] : ""; $utm_campaign_exp = isset($_REQUEST['utm_campaign']) ? $_REQUEST['utm_campaign'] : ""; }elseif(!isset($_REQUEST['utm_source']) && (isset($_COOKIE["yidio_utm_source"]) && $_COOKIE["yidio_utm_source"] != "")){ $utm_source_exp = $_COOKIE["yidio_utm_source"]; $utm_medium_exp = isset($_COOKIE['yidio_utm_medium']) ? $_COOKIE['yidio_utm_medium'] : ""; $utm_campaign_exp = isset($_COOKIE['yidio_utm_campaign']) ? $_COOKIE['yidio_utm_campaign'] : ""; } // $utm_campaign_array_exp = array(1,2,3,4,5); // UTM campaign targeting $dir_allowed_url_exp = array("www.yidio.com"); // URL targeting $full_dir_url_exp = strtolower($_SERVER['REQUEST_URI']); $full_dir_url_exp = explode("?",$full_dir_url_exp); $full_dir_url_exp = explode("#",$full_dir_url_exp[0]); $full_dir_url_exp = explode("&",$full_dir_url_exp[0]); $full_dir_url_exp = $_SERVER['HTTP_HOST'].$full_dir_url_exp[0]; //echo "exp test $full_dir_url_exp
"; if(1){ // strtolower($utm_source_exp) == "google" && strtolower($utm_medium_exp) == "search" && in_array($utm_campaign_exp,$utm_campaign_array_exp) $is_dir_exp_ul = 0; foreach($dir_allowed_url_exp as $edl){ if(stristr($full_dir_url_exp,$edl)){ $is_dir_exp_ul = 1; break; } } if($is_dir_exp_ul == 1){ $rand_percentage_exp = rand(0,100); if ($rand_percentage_exp <= 100) { // Traffic allocation //$global_provider_id_session = 65; $detail_variation_session = 1; //rand(0,1) $_SESSION['detail_variation_session'] = $provider_exp_id.".".$detail_variation_session; } else { $_SESSION['detail_variation_session'] = $detail_variation_session; } } else { $_SESSION['detail_variation_session'] = $detail_variation_session; } }else{ $_SESSION['detail_variation_session'] = $detail_variation_session; } }else{ $_SESSION['detail_variation_session'] = $detail_variation_session; } }elseif(isset($_SESSION['force_variant_detail'])){ $detail_variation_session = $_SESSION['force_variant_detail']; //$global_provider_id_session = 65; }else{ if($_SESSION['detail_variation_session'] != "0" && $_SESSION['detail_variation_session'] != "-1"){ $sid = explode(".",$_SESSION['detail_variation_session']); if(count($sid) > 1){ //$global_provider_id_session = 65; } $detail_variation_session = end($sid); } } }*/ //new dir enabled for all desktop traffic $dir_variation_session = 1; /*//CORE-3033 for server side A/B test for new directories pages $dir_variation_session = 0; $force_variant = isset($_REQUEST['force_variant']) ? $_REQUEST['force_variant'] : ""; if($force_variant == 1){ $dir_variation_session = 1; $detail_variation_session = 1; $global_provider_id_session = 60; }else{ $dir_exp_id = "mvy3DSVZRlaD1z1LQvg7ig"; // Experiment ID if (session_status() == PHP_SESSION_NONE) { session_start(); } if(!isset($_SESSION['dir_variation_session'])){ $country = isset($_COOKIE["yidio_user_country_code"]) ? strtoupper($_COOKIE["yidio_user_country_code"]) : ""; if($country == ""){ $country = isset($_SERVER['GEOIP_COUNTRY_CODE']) ? strtoupper($_SERVER['GEOIP_COUNTRY_CODE']) : ""; } if($country == "" || $country == "US"){ $utm_source_exp = ''; $utm_medium_exp = ''; $utm_campaign_exp = ''; if(isset($_REQUEST['utm_source'])){ $utm_source_exp = $_REQUEST['utm_source']; $utm_medium_exp = isset($_REQUEST['utm_medium']) ? $_REQUEST['utm_medium'] : ""; $utm_campaign_exp = isset($_REQUEST['utm_campaign']) ? $_REQUEST['utm_campaign'] : ""; }elseif(!isset($_REQUEST['utm_source']) && (isset($_COOKIE["yidio_utm_source"]) && $_COOKIE["yidio_utm_source"] != "")){ $utm_source_exp = $_COOKIE["yidio_utm_source"]; $utm_medium_exp = isset($_COOKIE['yidio_utm_medium']) ? $_COOKIE['yidio_utm_medium'] : ""; $utm_campaign_exp = isset($_COOKIE['yidio_utm_campaign']) ? $_COOKIE['yidio_utm_campaign'] : ""; } // $utm_campaign_array_exp = array(1,2,3,4,5); // UTM campaign targeting $dir_allowed_url_exp = array("www.yidio.com/movies", "www.yidio.com/tv-shows", "www.yidio.com/filter"); // URL targeting $full_dir_url_exp = strtolower($_SERVER['REQUEST_URI']); $full_dir_url_exp = explode("?",$full_dir_url_exp); $full_dir_url_exp = explode("#",$full_dir_url_exp[0]); $full_dir_url_exp = explode("&",$full_dir_url_exp[0]); $full_dir_url_exp = $_SERVER['HTTP_HOST'].$full_dir_url_exp[0]; if(strtolower($utm_source_exp) == "google" && strtolower($utm_medium_exp) == "search"){// && in_array($utm_campaign_exp,$utm_campaign_array_exp) $is_dir_exp_ul = 0; foreach($dir_allowed_url_exp as $edl){ if(stristr($full_dir_url_exp,$edl)){ $is_dir_exp_ul = 1; break; } } if($is_dir_exp_ul == 1){ $rand_percentage_exp = rand(0,100); if ($rand_percentage_exp <= -1) { // Traffic allocation $dir_variation_session = rand(0,1); $_SESSION['dir_variation_session'] = $dir_exp_id.".".$dir_variation_session; } else { $_SESSION['dir_variation_session'] = $dir_variation_session; } } else { $_SESSION['dir_variation_session'] = $dir_variation_session; } }else{ $_SESSION['dir_variation_session'] = $dir_variation_session; } }else{ $_SESSION['dir_variation_session'] = $dir_variation_session; } }else{ if($_SESSION['dir_variation_session'] != "0"){ $sid = explode(".",$_SESSION['dir_variation_session']); $dir_variation_session = end($sid); } } }*/ ?>Page at start of header '.$total_time.' ms.'; } if(!defined('BASE_DIR')) { define('BASE_DIR','./'); } define('APPENGVER',0.4); ini_set("soap.wsdl_cache_enabled", "0"); define('MODULEPATH',BASE_DIR.'mods/'); define('SHAREDPATH',BASE_DIR.'classes/shared/'); define('CLASSPATH',BASE_DIR.'classes/'); define('PAGES_DIR',BASE_DIR.'pages/'); define('CACHE_DIR',BASE_DIR.'cache/'); define('SEARCH_DIR',BASE_DIR.'api/'); $app_init=1; if(!defined('BACKEND_DIR')){ define('BACKEND_DIR',BASE_DIR.'_yadmin/'); define('BACKEND_MODULES_DIR',BACKEND_DIR.'modules/'); } require_once( BASE_DIR.'common/autoload.php' ); use Facebook\FacebookSession; use Facebook\FacebookRedirectLoginHelper; use Facebook\FacebookRequest; use Facebook\FacebookResponse; use Facebook\FacebookSDKException; use Facebook\FacebookRequestException; use Facebook\FacebookAuthorizationException; use Facebook\GraphObject; use Facebook\GraphUser; use Facebook\GraphSessionInfo; use Facebook\FacebookJavaScriptLoginHelper; use Facebook\Facebook; if(!defined('WORKER_DIR')){ define('WORKER_DIR',BASE_DIR.'../worker/'); } if(!defined('YIDIO_APP_RUN_MODE')){ define('YIDIO_APP_RUN_MODE','www'); } define('BACKEND_PATH','_yadmin/'); if( defined('YIDIO_APP_RUN_MODE') && YIDIO_APP_RUN_MODE == 'YADMIN'){ define('BACKEND_BASE_URL','https://'.CONF_BACKEND_HOST.'/'.BACKEND_PATH); } define('TYPE_REVIEW_SHOW_REVIEW',1); define('TYPE_REVIEW_MUSIC_REVIEW',2); define('TYPE_REVIEW_MOVIE_REVIEW',3); define('TYPE_REVIEW_CELEBRITY_REVIEW',4); define('TYPE_COMMENT_SHOW_REVIEW',1); define('TYPE_COMMENT_MUSIC_REVIEW',2); define('TYPE_COMMENT_MOVIE_REVIEW',3); define('TYPE_COMMENT_CELEBRITY_REVIEW',4); define('TYPE_COMMENT_SHOW_ESPISODE',4); define('TYPE_COMMENT_MUSIC_TRACK',5); define('TYPE_COMMENT_MOVIE_VIDEO',6); $servername = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'www.yidio.com'; define( 'SERVER_NAME', $servername ); define('CONF_YIDIO_URL', 'https://'.SERVER_NAME.'/'); define('CONF_API_URL',CONF_YIDIO_URL.'api/'); define('CONF_SESSION_SAVEPATH', BASE_DIR."cache/session"); define('CONF_SESSION_COOKIE_NAME', 'yidio_sid'); define('CONF_SESSION_COOKIE_LIFETIME', 0); define('CONF_SESSION_COOKIE_PATH', "/"); define('CONF_SESSION_COOKIE_DOMAIN', SERVER_NAME); define('CONF_SESSION_TIMEOUT', 3600); define('CONF_MAILER_FROM', 'mailer@yidio.com'); define('CONF_MAILER_FROM_NAME', 'Yidio.com'); define('CONF_MAILER_CHARSET','utf-8'); define('bDEBUG',0); define('CONF_DEFAULT_PERPAGE',20); define('CONF_BACKEND_DEFAULT_PERPAGE',20); global $visitor_array; error_reporting(E_ALL); error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ^ E_STRICT ^ E_DEPRECATED); if(!isset($header)) { include_once BASE_DIR."classes/Core/User.php"; include_once BASE_DIR."classes/Admin/User.php"; $folder = "base"; include_once BASE_DIR."common/code_definitions.inc.php"; include_once BASE_DIR."include/smarty/smarty_config.php"; if($read_only==1) include_once BASE_DIR."include/database_config_readonly.php"; else include_once BASE_DIR."include/database_config.php"; include_once BASE_DIR."include/class_admin.php"; include_once BASE_DIR."include/class_database.php"; include_once BASE_DIR."include/class_datetime.php"; include_once BASE_DIR."include/class_comment.php"; include_once BASE_DIR."include/class_field.php"; include_once BASE_DIR."include/class_hook.php"; include_once BASE_DIR."include/class_language.php"; include_once BASE_DIR."include/class_notify.php"; include_once BASE_DIR."include/class_upload.php"; include_once BASE_DIR."include/class_user.php"; include_once BASE_DIR."include/class_url.php"; include_once BASE_DIR."include/class_misc.php"; include_once BASE_DIR."include/class_ads.php"; include_once BASE_DIR."include/class_actions.php"; include_once BASE_DIR."include/class_imeem.php"; include_once BASE_DIR."include/functions_general.php"; include_once BASE_DIR."include/functions_email.php"; include_once BASE_DIR."include/functions_stats.php"; include_once BASE_DIR."include/class_module.php"; include_once BASE_DIR."include/function_isgd.php"; include_once BASE_DIR."include/function_groove.php"; include_once BASE_DIR."common/code_utils.inc.php"; include_once BASE_DIR."common/code_functions.shows.inc.php"; include_once BASE_DIR."common/code_favorities.inc.php"; include_once BASE_DIR."common/code_status.inc.php"; include_once BASE_DIR."common/code_search.inc.php"; //include_once BASE_DIR."include/class_pgsql.php"; include_once BASE_DIR."ClientIpAddr.class.php"; include_once BASE_DIR."include/sponosred_function.php"; //get_domain_name_test();//proxy check $vis_key_array = "visit_array"; if(is_object($memcached)){ $get_result = $memcached->get($vis_key_array); if($get_result) { $visitor_array = $get_result; } } define('CONF_API_ABSOLUTE_PATH',OWN_HOME.'/api/'); $country = ''; if(isset( $_SERVER['GEOIP_COUNTRY_CODE'] ) && (!isset($_COOKIE["yidio_user_country_code"]) || $_COOKIE["yidio_user_country_code"] == '' || $_COOKIE["yidio_user_country_code"] == 'XX' ) ){ $country = change_yidio_user_country_code(); } //session_start(); if(stristr($_SERVER['REQUEST_URI'],"/admin") || stristr($_SERVER['REQUEST_URI'],"_admin") || stristr($_SERVER['REQUEST_URI'],"/premium_cancel.php") || stristr($_SERVER['HTTP_REFERER'],"/user_logout.php")){ session_start(); } $glob_setts = array(); $glob_setts['COMMENTS']['TYPE']['ALLOWED']=array(TYPE_COMMENT_SHOW_REVIEW, TYPE_COMMENT_MUSIC_REVIEW, TYPE_COMMENT_MOVIE_REVIEW, TYPE_COMMENT_CELEBRITY_REVIEW, TYPE_COMMENT_SHOW_ESPISODE, TYPE_COMMENT_MUSIC_TRACK, TYPE_COMMENT_MOVIE_VIDEO);//, TYPE_COMMENT_SHOW_NAME, TYPE_COMMENT_MUSIC_ARTIST, TYPE_COMMENT_MOVIE_TITLE); $glob_setts['REVIEWS']['TYPE']['ALLOWED']=array(TYPE_REVIEW_SHOW_REVIEW, TYPE_REVIEW_MUSIC_REVIEW, TYPE_REVIEW_MOVIE_REVIEW, TYPE_REVIEW_CELEBRITY_REVIEW); // DEFINE SE PAGE CONSTANT define('SE_PAGE', true); // SET INCLUDE PATH TO ROOT OF SE set_include_path(get_include_path() . PATH_SEPARATOR . realpath("./") . PATH_SEPARATOR . MODULEPATH . PATH_SEPARATOR . CLASSPATH . PATH_SEPARATOR . SHAREDPATH); function yidio_autoloader($class_name) { if( substr($class_name,0,11) === 'YidioModule'){ $classNamePath = substr($class_name,11); $matchnum = preg_match("/^([A-Z][a-z0-9]*)?([A-Za-z0-9]*)/", $classNamePath, $matches); if ($matchnum > 0) { if(!empty($matches[2])){ $package = $matches[1] ; $module_filename = $matches[2]; }else{ $package = false; $module_filename = $matches[1]; } // treat modules a bit differently $class_filepath = MODULEPATH.($package!==false ? $package.'/' : '' ) .$module_filename.'.php'; if (file_exists($class_filepath)) { require_once($class_filepath); } else { throw new Exception("Class $class_name not found."); } } }elseif( substr($class_name,0,9) === 'YidioPage'){ $classNamePath = substr($class_name,9); $matchnum = preg_match("/^([A-Z][a-z0-9]*)?([A-Za-z0-9]*)/", $classNamePath, $matches); if ($matchnum > 0) { if(!empty($matches[2])){ $package = $matches[1] ; $module_filename = $matches[2]; }else{ $package = false; $module_filename = $matches[1]; } // treat modules a bit differently $class_filepath = PAGES_DIR.($package!==false ? $package.'/' : '' ) .$module_filename.'.php'; if (file_exists($class_filepath)) { require_once($class_filepath); } else { throw new Exception("Class $class_name not found."); } } }elseif( substr($class_name,0,8) === 'YidioApp'){ $classNamePath = substr($class_name,8); // $fileName = str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; $matchnum = preg_match("/^([A-Z][a-z0-9]*)?([A-Za-z0-9]*)/", $classNamePath, $matches); // debug($matches,'mn'); if ($matchnum > 0) { if(!empty($matches[2])){ $package = $matches[1] ; $module_filename = $matches[2]; }else{ $package = false; $module_filename = $matches[1]; } // treat modules a bit differently $class_filepath = CLASSPATH.($package!==false ? $package.'/' : '' ) .$module_filename.'.php'; // debug($class_filepath,'class_filepath'); if (file_exists($class_filepath)) { require_once($class_filepath); } else { throw new Exception("Class $class_name not found."); } } }elseif( substr($class_name,0,18) === 'YidioBackendModule'){ $classNamePath = substr($class_name,18); $matchnum = preg_match("/^([A-Z][a-z0-9]*)?([A-Za-z0-9]*)/", $classNamePath, $matches); $_cidx=count($matches)-1; if($matches[$_cidx]=='Ajax'){ $ajax=true; array_pop($matches); }else{ $ajax=false; } //die(); if ($matchnum > 0) { if(!empty($matches[2])){ $package = $matches[1] ; $module_filename = $matches[2]; }else{ $package = false; $module_filename = $matches[1]; } // treat modules a bit differently $class_filepath = BACKEND_MODULES_DIR.($package!==false ? $package.'/' : $module_filename.'/' ) .$module_filename.($ajax==true?'Ajax':'').'.php'; if (file_exists($class_filepath)) { require_once($class_filepath); } else { throw new Exception("Class $class_name not found."); } } }elseif(strpos($class_name,"_")!==false){ // echo 'cn='.$class_name."\n"; $_class_name_explode = explode("_",$class_name); if(is_array($_class_name_explode) && count($_class_name_explode)>1){ $_class_path=''; foreach($_class_name_explode as $_part_name){ $_class_path .= "/".$_part_name; } $_class_path = SHAREDPATH . ltrim($_class_path,"/").".php"; // echo "_class_path:".$_class_path."\n"; $class_file_exists = file_exists($_class_path); // echo "class_file_exists:".$class_file_exists."\n"; if ($class_file_exists) { require_once($_class_path); } else { //throw new Exception("Class $class_name not found."); } } } } spl_autoload_register('yidio_autoloader'); // CHECK FOR PAGE VARIABLE if(!isset($page)) { $page = ""; } // SET INCLUDE PATH TO ROOT OF SE set_include_path(get_include_path() . PATH_SEPARATOR . realpath("./") . PATH_SEPARATOR . MODULEPATH . PATH_SEPARATOR . CLASSPATH); function y_urldecode($url){ return strtr(urldecode($_GET['link_name']),array(':amp;'=>'&')); } function y_urlencode($link){ return urlencode(strtr($link,array('&'=>':amp;'))); } if(isset($_REQUEST['test_speed']) && $_REQUEST['test_speed'] == 1) { $finish = microtime(true); $total_time = round(($finish - $start), 3) * 1000; echo '
header before db files includes '.$total_time.' ms.'; } //define('OWN_HOME', '/home/beta/www'); //if(!defined('OWN_HOME')) define('OWN_HOME', '/home/beta/www'); //if(!defined('OWN_CACHE')) define('OWN_CACHE', OWN_HOME . '/cache'); $dbs_idents = array('yidio','social','movby');//,'data' foreach($dbs_idents as $db_ident){ $dbvar_name='db'.$db_ident; $$dbvar_name = YidioAppCoreDatabase::getInstance($db_ident); } /* $dbsocial = YidioAppCoreDatabase::getInstance('social'); $dbyidio = YidioAppCoreDatabase::getInstance('yidio'); $dbceleb = YidioAppCoreDatabase::getInstance('celeb'); $dbmusic = YidioAppCoreDatabase::getInstance('music'); */ $database = $dbsocial; $yidio = $dbyidio; //$database = new se_database($database_host, $database_username, $database_password, $database_name); //$yidio = new se_database($db_yidio['dbhost'], $db_yidio['dbuser'], $db_yidio['password'], $db_yidio['dbname']); $actions = new se_actions(); //$yidio_pg = new pgsql($database_pgsql);//init pgsql leo-odesk //$yidio_pg->connect(); // SET DATABASE CONSTANTS //$database->database_query("SET @SE_PRIVACY_SELF = 1, @SE_PRIVACY_FRIEND = 2, @SE_PRIVACY_FRIEND2 = 4, @SE_PRIVACY_SUBNET = 8, @SE_PRIVACY_REGISTERED = 16, @SE_PRIVACY_ANONYMOUS = 32"); // SET LANGUAGE CHARSET //$database->database_set_charset(SE_Language::info('charset')); if(isset($_REQUEST['test_speed']) && $_REQUEST['test_speed'] == 1) { $finish = microtime(true); $total_time = round(($finish - $start), 3) * 1000; echo '
header after db files includes '.$total_time.' ms.'; } // GET SETTINGS $key_setting = md5("SETTING_ALL_QUERY_NEW"); if(is_object($memcached)){ $get_result_setting = $memcached->get($key_setting); if ($get_result_setting) { $setting = $get_result_setting; } else { // Get Settings $setting = $database->database_fetch_assoc($database->database_query("SELECT * FROM se_settings LIMIT 1")); $memcached->set($key_setting, $setting,86400); // Store the result of the query for 4 hours } }else{ // Get Settings $setting = $database->database_fetch_assoc($database->database_query("SELECT * FROM se_settings LIMIT 1")); } if(isset($_REQUEST['test_speed']) && $_REQUEST['test_speed'] == 1) { $finish = microtime(true); $total_time = round(($finish - $start), 3) * 1000; echo '
header after setting cache '.$total_time.' ms.'; } if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE '.YIDIO_APP_RUN_MODE.'
'; } if(YIDIO_APP_RUN_MODE == 'www'){ if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 2 '.YIDIO_APP_RUN_MODE.'
'; } // CREATE URL CLASS $url = new se_url(); // CREATE DATETIME CLASS $datetime = new se_datetime(); // CREATE MISC CLASS $misc = new se_misc(); if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 2.1 '.YIDIO_APP_RUN_MODE.'
'; } // ENSURE NO SQL INJECTIONS THROUGH POST OR GET ARRAYS //$_POST = security($_POST); //$_GET = security($_GET); //$_COOKIE = security($_COOKIE); // CHECK FOR PAGE OWNER if(isset($_POST['user'])) { $user_username = $_POST['user']; } elseif(isset($_GET['user'])) { $user_username = $_GET['user']; } else { $user_username = ""; } if(isset($_POST['user_id'])) { $user_id = $_POST['user_id']; } elseif(isset($_GET['user_id'])) { $user_id = $_GET['user_id']; } else { $user_id = ""; } if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 2.11 '.YIDIO_APP_RUN_MODE.'
'; } $se_param_array = array(); $se_param_array[0] = $user_id; $se_param_array[1] = $user_username; if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 2.112 '.YIDIO_APP_RUN_MODE.'
'; } $owner = new se_user($se_param_array);//Array($user_id, $user_username) if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 2.2 '.YIDIO_APP_RUN_MODE.'
'; } // CREATE USER OBJECT AND ATTEMPT TO LOG USER IN $user = new se_user(); $user->user_checkCookies(); if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 2.3 '.YIDIO_APP_RUN_MODE.'
'; } //Don't over write user if use already login with yidio if($user->user_exists == 0){ if(isset($_COOKIE['facebookloged']) && $_COOKIE['facebookloged']==1){ if(isset($_COOKIE['fb_token'])){ FacebookSession::setDefaultApplication($APPID,$SECRET); //check for existing session and validate it if(isset($_COOKIE['fb_token'])) // !is_array($fbme) { try { $fb = new Facebook([ 'app_id' => $APPID, 'app_secret' => $SECRET, 'default_graph_version' => 'v2.9', ]); $session = FacebookSession::newAppSession(); $session = new FacebookSession($_COOKIE['fb_token']); if (!$session->Validate($APPID, $SECRET)) { unset($session); setcookie ("fb_token", "", time() - 3600); } else { try { $tokens = $session->getAccessToken(); $tokens = $tokens->extend(); setcookie ("fb_token", $tokens, time() + 84600); } catch(FacebookRequestException $e) { unset($session); setcookie ("fb_token", $tokens, time() - 3600); } try { $request = new FacebookRequest($session, 'GET', '/me', array('fields' => 'id,name,gender,birthday,email,first_name,hometown,last_name,quotes')); // this means: retrieve a GraphObject and cast it as a GraphUser (as /me returns a GraphUser object) $me = $request->execute()->getGraphObject(GraphUser::className()); } catch (FacebookRequestException $ex) { } if(is_object($me)){ $fb_uid = $me->getId(); if($fb_uid > 0){ $user->fb_user($fb_uid); $smarty->assign('fb_uid',$fb_uid); $smarty->assign('b',$b); } } } }catch(Exception $e) {} } } }//end facebookloged if $return_url = $_REQUEST['return_url']; if(strstr($return_url,"sub_onboarding.php") || strstr($return_url,"mobile-onboarding.php")){ $user_id = $user->user_info['user_id'];//$_COOKIE['user_id']; $_username= $user->user_info['user_username']; //echo $user_id."----".$_username; grab_favorites_from_facebook($user_id,$_username,'1'); //exit; } }//end user_exist if // USER IS LOGGED IN if($user->user_exists != 0) { // SET TIMEZONE IF USER IS LOGGED IN $global_timezone = $user->user_info['user_timezone']; // USER IS NOT LOGGED IN } else { if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 2.5 '.YIDIO_APP_RUN_MODE.'
'; } // SEND USER TO LOGIN IF TRYING TO ACCESS USER CONTROL PANEL if(substr($page, 0, 5) == "user_" && substr($page, 0, 11) != "user_points") { header("Location: login.php?return_url=".$url->url_current()); exit(); } // SET TIMEZONE IF USER IS LOGGED OUT $global_timezone = $setting['setting_timezone']; // SET VISITOR LAST ACTIVE TIME if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { /*$database->database_query("INSERT INTO se_visitors (visitor_ip, visitor_lastactive) VALUES ('".$_SERVER['HTTP_X_FORWARDED_FOR']."', '".time()."') ON DUPLICATE KEY UPDATE visitor_lastactive = '".time()."'");*/ check_visitor(); //echo "


app_init.inc.php ----1----


"; //print_r($visitor_array); } else { /*$database->database_query("INSERT INTO se_visitors (visitor_ip, visitor_lastactive) VALUES ('".$_SERVER['REMOTE_ADDR']."', '".time()."') ON DUPLICATE KEY UPDATE visitor_lastactive = '".time()."'");*/ check_visitor(); //echo "


app_init.inc.php ----2----


"; //print_r($visitor_array); } } if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 2.6 '.YIDIO_APP_RUN_MODE.'
'; } // SET UP LANGUAGE VARIABLES if(isset($_GET['lang_id']) && $setting['setting_lang_allow'] == 1 && $user->user_exists != 0) { $user->user_info['user_language_id'] = (int)$_GET['lang_id']; setcookie('se_language_anonymous', $user->user_info['user_language_id'], time()+99999999, "/"); //$database->database_query("UPDATE se_users SET user_language_id='".$user->user_info['user_language_id']."' WHERE user_id='".$user->user_info['user_id']."'"); } elseif(isset($_GET['lang_id']) && $setting['setting_lang_anonymous']) { setcookie('se_language_anonymous', (int)$_GET['lang_id'], time()+99999999, "/"); $_COOKIE['se_language_anonymous'] = (int)$_GET['lang_id']; } if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 2.7 '.YIDIO_APP_RUN_MODE.'
'; } SE_Language::select($user); if(SE_Language::info('language_setlocale') != '') { $multi_language = 1; setlocale(LC_TIME, SE_Language::info('language_setlocale')); } header("Content-Language: ".SE_Language::info('language_code')); if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 2.8 '.YIDIO_APP_RUN_MODE.'
'; } // UPDATE STATS TABLE update_stats("views"); if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 2.9 '.YIDIO_APP_RUN_MODE.'
'; } // CREATE ACTIONS CLASS // CREATE NOTIFICATION CLASS $notify = new se_notify(); if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 2.10 '.YIDIO_APP_RUN_MODE.'
'; } // CREATE ADS CLASS $ads = new se_ads(); if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 2.11 '.YIDIO_APP_RUN_MODE.'
'; } // CREATE GLOBAL CSS STYLES VAR (USED FOR CUSTOM USER-DEFINED PROFILE/PLUGIN STYLES) $global_css = ""; // INCLUDE RELEVANT PLUGIN FILES // AND SET PLUGIN HEADER TEMPLATES $show_menu_user = FALSE; $global_plugins = Array(); //$plugins = $database->database_query("SELECT plugin_type, plugin_icon FROM se_plugins WHERE plugin_disabled=0 ORDER BY plugin_id DESC"); //debug($user,'o:'); $facebooklogout=0; if(isset($_COOKIE['facebookloged']) && $_COOKIE['facebookloged']==1) // !is_array($fbme) { if(isset($_COOKIE['fbsr_'.$APPID]) || isset($_COOKIE['fbm_'.$APPID])){ //$facebook=facebook_client(); } else { $facebooklogout=1; setcookie ("facebookloged", "0", time() - 3600); setcookie ("getLoginStatus_firstime", "0", time() - 3600); setcookie("user_id", "0", time() - 3600); setcookie("user_email", "0", time() - 3600); setcookie("se_user_pass", "0", time() - 3600); } } if(isset($facebooklogout) && $facebooklogout==1){ setcookie ("facebookloged", "0", time() - 3600); setcookie ("getLoginStatus_firstime", "0", time() - 3600); $user->user_logout(); } // CREATE GLOBAL CSS STYLES VAR (USED FOR CUSTOM USER-DEFINED PROFILE/PLUGIN STYLES) $global_css = ""; if($user->user_exists != 0 && $user->user_info['fbuid'] > 0) { global $fb_uid; //$facebook=facebook_client(); //$fb_uid = $facebook->get_loggedin_user(); try { //$fb_uid = $facebook->getUser(); $fb_uid = $user->user_info['fbuid']; } catch (Exception $e) { //echo 'Caught exception: ', $e->getMessage(), "\n"; } if($fb_uid>0) { $smarty->assign('fb_uid',$fb_uid); $smarty->assign('b',$b); } } if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 3 '.YIDIO_APP_RUN_MODE.'
'; } /*while($plugin_info = $database->database_fetch_assoc($plugins)) { $plugin_vars = Array(); if(file_exists("header_".$plugin_info['plugin_type'].".php")) { include_once "header_".$plugin_info['plugin_type'].".php"; } $global_plugins[$plugin_info['plugin_type']] = $plugin_vars; if(isset($plugin_vars['menu_user']) && $plugin_vars['menu_user'] != "") { $show_menu_user = TRUE; } }*/ include_once BASE_DIR."header_invite.php"; include_once BASE_DIR."header_scheduler.php"; include_once BASE_DIR."header_userpoints.php"; if(isset($_REQUEST['test_all_error']) && $_REQUEST['test_all_error'] == 1) { echo '
YIDIO_APP_RUN_MODE 4 '.YIDIO_APP_RUN_MODE.'
'; } //$points_all = userpoints_get_all($user->user_info['user_id']); /*if($points_all) { $user_points = $points_all['userpoints_count']; $user_points_totalearned = $points_all['userpoints_totalearned']; $user_points_totalspent = $points_all['userpoints_totalspent']; } else { $user_points = 0; $user_points_totalearned = 0; $user_points_totalspent =0; } $smarty->assign('user_points', number_format($user_points)); $smarty->assign('user_points_totalearned', $user_points_totalearned); $smarty->assign('user_points_totalspent', $user_points_totalspent); */ $global_plugins['plugin_controls'] = Array('show_menu_user' => $show_menu_user); $request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; $smarty->assign('return_url',$request_uri); //$smarty->assign('base_url',BASE_URL); // CHECK TO SEE IF SITE IS ONLINE OR NOT if($setting['setting_online'] == 0) { // CREATE ADMIN OBJECT AND ATTEMPT TO LOG ADMIN IN $admin = new se_admin(); $admin->admin_checkCookies(); // ADMIN NOT LOGGED IN, DISPLAY OFFLINE PAGE if($admin->admin_exists == 0) { $page = "offline"; include_once BASE_DIR."footer.php"; } } $smarty->assign('webuser',$user); // CALL HEADER HOOK ($hook = SE_Hook::exists('se_header')) ? SE_Hook::call($hook, array()) : NULL; // CHECK IF LOGGED-IN USER IS ON OWNER'S BLOCKLIST if($user->user_exists == 1) { if($owner->user_blocked($user->user_info['user_id'])) { // ASSIGN VARIABLES AND DISPLAY ERROR PAGE $page = "error"; $smarty->assign('error_header', 639); $smarty->assign('error_message', 640); $smarty->assign('error_submit', 641); include_once BASE_DIR."footer.php"; } } // CHECK TO SEE IF USER HAS BEEN BLOCKED BY IP $banned_ips = explode(",", $setting['setting_banned_ips']); $remote_addr = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1'; if(in_array($remote_addr, $banned_ips)) { if($remote_addr != '' && in_array($remote_addr, $banned_ips)) { // ASSIGN VARIABLES AND DISPLAY ERROR PAGE $page = "error"; $smarty->assign('error_header', 639); $smarty->assign('error_message', 807); $smarty->assign('error_submit', 641); include_once BASE_DIR."footer.php"; } } } } if(isset($_REQUEST['test_speed']) && $_REQUEST['test_speed'] == 1) { $finish = microtime(true); $total_time = round(($finish - $start), 3) * 1000; echo '
header end includes '.$total_time.' ms.'; } ?>
Fatal error: Uncaught Error: Call to a member function assign() on null in /var/vhost/web/releases/54f37203efa4698f069379d899ad5006a85733f6/movie.php:142 Stack trace: #0 {main} thrown in /var/vhost/web/releases/54f37203efa4698f069379d899ad5006a85733f6/movie.php on line 142