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


PHP Render::chat方法代码示例

本文整理汇总了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;
        ?>
开发者ID:sukanyamandal,项目名称:open,代码行数:31,代码来源:msg.php

示例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");
开发者ID:sukanyamandal,项目名称:open,代码行数:31,代码来源:checkMsg.php

示例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);
    ?>
开发者ID:sankarganeshsiva,项目名称:open,代码行数:31,代码来源:gadget.php

示例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>
开发者ID:sukanyamandal,项目名称:open,代码行数:31,代码来源:chat.php


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