고수님들 오류봐주세요
본문
Warning: Use of undefined constant bo_table - assumed 'bo_table' (this will throw an Error in a future version of PHP) in /www/wwwroot/job1009.com/new.php on line 58
Warning: Use of undefined constant bo_table - assumed 'bo_table' (this will throw an Error in a future version of PHP) in /www/wwwroot/job1009.com/new.php on line 68
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if (G5_IS_MOBILE) {
include_once(G5_MOBILE_PATH.'/new.php');
return;
}
?>
<h1><?=$lang['new_text1']?><b><?=$lang['new_text2']?></b></h1>
<table>
<thead>
<tr>
<th><?=$lang['bd_th1']?></th>
<th><?=$lang['bd_th2']?></th>
<th><?=$lang['bd_th3']?></th>
<th><?=$lang['bd_th4']?></th>
</tr>
</thead>
<tbody>
<? //최신정보
$sql_common = "from g5_board_new ";
$sql_order = "where wr_id = wr_parent and bo_table!='v11' and bo_table!='a1' and bo_table!='notice' order by bn_datetime desc ";
$rows = "limit 15";
$sql = " select * {$sql_common} {$sql_order} {$rows} ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$tmp_write_table = $g5['write_prefix'].$row['bo_table'];
if ($row['wr_id'] == $row['wr_parent']) {
$row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
$list[$i] = $row2;
}
?>
<tr>
<td class="td_x1">
<? //지역
$code1 = explode("|",$lang['rgn_code']); //대응된 코드
$ctxt1 = explode("|",$lang['rgn_list']); //선택된 언어로 대체
for($y=0;$y<count($code1);$y++){
if($list[$i]['wr_1'] == $code1[$y]){
echo $ctxt1[$y];
}
}
?>
</td>
<td class="td_x2"><a href="<?=G5_BBS_URL.'/board.php?bo_table='.$row['bo_table']."&wr_id=".$list[$i]['wr_id'];?>"><?=$list[$i]['wr_subject']?></a></td>
<td class="td_x3">
<? //분류
$cy_code2 = sql_fetch(" select bo_category_list_code from g5_board where bo_table = '{$row[bo_table]}' ");
$code2 = explode("|",$cy_code2['bo_category_list_code']); //대응된 코드
if($_SESSION['language'] == 'zh'){ //테이블 값이 없으므로 세션으로 대체
$cy_code3 = sql_fetch(" select bo_category_list_cn from g5_board where bo_table = '{$row[bo_table]}' ");
$ctxt2 = explode("|",$cy_code3['bo_category_list_cn']);
}else{
$cy_code3 = sql_fetch(" select bo_category_list from g5_board where bo_table = '{$row[bo_table]}' ");
$ctxt2 = explode("|",$cy_code3['bo_category_list']);
}
for($y=0;$y<count($code1);$y++){
if($list[$i]['ca_name'] == $code2[$y]){
echo $ctxt2[$y];
}
}
?>
</td>
<td class="td_x4"><?=substr($list[$i]['wr_datetime'],0,10)?></td>
</tr>
<? } ?>
</tbody>
</table>