메시지 관련 template 준비중

This commit is contained in:
2018-01-28 03:44:27 +09:00
parent 3ecee6a9e8
commit 9b45ca41fa
4 changed files with 51 additions and 0 deletions
+2
View File
@@ -318,7 +318,9 @@ function MsgDip($connect, $bg) {
if($nation['dip4']) { echo "\n"; DecodeMsg($connect, $nation['dip4'], $nation['dip4_type'], $nation['dip4_who'], $nation['dip4_when'], $bg, 4); }
}
function ShowMsgEx($msgType, $src, $dest, $msg, $datetime){
}
function ShowMsg($skin, $bgcolor, $type, $picture, $imgsvr, $me, $mycolor, $you, $youcolor, $msg, $date, $num=0, $who=0, $when=0, $level=0, $note="") {
if($msg == "") return;
+1
View File
@@ -32,6 +32,7 @@ function Tag2Code($str) {
}
function BadTag2Code($str) {
/* FIXME: 제대로된 tag 변환 코드 사용 */
$str = str_replace("<script", "<sorry", $str);
$str = str_replace("<embed", "<sorry", $str);
return $str;
+1
View File
@@ -17,6 +17,7 @@ $connect = dbconn();
<body oncontextmenu='return false'>
<?php
$query = "select no,nation,skin from general where user_id='{$_SESSION['p_id']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
+47
View File
@@ -0,0 +1,47 @@
<?php
//TODO: style을 css로 분리
//TODO: msg를 div로 변경
?>
<table
width="498px"
border="1"
bordercolordark="gray"
bordercolorlight="black"
cellpadding="0"
cellspacing="0"
<?php if($msgType == 'private'): ?>
bgcolor="#CC6600"
<?php elseif($msgType == 'public'): ?>
bgcolor="#000055"
<?php else: /*$msgType == 'national'*/?>
bgcolor="#336600"
<?php endif; ?>
style="font-size:13;table-layout:fixed;word-break:break-all;"
data-num="<?=$num?>" <?php /*NOTE: 사용되지 않을 num인데 필요한가? */ ?>
>
<tbody><tr>
<td width="64px" height="64px">
<?php if ($src['iconPath'] !== NULL): ?>
<img src="<?=urlencode($src['iconPath'])?>">
<?php else: ?>
<img src="/image/default.jpg"> <?php /*NOTE: image 폴더는 어느 단에서 다뤄야하는가? */?>
<?php endif; ?>
</td>
<td width="434px" valign="top">
<?php if($msgType == 'private'): ?>
<b>[
<font color="<?=$src['color']?>"><?=$src['name']?>:<?=$src['nation']?>
</font><font color="<?=$dest['color']?>"><?=$dest['name']?>:<?=$dest['nation']?></font>
]</b>
<?php else: ?>
<b>[
<font color="<?=$src['color']?>"><?=$src['name']?>:<?=$src['nation']?>
]</b>
<?php endif; ?>
<font size="1">&lt;<?=$datetime?>&gt;</font>
<br>
<?=$msg?>
</td>
</tr></tbody>
</table>