function Page_Init() { global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm; global $tbl_facebook_stat; // Security $Security = new cAdvancedSecurity(); if (!$Security->IsLoggedIn()) { $Security->AutoLogin(); } if (!$Security->IsLoggedIn()) { $Security->SaveLastUrl(); $this->Page_Terminate("login.php"); } $Security->TablePermission_Loading(); $Security->LoadCurrentUserLevel($this->TableName); $Security->TablePermission_Loaded(); if (!$Security->IsLoggedIn()) { $Security->SaveLastUrl(); $this->Page_Terminate("login.php"); } if (!$Security->CanSearch()) { $Security->SaveLastUrl(); $this->Page_Terminate("tbl_facebook_statlist.php"); } // Create form object $objForm = new cFormObj(); // Global Page Loading event (in userfn*.php) Page_Loading(); // Page Load event $this->Page_Load(); }