메인화면 가운데 정렬 설정.. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

메인화면 가운데 정렬 설정.. 정보

메인화면 가운데 정렬 설정..

본문

첨부한 파일처럼 그누나,네이버사이트처럼 브라우져창을 최대로 하거나
작게 줄여도 메인화면이 가운데 정중앙으로 보여지게 하고자 하는데요

영카트 사용중인데..메인화면 내용이 꽉차서 보여지거든요
좌우 여백이 없이...
그누사이트처럼 창을 최대한크게 하거나 줄여도
좌우여백이 있으면서 가운데로 깔끔하게 정렬하게 보여지게 하려면
어떻게 해야 할까요?
테이블 크기등은 같은것 같은데 왜 전 화면이 꽉차서 크게 확대된것처럼
 나타나는 것인가요?
고수님 정확한 도움좀 부탁드려요


head.php
-------------------------------------------------------------------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");

//print_r2(get_defined_constants());

// 사용자 화면 상단과 좌측을 담당하는 페이지입니다.
// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.

$table_width = 900;

//print_r2($g4);
//$dir = dirname($HTTP_SERVER_VARS["PHP_SELF"]);
?>

<style>
.amount { color:#2266BB; font-weight:bold; font-family:Verdana; }
.c1 { background-color:#94D7E7; }
.c2 { background-color:#E7F3F7; }
</style>

<!-- 전체 -->
<table align=center width='1000' cellpadding=0 cellspacing=0 border=0>
<tr>
    <td width='900'>

<!-- 상단 -->
<table align=center width='<?=$table_width?>' cellpadding=0 cellspacing=0 border=0>
<tr><td colspan=2 height=4 bgcolor=#DCDCDB></td></tr>
<tr>
    <td rowspan=2 align=left width=200 height=60><a href='<?=$g4[path]?>/'><img src='<?=$g4[path]?>/img/lo.gif' border=0></a></td>
    <td align=right class=small>
       
        <? if ($is_member) { ?>
        <a href='<?=$g4[bbs_path]?>/logout.php'>로그아웃</a> |
        <a href='<?=$g4[bbs_path]?>/member_confirm.php?url=register_form.php'>정보수정</a> |
        <? } else { ?>
        <a href='<?=$g4[bbs_path]?>/login.php?url=<?=$urlencode?>'>로그인</a> |
        <a href='<?=$g4[bbs_path]?>/register.php'>회원가입</a> |
        <? } ?>

        <a hre='<?=$g4[shop_path]?>/cart.php'>저장<span class=small>(<?=get_cart_count(get_session('ss_on_uid'));?>)</span></a> |
        <a hre='<?=$g4[shop_path]?>/orderinquiry.php'>회원검색</a> |
        <a hre='<?=$g4[shop_path]?>/onlinecalc.php'>대행</a> |
        <a hre='<?=$g4[shop_path]?>/faq.php'>FAQ</a> |
        <a href='<?=$g4[shop_path]?>/mypage.php'>마이페이지</a>&nbsp;
    </td>
</tr>
<tr>
    <td colspan=2 align=right height=30>
        <!-- 검색 시작 -->
        <form name='frmsearch1' style='margin:0px;' onsubmit='return search_submit(this);'>
        <input type='hidden' name='sfl' value='wr_subject||wr_content'>
        <input type='hidden' name='sop' value='and'>
        <input type='hidden' name='stx' value=''>
        <select name='search_flag' id='search_flag' class='small'>
        <option value='인'>인
        <option value='인'>인
        </select>
        <input type=text name=search_str class='ed' value='<?=stripslashes(get_text($search_str))?>'>
        <input type=image src='<?=$g4[path]?>/img/btn_search.gif' border=0 align=absmiddle>&nbsp;
        </form>
        <script>
        function search_submit(f) {
            if (f.search_flag.value == '인') {
                f.action = '<?=$g4[shop_path]?>/search.php';
            } else {
                f.stx.value = f.search_str.value;
                f.action = '<?=$g4[bbs_path]?>/search.php';
            }
        }

        <?
        if ($search_flag) {
            echo "document.getElementById('search_flag').value = '$search_flag';";
        }
        ?>
        </script>
        <!-- 검색 끝 -->
    </td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#DCDCDC></td></tr>
<tr><td colspan=2 height=5></td></tr>
</table>
<!-- 상단끝 -->

<!-- 중간 -->
<table align=center width='<?=$table_width?>' cellpadding=0 cellspacing=0 border=0>
<tr>
    <td align=center valign=top width=185>

        <?=outlogin("shop_outlogin"); // 외부 로그인 ?>
        <br>




        <table bgcolor=#CCCCCC width=185 cellpadding=1 cellspacing=0>
        <tr><td><?include_once("$g4[shop_path]/boxcommunity.inc.php");?></td></tr>
        </table><br>



        <table bgcolor=#CCCCCC width=185 cellpadding=1 cellspacing=0>
        <tr><td><?include_once("$g4[shop_path]/boxevent.inc.php");?></td></tr>
        </table><br>



        <table bgcolor=#CCCCCC width=185 cellpadding=1 cellspacing=0>
        <tr><td><?include_once("$g4[shop_path]/boxcategory.inc.php");?></td></tr>
        </table><br>

             
        <table cellpadding=1 cellspacing=0 bgcolor=#D2D2D2>
        <tr><td><?include_once("$g4[shop_path]/boxwish.inc.php");?></td></tr>
        </table><br>


        <table cellpadding=1 cellspacing=0 bgcolor=#D2D2D2>
        <tr><td><?include_once("$g4[shop_path]/boxcart.inc.php");?></td></tr>
        </table><br>



        <?=display_banner('왼쪽');?><br>

    </td>
    <td width=5></td>
    <td valign=top width='<?=((int)$table_width-190)?>'>
       


---------------------------------------------------------------------------------------------------------


tail.php


<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$admin = get_admin("super");

// 사용자 화면 우측과 하단을 담당하는 페이지입니다.
// 우측, 하단 화면을 꾸미려면 이 파일을 수정합니다.
?>

</td></tr></table>
<!-- 중간끝 -->


<!-- 하단 -->
<table align=center width='<?=$table_width?>' cellpadding=0 cellspacing=0>
<tr>
    <td width=180 bgcolor=#EBEBEB><a href='<?=$g4[path]?>/'><img src='<?=$g4[path]?>/data/common/logo_img2' border=0 style="filter:gray();"></a></td>
    <td><img src='<?=$g4[shop_img_path]?>/tail_img.gif'></td>
    <td width=10></td>
    <td><img src='<?=$g4[shop_img_path]?>/tail_img02.gif'></td>
    <td width=770 bgcolor=#EBEBEB style='padding-left:10px;'>
        <table width=98% cellpadding=0 cellspacing=0 border=0>
               
                <br>Copyright &copy; 200. All Rights Reserved. </FONT></td></tr></table>
    </td>
</tr>
</table>
<!-- 하단끝 -->


<?
$sec = get_microtime() - $begin_time;
$file = $_SERVER[PHP_SELF];
?>

</td>
<td valign=top><?include("$g4[shop_path]/boxtodayview.inc.php");?></td>
</tr>
</table><br/>
<!-- 전체끝 -->

<?
include_once("$g4[path]/tail.sub.php");
?>


------------------------------------------------------------------------------------------------

index.php

<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");

define("_INDEX_", TRUE);

$g4[title] = "";
include_once("$g4[path]/head.php");
?>

<script language="JavaScript" src="<?=$g4[path]?>/js/shop.js"></script>

<table width=100% cellpadding=0 cellspacing=0>
<tr>
    <td valign=top>
      <br><br>
        <table width=100%  cellpadding=0 cellspacing=0>

        <tr>
            <td colspan=2>
                <?
                // 상품
                $type = 1;
                if ($default["de_type{$type}_list_use"])
                {
                    echo "<a href='$g4[shop_path]/listtype.php?type={$type}'><img src='$g4[shop_img_path]/bar_type{$type}.gif' border=0></a><br>";
                    display_type($type, $default["de_type{$type}_list_skin"], $default["de_type{$type}_list_mod"], $default["de_type{$type}_list_row"], $default["de_type{$type}_img_width"], $default["de_type{$type}_img_height"]);
                }
                ?>
            </td>
        </tr>
        <tr><td colspan=2 height=20></td></tr>
        <tr>
            <td colspan=2>
                <?
                // 상품
                $type = 2;
                if ($default["de_type{$type}_list_use"])
                {
                    echo "<a href='$g4[shop_path]/listtype.php?type={$type}'><img src='$g4[shop_img_path]/bar_type{$type}.gif' border=0></a><br>";
                    display_type($type, $default["de_type{$type}_list_skin"], $default["de_type{$type}_list_mod"], $default["de_type{$type}_list_row"], $default["de_type{$type}_img_width"], $default["de_type{$type}_img_height"]);
                }
                ?>
            </td>
        </tr>
        <tr><td colspan=2 height=20></td></tr>
        <tr>
            <td colspan=2>
                <?
                // 상품
                $type = 4;
                if ($default["de_type{$type}_list_use"])
                {
                    echo "<a href='$g4[shop_path]/listtype.php?type={$type}'><img src='$g4[shop_img_path]/bar_type{$type}.gif' border=0></a><br>";
                    display_type($type, $default["de_type{$type}_list_skin"], $default["de_type{$type}_list_mod"], $default["de_type{$type}_list_row"], $default["de_type{$type}_img_width"], $default["de_type{$type}_img_height"]);
                }
                ?>
            </td>
        </tr>
        <tr><td colspan=2 height=20></td></tr>
        <tr>
            <td colspan=2>
                <?
                // 할인상품
                $type = 5;
                if ($default["de_type{$type}_list_use"])
                {
                    echo "<a href='$g4[shop_path]/listtype.php?type={$type}'><img src='$g4[shop_img_path]/bar_type{$type}.gif' border=0></a><br>";
                    display_type($type, $default["de_type{$type}_list_skin"], $default["de_type{$type}_list_mod"], $default["de_type{$type}_list_row"], $default["de_type{$type}_img_width"], $default["de_type{$type}_img_height"]);
                }
                ?>
            </td>
        </tr>
        <tr><td colspan=2 height=20></td></tr>
        <tr>
            <td valign=top width=50% align=center>
                <table width=95% cellpadding=0 cellspacing=0>
                <tr><td><?=latest('basic', 'qa', 5, 30);?></td></tr>
                </table></td>
            <td valign=top width=50% align=center>
                <table width=95% cellpadding=0 cellspacing=0>
                <tr><td><?=latest('basic', 'free', 5, 30);?></td></tr>
                </table></td>
            </tr>
        </table>
    </td>
    <td valign=top>


        <table width=177 bgcolor=#DEDEDE cellpadding=1 cellspacing=0>
        <tr><td align=center>
            <table cellpadding=0 cellspacing=0 bgcolor=#FFFFFF height=97>
            <tr><td height=28><a href='<?=$g4[bbs_path]?>/board.php?bo_table=notice'><img src='<?=$g4[shop_img_path]?>/bar_notice.gif' border=0></a></td></tr>
            <tr>
                <td><?=latest('shop_notice', 'notice', 3, 25);?></td>
            </tr>
            </table>
        </td></tr>
        </table><BR>

        <?
        // 최신상품
        $type = 3;
        if ($default["de_type{$type}_list_use"])
        {
            echo "<a href='$g4[shop_path]/listtype.php?type={$type}'><img src='$g4[shop_img_path]/bar_type{$type}.gif' border=0></a><br>";
            display_type($type, $default["de_type{$type}_list_skin"], $default["de_type{$type}_list_mod"], $default["de_type{$type}_list_row"], $default["de_type{$type}_img_width"], $default["de_type{$type}_img_height"]);
        }
        ?><br><br>


        <?=poll('shop_poll');?><br>




        <?=display_banner('메인');?><br>
</td>
</tr>
</table>
<BR><BR>

<?
include "$g4[shop_path]/newwin.inc.php"; // 새창띄우기

include_once("$g4[path]/tail.php");
?>




head.sub.php
-------------------------------------------------------------------------------------------------
<?
// 이 파일은 새로운 파일 생성시 반드시 포함되어야 함
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$begin_time = get_microtime();

if (!$g4['title'])
    $g4['title'] = $config['cf_title'];

// 쪽지를 받았나?
if ($member['mb_memo_call']) {
    $mb = get_member($member[mb_memo_call], "mb_nick");
    sql_query(" update {$g4[member_table]} set mb_memo_call = '' where mb_id = '$member[mb_id]' ");

    alert($mb[mb_nick]."님으로부터 쪽지가 전달되었습니다.", $_SERVER[REQUEST_URI]);
}


// 현재 접속자
//$lo_location = get_text($g4[title]);
//$lo_location = $g4[title];
// 게시판 제목에 ' 포함되면 오류 발생
$lo_location = addslashes($g4['title']);
if (!$lo_location)
    $lo_location = $_SERVER['REQUEST_URI'];
//$lo_url = $g4[url] . $_SERVER['REQUEST_URI'];
$lo_url = $_SERVER['REQUEST_URI'];
if (strstr($lo_url, "/$g4[admin]/") || $is_admin == "super") $lo_url = "";

// 자바스크립트에서 go(-1) 함수를 쓰면 폼값이 사라질때 해당 폼의 상단에 사용하면
// 캐쉬의 내용을 가져옴. 완전한지는 검증되지 않음
header("Content-Type: text/html; charset=$g4[charset]");
$gmnow = gmdate("D, d M Y H:i:s") . " GMT";
header("Expires: 0"); // rfc2616 - Section 14.21
header("Last-Modified: " . $gmnow);
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: pre-check=0, post-check=0, max-age=0"); // HTTP/1.1
header("Pragma: no-cache"); // HTTP/1.0
?>
<!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=<?=$g4['charset']?>">
<title></title>
<link rel="stylesheet" href="<?=$g4['path']?>/style.css" type="text/css">
</head>
<script language="javascript">
// 자바스크립트에서 사용하는 전역변수 선언
var g4_path      = "<?=$g4['path']?>";
var g4_bbs      = "<?=$g4['bbs']?>";
var g4_bbs_img  = "<?=$g4['bbs_img']?>";
var g4_url      = "<?=$g4['url']?>";
var g4_is_member = "<?=$is_member?>";
var g4_is_admin  = "<?=$is_admin?>";
var g4_bo_table  = "<?=isset($bo_table)?$bo_table:'';?>";
var g4_sca      = "<?=isset($sca)?$sca:'';?>";
var g4_charset  = "<?=$g4['charset']?>";
var g4_cookie_domain = "<?=$g4['cookie_domain']?>";
var g4_is_gecko  = navigator.userAgent.toLowerCase().indexOf("gecko") != -1;
var g4_is_ie    = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
<? if ($is_admin) { echo "var g4_admin = '{$g4['admin']}';"; } ?>
</script>
<script language="javascript" src="<?=$g4['path']?>/js/common.js"></script>
<script language="javascript" src="<?=$g4['path']?>/js/ajax.js"></script>
<body topmargin="0" leftmargin="0" <?=isset($g4['body_script']) ? $g4['body_script'] : "";?>>
<a name="g4_head"></a>



tail.sub.php
----------------------------------------------------------------------------------------------------------------------------

<script language="javascript" src="<?=$g4['path']?>/js/wrest.js"></script>

<!-- 새창 대신 사용하는 iframe -->
<iframe width=0 height=0 name='hiddenframe' style='display:none;'></iframe>

<? if ($is_admin == "super") { ?><!-- <div style='float:left; width:<?=$table_width?>px; text-align:center;'>RUN TIME : <?=get_microtime()-$begin_time;?><br></div> --><? } ?>

</body>
</html>
<?
$tmp_sql = " select count(*) as cnt from $g4[login_table] where lo_ip = '$_SERVER[REMOTE_ADDR]' ";
$tmp_row = sql_fetch($tmp_sql);
//sql_query(" lock table $g4[login_table] write ", false);
if ($tmp_row['cnt'])
{
$tmp_sql = " update $g4[login_table] set mb_id = '$member[mb_id]', lo_datetime = '$g4[time_ymdhis]', lo_location = '$lo_location', lo_url = '$lo_url' where lo_ip = '$_SERVER[REMOTE_ADDR]' ";
sql_query($tmp_sql, FALSE);
}
else
{
$tmp_sql = " insert into $g4[login_table] ( lo_ip, mb_id, lo_datetime, lo_location, lo_url ) values ( '$_SERVER[REMOTE_ADDR]', '$member[mb_id]', '$g4[time_ymdhis]', '$lo_location',  '$lo_url' ) ";
sql_query($tmp_sql, FALSE);

// 시간이 지난 접속은 삭제한다
sql_query(" delete from $g4[login_table] where lo_datetime < '".date("Y-m-d H:i:s", $g4[server_time] - (60 * $config[cf_login_minutes]))."' ");

// 부담(overhead)이 있다면 테이블 최적화
//$row = sql_fetch(" SHOW TABLE STATUS FROM `$mysql_db` LIKE '$g4[login_table]' ");
//if ($row['Data_free'] > 0) sql_query(" OPTIMIZE TABLE $g4[login_table] ");
}
//sql_query(" unlock tables ", false);
?>

댓글 전체

전체 140 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT