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


PHP GetUrl函数代码示例

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


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

示例1: 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

示例2: CommentGrid_AddAjaxQuoteButton

 function CommentGrid_AddAjaxQuoteButton(&$CommentGrid)
 {
     $Comment =& $CommentGrid->DelegateParameters['Comment'];
     $CommentList =& $CommentGrid->DelegateParameters["CommentList"];
     $Url = GetUrl($CommentGrid->pl->Context->Configuration, $CommentGrid->pl->Context->SelfUrl, '', $CommentGrid->pl->UrlIdName, $CommentGrid->pl->UrlIdValue, $CommentGrid->pl->PageCount, 'aq_quote=' . $Comment->CommentID . '&aq_author=' . $Comment->AuthUsername, '');
     $CommentList .= '<a id="AjaxQuote_' . $Comment->CommentID . '" href="' . $Url . '" onclick="return ajaxquote(\'' . $Comment->Context->Configuration['WEB_ROOT'] . '\',' . $Comment->CommentID . ',\'' . $Comment->AuthUsername . '\');">' . $CommentGrid->Context->GetDefinition("Quote") . '</a>';
 }
开发者ID:laiello,项目名称:lussumo-vanilla,代码行数:7,代码来源:default.php

示例3: AccountRoleForm

 function AccountRoleForm(&$Context, &$UserManager, $User)
 {
     $this->Name = 'AccountRoleForm';
     $this->ValidActions = array('ApproveUser', 'DeclineUser', 'Role', 'ProcessRole');
     $this->Constructor($Context);
     if ($this->IsPostBack) {
         $this->User =& $User;
         $Redirect = 0;
         if ($this->PostBackAction == 'ProcessRole' && $this->IsValidFormPostBack() && $this->Context->Session->UserID != $User->UserID && $this->Context->Session->User->Permission('PERMISSION_CHANGE_USER_ROLE')) {
             $urh = $this->Context->ObjectFactory->NewObject($this->Context, 'UserRoleHistory');
             $urh->GetPropertiesFromForm();
             if ($UserManager->AssignRole($urh)) {
                 $Redirect = 1;
             }
         }
         if ($Redirect) {
             $Url = GetUrl($this->Context->Configuration, $this->Context->SelfUrl, '', 'u', $User->UserID);
             Redirect($Url);
         } else {
             $this->PostBackAction = str_replace('Process', '', $this->PostBackAction);
         }
         if ($this->PostBackAction == 'Role') {
             $RoleManager = $this->Context->ObjectFactory->NewContextObject($this->Context, 'RoleManager');
             $RoleData = $RoleManager->GetRoles();
             $this->RoleSelect = $this->Context->ObjectFactory->NewObject($this->Context, 'Select');
             $this->RoleSelect->Name = 'RoleID';
             $this->RoleSelect->CssClass = 'PanelInput';
             $this->RoleSelect->AddOptionsFromDataSet($this->Context->Database, $RoleData, 'RoleID', 'Name');
             $this->RoleSelect->SelectedValue = $this->User->RoleID;
             $this->RoleSelect->Attributes = ' id="ddRoleID"';
         }
     }
     $this->CallDelegate('Constructor');
 }
开发者ID:laiello,项目名称:lussumo-vanilla,代码行数:34,代码来源:Vanilla.Control.AccountRoleForm.php

