클럽 메인 질문입니다.. 정보
클럽 메인 질문입니다..본문
오류 주소 : http://fgwoori.dothome.co.kr/club/club_main.php?cb_id=cb_test
클럽 메인에서...커버스토리는 한줄로 뛰우고 다른 최신글은 두줄로 띄울려고 합니다..
근데 위 링크를 보시는바와같이..커버스토리도 두줄이 되어있습니다..
파일첨부 이미지를 보는바와같이...
커버스토리
최신글1 최신글2
최신글3 최신글4
이런식으로 만들고싶습니다..
cb_main.php 소스 입니다..
<?
include_once "./_common.php";
// 클럽 정보
$cb = get_club($cb_id);
// 클럽이 존재하지 않거나 $cb_id가 없을경우
if (!$cb[0]) {
error_msg("클럽이 존재하지 않습니다.");
}
$g4[title] = "$cb[cb_name] - $nc[nf_title]";
include_once "./g4_js.php";
include_once "./include/cb_style.inc.php";
?>
<script language='javascript' src='<?=$g4[path]?>/js/sideview.js'></script>
<link href=./club.css' rel='stylesheet' type='text/css'>
<?
// 커버스토리 출력 (1)
$sql = " select cn_name from $nc[tbl_menu] where cb_id = '$cb[cb_id]' and cn_type = 'C' and cn_1 = 'Y' ";
$ca_coverstory = sql_fetch($sql);
// 공지사항 출력 (1)
$sql = " select cn_name from $nc[tbl_menu] where cb_id = '$cb[cb_id]' and cn_type = 'N' and cn_1 = 'Y' ";
$ca_notice = sql_fetch($sql);
// 출력할 최근글 목록
$sql = " select cn_name from $nc[tbl_menu] where cb_id = '$cb[cb_id]' and cn_1 = 'Y' and cn_type not in ('C', 'N') order by cn_idx asc ";
$cn_list = sql_query($sql);
switch ($cb[cb_latest_cols]) {
case 1 : if ($ca_coverstory) {
echo cb_latest($cb[cb_latest_skin_coverstory], $cb[cb_id], $ca_coverstory[cn_name], $cb[cb_latest_rows], $cb[cb_latest_len]);
echo "<table width='100%'><tr><td height='5'></td></tr></table>";
}
if ($ca_notice) {
echo cb_latest($cb[cb_latest_skin], $cb[cb_id], $ca_notice[cn_name], $cb[cb_latest_rows], $cb[cb_latest_len]);
echo "<table width='100%'><tr><td height='5'></td></tr></table>";
}
if ($cb[cb_latest_use] == "Y") { //
for ($i=0; $row=mysql_fetch_array($cn_list); $i++) {
echo cb_latest($cb[cb_latest_skin], $cb[cb_id], $row[cn_name], $cb[cb_latest_rows], $cb[cb_latest_len]);
}
}
break;
case 2 :
case 3 :
default:
$col_width = 100 / $cb[cb_latest_cols]. "%";
$ja = 0; // 2개씩 채워서 넣기 위해서
echo "<table width='100%'><tr valign=top>";
if ($ca_coverstory) {
echo "<td width='" . $col_width . "'>";
echo cb_latest($cb[cb_latest_skin], $cb[cb_id], $ca_coverstory[cn_name], $cb[cb_latest_rows], $cb[cb_latest_len]);
echo "</td>";
$ja++;
}
if ($ca_notice) {
echo "<td width='" . $col_width ."' valign=top>";
echo cb_latest($cb[cb_latest_skin], $cb[cb_id], $ca_notice[cn_name], $cb[cb_latest_rows], $cb[cb_latest_len]);
echo "</td>";
$ja++;
}
if ($cb[cb_latest_use] == "Y") {
for ($i=0; $row=mysql_fetch_array($cn_list); $i++) {
if ($ja == $cb[cb_latest_cols]) { // 줄바꿈
echo "</tr><tr valign=top>";
$ja = 0;
}
echo "<td width='" . $col_width ."' valign=top>";
echo cb_latest($cb[cb_latest_skin], $cb[cb_id], $row[cn_name], $cb[cb_latest_rows], $cb[cb_latest_len]);
echo "</td>";
$ja++;
}
}
echo "</tr></table>";
}
echo "<br><br><br><br><br><br>";
//include_once "$g4[path]/tail.sub.php";
?>
클럽 메인에서...커버스토리는 한줄로 뛰우고 다른 최신글은 두줄로 띄울려고 합니다..
근데 위 링크를 보시는바와같이..커버스토리도 두줄이 되어있습니다..
파일첨부 이미지를 보는바와같이...
커버스토리
최신글1 최신글2
최신글3 최신글4
이런식으로 만들고싶습니다..
cb_main.php 소스 입니다..
<?
include_once "./_common.php";
// 클럽 정보
$cb = get_club($cb_id);
// 클럽이 존재하지 않거나 $cb_id가 없을경우
if (!$cb[0]) {
error_msg("클럽이 존재하지 않습니다.");
}
$g4[title] = "$cb[cb_name] - $nc[nf_title]";
include_once "./g4_js.php";
include_once "./include/cb_style.inc.php";
?>
<script language='javascript' src='<?=$g4[path]?>/js/sideview.js'></script>
<link href=./club.css' rel='stylesheet' type='text/css'>
<?
// 커버스토리 출력 (1)
$sql = " select cn_name from $nc[tbl_menu] where cb_id = '$cb[cb_id]' and cn_type = 'C' and cn_1 = 'Y' ";
$ca_coverstory = sql_fetch($sql);
// 공지사항 출력 (1)
$sql = " select cn_name from $nc[tbl_menu] where cb_id = '$cb[cb_id]' and cn_type = 'N' and cn_1 = 'Y' ";
$ca_notice = sql_fetch($sql);
// 출력할 최근글 목록
$sql = " select cn_name from $nc[tbl_menu] where cb_id = '$cb[cb_id]' and cn_1 = 'Y' and cn_type not in ('C', 'N') order by cn_idx asc ";
$cn_list = sql_query($sql);
switch ($cb[cb_latest_cols]) {
case 1 : if ($ca_coverstory) {
echo cb_latest($cb[cb_latest_skin_coverstory], $cb[cb_id], $ca_coverstory[cn_name], $cb[cb_latest_rows], $cb[cb_latest_len]);
echo "<table width='100%'><tr><td height='5'></td></tr></table>";
}
if ($ca_notice) {
echo cb_latest($cb[cb_latest_skin], $cb[cb_id], $ca_notice[cn_name], $cb[cb_latest_rows], $cb[cb_latest_len]);
echo "<table width='100%'><tr><td height='5'></td></tr></table>";
}
if ($cb[cb_latest_use] == "Y") { //
for ($i=0; $row=mysql_fetch_array($cn_list); $i++) {
echo cb_latest($cb[cb_latest_skin], $cb[cb_id], $row[cn_name], $cb[cb_latest_rows], $cb[cb_latest_len]);
}
}
break;
case 2 :
case 3 :
default:
$col_width = 100 / $cb[cb_latest_cols]. "%";
$ja = 0; // 2개씩 채워서 넣기 위해서
echo "<table width='100%'><tr valign=top>";
if ($ca_coverstory) {
echo "<td width='" . $col_width . "'>";
echo cb_latest($cb[cb_latest_skin], $cb[cb_id], $ca_coverstory[cn_name], $cb[cb_latest_rows], $cb[cb_latest_len]);
echo "</td>";
$ja++;
}
if ($ca_notice) {
echo "<td width='" . $col_width ."' valign=top>";
echo cb_latest($cb[cb_latest_skin], $cb[cb_id], $ca_notice[cn_name], $cb[cb_latest_rows], $cb[cb_latest_len]);
echo "</td>";
$ja++;
}
if ($cb[cb_latest_use] == "Y") {
for ($i=0; $row=mysql_fetch_array($cn_list); $i++) {
if ($ja == $cb[cb_latest_cols]) { // 줄바꿈
echo "</tr><tr valign=top>";
$ja = 0;
}
echo "<td width='" . $col_width ."' valign=top>";
echo cb_latest($cb[cb_latest_skin], $cb[cb_id], $row[cn_name], $cb[cb_latest_rows], $cb[cb_latest_len]);
echo "</td>";
$ja++;
}
}
echo "</tr></table>";
}
echo "<br><br><br><br><br><br>";
//include_once "$g4[path]/tail.sub.php";
?>
댓글 전체