当前位置: 首页>>代码示例>>PHP>>正文


PHP ForceIncomingInt函数代码示例

本文整理汇总了PHP中ForceIncomingInt函数的典型用法代码示例。如果您正苦于以下问题:PHP ForceIncomingInt函数的具体用法?PHP ForceIncomingInt怎么用?PHP ForceIncomingInt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ForceIncomingInt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: PasswordResetForm

 function PasswordResetForm(&$Context, $FormName = '')
 {
     $this->Name = 'PasswordResetForm';
     $this->ValidActions = array('PasswordResetForm', 'ResetPassword');
     $this->Constructor($Context);
     if ($this->IsPostBack) {
         $this->FormName = $FormName;
         $this->ValidatedCredentials = 0;
         // Set up the page
         global $Banner, $Foot;
         $Banner->Properties['CssClass'] = 'PasswordReset';
         $Foot->CssClass = 'PasswordReset';
         $this->Context->PageTitle = $this->Context->GetDefinition('ResetYourPassword');
         // Form properties
         $this->UserID = ForceIncomingInt('u', 0);
         $this->EmailVerificationKey = ForceIncomingString('k', '');
         $this->NewPassword = ForceIncomingString('NewPassword', '');
         $this->ConfirmPassword = ForceIncomingString('ConfirmPassword', '');
         $this->CallDelegate('Constructor');
         $um = $this->Context->ObjectFactory->NewContextObject($this->Context, 'UserManager');
         if ($this->IsPostBack && $this->PostBackAction == 'ResetPassword') {
             $this->ValidatedCredentials = 1;
         } else {
             $this->ValidatedCredentials = $um->VerifyPasswordResetRequest($this->UserID, $this->EmailVerificationKey);
         }
         if ($this->ValidatedCredentials && $this->PostBackAction == 'ResetPassword') {
             $this->PostBackValidated = $um->ResetPassword($this->UserID, $this->EmailVerificationKey, $this->NewPassword, $this->ConfirmPassword);
         }
         $this->CallDelegate('LoadData');
     }
 }
开发者ID:jaran,项目名称:opencongress,代码行数:31,代码来源:People.Control.PasswordResetForm.php

示例2: FTForm

 function FTForm(&$Context)
 {
     $this->Name = 'FTForm';
     $this->ValidActions = array('FeedThis', 'ProcessFeedThis');
     $this->Constructor($Context);
     if ($this->IsPostBack) {
         $SettingsFile = $this->Context->Configuration['APPLICATION_PATH'] . 'conf/settings.php';
         $this->ConfigurationManager = $this->Context->ObjectFactory->NewContextObject($this->Context, 'ConfigurationManager');
         if ($this->PostBackAction == 'ProcessFeedThis') {
             $this->ConfigurationManager->GetSettingsFromForm($SettingsFile);
             $this->ConfigurationManager->DefineSetting('FT_BLOG_FEED', ForceIncomingBool('FT_BLOG_FEED', 0), 0);
             $this->ConfigurationManager->DefineSetting('FT_BLOG_FEED_EVERY', ForceIncomingBool('FT_BLOG_FEED_EVERY', 0), 0);
             $this->ConfigurationManager->DefineSetting('FT_ALLDISCUSSIONS_FEED', ForceIncomingBool('FT_ALLDISCUSSIONS_FEED', 0), 0);
             $this->ConfigurationManager->DefineSetting('FT_ALLDISCUSSIONS_FEED_EVERY', ForceIncomingBool('FT_ALLDISCUSSIONS_FEED_EVERY', 0), 0);
             $this->ConfigurationManager->DefineSetting('FT_DISCUSSION_FEED', ForceIncomingBool('FT_DISCUSSION_FEED', 0), 0);
             $this->ConfigurationManager->DefineSetting('FT_CATEGORY_FEED', ForceIncomingBool('FT_CATEGORY_FEED', 0), 0);
             $this->ConfigurationManager->DefineSetting('FT_SEARCHRESULTS_FEED', ForceIncomingBool('FT_SEARCHRESULTS_FEED', 0), 0);
             $this->ConfigurationManager->DefineSetting('FT_USERBLOG_FEED', ForceIncomingBool('FT_USERBLOG_FEED', 0), 0);
             $this->ConfigurationManager->DefineSetting('FT_USERCOMMENTS_FEED', ForceIncomingBool('FT_USERCOMMENTS_FEED', 0), 0);
             $this->ConfigurationManager->DefineSetting('FT_PANEL_POSITION', ForceIncomingInt('FT_PANEL_POSITION', 0), 0);
             $this->ConfigurationManager->DefineSetting('FT_FEED_ITEMS', ForceIncomingInt('FT_FEED_ITEMS', 0), 0);
             $this->ConfigurationManager->DefineSetting('FT_WORD_LIMIT', ForceIncomingInt('FT_WORD_LIMIT', 0), 0);
             $this->DelegateParameters['ConfigurationManager'] =& $this->ConfigurationManager;
             // And save everything
             if ($this->ConfigurationManager->SaveSettingsToFile($SettingsFile)) {
                 header('location: ' . GetUrl($this->Context->Configuration, 'settings.php', '', '', '', '', 'PostBackAction=FeedThis&Success=1'));
             } else {
                 $this->PostBackAction = 'FeedThis';
             }
         }
     }
 }
