本文整理汇总了PHP中Render::chat方法的典型用法代码示例。如果您正苦于以下问题:PHP Render::chat方法的具体用法?PHP Render::chat怎么用?PHP Render::chat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Render
的用法示例。
在下文中一共展示了Render::chat方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: chat
$udte = true;
// It's a single message that should be replaced with the existing one
} else {
$sql = $OP->dbh->prepare("INSERT INTO chat (`uid`, `fid`, `msg`, `posted`) VALUES (?, ?, ?, NOW())");
$sql->execute(array($who, $to, $msg));
}
if (get("status", $to) == "off") {
// if friend is offline
$OP->notify("msg", $msg, 0, $to, $who);
}
$sql = $OP->dbh->prepare("SELECT `id` FROM `chat` WHERE `uid` = ? AND `fid` = ? ORDER BY `id` DESC LIMIT 1");
$sql->execute(array($who, $to));
while ($r = $sql->fetch()) {
$cid = $r['id'];
}
$html = $OP->rendFilt(Render::chat($to, $cid));
?>
p="<?php
echo $html;
?>
";
<?php
if ($udte == false) {
?>
if($("#<?php
echo $to;
?>
.msgs .msg").length == 0){
$("#<?php
echo $to;
?>
示例2: elseif
$(".msggt").show();
<?php
}
?>
open.chat.scrollToEnd();
}
<?php
}
}
} elseif (isset($_POST['all']) && $_POST['all'] == "true" && $to != "gadget") {
$sql = $OP->dbh->prepare("SELECT fid FROM conn WHERE uid=:who AND fid=:fid AND uid IN (SELECT fid FROM conn WHERE uid=:fid)");
$sql->execute(array(":who" => $who, ":fid" => $to));
if ($sql->rowCount() == 0) {
$OP->ser();
}
$ht = $OP->rendFilt(Render::chat($to, true));
?>
$("#<?php
echo $to;
?>
.msgs").html("<?php
echo $ht;
?>
");
open.chat.scrollToEnd();
t=$(".users #<?php
echo $to;
?>
.user");
t.css({background:"white",color:"black"});
t.attr("title", "Unread Messages");
示例3: get
<?php
if (loggedIn) {
?>
<div class="chatgt">
<div class="msggt">
<div class="close">x</div>
<div class="chattop">
<a id="cwinopen" href="chat/">Chat</a>
</div>
<?php
require_once "inc/render.php";
?>
<?php
echo Render::chat("gadget");
?>
</div>
<div class="usersgt">
<div class="cusgt">
<div class="close">x</div>
<img src="<?php
echo get("avatar");
?>
"/>
<div class="otd">
<a href="<?php
echo Open::URL("profile");
?>
"><?php
echo get("name", $who, false);
?>
示例4: get
<?php
if ($sql->rowCount() != 0 && $friendID != "") {
$pLink = get("plink", $friendID);
$fName = get("name", $friendID, false);
echo "Chat | <a href='{$pLink}'>{$fName}</a>";
}
?>
</div>
<div class="chatLoader">
<?php
if ($friendID != "") {
if ($sql->rowCount() == 0) {
if ($friendID == $who) {
echo "<h2>Uh... It's you</h2><p>Why do you want to chat with yourself ?</p>";
} else {
echo "<h2>Not Friends</h2><p>You and {$friendID} are not friends.</p>";
}
} else {
require_once "{$docRoot}/inc/render.php";
echo Render::chat($friendID);
}
} else {
echo "<h2>No User Selected</h2>To see messages, choose a person seen on the left table.";
}
?>
</div>
</div>
</div>
</div>
</body>
</html>