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


PHP FormatStringForDisplay函数代码示例

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


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

示例1: Get

    function Get()
    {
        $sReturn = '<select name="' . $this->Name . '" class="' . $this->CssClass . '" ' . $this->Attributes . '>
		';
        $OptionCount = count($this->aOptions);
        $i = 0;
        for ($i = 0; $i < $OptionCount; $i++) {
            $sReturn .= '<option value="' . FormatStringForDisplay($this->aOptions[$i]['IdValue']) . '" ';
            if (is_array($this->SelectedValue)) {
                $numrows = count($this->SelectedValue);
                for ($j = 0; $j < $numrows; $j++) {
                    if ($this->aOptions[$i]['IdValue'] == $this->SelectedValue[$j]) {
                        $sReturn .= ' selected="selected"';
                        $j = $numrows;
                        // If you've found a match, don't bother looping anymore
                    }
                }
            } else {
                if ($this->aOptions[$i]['IdValue'] == $this->SelectedValue) {
                    $sReturn .= ' selected="selected"';
                }
            }
            if ($this->aOptions[$i]['Attributes'] != '') {
                $sReturn .= $this->aOptions[$i]['Attributes'];
            }
            $sReturn .= '>' . FormatStringForDisplay($this->aOptions[$i]['DisplayValue']) . '</option>
			';
        }
        $sReturn .= '</select>
		';
        return $sReturn;
    }
开发者ID:jaran,项目名称:opencongress,代码行数:32,代码来源:Framework.Class.Select.php

