$row[0],
'name' => $row[1],
'token' => $row[2],
'type' => $row[3],
];
$id = $row[0]; //accid
$name = $row[1];
$token = $row[2];
require './connectnim.php';
if (empty($token)) {
$token = $p->gettokenforapp($userinfo);
if (empty($token)) {
exit("无用户token");
}
$sql = "UPDATE accounts SET token = '" . $token . "' WHERE aid = " . $id;
$result = mysql_query($sql);
}
$_SESSION['token'] = $token;
//获取聊天室roomid
$sql1 = "SELECT aid FROM accounts where type=1 limit 0,1";
$result1 = mysql_query($sql1);
$row1 = @mysql_fetch_row($result1);
$createaccid = $row1[0];
$result = $p->chatroomCreate($createaccid, $name . '_' . date("YmdHis"));
var_dump($result);exit;
$roomidresult = $p->queryUserRoomIds($createaccid);
var_dump($roomidresult);exit;
$roomid = 1;
//获取聊天室地址
$result = $p->chatroomRequestAddr($roomid, $id);*/
//header('Location: 000.php');
header('Location: 001.html');
exit;
} else {
header('Location: check.php');
exit;
}