테이블안에 글자 조정 질문 입니다. > 그누4 질문답변

그누4 질문답변

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

테이블안에 글자 조정 질문 입니다. 정보

테이블안에 글자 조정 질문 입니다.

본문

Main에서 최신글로 호출하게 되면요...

그림처럼 가운데 글자가 좌측으로 고정이 되어야 하는데 글자 갯수가 다르면
. <--컴마가 틀어지는데 어딜 수정해야 할까요?


좌측면으로 고정 하고 싶습니다.







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

  $sql="select a.wr_id,a.wr_subject,b.bf_file from g4_write_$bo_table as a, g4_board_file as b where";
  $sql.=" b.bo_table='$bo_table' and (a.wr_id=b.wr_id and b.bf_no='0' and a.wr_is_comment='0') order by a.wr_id desc limit 1";
  $rs = mysql_query($sql);
  if($rs) {
  $data = mysql_fetch_array($rs);

$img_width = "95";  //썸네일 가로길이
$img_height = "60"; //썸네일 세로길이
$img_quality = "80"; //이미지 질
$img_text = "12"; //썸네일 제목 길이

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumbLatest';

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);

 $thumb = $thumb_path.'/'.$data[wr_id];
      if (!file_exists($thumb)) {
        $file = $data_path .'/'. $data[bf_file];
        if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) {
            $size = getimagesize($file);
            if ($size[2] == 1)
                $src = imagecreatefromgif($file);
            else if ($size[2] == 2)
                $src = imagecreatefromjpeg($file);
            else if ($size[2] == 3)
                $src = imagecreatefrompng($file);
            else
                break;

            $rate = $img_width / $size[0];
            $height = (int)($size[1] * $rate);
            if ($height < $img_height)
                $dst = imagecreatetruecolor($img_width, $height);
            else
                $dst = imagecreatetruecolor($img_width, $img_height);
            imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
            imagejpeg($dst, $thumb_path.'/'.$data[wr_id], $img_quality);
            chmod($thumb_path.'/'.$data[wr_id], 0606);
        }
    }

  if (file_exists($thumb))
        $view_img = "<a href='./$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$data[wr_id]'><img src='$thumb' width='$img_width' height='$img_height' border='0'></a>";

 $w_subject = "<a href='./$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$data[wr_id]'>".mb_substr($data[wr_subject],0,$img_text,"euc_kr")."</a>";
  }

 $th_day=date("w");
  switch($th_day){
  case "0":
  $td="일";
  break;
  case "1":
  $td="월";
  break;
  case "2":
  $td="화";
  break;
  case "3":
  $td="수";
  break;
  case "4":
  $td="목";
  break;
  case "5":
  $td="금";
  break;
  case "6":
  $td="토";
  break;
  }
?>

<table width="95%" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="61" height="25" align="center" style="color:black;font-weight:bold"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color="black"><strong><?=$board[bo_subject]?></strong></font></a>&nbsp;<img src='<?=$latest_skin_path?>/img/ic-news.gif' align=absmiddle>&nbsp;</td>
  <td colspan="2"><span style='font-family:돋움; font-size:8pt; color:#00000;'><?=$today=date("n. j. [$td]");?></span></td>
    <td width="63" align="center"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/ic-view.gif' align=absmiddle border="0"></a></td>
  </tr>
  <tr><td colspan=4 bgcolor=#EBEBEB height=1></td></tr>
  <tr>
    <td height="102" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="123" height="80" align="center"><?=$view_img?></td>
    </tr>
      <tr>
        <td height="31" align="center" valign="top">[<?=$w_subject?>]</td>
  </tr>
    </table>
    </td>
    <td colspan="2" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
    <td colspan=4 align=center>
        <table width=95%>
        <tr>
            <td height=17><img src='<?=$latest_skin_path?>/img/dot.gif' align=absmiddle>&nbsp;&nbsp;
            <?
            echo $list[$i]['icon_reply'] . " ";
            echo "<a href='{$list[$i]['href']}'>";
            if ($list[$i]['is_notice'])
                echo "<font style='font-family:돋움; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
            else
                echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$list[$i]['subject']}</font>";
            echo "</a>";

            if ($list[$i]['comment_cnt'])
                echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i]['comment_cnt']}</span></a>";
            /*
            if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
            if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

          echo " " . $list[$i]['icon_new'];
          echo " " . $list[$i]['icon_file'];
          echo " " . $list[$i]['icon_link'];
          echo " " . $list[$i]['icon_hot'];
          echo " " . $list[$i]['icon_secret'];
  */
            ?></td></tr>
        <!--<tr><td bgcolor=#EBEBEB height=1></td></tr>-->
        </table></td>
</tr>
<? } ?>

<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
    </table></td>
  </tr>
 
  <tr>
    <td height="0"></td>
    <td width="62"></td>
    <td width="229"></td>
    <td></td>
  </tr>
</table>
  • 복사

댓글 전체

<tr>
    <td colspan=4 align=center>
        <table width=95%>
        <tr>
            <td height=17><img src='<?=$latest_skin_path?>/img/dot.gif' align=absmiddle>
에서
    <td colspan=4 align=center> 부분을 <td colspan=4> 이렇게 해보세요.
<td colspan=4>
        <table width=95%>
        <tr>
              <td colspan=4 align=left><img src='<?=$latest_skin_path?>/img/dot.gif' align=absmiddle><td colspan=4>

네 이렇게 하니까 되네요^^
© SIRSOFT
현재 페이지 제일 처음으로