summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Tutorial/AjaxChat.page
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/Tutorial/AjaxChat.page')
-rwxr-xr-xdemos/quickstart/protected/pages/Tutorial/AjaxChat.page8
1 files changed, 3 insertions, 5 deletions
diff --git a/demos/quickstart/protected/pages/Tutorial/AjaxChat.page b/demos/quickstart/protected/pages/Tutorial/AjaxChat.page
index d94dfa89..92118720 100755
--- a/demos/quickstart/protected/pages/Tutorial/AjaxChat.page
+++ b/demos/quickstart/protected/pages/Tutorial/AjaxChat.page
@@ -59,7 +59,6 @@ php prado/framework/prado-cli.php -c chat
class Login extends TPage
{
}
-?>
</com:TTextHighlighter>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code_90029">
<!doctype html public "-//W3C//DTD XHTML 1.0 Strict//EN"
@@ -170,7 +169,7 @@ as <tt>App_Code/chat.db</tt>.
class ChatUserRecord extends TActiveRecord
{
const TABLE='chat_users';
-
+
public $username;
public $last_activity;
@@ -431,7 +430,6 @@ and a button to send the message.
Text="Send" /&gt;
</div>
&lt;/com:TForm&gt;
-&lt;com:TJavascriptLogger /&gt;
</body>
</html>
</com:TTextHighlighter>
@@ -572,7 +570,7 @@ public function getUserMessages($user)
$content = '';
foreach($this->findAll('for_user = ?', $user) as $message)
$content .= $this->formatMessage($message);
- $this->deleteAll('for_user = ? OR created_on < ?',
+ $this->deleteAll('for_user = ? OR created_on < ?',
$user, time() - 300); //5 min inactivity
return $content;
}
@@ -581,7 +579,7 @@ protected function formatMessage($message)
{
$user = htmlspecialchars($message->from_user);
$content = htmlspecialchars($message->message);
- return "<div class=\"message\"><strong>{$user}:</strong>"
+ return "<div class=\"message\"><strong>{$user}:</strong>"
." <span>{$content}</span></div>";
}
</com:TTextHighlighter>