MINI MINI MANI MO

Path : /home/lhcar/www/mobile/
File Upload :
Current File : /home/lhcar/www/mobile/sub05.php

<?
require_once "./_common/common.php";
include $_SERVER['DOCUMENT_ROOT'].'/_config/global.php';
include $_SERVER['DOCUMENT_ROOT'].'/_config/_class/phpfun.class.php';

if(!$id) $id="notice";
$sql="select * from admin_table where a_name='$id'";
$result=mysql_query($sql);
$data=mysql_fetch_array($result);

function cut_str($msg,$cut_size,$dot=true) {
	if($cut_size<=0) return $msg;
	if ($dot) $odot="...";
	else $odot="";
	if(ereg("\[RE\]",$msg)) $cut_size=$cut_size+4;
	for($i=0;$i<$cut_size;$i++) if(ord($msg[$i])>127) $han++; else $eng++;
	$cut_size=$cut_size+(int)$han*0.6;
	$point=1;
	for ($i=0;$i<strlen($msg);$i++) {
		if ($point>$cut_size) return $pointtmp.$odot;
		if (ord($msg[$i])<=127) {
			$pointtmp.= $msg[$i];
			if ($point%$cut_size==0) return $pointtmp.$odot; 
		} else {
			if ($point%$cut_size==0) return $pointtmp.$odot;
			$pointtmp.=$msg[$i].$msg[++$i];
			$point++;
		}
		$point++;
	}
	return $pointtmp;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=medium-dpi">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>


<link rel="stylesheet" type="text/css" href="css/style.css">
<link href="css/scale.css" rel="stylesheet" type="text/css">
</head>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<div id="top">
<? include "inc/sub_top.html"; ?>
</div>

<tr>	
			<td>
					</td>
</tr>
<tr>
	<td>	
			<!-- navi start-->
							<table id="navi"  width="100%"  height="60"  border="0" cellpadding="0" cellspacing="0">
  <tr>	
									<td>
										<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<?if($id=="notice"){$ts1="color: #FF0000;font-weight:bolder;";$ts2="color: #000000";$ts3="color: #000000";}else if($id=="faq"){$ts2="color: #FF0000;font-weight:bolder;";$ts1="color: #000000";}else if($id=="data"){$ts3="color: #FF0000;font-weight:bolder;";$ts1="color: #000000";}?>
											<tr>
												<td width="20"><table align="left"><tr><td style="padding-left:10px;"><strong>°í°´¼¾ÅÍ : </strong><a href="/sub05.php"><font style="<?=$ts1?>">°øÁö»çÇ×</font></a> ¤Ó <a href="/sub05.php?id=faq"><font style="<?=$ts2?>">ÀÚÁÖÇÏ´ÂÁú¹®</font></a> ¤Ó <a href="/sub05.php?id=data"><font style="<?=$ts3?>">ÀÚ·á½Ç</font></a></td>
												</tr></table></td>
												
											</tr>
                                            <tr><td height="1" bgcolor="#0066CC"></td></tr>
                                            <tr><td height="10" ></td></tr>
										</table>								  </td>
							    </tr>
							 </table>
	  <!-- navi end-->
	</td>
</tr>

<tr>
	<td>	
			<div align="center">
			  <!-- contents start-->
			<table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><table width="100%" border="0" cellpadding="4" cellspacing="0" id="bbstable">
                                   <tr height="30">
                    <th class="left">
					</th>
                    <th>¹øÈ£</th>
                    <th>Á¦¸ñ</th>
                    <th>À̸§</th>
                    <th>µî·ÏÀÏ</th>
                    <th class="right">Á¶È¸</th>
                  </tr>
<?

if (!$page) $page=1; //ÃÊ±â ÆäÀÌÁö ¼³Á¤
$nperpage=20-$notice_cnt;
$nperblock=10;

$sql = "  select * from $id where bdiv='$site_code' and notice!='Y' $where";
$result=@mysql_query($sql);
$trecord=@mysql_num_rows($result);
$tpage = ceil($trecord/$nperpage); //ÀüüÆäÀÌÁö
// Ãâ·Â ·¹ÄÚµå ¹üÀ§
if($trecord==0) {
	$first=1;
	$last=0;
} else {
	$first=$nperpage*($page-1);
	$last=$nperpage*$page;
}
$p_qry = "  select * from $id where bdiv='$site_code' and notice!='Y' $where ORDER by list desc,ridx asc LIMIT $first, $nperpage";
$p_res = mysql_query($p_qry) or die(mysql_error());
$num_row = mysql_num_rows($p_res);
$article_num = $trecord - $nperpage*($page-1); //°¡»ó¹øÈ£ ¼³Á¤
// °¢ ÆäÀÌÁö·Î Á÷Á¢ À̵¿ÇÒ ¼ö ÀÖ´Â ÆäÀÌÁö ¸µÅ©¿¡ ´ëÇÑ ¼³Á¤À» ÇÑ´Ù.
$tblock = ceil($tpage/$nperblock);
$block = ceil($page/$nperblock);
$first_page = ($block-1)*$nperblock;
$last_page = $block*$nperblock;
if($tblock <= $block) {
   $last_page = $tpage;
}
if(!($num_row+$notice_cnt)){
?>
<?
}else{
	$i=1;
	while($list = mysql_fetch_array($p_res)){
		$d_no=$list["no"]; //°Ô½Ã¹°°íÀ¯¹øÈ£
		$d_memo=$list["memo"]; //³»¿ë
		$d_name=$list["name"]; //ÀÛ¼ºÀÚ
		$d_subject=$list["subject"]; //Á¦¸ñ
		$d_pwd=$list["pwd"]; //ºñ¹Ð¹øÈ£
		$d_date=$list["date"]; //time()°ª
		$d_ref=$list["ref"]; //Á¶È¸
		$d_list=$list["list"]; //°Ô½Ã¹°µî·Ï¼ø¼­ / µî·Ï½Ã max(no)+1
		$d_level=$list["level"]; // 0 - ¿ø±Û / 1 - ´ä±Û
		$d_ridx=$list["ridx"]; // 0 - ¿ø±Û / 1 - ´ä±Û
		$d_email=$list["email"]; // À̸ÞÀÏ
		$d_userno=$list["midx"]; // 0 - ? / 2 - ?
		$d_html=$list["html"]; //html±¸ºÐ
		$d_security=$list["security"]; //ºñ¹Ð¼³Á¤ Y,N
		$d_notice=$list["notice"]; //°øÁö»çÇ×¼³Á¤ Y,N
		$d_files=$list["files"]; 
		$d_files2=$list["files2"];

		$subject=cut_str(strip_tags($d_subject),32);

		$newdate=time()-60*60*24*1;
		if ($newdate < $d_date) $outnew="&nbsp; <img src='/board/img/ico_new.gif' border=0 style='vertical-align:middle;display:inline;'>";
		else $outnew="";
		if($d_security=="Y"){
			$icon_sec="<img src='/board/img/secret.gif' border='0' style='display:inline;'>";
			if($u_admin){
				$passed="";
			} elseif($cookie_user_no==$d_userno) {
				$passed="";
			} else {
				$passed="pwview";
			}
		} else {
			$icon_sec="";
			$passed="";
		}
		$number=$article_num--;
		if($d_ridx==1){
/*			if($u_admin){
				$passed="";
			} else {
				$passed="pwview";
			} */
			$reply_gubun=" &nbsp;<img src='".$skinDir."img/re.gif' border=0 style='vertical-align:middle;display:inline;'> ";
		} else {
			$reply_gubun="";
		}

		if($d_files){
			$dfiles="<img src='/board/img/ico_file.gif' border='0' style='display:inline;'>";
		}else{
			$dfiles="";
		}

		$qry_board = "select * from admin_table where a_name='$id' ";
		$res_board = mysql_query($qry_board) or die(mysql_error());
		$data_board = mysql_fetch_array($res_board);
		
?>
                  <tr height="30px">
                    <td align="center" class="left">
					</td>
                    <td align="center" ><?=$number?></td>
                    <td class="a_left"style="padding-left:10px;"><a href="http://autoweb.passcar.co.kr/board/board.php?id=<?=$id?>&mode=view&no=<?=$d_no?>&passed=<?=$passed?>&pc=ok"><?=$subject?></a></td>
                    <td align="center" ><?=$d_name?></font></td>
                    <td align="center" ><font color='#545454'><?=date("Y-m-d",$d_date)?></font></td>
                    <td align="center" class="right"><font color='#545454'><?=$d_ref?></font></td>
                  </tr>
<?
	$i++;}
}
?>
                </table></td>
              </tr>
              <tr>
                <td height="30"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td align="left" width="33%">
					</td>
                    <td align="center" width="33%"><center>
                      <font size="3" color="red">1</font>
                    </center></td>
                    <td align="right"  width="33%;">
					</td>
                  </tr>
                </table></td>
              </tr>
            </table>
	  </div>
			<!-- contents end--></td>
</tr>

<div id="btm">
<? include "inc/btm.html"; ?>
</div>
  


OHA YOOOO