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


PHP chatBoxSession函数代码示例

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


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

示例1: startChatSession

function startChatSession()
{
    $items = '';
    if (!empty($_SESSION['openChatBoxes'])) {
        foreach ($_SESSION['openChatBoxes'] as $chatbox => $void) {
            $items .= chatBoxSession($chatbox);
        }
    }
    if ($items != '') {
        $items = substr($items, 0, -1);
    }
    header('Content-type: application/json');
    ?>
{
		"username": "<?php 
    echo $_SESSION['username'];
    ?>
",
		"items": [
			<?php 
    echo $items;
    ?>
        ]
}

<?php 
    exit(0);
}
开发者ID:eswar544,项目名称:version-in,代码行数:28,代码来源:chat.php

示例2: startChatSession

function startChatSession()
{
    $items = '';
    if (!empty($_SESSION['openChatBoxes'])) {
        foreach ($_SESSION['openChatBoxes'] as $chatbox => $void) {
            $items .= chatBoxSession($chatbox);
        }
    }
    if ($items != '') {
        $items = substr($items, 0, -1);
    }
    /*
    $suser=$_SESSION['user_id'];
    $sc=mysql_query("select _user from dsb_user_profiles where _user='$su'");
    while($row_sc=mysql_fetch_array($sc))
    {
    $_SESSION['current_chat__user']=$row_sc['_user'];
    }*/
    ?>
{
		"_user": "<?php 
    echo $_SESSION['user_id'];
    ?>
",
		"items": [
			<?php 
    echo $items;
    ?>
        ]
}

<?php 
    exit(0);
}
开发者ID:Mahajyothis,项目名称:Version1.0-Git,代码行数:34,代码来源:chat.php

示例3: startChatSession

function startChatSession()
{
    global $dbmain;
    $items = '';
    if (!empty($_SESSION['openChatBoxes'])) {
        foreach ($_SESSION['openChatBoxes'] as $chatbox => $void) {
            $items .= chatBoxSession($chatbox);
        }
    }
    if ($items != '') {
        $items = substr($items, 0, -1);
    }
    $typec = getTypeC();
    $nombre_chat = getNombreChat();
    $sql = sqlite_query($dbmain, "INSERT OR REPLACE INTO tbchat_session values ('" . md5($nombre_chat) . "','" . $nombre_chat . "','" . $typec . "','" . strtotime("now") . "')");
    header('Content-type: application/json');
    ?>
	{
			"id_chat": "<?php 
    echo md5($nombre_chat);
    ?>
",
			"username": "<?php 
    echo $nombre_chat;
    ?>
",
			"items": [
				<?php 
    echo $items;
    ?>
			]
	}
	<?php 
    exit(0);
}
开发者ID:lflores10,项目名称:octa,代码行数:35,代码来源:chat.php

示例4: startChatSession

function startChatSession() {
    global $xoopsUser;
	$items = '';
    if (!empty($_SESSION['openChatBoxes'])) {
        foreach ($_SESSION['openChatBoxes'] as $chatbox => $void) {
            $items .= chatBoxSession($chatbox);
        }
    }
    
    
    if ($items != '') {
        $items = substr($items, 0, -1);
    }

    $user=$xoopsUser->uname(); 
	$avatar =$xoopsUser->getVar('user_avatar');
	if ($avatar!='blank.gif') {
	    $avatarURL = XOOPS_URL."/uploads/".$avatar;
	} else {
	    $avatarURL = XOOPS_URL."/modules/xim/images/default_avatar.png";
	}

    $message = <<<EOD
{"username":"$user","avatar":"$avatarURL","items":[
$items]} 
EOD;
    header('Content-type: application/json');
    print($message);  
    
    exit(0);
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:chat.php


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