示例4: GlobalsForm

 function GlobalsForm(&$Context)
 {
     $this->Name = 'GlobalsForm';
     $this->ValidActions = array('Globals', 'ProcessGlobals');
     $this->Constructor($Context);
     if (!$this->Context->Session->User->Permission('PERMISSION_CHANGE_APPLICATION_SETTINGS')) {
         $this->IsPostBack = 0;
     } elseif ($this->IsPostBack) {
         $this->Context->PageTitle = $this->Context->GetDefinition('ApplicationSettings');
         $SettingsFile = $this->Context->Configuration['APPLICATION_PATH'] . 'conf/settings.php';
         $this->ConfigurationManager = $this->Context->ObjectFactory->NewContextObject($this->Context, 'ConfigurationManager');
         if ($this->PostBackAction == 'ProcessGlobals' && $this->IsValidFormPostBack()) {
             $this->ConfigurationManager->GetSettingsFromForm($SettingsFile);
             // Checkboxes aren't posted back if unchecked, so make sure that they are saved properly
             $this->ConfigurationManager->DefineSetting('ENABLE_WHISPERS', ForceIncomingBool('ENABLE_WHISPERS', 0), 0);
             $this->ConfigurationManager->DefineSetting('ALLOW_NAME_CHANGE', ForceIncomingBool('ALLOW_NAME_CHANGE', 0), 0);
             $this->ConfigurationManager->DefineSetting('PUBLIC_BROWSING', ForceIncomingBool('PUBLIC_BROWSING', 0), 0);
             $this->ConfigurationManager->DefineSetting('USE_CATEGORIES', ForceIncomingBool('USE_CATEGORIES', 0), 0);
             $this->ConfigurationManager->DefineSetting('LOG_ALL_IPS', ForceIncomingBool('LOG_ALL_IPS', 0), 0);
             // And save everything
             if ($this->ConfigurationManager->SaveSettingsToFile($SettingsFile)) {
                 header('location: ' . GetUrl($this->Context->Configuration, 'settings.php', '', '', '', '', 'PostBackAction=Globals&Success=1'));
             } else {
                 $this->PostBackAction = 'Globals';
             }
         }
     }
     $this->CallDelegate('Constructor');
 }
开发者ID:jaran,项目名称:opencongress,代码行数:29,代码来源:Vanilla.Control.GlobalsForm.php

示例5: GlobalsForm

 function GlobalsForm(&$Context)
 {
     $this->Name = 'GlobalsForm';
     $this->ValidActions = array('Globals', 'ProcessGlobals');
     $this->Constructor($Context);
     if (!$this->Context->Session->User->Permission('PERMISSION_CHANGE_APPLICATION_SETTINGS')) {
         $this->IsPostBack = 0;
     } elseif ($this->IsPostBack) {
         $this->Context->PageTitle = $this->Context->GetDefinition('ApplicationSettings');
         $SettingsFile = $this->Context->Configuration['APPLICATION_PATH'] . 'conf/settings.php';
         $this->ConfigurationManager = $this->Context->ObjectFactory->NewContextObject($this->Context, 'ConfigurationManager');
         if ($this->PostBackAction == 'ProcessGlobals' && $this->IsValidFormPostBack()) {
             $this->ConfigurationManager->GetSettingsFromForm($SettingsFile);
             // Checkboxes aren't posted back if unchecked, so make sure that they are saved properly
             $this->ConfigurationManager->DefineSetting('ENABLE_WHISPERS', ForceIncomingBool('ENABLE_WHISPERS', 0), 0);
             $this->ConfigurationManager->DefineSetting('ALLOW_NAME_CHANGE', ForceIncomingBool('ALLOW_NAME_CHANGE', 0), 0);
             $this->ConfigurationManager->DefineSetting('PUBLIC_BROWSING', ForceIncomingBool('PUBLIC_BROWSING', 0), 0);
             $this->ConfigurationManager->DefineSetting('USE_CATEGORIES', ForceIncomingBool('USE_CATEGORIES', 0), 0);
             $this->ConfigurationManager->DefineSetting('LOG_ALL_IPS', ForceIncomingBool('LOG_ALL_IPS', 0), 0);
             //Validate cookie domain.
             //The pattern is loose; eg, It won't stop  "domain.tld" or ".co.uk" to be saved
             //(the "domain.tld" can be set by the browser, the 2nd won't).
             Validate($this->Context->GetDefinition('CookieDomain'), 0, ForceIncomingString('COOKIE_DOMAIN', ''), 255, '^[\\.-_~a-zA-Z0-9]*\\.?[-_~a-zA-Z0-9]+\\.[-_~a-zA-Z0-9]+$', $this->Context);
             // And save everything
             if ($this->ConfigurationManager->SaveSettingsToFile($SettingsFile)) {
                 header('Location: ' . GetUrl($this->Context->Configuration, 'settings.php', '', '', '', '', 'PostBackAction=Globals&Success=1'));
             } else {
                 $this->PostBackAction = 'Globals';
             }
         }
     }
     $this->CallDelegate('Constructor');
 }
开发者ID:evanfarrar,项目名称:opensprints.org,代码行数:33,代码来源:Vanilla.Control.GlobalsForm.php

