<?php function common_preprocessing() { global $dataset,$Config; emit_userpcid_cookie(); $is_member=is_member(); $language_requested=language_requested(); $dataset['MAINMENU']=array(0); $dataset['MAINFOOTER']=array(0); $dataset['SERVER-DOMAIN']=$Config->SERVER_DOMAIN; $dataset['REQUEST-SCHEME']='http'.(is_https()?'s':''); $dataset['NO-DISPLAY']=array(); $dataset['GUEST-ALSO']=array(0); $dataset['DEMO-ONLY']=defined('__DEMO__')?array(0):array(); $dataset['PRODUCTION-ONLY']=defined('__PRODUCTION__')?array(0):array(); $dataset['MEMBER-ONLY']=$is_member?array(0):array(); $dataset['LOGGED-IN']=$is_member?array(0):array(); $dataset['TEAM-AVAIL']=$Config->TeamAvailable?array(0):array(); $dataset['REQUEST_URI']=$_SERVER['REQUEST_URI']; $dataset['NOT-SSL']=!$Config->AllowSSL || is_https()?array():array(0); $dataset['IS-SSL']=is_https()?array(0):array(); $dataset['PC-ONLY']=TGET('MOBILE')?array():array(0); $dataset['MOBILE-ONLY']=TGET('MOBILE')?array(0):array(); $dataset['CHARGED-ONLY']=$Config->Charged?array(0):array(); $dataset['LANGUAGE']=language_requested(); $dataset['ROOT-URL']=$dataset['REQUEST-SCHEME'].'://'.$_SERVER['SERVER_NAME']; $dataset['CURRENT-PAGE-URL']=$dataset['REQUEST-SCHEME'].'://' .substr($Config->SERVER_DOMAIN,0,strcspn($Config->SERVER_DOMAIN,'/')) .$_SERVER['REQUEST_URI']; $dataset['LOGIN_SERVER_PREFIX']=$dataset['REQUEST-SCHEME'].'://'.$Config->LOGIN_SERVER_NAME .($language_requested?'/'.$language_requested:'') .(NOCOOKIE?'/m-'.session_id():''); $dataset['RETURN-POINT-AVAIL']=get_return_point()?array(0):array(); $dataset['GUEST-ONLY']=!$is_member?array(0):array(); $dataset['MB_ID']=current_mb_id(); $dataset['MB_NICKNAME']=current_mb_nickname(); } common_preprocessing(); ?>