function printChat($room = "") { if ($room == "") { $room = dcChat::getRoom(); } $chat =& getChat($room); $chat->printChat(); }
/** * 检查店铺开启状态 * * @param int $store_id 店铺编号 * @param string $msg 警告信息 */ protected function outputStoreInfo($store_info) { $model_store = Model('store'); $model_seller = Model('seller'); //店铺分类 $goodsclass_model = Model('my_goods_class'); $goods_class_list = $goodsclass_model->getShowTreeList($store_info['store_id']); Tpl::output('goods_class_list', $goods_class_list); //热销排行 $hot_sales = $model_store->getHotSalesList($store_info['store_id'], 5); Tpl::output('hot_sales', $hot_sales); //收藏排行 $hot_collect = $model_store->getHotCollectList($store_info['store_id'], 5); Tpl::output('hot_collect', $hot_collect); //卖家列表 $seller_list = $model_seller->getSellerList(array('store_id' => $store_info['store_id'], 'is_admin' => '0'), null, 'seller_id asc'); Tpl::output('seller_list', $seller_list); Tpl::output('store_info', $store_info); Tpl::output('page_title', $store_info['store_name']); if (function_exists('getChat')) { getChat(''); //调用一次向页面抛出变量 } }
<?php defined('InShopNC') or exit('Access Invalid!');?> <?php echo getChat($layout);?> <div id="faq"> <div class="wrapper"> <?php if(is_array($output['article_list']) && !empty($output['article_list'])){ ?><ul> <?php foreach ($output['article_list'] as $k=> $article_class){ ?> <?php if(!empty($article_class)){ ?> <li> <dl class="s<?php echo ''.$k+1;?>"> <dt> <?php if(is_array($article_class['class'])) echo $article_class['class']['ac_name'];?> </dt> <?php if(is_array($article_class['list']) && !empty($article_class['list'])){ ?> <?php foreach ($article_class['list'] as $article){ ?> <dd><i></i><a href="<?php if($article['article_url'] != '')echo $article['article_url'];else echo urlShop('article', 'show',array('article_id'=> $article['article_id']));?>" title="<?php echo $article['article_title']; ?>"> <?php echo $article['article_title'];?> </a></dd> <?php }?> <?php }?> </dl></li> <?php }?> <?php }?></ul> <?php }?> </div> </div> <div id="footer" class="wrapper" style="margin-bottom:30px; padding-top: 30px;"> <p><a href="<?php echo SHOP_SITE_URL;?>"><?php echo $lang['nc_index'];?></a> <?php if(!empty($output['nav_list']) && is_array($output['nav_list'])){?> <?php foreach($output['nav_list'] as $nav){?> <?php if($nav['nav_location'] == '2'){?> | <a <?php if($nav['nav_new_open']){?>target="_blank" <?php }?>href="<?php switch($nav['nav_type']){ case '0':echo $nav['nav_url'];break; case '1':echo urlShop('search', 'index', array('cate_id'=>$nav['item_id']));break; case '2':echo urlShop('article', 'article',array('ac_id'=>$nav['item_id']));break;
<?php //file_put_contents("/tmp/config", var_export($_GET, true)."\n"); require_once dirname(__FILE__) . "/config.php"; $chat =& getChat(isset($_GET["room"]) ? $_GET["room"] : "");
<?php defined('InShopNC') or exit('Access Invalid!'); echo getChat($layout); ?> <div id="faq"> <div class="wrapper"> <?php if (is_array($output['article_list']) && !empty($output['article_list'])) { ?> <ul> <?php foreach ($output['article_list'] as $k => $article_class) { ?> <?php if (!empty($article_class)) { ?> <li> <dl class="s<?php echo '' . $k + 1; ?> "> <dt> <?php if (is_array($article_class['class'])) { echo $article_class['class']['ac_name']; } ?> </dt> <?php if (is_array($article_class['list']) && !empty($article_class['list'])) { ?>
<div id="wrap"> <div id="header"> <h1>Tephlon Demo</h1> </div> <div id="description"> <h2>A chat engine using the data structure TBuffer_FIFO</h2> <p>TBuffer_FIFO is a data structure in which we can simply add objects (in this example each text line is an object) until we reach a configured buffer size (in this case 15). The system will automatically provide to eliminate the oldest objects when <ul> <li>Buffer is full and we added a new object (line)</li> <li>We reduce the buffer size in any moment</li> </ul> </p> <p>In addition to this, the TBuffer is able to provide a chronologically sorted non-associative array containing all the objects inside of it (method getAll()).</p> </div> <?php $lines = $cs->getLines(); $chat = getChat($lines); echo $chat; ?> <div id="footer"> </div> </div> </body> </html>
} else { if ($action == "sendChat") { $msg = $_POST['msg']; $to_user = mysql_real_escape_string($_POST['name']); $t = time() - 3; $sql = "SELECT NULL FROM stud_data WHERE usr_roll=" . $to_roll . " AND time>=" . $t; $result = mysql_query($sql); $count = mysql_num_rows($result); if ($count == 1) { sendChat($to_roll, $to_user, $msg, $enroll, $username); } else { echo "<root success='no'><user>" . $to_user . "</user></root>"; } } else { if ($action == "getChat") { getChat($to_roll, $enroll); } else { if ($action == "setWritingStatus") { setWritingStatus($enroll, "yes"); } else { if ($action == "checkMyOnlineStatus") { checkMyOnlineStatus($enroll); } else { if ($action == "setOnlineStatus") { $status = mysql_real_escape_string($_POST['status']); setOnlineStatus($enroll, $status); } else { if ($action == "popUpChat") { popUpChat($enroll); } }