开发者ID:evanfarrar,项目名称:opensprints.org,代码行数:32,代码来源:PostBackControl.FeedThis.php

示例3: GetPropertiesFromForm

 function GetPropertiesFromForm(&$Context)
 {
     $this->CategoryID = ForceIncomingInt('CategoryID', 0);
     $this->Name = ForceIncomingString('Name', '');
     $this->Description = ForceIncomingString('Description', '');
     $this->AllowedRoles = ForceIncomingArray('CategoryRoleBlock', array());
 }
开发者ID:evanfarrar,项目名称:opensprints.org,代码行数:7,代码来源:Vanilla.Class.Category.php

示例4: Check

 function Check(&$Context)
 {
     //		if (($this->UserID == 0 && !$Context->Configuration['PUBLIC_BROWSING']) || ($this->UserID > 0 && !$this->User->PERMISSION_SIGN_IN)) {
     if ($this->UserID == 0 && $Context->SelfUrl == 'index.php' && ForceIncomingInt('CategoryID', 0) == 0 || $this->UserID > 0 && !$this->User->PERMISSION_SIGN_IN) {
         if ($this->UserID > 0 && !$this->User->PERMISSION_SIGN_IN) {
             $this->End($Context->Authenticator);
         }
         $Url = AppendUrlParameters($Context->Configuration['SAFE_REDIRECT'], 'ReturnUrl=' . urlencode(GetRequestUri()));
         Redirect($Url);
     }
 }
开发者ID:avital,项目名称:vanilla-thewe,代码行数:11,代码来源:People.Class.Session.php