示例6: DiscussionGrid_DiscussionPages

 function DiscussionGrid_DiscussionPages($DiscussionGrid)
 {
     $Discussion =& $DiscussionGrid->DelegateParameters['Discussion'];
     $DiscussionList =& $DiscussionGrid->DelegateParameters['DiscussionList'];
     $CommentsPerPage = $DiscussionGrid->Context->Configuration['COMMENTS_PER_PAGE'];
     if ($Discussion->CountComments > $CommentsPerPage) {
         $PageList = '<font class="DiscussionPageNumbersContainer">';
         $PageList .= $Discussion->Context->GetDefinition('TextPrefix');
         $PageCount = CalculateNumberOfPages($Discussion->CountComments, $CommentsPerPage);
         if ($PageCount > 6) {
             $PageCountMinus2 = $PageCount - 2;
             $PageCountMinus1 = $PageCount - 1;
             $PageList .= ' <a href="' . GetUrl($Discussion->Context->Configuration, 'comments.php', '', 'DiscussionID', $Discussion->DiscussionID, 1) . '">1</a> ';
             $PageList .= ' <a href="' . GetUrl($Discussion->Context->Configuration, 'comments.php', '', 'DiscussionID', $Discussion->DiscussionID, 2) . '">2</a> ';
             $PageList .= ' <a href="' . GetUrl($Discussion->Context->Configuration, 'comments.php', '', 'DiscussionID', $Discussion->DiscussionID, 3) . '">3</a> ... ';
             $PageList .= ' <a href="' . GetUrl($Discussion->Context->Configuration, 'comments.php', '', 'DiscussionID', $Discussion->DiscussionID, $PageCountMinus2) . '">' . $PageCountMinus2 . '</a> ';
             $PageList .= ' <a href="' . GetUrl($Discussion->Context->Configuration, 'comments.php', '', 'DiscussionID', $Discussion->DiscussionID, $PageCountMinus1) . '">' . $PageCountMinus1 . '</a> ';
             $PageList .= ' <a href="' . GetUrl($Discussion->Context->Configuration, 'comments.php', '', 'DiscussionID', $Discussion->DiscussionID, $PageCount) . '">' . $PageCount . '</a> ';
         } else {
             for ($i = 1; $i <= $PageCount; $i++) {
                 $PageList .= ' <a href="' . GetUrl($Discussion->Context->Configuration, 'comments.php', '', 'DiscussionID', $Discussion->DiscussionID, $i) . '">' . $i . '</a> ';
             }
         }
         $PageList .= $Discussion->Context->GetDefinition('TextSuffix');
         $PageList .= "</font>";
         $DiscussionList = str_replace('class="DiscussionTopicName">' . $Discussion->Name . '</a>', 'class="DiscussionTopicName">' . $Discussion->Name . '</a> ' . $PageList, $DiscussionList);
     }
 }
开发者ID:laiello,项目名称:lussumo-vanilla,代码行数:28,代码来源:default.php

示例7: GetAccountLink

 function GetAccountLink($Object)
 {
     if (isset($Object->AuthUserID) && $Object->AuthUserID != "" && isset($Object->AuthUsername) && $Object->AuthUsername != "") {
         return '<a href="' . GetUrl($Object->Context->Configuration, 'account.php', '', 'u', $Object->AuthUserID) . '">' . $Object->AuthUsername . '</a>';
     } else {
         return '/me';
     }
 }
开发者ID:avital,项目名称:vanilla-thewe,代码行数:8,代码来源:default.php

示例8: index

 public function index()
 {
     $Article = $this->GetArticle();
     $Article = $this->FormatArticle($Article);
     $ArticleAbout = $this->GetAbout();
     $url = GetUrl();
     $this->assign("ArticleInfo", $Article);
     $this->assign("thisurl", $url);
     $this->assign("ArticleAbout", $ArticleAbout);
     $this->display("Article/index");
 }
开发者ID:zeroboy,项目名称:Zeroboyblog1,代码行数:11,代码来源:ArticleController.class.php

示例9: 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