示例2: FormatPropertiesForDisplay

 function FormatPropertiesForDisplay($IncludeContents = "0")
 {
     $IncludeContents = ForceBool($IncludeContents, 0);
     $this->Label = FormatStringForDisplay($this->Label);
     if ($IncludeContents) {
         $this->Contents = htmlspecialchars($this->Contents);
     }
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:8,代码来源:Clipboard.php

示例3: FormatPropertiesForDisplay

 function FormatPropertiesForDisplay()
 {
     $this->AuthUsername = FormatStringForDisplay($this->AuthUsername);
     $this->AuthFullName = FormatStringForDisplay($this->AuthFullName);
     $this->Name = FormatStringForDisplay($this->Name);
     $this->Url = FormatStringForDisplay($this->Url);
     $this->PreviewImage = FormatStringForDisplay($this->PreviewImage);
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:8,代码来源:Style.php

示例4: Render_NoPostBack

 function Render_NoPostBack()
 {
     $this->PostBackParams->Add("PostBackAction", "RequestPasswordReset");
     $this->Render_Warnings();
     $this->Context->Writer->Add("<div class=\"About\">\r\n\t\t\t<h1>" . $this->Context->GetDefinition("AboutYourPassword") . "</h1>\r\n\t\t\t<p>" . $this->Context->GetDefinition("AboutYourPasswordRequestNotes") . "</p>\r\n\t\t\t<p><a href=\"signin.php\">" . $this->Context->GetDefinition("BackToSignInForm") . "</a></p>\r\n\t\t</div>\r\n\t\t<div class=\"Form\">\r\n\t\t\t<h1>" . $this->Context->GetDefinition("PasswordResetRequestForm") . "</h1>\r\n\t\t\t<p>" . $this->Context->GetDefinition("PasswordResetRequestFormNotes") . "</p>");
     $this->Render_PostBackForm($this->FormName);
     $this->Context->Writer->Write("<dl class=\"InputBlock PasswordRequestInputs\">\r\n\t\t\t\t<dt>" . $this->Context->GetDefinition("Username") . "</dt>\r\n\t\t\t\t<dd><input type=\"text\" name=\"Username\" value=\"" . FormatStringForDisplay($this->Username, 1) . "\" class=\"Input\" maxlength=\"20\" /></dd>\r\n\t\t\t</dl>\r\n\t\t\t<div class=\"FormButtons\"><input type=\"submit\" name=\"btnPassword\" value=\"" . $this->Context->GetDefinition("SendRequest") . "\" class=\"Button\" /></div>\r\n\t\t\t</form>\r\n\t\t</div>");
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:8,代码来源:passwordrequest.php

示例5: Render_NoPostBack

 function Render_NoPostBack()
 {
     $this->Username = FormatStringForDisplay($this->Username, 1);
     $this->PostBackParams->Add('PostBackAction', 'SignIn');
     $this->PostBackParams->Add('ReturnUrl', $this->ReturnUrl);
     $this->CallDelegate('PreNoPostBackRender');
     include ThemeFilePath($this->Context->Configuration, 'people_signin_form_nopostback.php');
     $this->CallDelegate('PostNoPostBackRender');
 }
开发者ID:jaran,项目名称:opencongress,代码行数:9,代码来源:People.Control.SignInForm.php

示例6: Render_NoPostBack

 function Render_NoPostBack()
 {
     $this->Username = FormatStringForDisplay($this->Username, 1);
     $this->PostBackParams->Add("PostBackAction", "SignIn");
     $this->PostBackParams->Add("ReturnUrl", $this->ReturnUrl);
     $this->Render_Warnings();
     $this->Context->Writer->Add("<div class=\"About\">\r\n\t\t\t" . $this->Context->GetDefinition("AboutVanilla") . "\r\n\t\t</div>\r\n\t\t<div class=\"Form\">\r\n\t\t\t" . $this->Context->GetDefinition("MemberSignIn"));
     $this->Render_PostBackForm($this->FormName);
     $this->Context->Writer->Write("<dl class=\"InputBlock SignInInputs\">\r\n\t\t\t\t<dt>" . $this->Context->GetDefinition("Username") . "</dt>\r\n\t\t\t\t<dd><input type=\"text\" name=\"Username\" value=\"" . $this->Username . "\" class=\"Input\" maxlength=\"20\" /></dd>\r\n\t\t\t\t<dt>" . $this->Context->GetDefinition("Password") . "</dt>\r\n\t\t\t\t<dd><input type=\"password\" name=\"Password\" value=\"\" class=\"Input\" /></dd>\r\n\t\t\t</dl>\r\n\t\t\t<div class=\"InputBlock RememberMe\">" . GetDynamicCheckBox("RememberMe", 1, ForceIncomingBool("RememberMe", 0), "", $this->Context->GetDefinition("RememberMe")) . "</div>\r\n\t\t\t<a class=\"ForgotPasswordLink\" href=\"passwordrequest.php\">" . $this->Context->GetDefinition("ForgotYourPassword") . "</a>\r\n\t\t\t<div class=\"FormButtons\"><input type=\"submit\" name=\"btnSignIn\" value=\"" . $this->Context->GetDefinition("Proceed") . "\" class=\"Button\" /></div>\r\n\t\t\t</form>\r\n\t\t</div>");
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:10,代码来源:signin.php

示例7: FormatPropertiesForDisplay

 function FormatPropertiesForDisplay(&$Context)
 {
     $this->Username = FormatStringForDisplay($this->Username, 0);
     $this->FullName = FormatStringForDisplay($this->FullName, 0);
     $this->AdminUsername = FormatStringForDisplay($this->AdminUsername, 0);
     $this->AdminFullName = FormatStringForDisplay($this->AdminFullName, 0);
     $AdminUser = $Context->ObjectFactory->NewContextObject($Context, 'Comment');
     $AdminUser->Clear();
     $AdminUser->AuthUsername = $this->AdminUsername;
     $AdminUser->AuthUserID = $this->AdminUserID;
     $this->Notes = $Context->FormatString($this->Notes, $AdminUser, 'Text', FORMAT_STRING_FOR_DISPLAY);
 }
开发者ID:jaran,项目名称:opencongress,代码行数:12,代码来源:People.Class.UserRoleHistory.php

示例8: Render_NoPostBack

 function Render_NoPostBack()
 {
     $this->Reporter = FormatStringForDisplay($this->Reporter, 0);
     $this->ReporterEmail = FormatStringForDisplay($this->ReporterEmail, 0);
     $this->BugUrl = FormatStringForDisplay($this->BugUrl, 0);
     $this->BugHappenedWhen = FormatStringForDisplay($this->BugHappenedWhen, 0);
     $this->BugDescription = FormatStringForDisplay($this->BugDescription, 0);
     $this->PostBackParams->Add("PostBackAction", "ReportBug");
     $this->Render_Warnings();
     $this->Context->Writer->Add("<div class=\"Form BugForm\">\r\n\t\t\t" . $this->Context->GetDefinition("AboutBugReport"));
     $this->Render_PostBackForm("frmBugReport");
     $this->Context->Writer->Write("<dl class=\"InputBlock BugReportInputs\">\r\n\t\t\t\t<dt>" . $this->Context->GetDefinition("ReporterName") . "</dt>\r\n\t\t\t\t<dd><input type=\"text\" name=\"ReporterName\" value=\"" . $this->Reporter . "\" class=\"BugInput\" maxlength=\"100\" /></dd>\r\n\t\t\t\t<dt>" . $this->Context->GetDefinition("ReporterEmail") . "</dt>\r\n\t\t\t\t<dd><input type=\"text\" name=\"ReporterEmail\" value=\"" . $this->ReporterEmail . "\" class=\"BugInput\" maxlength=\"200\" /></dd>\r\n\t\t\t\t<dt>" . $this->Context->GetDefinition("BugUrl") . "</dt>\r\n\t\t\t\t<dd><input type=\"text\" name=\"BugUrl\" value=\"" . $this->BugUrl . "\" class=\"BugInput\" maxlength=\"255\" /></dd>\r\n\t\t\t\t<dt>" . $this->Context->GetDefinition("BugHappenedWhen") . "</dt>\r\n\t\t\t\t<dd><textarea name=\"BugHappenedWhen\" class=\"BugTextBox\">" . $this->BugHappenedWhen . "</textarea></dd>\r\n\t\t\t\t<dt>" . $this->Context->GetDefinition("BugDescription") . "</dt>\r\n\t\t\t\t<dd><textarea name=\"BugDescription\" class=\"BugTextBox\">" . $this->BugDescription . "</textarea></dd>\r\n\t\t\t</dl>\r\n\t\t\t<div class=\"FormButtons\"><input type=\"submit\" name=\"btnReportBug\" value=\"" . $this->Context->GetDefinition("Submit") . "\" class=\"Button\" /></div>\r\n\t\t\t</form>\r\n\t\t</div>");
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:13,代码来源:bugreport.php

示例9: GetPropertiesFromDataSet

 function GetPropertiesFromDataSet($DataSet, &$Context)
 {
     $this->Title = FormatHtmlStringInline(ForceString($DataSet["Name"], ""));
     $this->Link = PrependString("http://", AppendFolder(agDOMAIN, "comments.php?DiscussionID=" . ForceInt($DataSet["DiscussionID"], 0)));
     $this->Id = $this->Link;
     $this->Published = FixDate(@$DataSet["DateCreated"]);
     $this->Updated = FixDate(@$DataSet["DateLastActive"]);
     $this->AuthorName = FormatHtmlStringInline(ForceString($DataSet["AuthUsername"], ""));
     $this->AuthorUrl = PrependString("http://", AppendFolder(agDOMAIN, "account.php?u=" . ForceInt($DataSet["AuthUserID"], 0)));
     $this->Content = $this->RemoveHtml(ForceString(@$DataSet["Body"], ""));
     $this->Summary = SliceString($this->Content, 200);
     $this->Summary = str_replace("\r\n", " ", $this->Content);
     $this->Content = str_replace("\r\n", "<br />", $this->Content);
     if (agUSE_CATEGORIES) {
         $this->Category = FormatStringForDisplay(ForceString($DataSet["Category"], ""), true);
         $this->CategoryLink = "http://" . AppendFolder(agDOMAIN, "?CategoryID=" . ForceInt($DataSet["CategoryID"], 0));
     }
 }
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:18,代码来源:index.php

示例10: Wizard

    echo "<h1>Vanilla Installation Wizard (Step 1 of 3)</h1>";
    if ($WarningCollector->Count() > 0) {
        echo "<div class=\"Warnings\">\r\n                  <strong>Oops. We came across some problems while checking your permissions...</strong>\r\n                  " . $WarningCollector->GetMessages() . "\r\n               </div>\r\n               <p>Let's try this again...</p>";
    }
    echo "<p>Before we can do much of anything, we need to make sure that you've got your directory &amp; file permissions set up properly.</p>\r\n               <p>Vanilla is going to need read AND write access to the following files:</p>\r\n               <ul>\r\n                  <li>" . $WorkingDirectory . "appg/settings.php</li>\r\n                  <li>" . $WorkingDirectory . "appg/extensions.php</li>\r\n                  <li>" . $WorkingDirectory . "appg/language.php</li>\r\n                  <li>" . $WorkingDirectory . "database.sql</li>\r\n               </ul>\r\n               <p>Vanilla is also going to need read access to the following folder:</p>\r\n               <ul>\r\n                  <li>" . $WorkingDirectory . "languages/</li>\r\n               </ul>\r\n               <p>And finally, the filebrowser and thumbnailer will need read AND write access to the following folder:</p>\r\n               <ul>\r\n                  <li>" . $WorkingDirectory . "images/</li>\r\n               </ul>\r\n               <p>If you are running a *nix server and you have command line access, you can achieve these permissions by navigating to the Vanilla folder. Once you are sitting in the same folder as the installer.php file, run the following commands:</p>\r\n               <blockquote>\r\n                  <code>\r\n                     chmod 666 appg/settings.php\r\n                     <br />chmod 666 appg/language.php\r\n                     <br />chmod 666 appg/extensions.php\r\n                     <br />chmod 666 database.sql\r\n                     <br />chmod 757 images/\r\n                  </code>\r\n               </blockquote>\r\n               <p>Once you've got your permissions set up properly...</p>\r\n               <div class=\"Button\"><a href=\"installer.php?PostBackAction=Permissions\">Click here to check your permissions and proceed to the next step</a></div>";
} elseif ($CurrentStep == 2) {
    echo "<h1>Vanilla Installation Wizard (Step 2 of 3)</h1>";
    if ($WarningCollector->Count() > 0) {
        echo "<div class=\"Warnings\">\r\n                  <strong>Oops. We came across some problems while setting up Vanilla...</strong>\r\n                  " . $WarningCollector->GetMessages() . "\r\n               </div>\r\n               <p>Let's try this again...</p>";
    }
    echo "<p>Below you can provide the connection parameters for the mysql server where you want to install Vanilla. If you haven't done it yet, now would be a good time to create the database where you want Vanilla installed.</p>\r\n            <form name=\"frmDatabase\" method=\"post\" action=\"installer.php\">\r\n            <input type=\"hidden\" name=\"PostBackAction\" value=\"Database\" />\r\n            <div class=\"Form\">\r\n               <dl>\r\n                  <dt>MySQL Server</dt>\r\n                  <dd><input type=\"text\" name=\"DBHost\" value=\"" . FormatStringForDisplay($DBHost, 1) . "\" /></dd>\r\n                  <dt>MySQL Database Name</dt>\r\n                  <dd><input type=\"text\" name=\"DBName\" value=\"" . FormatStringForDisplay($DBName, 1) . "\" /></dd>\r\n                  <dt>MySQL User</dt>\r\n                  <dd><input type=\"text\" name=\"DBUser\" value=\"" . FormatStringForDisplay($DBUser, 1) . "\" /></dd>\r\n                  <dt>MySQL Password</dt>\r\n                  <dd><input type=\"password\" name=\"DBPass\" value=\"" . FormatStringForDisplay($DBPass, 1) . "\" /></dd>\r\n               </dl>\r\n            </div>\r\n            </form>\r\n            <div class=\"Button\"><a href=\"javascript:document.frmDatabase.submit();\">Click here to create Vanilla's database tables and proceed to the next step</a></div>";
} elseif ($CurrentStep == 3) {
    if ($PostBackAction != "User") {
        $CookieDomain = ForceString(@$_SERVER['HTTP_HOST'], "");
    }
    echo "<h1>Vanilla Installation Wizard (Step 3 of 3)</h1>";
    if ($WarningCollector->Count() > 0) {
        echo "<div class=\"Warnings\">\r\n                  <strong>Oops. We came across some problems while setting up Vanilla...</strong>\r\n                  " . $WarningCollector->GetMessages() . "\r\n               </div>";
    }
    echo "<p>Now let's set up your administrative account for Vanilla.</p>\r\n            <form name=\"frmUser\" method=\"post\" action=\"installer.php\">\r\n            <input type=\"hidden\" name=\"PostBackAction\" value=\"User\" />\r\n            <input type=\"hidden\" name=\"DBHost\" value=\"" . FormatStringForDisplay($DBHost) . "\" />\r\n            <input type=\"hidden\" name=\"DBName\" value=\"" . FormatStringForDisplay($DBName) . "\" />\r\n            <input type=\"hidden\" name=\"DBUser\" value=\"" . FormatStringForDisplay($DBUser) . "\" />\r\n            <input type=\"hidden\" name=\"DBPass\" value=\"" . FormatStringForDisplay($DBPass) . "\" />\r\n            <div class=\"Form\">\r\n               <dl>\r\n                  <dt>Username</dt>\r\n                  <dd><input type=\"text\" name=\"Username\" value=\"" . FormatStringForDisplay($Username, 1) . "\" /></dd>\r\n                  <dt>Password</dt>\r\n                  <dd><input type=\"password\" name=\"Password\" value=\"" . FormatStringForDisplay($Password, 1) . "\" /></dd>\r\n                  <dt>Confirm Password</dt>\r\n                  <dd><input type=\"password\" name=\"ConfirmPassword\" value=\"" . FormatStringForDisplay($ConfirmPassword, 1) . "\" /></dd>\r\n               </dl>\r\n            </div>\r\n            <p>Up next we've got to set up the support contact information for your forum. This is what people will see when support emails go out from the system for things like password retrieval and role changes.</p>\r\n            <div class=\"Form\">\r\n               <dl>\r\n                  <dt>Support Contact Name</dt>\r\n                  <dd><input type=\"text\" name=\"SupportName\" value=\"" . FormatStringForDisplay($SupportName, 1) . "\" /></dd>\r\n                  <dt>Support Email Address</dt>\r\n                  <dd><input type=\"text\" name=\"SupportEmail\" value=\"" . FormatStringForDisplay($SupportEmail, 1) . "\" /></dd>\r\n               </dl>\r\n            </div>\r\n            <p>What do you want to call your forum?</p>\r\n            <div class=\"Form\">\r\n               <dl>\r\n                  <dt>Forum Name</dt>\r\n                  <dd><input type=\"text\" name=\"ApplicationTitle\" value=\"" . FormatStringForDisplay($ApplicationTitle, 1) . "\" /></dd>\r\n               </dl>\r\n            </div>\r\n            <p>When members use the \"remember me\" feature of the sign in form, we assign a cookie to their browser. That cookie is normally associated with your domain name, but you may want to associate it with something else like the sub-folder in which Vanilla resides (if Vanilla is in a sub-folder). Specify your cookie domain here.</p>\r\n            <div class=\"Form\">\r\n               <dl>\r\n                  <dt>Cookie Domain</dt>\r\n                  <dd><input type=\"text\" name=\"CookieDomain\" value=\"" . FormatStringForDisplay($CookieDomain, 1) . "\" /></dd>\r\n               </dl>\r\n            </div>\r\n            <p>Finally, select the language you want Vanilla to use. If you don't see your language here, you should " . GetEmail("support@lussumo.com", "contact us") . " about setting up a Vanilla dictionary for your language!</p>\r\n            <div class=\"Form\">\r\n               <dl>\r\n                  <dt>Language</dt>\r\n                  <dd>" . $LanguageSelect->Get() . "</dd>\r\n               </dl>\r\n            </div>\r\n            </form>\r\n            <div class=\"Button\"><a href=\"javascript:document.frmUser.submit();\">Click here to complete the setup process!</a></div>";
} else {
    echo "<h1>Vanilla Installation Wizard (Complete)</h1>\r\n            <p><strong>That's it!</strong></p>\r\n            <p>Vanilla is set up and ready to go, so what do you do next?</p>\r\n            <p>Before you start inviting your friends in for discussions, there are a lot of other things you might want to set up. For example, in the settings tab, you can:</p>\r\n            <ul>\r\n               <li>\r\n                  Turn some of the extensions on, like...\r\n                  <ul>\r\n                     <li>The category quick-jump that allows members to jump between categories from their control panel</li>\r\n                     <li>The clipboard that allows members to quickly paste snippets of information into their comments</li>\r\n                     <li>The Html Formatter that allows members to use a limited set of html when adding their comments to discussions</li>\r\n                     <li>And lots more!</li>\r\n                  </ul>\r\n               </li>\r\n               <li>\r\n                  Fine-tune application settings like...\r\n                  <ul>\r\n                     <li>Change the number of discussions or comments per page</li>\r\n                     <li>Allow the public to browse your forum without an account</li>\r\n                     <li>Disable discussion categories and run your forum as one giant discussion container</li>\r\n                     <li>Allow your members to change their usernames at will</li>\r\n                     <li>Much, much more!</li>\r\n                  </ul>\r\n               </li>\r\n               <li>Create new roles with various different permissions</li>\r\n               <li>Create new categories, and even limit which roles get to access them</li>\r\n               <li>Allow new users to be automatically granted access when they apply for membership</li>\r\n            </ul>\r\n            <p>And that's not all. There's also the latest version of the Lussumo Filebrowser and Thumbnailer sitting in your images folder.</p>\r\n            <div class=\"Button\"><a href=\"signin.php\">Go sign in and have some fun!</a></div>";
}
?>
         </div>
      </div>
      <div class="Foot">
         <a href="http://lussumo.com">Lussumo</a> <a href="http://getvanilla.com">Vanilla</a> & <a href="http://thefilebrowser.com">Filebrowser</a> Copyright &copy; 2001 - 2005
      </div>   
   </body>
</html>
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:installer.php

示例11: GetRequestUri

function GetRequestUri()
{
    global $Configuration;
    $Host = ForceString($_SERVER['HTTP_HOST'], '');
    if ($Host != '') {
        $Host = PrependString($Configuration['HTTP_METHOD'] . '://', $Host);
    }
    $Path = @$_SERVER['REQUEST_URI'];
    // If the path wasn't provided in the REQUEST_URI variable, let's look elsewhere for it
    if ($Path == '') {
        $Path = @$_SERVER['HTTP_X_REWRITE_URL'];
    }
    // Some servers use this instead
    // If the path still wasn't found, let's try building it with other variables
    if ($Path == '') {
        $Path = @$_SERVER['SCRIPT_NAME'];
        $Path .= @$_SERVER['QUERY_STRING'] == '' ? '' : '?' . @$_SERVER['QUERY_STRING'];
    }
    $FullPath = ConcatenatePath($Host, $Path);
    return FormatStringForDisplay($FullPath);
}
开发者ID:jaran,项目名称:opencongress,代码行数:21,代码来源:Framework.Functions.php

示例12: FormatStringForDisplay

// Create the comment grid
$Post = $Context->ObjectFactory->NewContextObject($Context, "Post");
$Post->Title = $Context->GetDefinition("StartANewDiscussion");
// Create the comment form
$CommentForm = $Context->ObjectFactory->NewContextObject($Context, "DiscussionForm");
$CommentForm->LoadData();
// Only people with active sessions can post
if ($Context->Session->UserID == 0) {
    $Context->WarningCollector->Add($this->Context->GetDefinition("ErrSignInToDiscuss"));
    $CommentForm->FatalError = 1;
}
// Define properties of the page controls that are specific to this page
$Menu->CurrentTab = "discussions";
$Panel->CssClass = "PostPanel";
$Body->CssClass = "StartDiscussion";
$Context->PageTitle = FormatStringForDisplay($CommentForm->Discussion->Name, 1);
if ($Context->PageTitle == "") {
    $Context->PageTitle = $Context->GetDefinition("StartANewDiscussion");
} else {
    if ($CommentForm->CommentID == 0) {
        $Post->Title = $Context->GetDefinition("AddYourComments");
    } elseif ($CommentForm->CommentID > 0) {
        $Post->Title = $Context->GetDefinition("EditComments");
    } else {
        $Post->Title = $Context->GetDefinition("EditDiscussion");
    }
}
// 2. BUILD PAGE CONTROLS
// Build the control panel
$Panel->AddListItem($Context->GetDefinition("Options"), $Context->GetDefinition("BackToDiscussions"), "./");
AddDiscussionOptionsToPanel($Context, $Panel);
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:post.php

示例13: FormatStringForDisplay

        $cs->Attributes .= ' id="ddCategories"';
        if ($CategoryID > 0) {
            echo '<input type=hidden name=CategoryID value=' . $CategoryID . ' />';
        }
    } else {
        echo '<input type="hidden" name="CategoryID" value="' . $cs->aOptions[0]['IdValue'] . '" />';
    }
    $this->CallDelegate('DiscussionForm_PreTopicRender');
    echo '<li>
		<label for="txtTopic">' . $this->Context->GetDefinition($Discussion->DiscussionID == 0 ? 'EnterYourDiscussionTopic' : 'EditYourDiscussionTopic') . '</label>
		<input id="txtTopic" type="text" name="Name" class="DiscussionBox" maxlength="100" value="' . $Discussion->Name . '" />
	</li>';
    if ($this->Context->Configuration['ENABLE_WHISPERS'] && $Discussion->DiscussionID == 0) {
        echo '<li>
			<label for="WhisperUsername">' . $this->Context->GetDefinition('WhisperYourCommentsTo') . '</label>
			<input id="WhisperUsername" name="WhisperUsername" type="text" value="' . FormatStringForDisplay($Discussion->WhisperUsername, 0) . '" class="Whisper AutoCompleteInput" maxlength="20" />
			<script type="text/javascript">
				var WhisperAutoComplete = new AutoComplete("WhisperUsername", false);
				WhisperAutoComplete.TableID = "WhisperAutoCompleteResults";
				WhisperAutoComplete.KeywordSourceUrl = "' . $this->Context->Configuration['WEB_ROOT'] . 'ajax/getusers.php?Search=";
			</script>
		</li>
		';
    }
    $this->CallDelegate('DiscussionForm_PreCommentRender');
    echo '<li>
		<label for="CommentBox">
			<a href="./" id="CommentBoxController" onclick="' . "ToggleCommentBox('" . $this->Context->Configuration['WEB_ROOT'] . "ajax/switch.php', '" . $this->Context->GetDefinition('SmallInput') . "', '" . $this->Context->GetDefinition('BigInput') . "', '" . $this->Context->Session->GetCsrfValidationKey() . "'); return false;" . '">' . $this->Context->GetDefinition($this->Context->Session->User->Preference('ShowLargeCommentBox') ? 'SmallInput' : 'BigInput') . '</a>';
    $this->CallDelegate('DiscussionForm_PostCommentToggle');
    echo $this->Context->GetDefinition('EnterYourComments') . '
		</label>
开发者ID:avital,项目名称:vanilla-thewe,代码行数:31,代码来源:discussion_form.php

示例14: GetUrl

<?php

// Note: This file is included from the library/People/People.Control.PasswordRequestForm.php control.
echo '<div class="About">
	<h2>' . $this->Context->GetDefinition('AboutYourPassword') . '</h2>
	<p>' . $this->Context->GetDefinition('AboutYourPasswordRequestNotes') . '</p>
	<p><a href="' . GetUrl($this->Context->Configuration, $this->Context->SelfUrl) . '">' . $this->Context->GetDefinition('BackToSignInForm') . '</a></p>
</div>
<div id="Form" class="PasswordRequestForm">
	<fieldset>
		<legend>' . $this->Context->GetDefinition('PasswordResetRequestForm') . '</legend>
		<p>' . $this->Context->GetDefinition('PasswordResetRequestFormNotes') . '</p>';
$this->Render_Warnings();
$this->Render_PostBackForm($this->FormName);
echo '<ul>
	<li>
		<label for="txtUsername">' . $this->Context->GetDefinition('Username') . '</label>
		<input id="txtUsername" type="text" name="Username" value="' . FormatStringForDisplay($this->Username, 1) . '" class="Input" maxlength="20" />
	</li>
</ul>
<div class="Submit"><input type="submit" name="btnPassword" value="' . $this->Context->GetDefinition('SendRequest') . '" class="Button" /></div>
</form>
</fieldset>
</div>';
开发者ID:laiello,项目名称:lussumo-vanilla,代码行数:24,代码来源:people_password_request_form_nopostback.php

示例15: NuggetForm

 function NuggetForm(&$Context)
 {
     global $NuggetObj;
     $this->ValidActions = array('NuggetList', 'Nugget', 'RemoveNugget', 'ProcessNugget', 'ProcessNuggetList', 'ProcessRemoveNugget');
     $this->Constructor($Context);
     if (in_array($this->PostBackAction, array('ProcessNugget', 'Nugget')) || !is_array($NuggetObj->Nugget)) {
         //get the role data
         $RoleMng = $this->Context->ObjectFactory->NewContextObject($Context, 'RoleManager');
         $RoleData = $RoleMng->GetRoles();
         if ($RoleData) {
             $NuggetObj->Roles[] = array('ID' => 0, 'Name' => $this->Context->GetDefinition('Unathenticated'));
             while ($Row = $this->Context->Database->GetRow($RoleData)) {
                 $NuggetObj->Roles[] = array('ID' => $Row['RoleID'], 'Name' => FormatStringForDisplay($Row['Name']));
             }
         }
     }
     if ($this->IsPostBack) {
         if ($this->PostBackAction == 'ProcessNugget' && $this->IsValidFormPostBack()) {
             if (!$NuggetObj->CreateNugget($this)) {
                 header('Location: ' . $this->Context->Configuration['WEB_ROOT'] . 'settings.php?PostBackAction=NuggetList');
             }
         } else {
             if ($this->PostBackAction == 'ProcessNuggetList' && $this->IsValidFormPostBack()) {
                 if (!$NuggetObj->SaveNuggetList()) {
                     header('Location: ' . $this->Context->Configuration['WEB_ROOT'] . 'settings.php?PostBackAction=NuggetList');
                 }
             } else {
                 if ($this->PostBackAction == 'ProcessRemoveNugget' && $this->IsValidFormPostBack()) {
                     $NuggetObj->RemoveNugget();
                     header('Location: ' . $this->Context->Configuration['WEB_ROOT'] . 'settings.php?PostBackAction=NuggetList');
                 }
             }
         }
         if (in_array($this->PostBackAction, array('Nugget', 'ProcessNugget', 'RemoveNugget'))) {
             // Generate Nugget select fields.
             $this->NuggetSelect = $this->Context->ObjectFactory->NewObject($this->Context, 'Select');
             $this->NuggetSelect->Name = 'NuggetID';
             $this->NuggetSelect->CssClass = 'SmallInput';
             $this->NuggetSelect->Attributes = 'id="nuggetselect"';
             for ($i = 0; $i < count($NuggetObj->Nugget); $i++) {
                 $this->NuggetSelect->AddOption($NuggetObj->Nugget[$i]['id'], $NuggetObj->Nugget[$i]['name']);
             }
             if ($this->PostBackAction != 'RemoveNugget') {
                 $this->NuggetSelect->AddOption('', $this->Context->GetDefinition('[Create Nugget]'));
             }
         }
         if (in_array($this->PostBackAction, array('NuggetList', 'ProcessNuggetList', 'Nugget', 'ProcessNugget'))) {
             // Generate Weight select fields.
             $this->WeightSelect = $this->Context->ObjectFactory->NewObject($this->Context, 'Select');
             $this->WeightSelect->Name = 'Weight';
             $this->WeightSelect->CssClass = 'WeightSelect SmallInput';
             for ($i = $NuggetObj->Weight['min']; $i <= $NuggetObj->Weight['max']; $i++) {
                 $this->WeightSelect->AddOption($i, $i);
             }
             // Generate Position select fields.
             $this->PositionSelect = $this->Context->ObjectFactory->NewObject($this->Context, 'Select');
             $this->PositionSelect->Name = 'Position';
             $this->PositionSelect->CssClass = 'PositionSelect SmallInput';
             for ($i = 0; $i < count($NuggetObj->Position); $i++) {
                 $this->PositionSelect->AddOption($NuggetObj->Position[$i]['position'], $NuggetObj->Position[$i]['name']);
             }
         }
     }
 }
开发者ID:avital,项目名称:vanilla-thewe,代码行数:64,代码来源:PostBackControl.NuggetForm.php


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