示例5: RegistrationForm

 function RegistrationForm(&$Context)
 {
     $this->Name = 'RegistrationForm';
     $this->ValidActions = array('ProcessRegistrationChange', 'RegistrationChange');
     $this->Constructor($Context);
     if (!$this->Context->Session->User->Permission('PERMISSION_MANAGE_REGISTRATION')) {
         $this->IsPostBack = 0;
     } elseif ($this->IsPostBack) {
         $this->Context->PageTitle = $this->Context->GetDefinition('RegistrationManagement');
         $RoleID = ForceIncomingString('RoleID', '');
         if ($RoleID == '') {
             $RoleID = $this->Context->Configuration['DEFAULT_ROLE'];
         }
         $this->RoleManager = $this->Context->ObjectFactory->NewContextObject($this->Context, 'RoleManager');
         $this->RoleSelect = $this->Context->ObjectFactory->NewObject($this->Context, 'Select');
         $this->RoleSelect->Name = 'RoleID';
         // Add the applicant faux-role
         $this->RoleSelect->AddOption(0, $this->Context->GetDefinition('Applicant'));
         // Add all other roles
         $this->RoleSelect->AddOptionsFromDataSet($this->Context->Database, $this->RoleManager->GetRoles(), 'RoleID', 'Name');
         $this->RoleSelect->SelectedValue = $RoleID;
         $this->RoleSelect->Attributes = ' id="ddRoleID"';
         $ApprovedRoleID = ForceIncomingInt('ApprovedRoleID', $this->Context->Configuration['APPROVAL_ROLE']);
         $this->ApprovedRoleSelect = $this->Context->ObjectFactory->NewObject($this->Context, 'Select');
         $this->ApprovedRoleSelect->Name = 'ApprovedRoleID';
         $this->ApprovedRoleSelect->AddOptionsFromDataSet($this->Context->Database, $this->RoleManager->GetRoles(), 'RoleID', 'Name');
         $this->ApprovedRoleSelect->SelectedValue = $ApprovedRoleID;
         $this->ApprovedRoleSelect->Attributes = ' id="ddApprovedRoleID"';
         if ($this->PostBackAction == 'ProcessRegistrationChange' && $this->IsValidFormPostBack()) {
             // Make the immediate access option default to '0' if the 'default' role
             // for new members is '0' (applicant)
             $AllowImmediateAccess = 0;
             if ($RoleID > 0) {
                 $Role = $this->RoleManager->GetRoleById($RoleID);
                 $AllowImmediateAccess = $Role->PERMISSION_SIGN_IN ? '1' : '0';
             }
             $ConstantsFile = $this->Context->Configuration['APPLICATION_PATH'] . 'conf/settings.php';
             $ConstantManager = $this->Context->ObjectFactory->NewContextObject($this->Context, 'ConfigurationManager');
             // Set the constants to their new values
             $ConstantManager->DefineSetting('DEFAULT_ROLE', $RoleID);
             $ConstantManager->DefineSetting('ALLOW_IMMEDIATE_ACCESS', $AllowImmediateAccess);
             $ConstantManager->DefineSetting('APPROVAL_ROLE', $ApprovedRoleID);
             $this->DelegateParameters['ConstantManager'] =& $ConstantManager;
             $this->CallDelegate('PreSaveSettings');
             // Save the settings file
             $ConstantManager->SaveSettingsToFile($ConstantsFile);
             if ($this->Context->WarningCollector->Iif()) {
                 $this->PostBackValidated = 1;
             }
         }
     }
     $this->CallDelegate('Constructor');
 }
开发者ID:jaran,项目名称:opencongress,代码行数:53,代码来源:People.Control.RegistrationForm.php

