下列代码出现问题,请高手赐教。
Parse error: syntax error, unexpected T_ELSE in D:\AppServ\www\Chat\Include\Global.php on line 468
else
{
$Msg = ( $IsPublic == "true" ? "" : "<font color=Silver>[私聊]</font>" )."<a href=# onclick=\"window.parent.SelectToUser('".$User['ChatId']."','".$User['Name']."');return false;\"><img border=0 src=\"".( $User['Sex'] == 1 ? "ChatRoom/UserSex1.gif" : "ChatRoom/UserSex0.gif" )."\"> <font color='".$User['Color']."'>".$User['Name']."</font></a><font color=Silver>".$ExpWord."对</font><a href=# onclick=\"window.parent.SelectToUser('".$ToUser['ChatId']."','".$ToUser['Name']."');return false;\"><img border=0 src=\"".( $ToUser['Sex'] == 1 ? "ChatRoom/UserSex1.gif" : "ChatRoom/UserSex0.gif" )."\"> <font color='".$ToUser['Color']."'>".$ToUser['Name']."</font></a><font color=Silver>说:</font><font color=".$User['Color'].">".( $FontWeight == "true" ? "<b>" : "" ).$Content.( $FontWeight == "true" ? "</b>" : "" )."</font><font color=Silver>[".date( "H:i:s", time( ) )."]</font><br>";
$Msg = "<T".$User['ChatId'].">".$Msg."</T".$User['ChatId'].">\r\n\t\t";
$Msg = formatmsg( $Msg );
$Time = time( );
$Insert_Sql = "insert into chat_msg(RoomId,IsPublic,FromChatId,ToChatId,Content,Time)values('".$User['RoomId']."','{$IsPublic}','{$User['ChatId']}','{$ToChatId}','{$Msg}',{$Time})";
}
Parse error: syntax error, unexpected T_ELSE in D:\AppServ\www\Chat\Include\Global.php on line 468
else
{
$Msg = ( $IsPublic == "true" ? "" : "<font color=Silver>[私聊]</font>" )."<a href=# onclick=\"window.parent.SelectToUser('".$User['ChatId']."','".$User['Name']."');return false;\"><img border=0 src=\"".( $User['Sex'] == 1 ? "ChatRoom/UserSex1.gif" : "ChatRoom/UserSex0.gif" )."\"> <font color='".$User['Color']."'>".$User['Name']."</font></a><font color=Silver>".$ExpWord."对</font><a href=# onclick=\"window.parent.SelectToUser('".$ToUser['ChatId']."','".$ToUser['Name']."');return false;\"><img border=0 src=\"".( $ToUser['Sex'] == 1 ? "ChatRoom/UserSex1.gif" : "ChatRoom/UserSex0.gif" )."\"> <font color='".$ToUser['Color']."'>".$ToUser['Name']."</font></a><font color=Silver>说:</font><font color=".$User['Color'].">".( $FontWeight == "true" ? "<b>" : "" ).$Content.( $FontWeight == "true" ? "</b>" : "" )."</font><font color=Silver>[".date( "H:i:s", time( ) )."]</font><br>";
$Msg = "<T".$User['ChatId'].">".$Msg."</T".$User['ChatId'].">\r\n\t\t";
$Msg = formatmsg( $Msg );
$Time = time( );
$Insert_Sql = "insert into chat_msg(RoomId,IsPublic,FromChatId,ToChatId,Content,Time)values('".$User['RoomId']."','{$IsPublic}','{$User['ChatId']}','{$ToChatId}','{$Msg}',{$Time})";
}
$Insert_Sql = "insert into chat_msg(RoomId,IsPublic,FromChatId,ToChatId,Content,Time)values('".$User['RoomId']."','{".$IsPublic."}','{".$User['ChatId']."}','{".$ToChatId."}','{".$Msg."}','{".$Time."}')";