示例10: UpdateCheck

 function UpdateCheck(&$Context)
 {
     $this->Name = 'UpdateCheck';
     $this->ValidActions = array('UpdateCheck', 'ProcessUpdateCheck', 'ProcessUpdateReminder');
     $this->Constructor($Context);
     if (!$this->Context->Session->User->Permission('PERMISSION_CHECK_FOR_UPDATES')) {
         $this->IsPostBack = 0;
     }
     if ($this->IsPostBack) {
         $this->Context->PageTitle = $this->Context->GetDefinition('UpdatesAndReminders');
         $this->ReminderSelect = $this->Context->ObjectFactory->NewObject($this->Context, 'Select');
         $this->ReminderSelect->Name = 'ReminderRange';
         $this->ReminderSelect->AddOption('', $this->Context->GetDefinition('Never'));
         $this->ReminderSelect->AddOption('Weekly', $this->Context->GetDefinition('Weekly'));
         $this->ReminderSelect->AddOption('Monthly', $this->Context->GetDefinition('Monthly'));
         $this->ReminderSelect->AddOption('Quarterly', $this->Context->GetDefinition('Quarterly'));
         $this->ReminderSelect->SelectedValue = $this->Context->Configuration['UPDATE_REMINDER'];
         $SettingsFile = $this->Context->Configuration['APPLICATION_PATH'] . 'conf/settings.php';
     }
     if ($this->IsPostBack && $this->PostBackAction == 'ProcessUpdateCheck') {
         // Load the extensions
         $this->Extensions = DefineExtensions($this->Context, true);
         // Add an onload event to the document body
         $this->Context->BodyAttributes .= " onload=\"UpdateCheck('" . $this->Context->Configuration['WEB_ROOT'] . "ajax/updatecheck.php', 'Core', '" . $this->Context->Session->GetCsrfValidationKey() . "');\"";
         // Report that the postback is validated
         $this->PostBackValidated = 1;
     } elseif ($this->IsPostBack && $this->PostBackAction == 'ProcessUpdateReminder' && $this->IsValidFormPostBack()) {
         $ReminderRange = ForceIncomingString('ReminderRange', '');
         if (!in_array($ReminderRange, array('Weekly', 'Monthly', 'Quarterly'))) {
             $ReminderRange = '';
         }
         // Set the Reminder configuration option
         $ConfigurationManager = $this->Context->ObjectFactory->NewContextObject($this->Context, "ConfigurationManager");
         $ConfigurationManager->DefineSetting('UPDATE_REMINDER', $ReminderRange, 1);
         if ($ConfigurationManager->SaveSettingsToFile($SettingsFile)) {
             // If everything was successful, Redirect back with saved changes message
             if ($this->Context->WarningCollector->Iif()) {
                 $Url = GetUrl($this->Context->Configuration, $this->Context->SelfUrl, "", "", "", "", "PostBackAction=UpdateCheck&Saved=1");
                 Redirect($Url);
             }
         }
     }
     $this->CallDelegate('Constructor');
 }
开发者ID:laiello,项目名称:lussumo-vanilla,代码行数:44,代码来源:Framework.Control.UpdateCheck.php

示例11: 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

示例12: DiscussionGrid

 function DiscussionGrid(&$Context)
 {
     $this->Name = "DiscussionGrid";
     $this->Control($Context);
     $this->Category = false;
     $DiscussionManager = $this->Context->ObjectFactory->NewContextObject($this->Context, "DiscussionManager");
     $this->CurrentPage = ForceIncomingInt("page", 1);
     $this->DiscussionData = false;
     $this->DiscussionDataCount = false;
     // Get the category if filtered
     $CategoryID = ForceIncomingInt("CategoryID", 0);
     if ($CategoryID > 0) {
         $cm = $this->Context->ObjectFactory->NewContextObject($this->Context, "CategoryManager");
         $this->Category = $cm->GetCategoryById($CategoryID);
     }
     $this->PageJump = '<a id="PageJump" href="' . GetUrl($this->Context->Configuration, 'index.php') . '">' . $this->Context->GetDefinition('ShowAll') . '</a>';
     $this->DelegateParameters['DiscussionManager'] =& $DiscussionManager;
     $this->CallDelegate('PreDataLoad');
     if (!$this->DiscussionData) {
         $this->DiscussionData = $DiscussionManager->GetDiscussionList($this->Context->Configuration['DISCUSSIONS_PER_PAGE'], $this->CurrentPage, $CategoryID);
         $this->DiscussionDataCount = $DiscussionManager->GetDiscussionCount($CategoryID);
         if ($this->Category) {
             if ($this->Context->PageTitle == '') {
                 $this->Context->PageTitle = htmlspecialchars($this->Category->Name);
             }
         } else {
             if ($this->Context->PageTitle == '') {
                 $this->PageJump = '';
             }
             if ($this->Context->Session->User->BlocksCategories) {
                 if ($this->Context->PageTitle == '') {
                     $this->Context->PageTitle = $this->Context->GetDefinition('WatchedDiscussions');
                 }
             } else {
                 if ($this->Context->PageTitle == '') {
                     $this->Context->PageTitle = $this->Context->GetDefinition('AllDiscussions');
                 }
             }
         }
     }
     $this->CallDelegate('Constructor');
 }