示例6: PasswordResetForm

 function PasswordResetForm(&$Context, $FormName = "")
 {
     $this->ValidActions = array("ResetPassword");
     $this->FormName = $FormName;
     $this->ValidatedCredentials = 0;
     $this->Constructor($Context);
     // Form properties
     $this->UserID = ForceIncomingInt("u", 0);
     $this->EmailVerificationKey = ForceIncomingString("k", "");
     $this->NewPassword = ForceIncomingString("NewPassword", "");
     $this->ConfirmPassword = ForceIncomingString("ConfirmPassword", "");
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:12,代码来源:passwordreset.php

示例7: Render

    function Render()
    {
        if ($this->IsPostBack) {
            $this->CallDelegate('PreRender');
            $this->PostBackParams->Clear();
            if ($this->PostBackAction == 'Notifi') {
                $this->PostBackParams->Set('PostBackAction', 'ProcessNotifi');
                echo '<div id="Form" class="Account NotifiSettings">';
                if (ForceIncomingInt('Success', 0)) {
                    echo '<div id="Success">' . $this->Context->GetDefinition('ChangesSaved') . '</div>';
                }
                echo '
		     <fieldset>
			<legend>' . $this->Context->GetDefinition("NotifiSettings") . '</legend>
			' . $this->Get_Warnings() . '
			' . $this->Get_PostBackForm('frmNotifi') . '
			<p>' . $this->Context->GetDefinition("NotifiAdminNotes") . '</p>
			<ul>
			   <li>
			      <p><span>' . GetDynamicCheckBox('NOTIFI_ALLOW_ALL', 1, $this->ConfigurationManager->GetSetting('NOTIFI_ALLOW_ALL'), '', $this->Context->GetDefinition('AdminAllowAll')) . '</span></p>
			   </li>
			   <li>
			      <p><span>' . GetDynamicCheckBox('NOTIFI_ALLOW_CATEGORY', 1, $this->ConfigurationManager->GetSetting('NOTIFI_ALLOW_CATEGORY'), '', $this->Context->GetDefinition('AdminAllowCategories')) . '</span></p>
			   </li>
			   <li>
			      <p><span>' . GetDynamicCheckBox('NOTIFI_ALLOW_DISCUSSION', 1, $this->ConfigurationManager->GetSetting('NOTIFI_ALLOW_DISCUSSION'), '', $this->Context->GetDefinition('AdminAllowDiscussions')) . '</span></p>
			   </li>
			   <li>
			      <p><span>' . GetDynamicCheckBox('NOTIFI_ALLOW_BBCODE', 1, $this->ConfigurationManager->GetSetting('NOTIFI_ALLOW_BBCODE'), '', $this->Context->GetDefinition('AdminAllowBbcode')) . '</span></p>
			   </li>
			   <li>
			      <p><span>' . GetDynamicCheckBox('NOTIFI_FORMAT_PLAINTEXT', 1, $this->ConfigurationManager->GetSetting('NOTIFI_FORMAT_PLAINTEXT'), '', $this->Context->GetDefinition('AdminFormatPlaintext')) . '</span></p>
			   </li>
			   <li>
			      <p><span>' . GetDynamicCheckBox('NOTIFI_AUTO_ALL', 1, $this->ConfigurationManager->GetSetting('NOTIFI_AUTO_ALL'), '', $this->Context->GetDefinition('AdminAutoAll')) . '</span></p>
			   </li>
			</ul>
			<div class="Submit">
			   <input type="submit" name="btnSave" value="' . $this->Context->GetDefinition('Save') . '" class="Button SubmitButton" />
			   <a href="' . GetUrl($this->Context->Configuration, $this->Context->SelfUrl) . '" class="CancelButton">' . $this->Context->GetDefinition('Cancel') . '</a>
			</div>
		     </form>
		  </fieldset>
	       </div>';
            }
            $this->CallDelegate('PostRender');
        }
    }
开发者ID:avital,项目名称:vanilla-thewe,代码行数:48,代码来源:adminsettings.php

示例8: GetPropertiesFromForm

 function GetPropertiesFromForm()
 {
     $this->RoleID = ForceIncomingInt("RoleID", 0);
     $this->Name = ForceIncomingString("Name", "");
     $this->Icon = ForceIncomingString("Icon", "");
     $this->Description = ForceIncomingString("Description", "");
     $this->CanLogin = ForceIncomingBool("CanLogin", 0);
     $this->CanPostDiscussion = ForceIncomingBool("CanPostDiscussion", 0);
     $this->CanPostComment = ForceIncomingBool("CanPostComment", 0);
     $this->CanPostHTML = ForceIncomingBool("CanPostHTML", 0);
     $this->CanViewIps = ForceIncomingBool("CanViewIps", 0);
     $this->AdminUsers = ForceIncomingBool("AdminUsers", 0);
     $this->AdminCategories = ForceIncomingBool("AdminCategories", 0);
     $this->MasterAdmin = ForceIncomingBool("MasterAdmin", 0);
     $this->ShowAllWhispers = ForceIncomingBool("ShowAllWhispers", 0);
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:16,代码来源:Vanilla.Role.class.php

示例9: DiscussionGrid

 function DiscussionGrid(&$Context, $DiscussionManager, $CategoryID, $View)
 {
     $DiscussionStarterUserID = 0;
     $BookmarkedDiscussionsOnly = 0;
     $PrivateDiscussionsOnly = 0;
     $this->Context =& $Context;
     $this->CurrentPage = ForceIncomingInt("page", 1);
     $this->View = $View;
     // Get the category if filtered
     $Category = false;
     if ($CategoryID > 0) {
         include_once sgLIBRARY . "Vanilla.Category.class.php";
         $cm = $this->Context->ObjectFactory->NewContextObject($this->Context, "CategoryManager");
         $Category = $cm->GetCategoryById($CategoryID);
     }
     $this->PageJump = "<a class=\"PageJump AllDiscussions\" href=\"./\">Show all discussions</a>";
     switch ($View) {
         case "Bookmarks":
             $this->Context->PageTitle = $this->Context->GetDefinition("BookmarkedDiscussions");
             $BookmarkedDiscussionsOnly = 1;
             break;
         case "YourDiscussions":
             $this->Context->PageTitle = $this->Context->GetDefinition("YourDiscussions");
             $DiscussionStarterUserID = $this->Context->Session->UserID;
             break;
         case "Private":
             $this->Context->PageTitle = $this->Context->GetDefinition("PrivateDiscussions");
             $PrivateDiscussionsOnly = 1;
             break;
         default:
             if ($Category) {
                 $this->Context->PageTitle = $Category->Name . " " . $this->Context->GetDefinition("Discussions");
             } else {
                 if ($this->Context->Session->User->BlocksCategories) {
                     $this->Context->PageTitle = $this->Context->GetDefinition("WatchedDiscussions");
                 } else {
                     $this->Context->PageTitle = $this->Context->GetDefinition("AllDiscussions");
                 }
                 $this->PageJump = "";
             }
             break;
     }
     $this->DiscussionData = $DiscussionManager->GetDiscussionList(agDISCUSSIONS_PER_PAGE, $this->CurrentPage, $CategoryID, $BookmarkedDiscussionsOnly, $PrivateDiscussionsOnly, $DiscussionStarterUserID);
     $this->DiscussionDataCount = $DiscussionManager->GetDiscussionCount($CategoryID, $BookmarkedDiscussionsOnly, $PrivateDiscussionsOnly, $DiscussionStarterUserID);
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:45,代码来源:index.php

示例10: LanguageForm

 function LanguageForm(&$Context)
 {
     $this->Name = "LanguageForm";
     $this->ValidActions = array("LanguageChange", "ProcessLanguageChange");
     $this->Constructor($Context);
     if (!$this->Context->Session->User->Permission("PERMISSION_MANAGE_LANGUAGE")) {
         $this->IsPostBack = 0;
     } elseif ($this->IsPostBack) {
         $this->Context->PageTitle = $this->Context->GetDefinition('LanguageManagement');
         $this->DefineLanguages();
         $this->LanguageSelect = $this->Context->ObjectFactory->NewObject($Context, "Select");
         $this->LanguageSelect->Name = "LanguageKey";
         $this->LanguageSelect->Attributes = ' id="ddLanguage"';
         for ($i = 0; $i < count($this->Languages); $i++) {
             $this->LanguageSelect->AddOption($i, $this->Languages[$i]);
             if ($this->Languages[$i] == $this->Context->Configuration['LANGUAGE']) {
                 $this->LanguageSelect->SelectedValue = $i;
             }
         }
         if ($this->PostBackAction == "ProcessLanguageChange" && $this->IsValidFormPostBack()) {
             $LanguageKey = ForceIncomingInt("LanguageKey", 0);
             // Grab that language from the languages array
             $Language = $this->Languages[$LanguageKey];
             if ($Language) {
                 // Set the language configuration option
                 $ConfigurationManager = $this->Context->ObjectFactory->NewContextObject($this->Context, "ConfigurationManager");
                 $ConfigurationManager->DefineSetting('LANGUAGE', $Language, 1);
                 $SettingsFile = $this->Context->Configuration['APPLICATION_PATH'] . 'conf/settings.php';
                 if ($ConfigurationManager->SaveSettingsToFile($SettingsFile)) {
                     // If everything was successful, mark the postback as validated
                     if ($this->Context->WarningCollector->Iif()) {
                         $Url = GetUrl($this->Context->Configuration, $this->Context->SelfUrl, "", "", "", "", "PostBackAction=LanguageChange&Saved=1");
                         Redirect($Url);
                     }
                 }
             }
         } elseif ($this->PostBackAction == "LanguageChange" && ForceIncomingBool("Saved", 0) == 1) {
             $this->PostBackValidated = 1;
         }
     }
     $this->CallDelegate("Constructor");
 }
开发者ID:laiello,项目名称:lussumo-vanilla,代码行数:42,代码来源:Framework.Control.LanguageForm.php

示例11: CommentGrid

 function CommentGrid(&$Context, $DiscussionManager, $DiscussionID)
 {
     $this->Context =& $Context;
     $this->CurrentPage = ForceIncomingInt("page", 1);
     // Load information about this discussion
     $RecordDiscussionView = 1;
     if ($this->Context->Session->UserID == 0) {
         $RecordDiscussionView = 0;
     }
     $this->Discussion = $DiscussionManager->GetDiscussionById($DiscussionID, $RecordDiscussionView);
     if ($this->Discussion) {
         $this->Discussion->FormatPropertiesForDisplay();
         if (!$this->Discussion->Active && !$this->Context->Session->User->AdminCategories) {
             $this->Discussion = false;
             $this->Context->WarningCollector->Add($this->Context->GetDefinition("ErrDiscussionNotFound"));
         }
     }
     if ($this->Context->WarningCollector->Count() > 0) {
         $this->CommentData = false;
         $this->CommentDataCount = 0;
     } else {
         // Load the data
         $CommentManager = $Context->ObjectFactory->NewContextObject($Context, "CommentManager");
         $this->CommentData = $CommentManager->GetCommentList(agCOMMENTS_PER_PAGE, $this->CurrentPage, $DiscussionID);
         $this->CommentDataCount = $CommentManager->GetCommentCount($DiscussionID);
     }
     // Set up the pagelist
     $this->pl = $this->Context->ObjectFactory->NewContextObject($this->Context, "PageList");
     $this->pl->NextText = $this->Context->GetDefinition("Next");
     $this->pl->PreviousText = $this->Context->GetDefinition("Previous");
     $this->pl->CssClass = "PageList";
     $this->pl->TotalRecords = $this->CommentDataCount;
     $this->pl->CurrentPage = $this->CurrentPage;
     $this->pl->RecordsPerPage = agCOMMENTS_PER_PAGE;
     $this->pl->PagesToDisplay = 10;
     $this->pl->PageParameterName = "page";
     $this->pl->DefineProperties();
     $this->ShowForm = 0;
     if ($this->Context->Session->UserID > 0 && ($this->pl->PageCount == 1 || $this->pl->PageCount == $this->CurrentPage) && (!$this->Discussion->Closed && $this->Discussion->Active || $this->Context->Session->User->AdminCategories)) {
         $this->ShowForm = 1;
     }
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:42,代码来源:comments.php

示例12: GetPropertiesFromForm

 function GetPropertiesFromForm()
 {
     $this->SearchID = ForceIncomingInt('SearchID', 0);
     $this->Label = ForceIncomingString('Label', '');
     $this->Type = $this->DefineType(ForceIncomingString('Type', ''));
     $this->Keywords = urldecode(ForceIncomingString('Keywords', ''));
     // Parse out the keywords differently based on the type of search
     $Advanced = ForceIncomingBool('Advanced', 0);
     if ($Advanced) {
         // Load all of the search variables from the form
         $this->Categories = ForceIncomingString('Categories', '');
         $this->AuthUsername = ForceIncomingString('AuthUsername', '');
         $this->Roles = ForceIncomingString('Roles', '');
         $this->UserOrder = ForceIncomingString('UserOrder', '');
         $this->Query = $this->Keywords;
         // Build the keyword definition
         $KeyDef = '';
         if ($this->Type == 'Users') {
             if ($this->Roles != '') {
                 $KeyDef = 'roles:' . $this->Roles . ';';
             }
             if ($this->UserOrder != '') {
                 $KeyDef .= 'sort:' . $this->UserOrder . ';';
             }
             $this->Keywords = $KeyDef . $this->Keywords;
         } else {
             if ($this->Categories != '') {
                 $KeyDef = 'cats:' . $this->Categories . ';';
             }
             if ($this->AuthUsername != '') {
                 $KeyDef .= $this->AuthUsername . ':';
             }
             $this->Keywords = $KeyDef . $this->Keywords;
         }
     } else {
         // Load all of the search variables from the keyword definition
         $this->ParseKeywords($this->Type, $this->Keywords);
     }
 }
开发者ID:evanfarrar,项目名称:opensprints.org,代码行数:39,代码来源:Vanilla.Class.Search.php

示例13: DefineProperties

 function DefineProperties()
 {
     if (!$this->isPropertiesDefined) {
         if ($this->CurrentPage == 0) {
             $this->CurrentPage = ForceIncomingInt($this->PageParameterName, 1);
         }
         if ($this->Totalled) {
             $this->PageCount = CalculateNumberOfPages($this->TotalRecords, $this->RecordsPerPage);
             if ($this->CurrentPage > $this->PageCount) {
                 $this->CurrentPage = $this->PageCount;
             }
             if ($this->CurrentPage < 1) {
                 $this->CurrentPage = 1;
             }
             $this->FirstRecord = ($this->CurrentPage - 1) * $this->RecordsPerPage + 1;
             $this->LastRecord = $this->FirstRecord + $this->RecordsPerPage - 1;
             if ($this->LastRecord > $this->TotalRecords) {
                 $this->LastRecord = $this->TotalRecords;
             }
         } else {
             if ($this->CurrentPage < 1) {
                 $this->CurrentPage = 1;
             }
             $this->PageCount = $this->CurrentPage;
             if ($this->TotalRecords > $this->RecordsPerPage) {
                 $this->PageCount++;
             }
             $this->FirstRecord = ($this->CurrentPage - 1) * $this->RecordsPerPage + 1;
             $this->LastRecord = $this->FirstRecord + $this->TotalRecords - 1;
             if ($this->LastRecord < $this->FirstRecord) {
                 $this->LastRecord = $this->FirstRecord;
             }
             if ($this->PageCount > $this->CurrentPage) {
                 $this->LastRecord = $this->LastRecord - 1;
             }
         }
         $this->isPropertiesDefined = 1;
     }
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:39,代码来源:Utility.Pagelist.class.php

示例14: GetPropertiesFromForm

 function GetPropertiesFromForm()
 {
     $this->SearchID = ForceIncomingInt("SearchID", 0);
     $this->Label = ForceIncomingString("Label", "");
     $this->Type = $this->DefineType(ForceIncomingString("Type", ""));
     $this->Keywords = urldecode(ForceIncomingString("Keywords", ""));
     // Parse out the keywords differently based on the type of search
     $Advanced = ForceIncomingBool("Advanced", 0);
     if ($Advanced) {
         // Load all of the search variables from the form
         $this->Categories = ForceIncomingString("Categories", "");
         $this->AuthUsername = ForceIncomingString("AuthUsername", "");
         $this->Roles = ForceIncomingString("Roles", "");
         $this->UserOrder = ForceIncomingString("UserOrder", "");
         $this->Query = $this->Keywords;
         // Build the keyword definition
         $KeyDef = "";
         if ($this->Type == "Users") {
             if ($this->Roles != "") {
                 $KeyDef = "roles:" . $this->Roles . ";";
             }
             if ($this->UserOrder != "") {
                 $KeyDef .= "sort:" . $this->UserOrder . ";";
             }
             $this->Keywords = $KeyDef . $this->Keywords;
         } else {
             if ($this->Categories != "") {
                 $KeyDef = "cats:" . $this->Categories . ";";
             }
             if ($this->AuthUsername != "") {
                 $KeyDef .= $this->AuthUsername . ":";
             }
             $this->Keywords = $KeyDef . $this->Keywords;
         }
     } else {
         // Load all of the search variables from the keyword definition
         $this->ParseKeywords($this->Type, $this->Keywords);
     }
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:39,代码来源:Vanilla.Search.class.php

示例15: Render

 function Render()
 {
     $this->CallDelegate('PreRender');
     // Set up the pagelist
     $CategoryID = ForceIncomingInt('CategoryID', 0);
     if ($CategoryID == 0) {
         $CategoryID = '';
     }
     $pl = $this->Context->ObjectFactory->NewContextObject($this->Context, 'PageList', 'CategoryID', $CategoryID);
     $pl->NextText = $this->Context->GetDefinition('Next');
     $pl->PreviousText = $this->Context->GetDefinition('Previous');
     $pl->CssClass = 'PageList';
     $pl->TotalRecords = $this->DiscussionDataCount;
     $pl->CurrentPage = $this->CurrentPage;
     $pl->RecordsPerPage = $this->Context->Configuration['DISCUSSIONS_PER_PAGE'];
     $pl->PagesToDisplay = 10;
     $pl->PageParameterName = 'page';
     $pl->DefineProperties();
     $PageDetails = $pl->GetPageDetails($this->Context);
     $PageList = $pl->GetNumericList();
     include ThemeFilePath($this->Context->Configuration, 'discussions.php');
     $this->CallDelegate('PostRender');
 }
开发者ID:laiello,项目名称:lussumo-vanilla,代码行数:23,代码来源:Vanilla.Control.DiscussionGrid.php


注:本文中的ForceIncomingInt函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。