/home/mjc1/public_html/emillennium/notice.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
<?php
$dir 
".";
include_once(
$dir."/_common.php");
include(
'./include/header.sub.php'); 

$sql  =   " select count(*) as cnt from mBoard_notice WHERE (company = '00' or company = '01') and ifnull(temp,\"\") <>'Y'";
$result      =    mysql_query($sql,$connect_web);
$row mysql_fetch_array($result);
$total_count $row['cnt'];

$list_num 10;
$total_page  ceil($total_count $list_num);  // 전체 페이지 계산
if ($page 1) { $page 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page 1) * $list_num// 시작 열을 구함

$sql "select * from mBoard_notice WHERE (company = '00' or company = '01') and ifnull(temp,\"\") <>'Y' order by reg_date desc limit $from_record$list_num";
$result      =    mysql_query($sql,$connect_web);

while(
$notice_info=mysql_fetch_array($result)){
    
$notice_info['reg_date'] = date("Y-m-d",$notice_info['reg_date']);
    
$notice_info['reg_time'] = date("H:i:s",$notice_info['reg_date']);
    
$array[] = array_utf8($notice_info);
}
?>

<div id="wrap-notice" style="padding:0 10px;">
    <div id="sub-title" style="margin-top:0px;">
        <h2>공지사항</h2>
        <nav class="sub-location">
            <a href="javascript:home();" class="home"><span class="screen_out">홈</span></a>
            <span class="location-gt"></span>
            <a>게시판</a>
            <span class="location-gt"></span>
            <a>공지사항</a>
        </nav>
    </div>

    <section id="sub-contents-area">
        <article class="sub-order-area">
            <h3 class="toggle-head">
                <span class="no">번호</span>
                <span class="date">일자</span>
                <span class="time">시간</span>
                <span class="subject">제목</span>
            </h3>
            <ul id="board-toggle">
<?php
    $notice_count 
0;
    
$k 0;
    
$nums $total_count - ($page 1) * $list_num $notice_count;
    for(
$i=0;$i<count($array);$i++){
        
$info $array[$i];
?>
                <li>
                    <h4 class="title">
                        <span class="no"><?php echo $nums;?></span>
                        <span class="date"><?php echo $info['reg_date'];?></span>
                        <span class="time"><?php echo $info['reg_time'];?></span>
                        <span class="subject" style="width:325px;"><?php echo strip_tags($info['subject']);?></span>
                    </h4>
                    <div class="sub <?php if($uid==$info['uid']){?>show_class<?php }?>">
                        <?php echo nl2br($info['content']);?>
                    </div>
                </li>
<?php
        $nums
--;
        
$k++;
    }
?>
            </ul>
        </article>
    </section>
    <div class='close_button'><input type='button' value='창닫기' onclick="window.close();"></div>
</div><!--//wrap-->

<div class='pg_wrap' style='padding-top:0px;'>
<?php echo get_paging(5$page$total_page"?$qstr&amp;page=");?>
</div>


<script>
jQuery(document).ready(function(){
    
    $("#board-toggle .sub").hide();

    $("#board-toggle .title").click(function () {
        if ($(this).next().css("display") == "none") {
            $(".sub").slideUp();
        };
        $(this).next().slideToggle();
    });

    $(".sub").click(function () {
        $(this).slideUp();
    });

    $(".show_class").show();
});

function home(){
    parent.window.opener.document.location.href='./index.php';
    window.close();
}
</script>


<?php  //include('./include/footer.php'); ?>