开发者ID:laiello,项目名称:lussumo-vanilla,代码行数:42,代码来源:Vanilla.Control.DiscussionGrid.php

示例13: PasswordForm

 function PasswordForm(&$Context, &$UserManager, $UserID)
 {
     $this->Name = 'PasswordForm';
     if ($Context->Configuration['ALLOW_PASSWORD_CHANGE']) {
         $this->ValidActions = array('ProcessPassword', 'Password');
     }
     $this->Constructor($Context);
     if ($this->IsPostBack) {
         $this->UserManager =& $UserManager;
         $this->User = $this->Context->ObjectFactory->NewContextObject($Context, 'User');
         $this->User->GetPropertiesFromForm();
         $this->User->UserID = $UserID;
         if ($this->PostBackAction == 'ProcessPassword' && $this->IsValidFormPostBack()) {
             if ($this->UserManager->ChangePassword($this->User)) {
                 header('location: ' . GetUrl($this->Context->Configuration, $this->Context->SelfUrl));
             }
         }
     }
     $this->CallDelegate('Constructor');
 }
开发者ID:jaran,项目名称:opencongress,代码行数:20,代码来源:Vanilla.Control.PasswordForm.php

示例14: IdentityForm

 function IdentityForm(&$Context, &$UserManager, &$User)
 {
     $this->Name = 'IdentityForm';
     $this->ValidActions = array('ProcessIdentity', 'Identity');
     $this->Constructor($Context);
     if ($this->IsPostBack) {
         $this->UserManager =& $UserManager;
         $this->User = clone $User;
         if ($this->PostBackAction == 'ProcessIdentity' && $this->IsValidFormPostBack()) {
             $this->User->Clear();
             $this->User->GetPropertiesFromForm();
             $this->User->Preferences = $User->Preferences;
             $this->CallDelegate('PreSaveIdentity');
             if ($this->UserManager->SaveIdentity($this->User) && $this->UserManager->SaveUserCustomizationsFromForm($this->User)) {
                 header('location: ' . GetUrl($this->Context->Configuration, $this->Context->SelfUrl, '', 'u', $this->Context->Session->UserID == 0 ? '' : $this->User->UserID, '', 'Success=1'));
             }
         }
     }
     $this->CallDelegate('Constructor');
 }
开发者ID:jaran,项目名称:opencongress,代码行数:20,代码来源:Vanilla.Control.IdentityForm.php

示例15: GetUnreadQuerystring

function GetUnreadQuerystring(&$Discussion, &$Configuration, $CurrentUserJumpToLastCommentPref = '0')
{
    $Suffix = '';
    if ($Configuration['URL_BUILDING_METHOD'] == 'mod_rewrite') {
        $Suffix = CleanupString($Discussion->Name) . '/';
    }
    if ($CurrentUserJumpToLastCommentPref) {
        $UnreadCommentCount = $Discussion->CountComments - $Discussion->NewComments + 1;
        $ReadCommentCount = $Discussion->CountComments - $Discussion->NewComments;
        $PageNumber = CalculateNumberOfPages($ReadCommentCount, $Configuration['COMMENTS_PER_PAGE']);
        $JumpToItem = $ReadCommentCount - ($PageNumber - 1) * $Configuration['COMMENTS_PER_PAGE'];
        if ($JumpToItem < 0) {
            $JumpToItem = 0;
        }
        if ($PageNumber == 0) {
            $PageNumber = '';
        }
        return GetUrl($Configuration, 'comments.php', '', 'DiscussionID', $Discussion->DiscussionID, $PageNumber, '#Item_' . $JumpToItem, $Suffix);
    } else {
        return GetUrl($Configuration, 'comments.php', '', 'DiscussionID', $Discussion->DiscussionID, '', '', $Suffix);
    }
}
开发者ID:evanfarrar,项目名称:opensprints.org,代码行数:22,代码来源:Vanilla.Functions.php


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