/home/mjc1/public_html/common/support/demo.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
<style>
    .demoTable {width: 1199px !important;margin-top: 20px;border-bottom: 1px solid #d8d8d8;}
    .demoTable th{height:36px;color:#012D6A;font-size:16px;font-weight:400;text-align:center;}
    .demoTable thead th{border-top:none;background:#EAEAEA;border-left:1px solid #EAEAEA;border-right:1px solid #EAEAEA;}
    .demoTable tbody {border-left:1px solid #EAEAEA;border-right:1px solid #EAEAEA;}
    .demoTable tbody th{border-top:none;background:inherit;}
    .demoTable tbody td{font-size:16px;border-top:none;text-align:center;}
    .demoTable tbody tr:hover {background-color:#fff !important;}
    .demoTable .on {background-color:#D1E4FF;}
    .pro_name {color:#012D6A;}
    .pro_use {color:#666666;}

    .domoNum{width:60px;}
    .domoProduct{width:280px;}
    .demoUse{width:540px;}
    .domoDownload{width:160px;}
    .domoInfo{width:160px;}

</style>
    <table class="demoTable">
        <colgroup>
            <col class="domoNum"><col class="domoProduct"><col class="demoUse"><col class="domoDownload"><col class="domoInfo">
        </colgroup>
        <thead>
            <tr> 
                <th>¼ø¹ø</th>
                <th>Á¦Ç°¸í</th>
                <th>¿ëµµ</th>
                <th>´Ù¿î·Îµå</th>
                <th>Á¦Ç°Á¤º¸</th>
            </tr>
        </thead>

    <? 
        $i 
1;
        if(
date("Y-m-d",time())>"2017-05-31"){
            
$certsql "SELECT c.idx, c.category_code, c.programName, c.ver, c.reg_date, t.DemoDownFile, t.cate1_code, t.cate2_code, i.category_info, i.link AS linkgo
                        FROM certinumManage AS c 
                        INNER JOIN cate3 AS t ON ( SUBSTRING(c.category_code,5,2) = t.category_code)
                        INNER JOIN cate3_info AS i ON (c.idx = i.idx)
                        WHERE i.viewtype = 1 AND c.lineup < 99  order by c.lineup"
;
        } else {
            
$certsql "SELECT c.idx, c.category_code, c.programName, c.ver, c.reg_date, t.DemoDownFile, t.cate1_code, t.cate2_code, i.category_info, i.link AS linkgo
                        FROM certinumManage AS c 
                        INNER JOIN cate3 AS t ON ( SUBSTRING(c.category_code,5,2) = t.category_code)
                        INNER JOIN cate3_info AS i ON (c.idx = i.idx)
                        WHERE i.viewtype = 1 AND c.lineup < 99 and c.idx not in (105,106) order by c.lineup"
;
        }
        
//echo $certsql;
        
$certresult mysql_query($certsql);
        while(
$certrow mysql_fetch_array($certresult)){
            if(
$certrow['programName']=='õ³âÆ÷½º'){ continue; }
            
        
$usecate substr($certrow['category_code'],4,2);
        
$catedown substr($certrow['category_code'],0,2);
    
    
?>
        <tbody class=
            <? if($i && $i 5){
                echo 
"tbBg1";
            } else if(
$i && $i 16){
                echo 
"tbBg2";
            } else if(
$i 15 && $i 19){
                echo 
"tbBg3";
            } else if(
$i 18 && $i 22){
                echo 
"tbBg4";
            } else if(
$i 21 && $i 30){
                echo 
"tbBg5";
            } 
?>
        >
            <tr class=
                <? if($i && $i 5){
                    echo 
"trBg1";
                } else if(
$i && $i 16){
                    echo 
"trBg2";
                } else if(
$i 15 && $i 19){
                    echo 
"trBg3";
                } else if(
$i 18 && $i 22){
                    echo 
"trBg4";
                } else if(
$i 21 && $i 30){
                    echo 
"trBg5";
                } 
?>
                height="44">

                
                <th><?=$i?></th>    <!-- ¼ø¹ø -->
                <td class="pro_name"><?=$certrow['programName']?></td><!-- Á¦Ç°¸í -->
                <td class="pro_use"><?=$certrow['category_info'];?></td><!-- ¹öÀü -->
                <td>
                    <input type='hidden' name='download_file[]' value='/download/<?=$certrow['DemoDownFile']?>'>
                    <input type='hidden' name='category_code[]' value='<?=substr($certrow['category_code'],4,2)?>'>
                    <a href= "/download/<?=$certrow['DemoDownFile']?>" class='id_message1'><img src='/img/download_bt.png' border="0" style="cursor:pointer;"></a>
                </td><!-- ´Ù¿î·Îµå -->
                <td>
                <?php if(!($certrow['category_code']=='010205' || $certrow['category_code']=='010206' || $certrow['category_code']=='010514' || $certrow['category_code']=='010531' || $certrow['category_code']=='010332' || $certrow['category_code']=='010409')){ ?>
                    <a href="<?=$certrow['linkgo']?>" target="_blank"><img src="/img/linkgo.png" border="0"></a><?php //echo $certrow['category_code']; ?>
                <?php }?>
                </td><!-- µî·ÏÀÏÀÚ -->
            </tr>
        </tbody>

    <? $i++; } ?>

    </table>

    <script language="JavaScript">
        $(".tbBg1:last").css("border-bottom","1px dotted #012D6A");
        $(".tbBg2:last").css("border-bottom","1px dotted #012D6A");
        $(".tbBg3:last").css("border-bottom","1px dotted #012D6A");
        $(".tbBg4:last").css("border-bottom","1px dotted #012D6A");

        $(".trBg1").mouseover(
            function(){
                $(".tbBg1").addClass("on");
            }
        );
        $(".trBg1").mouseleave(
            function(){
                $(".tbBg1").removeClass("on");
            }
        );
        $(".trBg2").mouseover(
            function(){
                $(".tbBg2").addClass("on");
            }
        );
        $(".trBg2").mouseleave(
            function(){
                $(".tbBg2").removeClass("on");
            }
        );
        $(".trBg3").mouseover(
            function(){
                $(".tbBg3").addClass("on");
            }
        );
        $(".trBg3").mouseleave(
            function(){
                $(".tbBg3").removeClass("on");
            }
        );
        $(".trBg4").mouseover(
            function(){
                $(".tbBg4").addClass("on");
            }
        );
        $(".trBg4").mouseleave(
            function(){
                $(".tbBg4").removeClass("on");
            }
        );
        $(".trBg5").mouseover(
            function(){
                $(".tbBg5").addClass("on");
            }
        );
        $(".trBg5").mouseleave(
            function(){
                $(".tbBg5").removeClass("on");
            }
        );

        function download(cate){
            alert(cate);
        }

        function fileDown(type,name,cate2_code,category_code){
            location.href =   "fileDownLoad.php?type="+type+"&filename="+name+"&cate2_code="+cate2_code+"&category_code="+ category_code ;
        }
    </script>