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->CanEdit()) {
         $Security->SaveLastUrl();
         $this->setFailureMessage($Language->Phrase("NoPermission"));
         // Set no permission
         if ($Security->CanList()) {
             $this->Page_Terminate(ew_GetUrl("bank_accountlist.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();
 }
示例#2
0
		<?php 
        }
        ?>
				</td>
		<?php 
        if ($archives->Export == "") {
            ?>
		<?php 
            if ($Security->CanView()) {
                ?>
		<td nowrap>&nbsp;</td>
		<?php 
            }
            ?>
		<?php 
            if ($Security->CanEdit()) {
                ?>

		<?php 
            }
            ?>
		<?php 
        }
        ?>
			</tr>
		<?php 
        if (defined("EW_EXPORT_ALL") && $archives->Export != "") {
            $nStopRec = $nTotalRecs;
        } else {
            $nStopRec = $nStartRec + $nDisplayRecs - 1;
            // Set the last record to display
示例#3
0
 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->CanEdit()) {
         $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();
 }
		<?php } ?>
				</td>
				<td valign="top">
		<?php if ($posts->Export <> "" ) { ?>
		标题
		<?php } else { ?>
			<a href="postslist.php?order=<?php echo urlencode('title') ?>&ordertype=<?php echo $posts->title->ReverseSort() ?>">网页标题&nbsp;(*)<?php if ($posts->title->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($posts->title->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></a>
		<?php } ?>
				</td>
		<?php if ($posts->Export == "") { ?>
		<?php
			if ($Security->CanView()) {
		?>
		<td nowrap>&nbsp;</td>
		<?php } ?>
		<?php if ($Security->CanEdit()) { ?>
		<td nowrap>&nbsp;</td>
		<?php } ?>
		<?php } ?>
			</tr>
		<?php
		if (defined("EW_EXPORT_ALL") && $posts->Export <> "") {
			$nStopRec = $nTotalRecs;
		} else {
			$nStopRec = $nStartRec + $nDisplayRecs - 1; // Set the last record to display
		}
		$nRecCount = $nStartRec - 1;
		if (!$rs->EOF) {
			$rs->MoveFirst();
			if (!$posts->SelectLimit) $rs->Move($nStartRec - 1); // Move to first record directly
		}