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>
답변 1개 / 댓글 6개
// $row[bo_table]
$row['bo_table']
답변에 대한 댓글 6개
<?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>
[/code]
$row['bo_table'] 로 수정하면 됩니다.
|
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/mobile/new.php on line 51
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/mobile/new.php on line 61
[code]
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<h1><?=$lang['new_text1']?><b><?=$lang['new_text2']?></b></h1>
<table>
<thead>
<tr>
<th><?=$lang['bd_th2']?></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">
<a href="<?=G5_BBS_URL.'/board.php?bo_table='.$row['bo_table']."&wr_id=".$list[$i]['wr_id'];?>"><? echo conv_subject($list[$i]['wr_subject'], '16', '…'); ?></a>
<div>
<? //지역
$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];
}
}
?>
<? echo "|"; ?>
<? //분류
$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];
}
}
?>
</div>
</td>
<td class="td_x4"><?=substr($list[$i]['wr_datetime'],5,5)?></td>
</tr>
<? } ?>
</tbody>
</table>
[/code]
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/mobile/head.php on line 113
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/mobile/head.php on line 113
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/mobile/head.php on line 113
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/mobile/head.php on line 113
[code]
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if(defined('G5_THEME_PATH')) {
require_once(G5_THEME_PATH.'/head.php');
return;
}
include_once(G5_PATH.'/head.sub.php');
include_once(G5_LIB_PATH.'/language.lib.php');
include_once(G5_LIB_PATH.'/latest.lib.php');
include_once(G5_LIB_PATH.'/outlogin.lib.php');
include_once(G5_LIB_PATH.'/poll.lib.php');
include_once(G5_LIB_PATH.'/visit.lib.php');
include_once(G5_LIB_PATH.'/connect.lib.php');
include_once(G5_LIB_PATH.'/popular.lib.php');
?>
<header id="hd">
<h1 id="hd_h1"><?php echo $g5['title'] ?></h1>
<div class="to_content"><a href="#container">본문 바로가기</a></div>
<?php
if(defined('_INDEX_')) { // index에서만 실행
include G5_MOBILE_PATH.'/newwin.inc.php'; // 팝업레이어
} ?>
<div id="hd_wrapper">
<div id="logo">
<a href="<?php echo G5_URL ?>"><img src="<?php echo G5_IMG_URL ?>/mobile/logo.png" alt="<?php echo $config['cf_title']; ?>"></a>
</div>
<div id="navi">
<div class="slider_wrap line">
<div class="wx_items">
<? for($i=0;$i<count($lang['nv_name']);$i++){ ?>
<div class="item_cell"><span><a href="<?=$lang['nv_link'][$i]?>" target="_<?=$lang['nv_target'][$i]?>"><img src="<?php echo G5_IMG_URL ?>/icon<?=$i?>.png" /> <?=$lang['nv_name'][$i]?></a></span></div>
<? } ?>
</div>
</div>
</div>
<a href="/bbs/search.php" id="search_open"><i class="fa fa-search" aria-hidden="true"></i></a>
<button type="button" id="user_btn" class="hd_opener"><i class="fa fa-bars" aria-hidden="true"></i><span class="sound_only">사용자메뉴</span></button>
<div class="hd_div" id="user_menu">
<button type="button" id="user_close" class="hd_closer"><span class="sound_only">메뉴 </span>닫기</button>
<?php echo outlogin('basic'); // 외부 로그인 ?>
<ul id="hd_nb">
<li class="hd_nb1"><a href="<?php echo lang_change_url('zh'); ?>" id="snb_qa"><img src="<?php echo G5_IMG_URL ?>/zh.png" /><br>中国语</a></li>
<li class="hd_nb2"><a href="<?php echo lang_change_url('kr'); ?>" id="snb_faq"><img src="<?php echo G5_IMG_URL ?>/kr.png" /><br>한국어</a></li>
<li class="hd_nb1"><a href="<?=$lang['nv_link'][10]?>" id="snb_cnt"><i class="fa fa-child" aria-hidden="true"></i><br><?=$lang['member_m_bname1']?></a></li>
<li class="hd_nb2"><a href="<?=$lang['nv_link'][11]?>" id="snb_new" target="_blank"><i class="fa fa-film" aria-hidden="true"></i><br><?=$lang['member_m_bname2']?></a></li>
<? for($i=0;$i<count($lang['nv_name']);$i++){ ?>
<?
if($i%2){
?>
<li class="hd_nb2"><a href="<?=$lang['nv_link'][$i]?>" target="_<?=$lang['nv_target'][$i]?>"><img src="<?php echo G5_IMG_URL ?>/icon00<?=$i?>.png" /><br><?=$lang['nv_name'][$i]?></a></li>
<?
}else{
?>
<li class="hd_nb1"><a href="<?=$lang['nv_link'][$i]?>" target="_<?=$lang['nv_target'][$i]?>"><img src="<?php echo G5_IMG_URL ?>/icon00<?=$i?>.png" /><br><?=$lang['nv_name'][$i]?></a></li>
<? }?>
<? } ?>
</ul>
</div>
<script>
jQuery(function ($) {
$(".hd_opener").on("click", function(e) {
var $this = $(this);
var $hd_layer = $this.next(".hd_div");
if($hd_layer.is(":visible")) {
$hd_layer.hide();
$this.find("span").text("열기");
} else {
var $hd_layer2 = $(".hd_div:visible");
$hd_layer2.prev(".hd_opener").find("span").text("열기");
$hd_layer2.hide();
$hd_layer.show();
$this.find("span").text("닫기");
}
});
$(".hd_closer").on("click", function(e) {
var idx = $(".hd_closer").index($(this));
$(".hd_div:visible").hide();
$(".hd_opener:eq("+idx+")").find("span").text("열기");
});
});
</script>
</div>
</header>
<div class="top_banner">
<section id="features">
<div class="content">
<div class="slider center">
[/code]
답변을 작성하려면 로그인이 필요합니다.