/home/mjc1/public_html/html/community_01.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<?
 
include("../manage/category/common.php");
 
/*
 if( isset($uid) && $uid !== ""){
    
    if( !isset(${"up_noticeBoardUid_".$uid}) ){
    
      $hitSel     =  " select hit from mBoard_up_notice WHERE uid = '$uid'";
      $hitResult  =    mysql_query($hitSel);
      $hitRow     =    mysql_fetch_array($hitResult);
      $plus_hit   =    $hitRow[0] + 1;
      
      $hitUp  =  " UPDATE mBoard_up_notice SET hit = '$plus_hit' WHERE uid = '$uid' ";
                    MYSQL_QUERY($hitUp );
      
      setcookie("up_noticeBoardUid_$uid",$uid,0);
      }  
  }
   */
   
$cm_nCount          =      15;
   
$cm_item_nCount     =      30;          
   
   function 
pageListing($cur_page$total_page$n$url) {

  
$retValue .= "<table width=600 border=0 cellspacing=0 cellpadding=0 height=40 align=center><tr><td align=center valign=middle>";
  if (
$cur_page 1) {

      
$retValue .= "<span style=font-size:9pt;><font face=Verdana><a href='" $url . ($cur_page-1) ."'>ÀÌÀü</a></font></span>";
  } else {
    
$retValue .= "&nbsp;";
    
$retValue .= "&nbsp;";
  }
  
$retValue .= "&nbsp;";
  
$start_page = ( ( (int)( ($cur_page ) / 10 ) ) * 10 ) + 1;
 
  
$end_page $start_page 9;
  if (
$end_page >= $total_page$end_page $total_page;
  if (
$start_page 1$retValue .= " <span style=font-size:9pt;><font face=Verdana><a href='" $url . ($start_page-1) . "'>...</a></font></span> ";
  if (
$total_page 1)
    for (
$k=$start_page;$k<=$end_page;$k++)
      if (
$cur_page != $k$retValue .= "&nbsp;<span style=font-size:9pt;><font face=Verdana><a href='$url$k'>$k</a>&nbsp;</font></span>";
      else 
$retValue .= "&nbsp;<b>$k</b> ";
  if (
$total_page $end_page$retValue .= "<span style=font-size:9pt;><font face=Verdana><a href='" $url . ($end_page+1) . "'>...</a></font></span> ";
  
$retValue .= "&nbsp;&nbsp;";
  if (
$cur_page $total_page) {
    
$retValue .= "<span style=font-size:9pt;><font face=Verdana><a href='$url. ($cur_page+1) ."'>´ÙÀ½</a></font></span>";

  } else {
    
$retValue .= "&nbsp;";
    
$retValue .= "&nbsp;";
  }
  
$retValue .= "</td></tr></table>";
  return 
$retValue;
}

?>
<html>
<head>
<title>¾÷¹«¿ë ¼ÒÇÁÆ®¿þ¾î Àü¹®°³¹ß¾÷ü::::¹ÌÁø¼ÒÇÁÆ®::::</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script language='javascript' src='../js/left_menu.js'></script>
<script language='javascript' src='../js/img.js'></script>
</head>

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" style="background: url(../img/common/bg_community_top.jpg) #ffffff repeat-x" >
<? include("top_com.php"); ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td width="220" height="100%" valign="top"><table width="220" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="25" height="100%" valign="top"><table width="25" height="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td height="5"></td>
              </tr>
              <tr>
                <td background="../img/common/bg_bar.gif"></td>
              </tr>
            </table></td>
          <td width="195" align="right" valign="top"><table width="190" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td colspan="3"><img src="../img/community/tit.gif" width="190" height="110"></td>
              </tr>
              <tr> 
                <td width="10" valign="top"><img src="../img/common/left_tit_bg.gif" width="10" height="189"></td>
                <td width="170" valign="top"><? include("left_com.php"); ?>
                  <br>
                  <? include("banner.php"); ?>
                  <br>
                </td>
                <td width="10" valign="top"><img src="../img/common/left_tit_bg01.gif" width="10" height="163"></td>
              </tr>
            </table></td>
        </tr>
      </table> </td>
    <td width="755" align="center" valign="top"><table width="755" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td colspan="2"><img src="../img/community/top.jpg" width="755" height="110"></td>
        </tr>
        <tr> 
          <td width="765" align="center" valign="top"><table width="735" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="735" height="30" align="right" class="txt01"><img src="../img/common/history.gif" width="63" height="13" align="absmiddle"> 
                  <img src="../img/common/history_icon.gif" width="4" height="5" hspace="7" align="absmiddle">HOME<img src="../img/common/history_icon.gif" width="4" height="5" hspace="7" align="absmiddle">Ä¿¹Â´ÏƼ<img src="../img/common/history_icon.gif" width="4" height="5" hspace="7" align="absmiddle">¾÷±×·¹À̵å 
                  °øÁö»çÇ×&nbsp;&nbsp;&nbsp;</td>
              </tr>
            </table>
            <table width="725" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><img src="../img/community/tit_02.gif" width="725" height="35"></td>
              </tr>
            </table>
            <br>
<?
  
if( isset($uid) && $uid !== ""){
    
    
$oneQry     =   " select * from mBoard_up_notice WHERE uid = '$uid' ";
    
$oneResult  =     mysql_query($oneQry);
    
    
$oneRow     =     mysql_fetch_array($oneResult);
    
$content    =     nl2br(stripcslashes($oneRow[content]));

?>             
            <table width="680" border="0" cellspacing="0" cellpadding="0">
              <tr bgcolor="9C8F6F"> 
                <td height="3" colspan="2"></td>
              </tr>
              <tr bgcolor="f6f6f6"> 
                <td width="15" height="45" align="center">&nbsp;</td>
                <td width="665" class="txt03">±Û¹øÈ£ : <?=$oneRow[uid];?><br>
                  Á¦&nbsp;&nbsp;&nbsp;¸ñ : <strong><?=$oneRow[subject];?></strong></td>
              </tr>
              <tr bgcolor="EEEEEE"> 
                <td height="1" colspan="2"></td>
              </tr>
            </table>
            <br>
            <table width="680" border="0" cellpadding="15" cellspacing="5" bgcolor="f3f3f3">
              <tr>
                <td valign="top" bgcolor="#FFFFFF" class="txt03"><?=$content;?></td>
              </tr>
            </table>
            <a href="community_01.php"><img src="../img/skin/btn_list.gif" width="74" height="24" vspace="15" border="0"></a><br>
<?
     
}
?>               
            <table width="680" border="0" cellspacing="0" cellpadding="0">
              <tr bgcolor="9C8F6F"> 
                <td height="3" colspan="4"></td>
              </tr>
              <tr align="center" bgcolor="F5F5F5"> 
                <td width="50" height="27"><img src="../img/skin/tit_no.gif" width="13" height="9"></td>
                <td width="460"><img src="../img/skin/tit_title.gif" width="22" height="9"></td>
                
                <td width="120"><img src="../img/skin/tit_date.gif" width="22" height="9"></td>
                <td width="50"><img src="../img/skin/tit_view.gif" width="24" height="9"></td>
              </tr>
              <tr bgcolor="EEEEEE"> 
                <td height="1" colspan="4"></td>
              </tr>
            </table>
            <table width="680" border="0" cellspacing="0" cellpadding="0">
<?
  $total_sql  
.=   " select * from mBoard_up_notice ";
 
  
$result      =    mysql_query($total_sql) or die (mysql_error());
  
$nTotalCount =    mysql_num_rows($result);
  
  
$nPage       =    ceil($nTotalCount $cm_nCount);
  if (
$pg == "")    $pg 1;
  
$nFrom       =    ($pg 1) * $cm_nCount;
 
  
$sql         =    $total_sql "  order by uid DESC limit $nFrom$cm_nCount ";
 
  
$result      =    mysql_query($sql) or die (mysql_error());
  
   if( 
mysql_num_rows($result) > ){ 
     
    while (
$up_noticeRow =  mysql_fetch_array($result)){ 
      
           
$reg_date  =  date('Y-m-d',$up_noticeRow[reg_date] ); 

?>         
              <tr <? if($up_noticeRow[uid] == $uid ){ echo "bgcolor=dddddd";} else{ echo "bgcolor=ffffff";}?> class="txt03"> 
                <td width="50" height="27" align="center"><?=$up_noticeRow[uid];?></td>
                <td width="460"><a href='community_01.php?uid=<?=$up_noticeRow[uid];?>&pg=<?=$pg;?>'><?=$up_noticeRow[subject];?></td>
                
                <td width="120" align="center"><?=$reg_date;?></td>
                <td width="50" align="center"><?=$up_noticeRow[hit];?></td>
              </tr>
              <tr bgcolor="EEEEEE"> 
                <td height="1" colspan="4"></td>
              </tr>
<?
    
}
  }  
?>             </table>
            <br>
            <table width="680" border="0" cellpadding="0" cellspacing="0">
              <tr bgcolor="#FFFFFF" class="txt03"> 
                <td align="center">
<?=pageListing($pg$nPage$cm_nCount"community_01.php?pg=" );?></td>
              </tr>
            </table>
            <br>
         
            
          </td>
          <td valign="top"><img src="../img/common/right_tit_bg.gif" width="10" height="153"></td>
        </tr>
      </table> </td>
    <td valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height="100"></td>
        </tr>
        <tr>
          <td background="../img/common/bg_bar.gif">&nbsp;</td>
        </tr>
      </table></td>
  </tr>
</table>
<? include("foot.php"); ?>
</body>
</html>