<?php function common_preprocessing() { global $dataset,$Config,$LogDBConn; if (NOCOOKIE) $Config->LIST_PAGE_LENGTH_DEFAULT=5; emit_userpcid_cookie(); $is_admin=is_admin(); $is_member=is_member(); $is_valid_compere=is_valid_compere(); $is_once_a_compere=is_once_a_compere(); $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['ADMIN-ONLY']=$is_admin?array(0):array(); $dataset['MEMBER-ONLY']=$is_member?array(0):array(); $dataset['COMPERE-ONLY']=$is_valid_compere?array(0):array(); $dataset['NOT-COMPERE']=$is_once_a_compere?array():array(0); $dataset['COMPERE-ENDED']=$is_once_a_compere && !$is_valid_compere?array(0):array(); $dataset['LOGGED-IN']=($is_admin || $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'].'://'.$Config->SERVER_DOMAIN; $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['GUEST-ONLY']=(!$is_admin && !$is_member)?array(0):array(); $dataset['MB_ID']=current_mb_id(); $dataset['MB_NICKNAME']=current_mb_nickname(); } common_preprocessing(); ?>