diff --git a/d_setting/conf.orig.php b/d_setting/conf.orig.php index 2e6bd170..9e45ba67 100644 --- a/d_setting/conf.orig.php +++ b/d_setting/conf.orig.php @@ -4,6 +4,11 @@ require_once(__dir__.'/../e_lib/meekrodb.2.3.class.php.php'); require_once(__dir__.'/../e_lib/phpmailer5/class.phpmailer.php'); require_once(__dir__.'/../e_lib/phpmailer5/class.smtp.php'); +/** + * DB 객체 생성 + * + * @return MeekroDB + */ function newRootDB(){ $host = '_host_'; $user = '_user_'; diff --git a/twe/d_setting/conf.orig.php b/twe/d_setting/conf.orig.php index 51dca3a5..03fb571c 100644 --- a/twe/d_setting/conf.orig.php +++ b/twe/d_setting/conf.orig.php @@ -1,6 +1,11 @@ 0?"orange":"white"; echo ">".$nation['msg'].""; } -function genList($connect) { - $query = "select no,nation,level,msgindex,userlevel from general where user_id='{$_SESSION['p_id']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - $you = array(); - - $query = "select msg{$me['msgindex']}_who as reply,msg{$me['msgindex']}_type as type from general where user_id='{$_SESSION['p_id']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $reply = MYDB_fetch_array($result); - if($reply['type'] % 100 == 9) { - $reply['reply'] %= 10000; - $query = "select no,name from general where no={$reply['reply']}"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - } elseif($reply['type'] % 100 == 10) { - $reply['reply'] = floor($reply['reply']/10000); - $query = "select no,name from general where no={$reply['reply']}"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - } - - $query = "select nation,color,name from nation where nation='{$me['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - echo " - -"; -} - -function moveMsg($connect, $table, $msgtype, $msgnum, $msg, $type, $who, $when, $column, $value) { - $query = "update {$table} set {$msgtype}{$msgnum}='$msg',{$msgtype}{$msgnum}_type='$type',{$msgtype}{$msgnum}_who='$who',{$msgtype}{$msgnum}_when='$when' where {$column}='$value'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function MsgMe($connect, $bg) { - $query = "select no,nation,msgindex, - msg0,msg1,msg2,msg3,msg4,msg5,msg6,msg7,msg8,msg9, - msg0_type,msg1_type,msg2_type,msg3_type,msg4_type,msg5_type,msg6_type,msg7_type,msg8_type,msg9_type, - msg0_who,msg1_who,msg2_who,msg3_who,msg4_who,msg5_who,msg6_who,msg7_who,msg8_who,msg9_who, - msg0_when,msg1_when,msg2_when,msg3_when,msg4_when,msg5_when,msg6_when,msg7_when,msg8_when,msg9_when - from general where user_id='{$_SESSION['p_id']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $index = $me['msgindex']; - for($i=0; $i < 10; $i++) { - if($me["msg{$index}"]) { echo "\n"; DecodeMsg($connect, $me["msg{$index}"], $me["msg{$index}_type"], $me["msg{$index}_who"], $me["msg{$index}_when"], $bg, $index); } - $index--; - if($index < 0) { $index = 9; } - } -} - -function MsgDip($connect, $bg) { - $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select dip0,dip1,dip2,dip3,dip4,dip0_who,dip1_who,dip2_who,dip3_who,dip4_who,dip0_when,dip1_when,dip2_when,dip3_when,dip4_when,dip0_type,dip1_type,dip2_type,dip3_type,dip4_type from nation where nation='{$me['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($nation['dip0']) { echo "\n"; DecodeMsg($connect, $nation['dip0'], $nation['dip0_type'], $nation['dip0_who'], $nation['dip0_when'], $bg, 0); } - if($nation['dip1']) { echo "\n"; DecodeMsg($connect, $nation['dip1'], $nation['dip1_type'], $nation['dip1_who'], $nation['dip1_when'], $bg, 1); } - if($nation['dip2']) { echo "\n"; DecodeMsg($connect, $nation['dip2'], $nation['dip2_type'], $nation['dip2_who'], $nation['dip2_when'], $bg, 2); } - if($nation['dip3']) { echo "\n"; DecodeMsg($connect, $nation['dip3'], $nation['dip3_type'], $nation['dip3_who'], $nation['dip3_when'], $bg, 3); } - if($nation['dip4']) { echo "\n"; DecodeMsg($connect, $nation['dip4'], $nation['dip4_type'], $nation['dip4_who'], $nation['dip4_when'], $bg, 4); } -} - -// type : xx,xx(불가침기간,타입) -// who : xxxx,xxxx(발신인, 수신인) -function DecodeMsg($connect, $msg, $type, $who, $date, $bg, $num=0) { - $query = "select skin,no,nation,name,picture,level from general where user_id='{$_SESSION['p_id']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - // 1 : 전메, 2 : 아국->타국, 3 : 타국->아국 - // 4 : 합병, 5 : 통합, 6 : 불가침, 7 : 종전, 8 : 파기 - // 9 : 자신->타인, 10 : 타인 -> 자신, 11 : 등용 - $category = $type % 100; - $term = floor($type / 100); - $from = floor($who / 10000); - $to = $who % 10000; - - $query = "select name,picture,imgsvr,nation from general where no='$from'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $sndr = MYDB_fetch_array($result); - - if($sndr['nation'] == 0) { - $sndrnation['name'] = '재야'; - $sndrnation['color'] = 'FFFFFF'; - } else { - $query = "select name,color from nation where nation='{$sndr['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $sndrnation = MYDB_fetch_array($result); - } - - switch($bg) { - case 2: - case 4: $bgcolor = "CC6600"; break; - } - - if($category == 6) { - $query = "select reserved from diplomacy where me='{$sndr['nation']}' and you='{$me['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - - ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], $sndr['name'], $sndrnation['color'], $msg, $date, $num, $from, $term, $me['level'], $dip['reserved']); - } elseif($category <= 8) { - $query = "select name,color from nation where nation='$to'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $rcvrnation = MYDB_fetch_array($result); - - ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], $rcvrnation['name'], $rcvrnation['color'], $msg, $date, $num, $from, $term, $me['level']); - } elseif($category <= 11) { - $query = "select name,picture,nation from general where no='$to'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $rcvr = MYDB_fetch_array($result); - - if($rcvr['nation'] == 0) { - $rcvrnation['name'] = '재야'; - $rcvrnation['color'] = 'FFFFFF'; - } else { - $query = "select name,color from nation where nation='{$rcvr['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $rcvrnation = MYDB_fetch_array($result); - } - ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], "{$rcvr['name']}:{$rcvrnation['name']}", $rcvrnation['color'], $msg, $date, $num, $from, $term); - } -} function PushMsg($type, $nation, $picture, $imgsvr, $from, $fromcolor, $to, $tocolor, $msg) { if($nation == 0) { $nation = 0; } @@ -3448,95 +3240,6 @@ function PushMsg($type, $nation, $picture, $imgsvr, $from, $fromcolor, $to, $toc fclose($fp); } -function MsgFile($skin, $bg, $nation=0, $level=0) { - switch($bg) { - case 1: $bgcolor = "000055"; $count = 10; $fl = "_all_msg.txt"; break; - case 3: $bgcolor = "336600"; $count = 20; $fl = "_nation_msg{$nation}.txt"; break; - } - - if(!file_exists("logs/{$fl}")){ - return; - } - $fp = @fopen("logs/{$fl}", "r"); - @fseek($fp, -$count*300, SEEK_END); - $file = @fread($fp, $count*300); - @fclose($fp); - $code = explode("\r\n",$file); - for($i=0; $i < $count; $i++) { - $msg = isset($code[count($code)-2-$i]) ? explode("|", $code[count($code)-2-$i]) : array(); - - $cnt = count($msg); - if(!empty($cnt)){ - for($k=0; $k < $cnt; $k++) { - $msg[$k] = trim($msg[$k]); - } - } - if(!empty($msg)){ - ShowMsg($skin, $bgcolor, $msg[0], $msg[7], $msg[8], $msg[1], $msg[5], $msg[2], $msg[6], $msg[4], $msg[3]); - } - } -} - -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; - - $msg = Tag2Code($msg); - - $site = ""; $form = ""; $form2 = ""; - if($type == 11 || ($type >= 4 && $type <= 8 && $level >= 5)) { - $corebutton = " "; - } else { - $corebutton = " 【수락】【거절】"; - } - if($type == 6) { - $corebutton .= "
비고: {$note}"; - } - switch($type) { - case 1: $sign = ""; $corebutton = ""; break; - case 2: $sign = ""; $corebutton = ""; break; - case 3: $sign = ""; $corebutton = ""; break; - case 4: $sign = ""; $site = "d_surrender.php"; break; - case 5: $sign = ""; $site = "d_merge.php"; break; - case 6: $sign = ""; $site = "d_ally.php"; break; - case 7: $sign = ""; $site = "d_cease.php"; break; - case 8: $sign = ""; $site = "d_cancel.php"; break; - case 9: $sign = ""; $corebutton = ""; break; - case 10: $sign = ""; $corebutton = ""; break; - case 11: $sign = ""; $site = "d_scout.php"; break; - } - if($skin == 0) { - $bgcolor = "000000"; $picture = ""; - $naming = "[{$me}{$sign}{$you}]"; - } else { - $imageTemp = GetImageURL($imgsvr); - $naming = "[$me{$sign}$you]"; - $picture = ""; - } - if($site != "") { - $form = "
"; - $form2 = "
"; - } - if($num >= 0) { $num = ""; } - else { $num = ""; } - if($who > 0) { $who = ""; } - else { $who = ""; } - if($when > 0) { $when = ""; } - else { $when = ""; } - echo " - - - - $form - - $num - $who - $when - $form2 - -
$picture$naming<$date>
{$msg}{$corebutton}
- "; -} - function msgprint($connect, $msg, $name, $picture, $imgsvr, $when, $num, $type) { global $_basecolor2, $_basecolor4, $images; diff --git a/twe/func_message.php b/twe/func_message.php new file mode 100644 index 00000000..d33d32a5 --- /dev/null +++ b/twe/func_message.php @@ -0,0 +1,381 @@ +id = $row['id']; + $this->address = $row['address']; + $this->type = $row['type']; + $this->src = $row['src']; + $this->dest = $row['dest']; + $this->time = $row['time']; + $this->message = $row['message']; + + $this->src_name = $row['src_name']; + } +} + + + +function getRawMessage($address, $limit=30, $fromTime=NULL){ + //'select * from `message` where `address` = 90 and `time` < "2018-01-21 04:47:20" ORDER BY `time` desc LIMIT 3 '; + + + $sql = 'select * from `message` where `address` = %d_address'; + if($fromTime !== NULL){ + $sql .= ' and `time` <= %s_time'; + } + $sql .= ' ORDER BY `time` desc'; + if($limit > 0){ + $sql .= ' LIMIT %d_limit'; + } + + + $db = newDB(); + //TODO: table 네임의 prefix를 처리할 수 있도록 개선 + $result = $db->query($sql, array( + 'address' => $address, + 'limit' => $limit, + 'time' => $fromTime + )); + + + return array_map(function ($row){ + return new Message($row); + }, $result); +} + +function getMessage(){ + +} + + +function genList($connect) { + $query = "select no,nation,level,msgindex,userlevel from general where user_id='{$_SESSION['p_id']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + $you = array(); + + $query = "select msg{$me['msgindex']}_who as reply,msg{$me['msgindex']}_type as type from general where user_id='{$_SESSION['p_id']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $reply = MYDB_fetch_array($result); + if($reply['type'] % 100 == 9) { + $reply['reply'] %= 10000; + $query = "select no,name from general where no={$reply['reply']}"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + } elseif($reply['type'] % 100 == 10) { + $reply['reply'] = floor($reply['reply']/10000); + $query = "select no,name from general where no={$reply['reply']}"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + } + + $query = "select nation,color,name from nation where nation='{$me['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + echo " + +"; +} + + +function MsgFile($skin, $bg, $nation=0, $level=0) { + switch($bg) { + case 1: $bgcolor = "000055"; $count = 10; $fl = "_all_msg.txt"; break; + case 3: $bgcolor = "336600"; $count = 20; $fl = "_nation_msg{$nation}.txt"; break; + } + + if(!file_exists("logs/{$fl}")){ + return; + } + $fp = @fopen("logs/{$fl}", "r"); + @fseek($fp, -$count*300, SEEK_END); + $file = @fread($fp, $count*300); + @fclose($fp); + $code = explode("\r\n",$file); + for($i=0; $i < $count; $i++) { + $msg = isset($code[count($code)-2-$i]) ? explode("|", $code[count($code)-2-$i]) : array(); + + $cnt = count($msg); + if(!empty($cnt)){ + for($k=0; $k < $cnt; $k++) { + $msg[$k] = trim($msg[$k]); + } + } + if(!empty($msg)){ + ShowMsg($skin, $bgcolor, $msg[0], $msg[7], $msg[8], $msg[1], $msg[5], $msg[2], $msg[6], $msg[4], $msg[3]); + } + } +} + + +// type : xx,xx(불가침기간,타입) +// who : xxxx,xxxx(발신인, 수신인) +function DecodeMsg($connect, $msg, $type, $who, $date, $bg, $num=0) { + $query = "select skin,no,nation,name,picture,level from general where user_id='{$_SESSION['p_id']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + // 1 : 전메, 2 : 아국->타국, 3 : 타국->아국 + // 4 : 합병, 5 : 통합, 6 : 불가침, 7 : 종전, 8 : 파기 + // 9 : 자신->타인, 10 : 타인 -> 자신, 11 : 등용 + $category = $type % 100; + $term = floor($type / 100); + $from = floor($who / 10000); + $to = $who % 10000; + + $query = "select name,picture,imgsvr,nation from general where no='$from'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $sndr = MYDB_fetch_array($result); + + if($sndr['nation'] == 0) { + $sndrnation['name'] = '재야'; + $sndrnation['color'] = 'FFFFFF'; + } else { + $query = "select name,color from nation where nation='{$sndr['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $sndrnation = MYDB_fetch_array($result); + } + + switch($bg) { + case 2: + case 4: $bgcolor = "CC6600"; break; + } + + if($category == 6) { + $query = "select reserved from diplomacy where me='{$sndr['nation']}' and you='{$me['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + + ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], $sndr['name'], $sndrnation['color'], $msg, $date, $num, $from, $term, $me['level'], $dip['reserved']); + } elseif($category <= 8) { + $query = "select name,color from nation where nation='$to'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $rcvrnation = MYDB_fetch_array($result); + + ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], $rcvrnation['name'], $rcvrnation['color'], $msg, $date, $num, $from, $term, $me['level']); + } elseif($category <= 11) { + $query = "select name,picture,nation from general where no='$to'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $rcvr = MYDB_fetch_array($result); + + if($rcvr['nation'] == 0) { + $rcvrnation['name'] = '재야'; + $rcvrnation['color'] = 'FFFFFF'; + } else { + $query = "select name,color from nation where nation='{$rcvr['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $rcvrnation = MYDB_fetch_array($result); + } + ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], "{$rcvr['name']}:{$rcvrnation['name']}", $rcvrnation['color'], $msg, $date, $num, $from, $term); + } +} + + +function MsgMe($connect, $bg) { + $query = "select no,nation,msgindex, + msg0,msg1,msg2,msg3,msg4,msg5,msg6,msg7,msg8,msg9, + msg0_type,msg1_type,msg2_type,msg3_type,msg4_type,msg5_type,msg6_type,msg7_type,msg8_type,msg9_type, + msg0_who,msg1_who,msg2_who,msg3_who,msg4_who,msg5_who,msg6_who,msg7_who,msg8_who,msg9_who, + msg0_when,msg1_when,msg2_when,msg3_when,msg4_when,msg5_when,msg6_when,msg7_when,msg8_when,msg9_when + from general where user_id='{$_SESSION['p_id']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $index = $me['msgindex']; + for($i=0; $i < 10; $i++) { + if($me["msg{$index}"]) { echo "\n"; DecodeMsg($connect, $me["msg{$index}"], $me["msg{$index}_type"], $me["msg{$index}_who"], $me["msg{$index}_when"], $bg, $index); } + $index--; + if($index < 0) { $index = 9; } + } +} + + + + +function moveMsg($connect, $table, $msgtype, $msgnum, $msg, $type, $who, $when, $column, $value) { + //TODO: moveMsg 쓰는 곳 모두 고쳐!!! + $query = "update {$table} set {$msgtype}{$msgnum}='$msg',{$msgtype}{$msgnum}_type='$type',{$msgtype}{$msgnum}_who='$who',{$msgtype}{$msgnum}_when='$when' where {$column}='$value'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function MsgDip($connect, $bg) { + $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $query = "select dip0,dip1,dip2,dip3,dip4,dip0_who,dip1_who,dip2_who,dip3_who,dip4_who,dip0_when,dip1_when,dip2_when,dip3_when,dip4_when,dip0_type,dip1_type,dip2_type,dip3_type,dip4_type from nation where nation='{$me['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($nation['dip0']) { echo "\n"; DecodeMsg($connect, $nation['dip0'], $nation['dip0_type'], $nation['dip0_who'], $nation['dip0_when'], $bg, 0); } + if($nation['dip1']) { echo "\n"; DecodeMsg($connect, $nation['dip1'], $nation['dip1_type'], $nation['dip1_who'], $nation['dip1_when'], $bg, 1); } + if($nation['dip2']) { echo "\n"; DecodeMsg($connect, $nation['dip2'], $nation['dip2_type'], $nation['dip2_who'], $nation['dip2_when'], $bg, 2); } + if($nation['dip3']) { echo "\n"; DecodeMsg($connect, $nation['dip3'], $nation['dip3_type'], $nation['dip3_who'], $nation['dip3_when'], $bg, 3); } + if($nation['dip4']) { echo "\n"; DecodeMsg($connect, $nation['dip4'], $nation['dip4_type'], $nation['dip4_who'], $nation['dip4_when'], $bg, 4); } +} + + + +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; + + $msg = Tag2Code($msg); + + $site = ""; $form = ""; $form2 = ""; + if($type == 11 || ($type >= 4 && $type <= 8 && $level >= 5)) { + $corebutton = " "; + } else { + $corebutton = " 【수락】【거절】"; + } + if($type == 6) { + $corebutton .= "
비고: {$note}"; + } + switch($type) { + case 1: $sign = ""; $corebutton = ""; break; + case 2: $sign = ""; $corebutton = ""; break; + case 3: $sign = ""; $corebutton = ""; break; + case 4: $sign = ""; $site = "d_surrender.php"; break; + case 5: $sign = ""; $site = "d_merge.php"; break; + case 6: $sign = ""; $site = "d_ally.php"; break; + case 7: $sign = ""; $site = "d_cease.php"; break; + case 8: $sign = ""; $site = "d_cancel.php"; break; + case 9: $sign = ""; $corebutton = ""; break; + case 10: $sign = ""; $corebutton = ""; break; + case 11: $sign = ""; $site = "d_scout.php"; break; + } + if($skin == 0) { + $bgcolor = "000000"; $picture = ""; + $naming = "[{$me}{$sign}{$you}]"; + } else { + $imageTemp = GetImageURL($imgsvr); + $naming = "[$me{$sign}$you]"; + $picture = ""; + } + if($site != "") { + $form = "
"; + $form2 = "
"; + } + if($num >= 0) { $num = ""; } + else { $num = ""; } + if($who > 0) { $who = ""; } + else { $who = ""; } + if($when > 0) { $when = ""; } + else { $when = ""; } + echo " + + + + $form + + $num + $who + $when + $form2 + +
$picture$naming<$date>
{$msg}{$corebutton}
+ "; +} diff --git a/twe/j_msgselect.php b/twe/j_msgselect.php new file mode 100644 index 00000000..1083d4a9 --- /dev/null +++ b/twe/j_msgselect.php @@ -0,0 +1,2 @@ + 전체 메세지(최고75자)
- +
개인 메세지(최고75자)
- + - + 국가 메세지(최고75자)
- + diff --git a/twe/new_lib.php b/twe/new_lib.php index b08635cd..9ccd6bde 100644 --- a/twe/new_lib.php +++ b/twe/new_lib.php @@ -2,17 +2,6 @@ //임시 땜빵 리팩터링. require_once "lib.php"; -function dbConnRoot() { - global $connect, $HTTP_COOKIE_VARS; - $f = @file("../d_setting/set.php") or Error("set.php파일이 없습니다. DB설정을 먼저 하십시요!"); - for($i=1; $i<= 4; $i++) $f[$i] = trim(str_replace("\n","",$f[$i])); - if(!$connect) $connect = @MYDB_connect($f[1],$f[2],$f[3]) or Error("DB 접속시 에러가 발생했습니다"); - @MYDB_select_db($f[4], $connect) or Error("DB Select 에러가 발생했습니다",""); - return $connect; -} - - - class General{ protected $no, $user_id, $name, $level, $level_exp,