function Page_Init() { global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm; global $tbl_target; // 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->CanAdd()) { $Security->SaveLastUrl(); $this->Page_Terminate("tbl_targetlist.php"); } // Create form object $objForm = new cFormObj(); // Global Page Loading event (in userfn*.php) Page_Loading(); // Page Load event $this->Page_Load(); }
function Page_Init() { global $gsExport, $gsCustomExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm; // User profile $UserProfile = new cUserProfile(); // Security $Security = new cAdvancedSecurity(); if (!$Security->IsLoggedIn()) { $Security->AutoLogin(); } if ($Security->IsLoggedIn()) { $Security->TablePermission_Loading(); } $Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName); if ($Security->IsLoggedIn()) { $Security->TablePermission_Loaded(); } if (!$Security->CanAdd()) { $Security->SaveLastUrl(); $this->setFailureMessage($Language->Phrase("NoPermission")); // Set no permission if ($Security->CanList()) { $this->Page_Terminate(ew_GetUrl("flightlist.php")); } else { $this->Page_Terminate(ew_GetUrl("login.php")); } } if ($Security->IsLoggedIn()) { $Security->UserID_Loading(); $Security->LoadUserID(); $Security->UserID_Loaded(); } // Create form object $objForm = new cFormObj(); $this->CurrentAction = @$_GET["a"] != "" ? $_GET["a"] : @$_POST["a_list"]; // Set up current action // Global Page Loading event (in userfn*.php) Page_Loading(); // Page Load event $this->Page_Load(); // Check token if (!$this->ValidPost()) { echo $Language->Phrase("InvalidPostRequest"); $this->Page_Terminate(); exit; } // Process auto fill if (@$_POST["ajax"] == "autofill") { $results = $this->GetAutoFill(@$_POST["name"], @$_POST["q"]); if ($results) { // Clean output buffer if (!EW_DEBUG_ENABLED && ob_get_length()) { ob_end_clean(); } echo $results; $this->Page_Terminate(); exit; } } // Create Token $this->CreateToken(); }
} ?> </tr> <?php } $rs->MoveNext(); } ?> </table> <?php if ($user->Export == "") { ?> <table> <tr><td><span class="phpmaker"> <?php if ($Security->CanAdd()) { ?> <a href="useradd.php">添加</a> <?php } ?> </span></td></tr> </table> <?php } } ?> </form> <?php // Close recordset and connection if ($rs) {