/home/mjc1/public_html/manage/buildBoard_Count_old20160712.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
<?
    Header
("P3P: CP='NOI DSP COR IVAa OUR BUS IND UNI COM NAV INT'"); 
    include(
"./FusionCharts/Includes/FusionCharts.php");
    include(
"./category/common.php");
?>

<!DOCTYPE html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
        <title>´ã´çÀÚº° ´äº¯ °Ç¼ö</title> 
        <link rel='stylesheet' type='text/css' href='./css/reset.css'>
        <link rel='stylesheet' type='text/css' href='./css/point.css'>
        <script language="JavaScript">
            function goSearch() {  //Á¶È¸ ½ºÅ©¸³Æ®
                document.serch_form.action="asBoard_Count.php"
                document.serch_form.submit(); 
            } 
        </script>
    </head>

<body>
    <div class="wrap">
        <h2>´ã´çÀÚº° ´äº¯ °Ç¼ö</h2>

        <form name="serch_form" style="margin:0;">     
        <div class="replyWrap">

<? //Æû·Îµå ÇÒ¶§ ÀÚµ¿À¸·Î ³¯Â¥ »ý¼º(¿À´ÃºÎÅÍ ÇÑ´ÞÀü)
if ($keydate1 == "") { 
    
$keydate1 = ($keydate1 == "") ? date("Y-m-01"time()) : $keydate1
}
if (
$keydate2 == "") { 
    
$keydate2 = ($keydate2 == "") ? date("Y-m-d"time()) : $keydate2
}
?> 
            <dl>
                <dt>±â°£ : </dt>
                <dd><input type="text" name="keydate1" size="10" value='<?=$keydate1;?>' maxlength="10" onClick="check_mouse('SearchFrm.'+this.name)"><span>~</span><input type="text" name="keydate2" size="10" value='<?=$keydate2;?>' maxlength="10" onClick="check_mouse('SearchFrm.'+this.name)"><input type="button" name="btnqurry" value="°Ë»ö" onClick="goSearch()">
                </dd>
            </dl>
        </div><!--//replyWrap-->
        </form>
        
        <div class="chartWrap">
<?
    $qry              
=   " select name, count(name) AS ansnum from mBoard_as where thread = 'AA' AND from_unixtime(`reg_date`, '%Y-%m-%d') BETWEEN '$keydate1' AND '$keydate2' group by name order by  ansnum desc" ;
    
$result       =     mysql_query($qry);

    
$qry2              =   " select name, count(name) AS ansnum from mBoard_build where thread = 'AA' AND from_unixtime(`reg_date`, '%Y-%m-%d') BETWEEN '{$keydate1}' AND '{$keydate2}' group by name order by  ansnum desc" ;
    
$result2       =     mysql_query($qry2);    
?>
<?php

    $i 
0;

    while(
$replyRow mysql_fetch_array($result)){

            if(
$replyRow['name'] == "°í°´Áö¿ø 1ÆÀ"){
                
$wname "È«Àç¿ø";
            } else if (
$replyRow['name'] == "°í°´Áö¿ø 2ÆÀ"){
                
$wname "ÇÔµ¿Áø";
            } else if (
$replyRow['name'] == "°í°´Áö¿ø 3ÆÀ"){
                
$wname "±Çâ±Ô";
            } else if (
$replyRow['name'] == "°í°´Áö¿ø 4ÆÀ"){
                
$wname "ÃÖ±¤¹Î";
            } else if (
$replyRow['name'] == "°í°´Áö¿ø 5ÆÀ"){
                
$wname "ÀåÁø¾Æ";
            } else if (
$replyRow['name'] == "°í°´Áö¿ø 6ÆÀ"){
                
$wname "Á¤ÀÏ¿µ";
            } else if (
$replyRow['name'] == "°í°´Áö¿ø 7ÆÀ"){
                
$wname "";
            } else if (
$replyRow['name'] == "°í°´Áö¿ø 8ÆÀ"){
                
$wname "ȲÈñ¿µ";
            } else if (
$replyRow['name'] == "°³¹ß 2ÆÀ"){
                
$wname "";
            } else if (
$replyRow['name'] == "°³¹ß 4ÆÀ"){
                
$wname "ÃÖ»óÈ£";
            } else if (
$replyRow['name'] == "¿µ¾÷ 1ÆÀ"){
                
$wname "¿À»ó¸ñ";
            } else if (
$replyRow['name'] == "¿µ¾÷ 2ÆÀ"){
                
$wname "À̺ÀÇÐ";
            } else if (
$replyRow['name'] == "¿µ¾÷ 3ÆÀ"){
                
$wname "À¯Å°ü";
            } else if (
$replyRow['name'] == "¿µ¾÷ 4ÆÀ"){
                
$wname "À̽Âȯ";
            } else if (
$replyRow['name'] == "¿µ¾÷ 5ÆÀ"){
                
$wname "½ÉÀ¯µ¿";
            }

        
$arrData[$i][1] = $wname;
        
$arrData[$i][2] = $replyRow['ansnum'];

    
$i++;
    }

    while(
$replyRow mysql_fetch_array($result2)){

        if(
$replyRow['name'] == "°í°´Áö¿ø 1ÆÀ"){
            
$wname "È«Àç¿ø";
        } else if (
$replyRow['name'] == "°í°´Áö¿ø 2ÆÀ"){
            
$wname "ÇÔµ¿Áø";
        } else if (
$replyRow['name'] == "°í°´Áö¿ø 3ÆÀ"){
            
$wname "±Çâ±Ô";
        } else if (
$replyRow['name'] == "°í°´Áö¿ø 4ÆÀ"){
            
$wname "ÃÖ±¤¹Î";
        } else if (
$replyRow['name'] == "°í°´Áö¿ø 5ÆÀ"){
            
$wname "ÀåÁø¾Æ";
        } else if (
$replyRow['name'] == "°í°´Áö¿ø 6ÆÀ"){
            
$wname "Á¤ÀÏ¿µ";
        } else if (
$replyRow['name'] == "°í°´Áö¿ø 7ÆÀ"){
            
$wname "";
        } else if (
$replyRow['name'] == "°í°´Áö¿ø 8ÆÀ"){
            
$wname "ȲÈñ¿µ";
        } else if (
$replyRow['name'] == "°³¹ß 2ÆÀ"){
            
$wname "";
        } else if (
$replyRow['name'] == "°³¹ß 4ÆÀ"){
            
$wname "ÃÖ»óÈ£";
        } else if (
$replyRow['name'] == "¿µ¾÷ 1ÆÀ"){
            
$wname "¿À»ó¸ñ";
        } else if (
$replyRow['name'] == "¿µ¾÷ 2ÆÀ"){
            
$wname "À̺ÀÇÐ";
        } else if (
$replyRow['name'] == "¿µ¾÷ 3ÆÀ"){
            
$wname "À¯Å°ü";
        } else if (
$replyRow['name'] == "¿µ¾÷ 4ÆÀ"){
            
$wname "À̽Âȯ";
        } else if (
$replyRow['name'] == "¿µ¾÷ 5ÆÀ"){
            
$wname "½ÉÀ¯µ¿";
        }

        
$flag 0;

        for(
$ii=0;$ii<count($arrData);$ii++){
            if(
$arrData[$ii][1]==$wname){
                
//echo $wname."<br>";
                
$arrData[$ii][2] = ($arrData[$ii][2]*1)+$replyRow['ansnum'];
                
$flag 1;
            }
        }
        if(
$flag==0){
            
$arrData[$i][1] = $wname;
            
$arrData[$i][2] = $replyRow['ansnum'];
            
$i++;
        }
    }

    
$numline $i-2;

    
$strXML "<graph caption='´äº¯¼ö'  baseFontSize='12' baseFont='±¼¸²' numberPrefix='' numdivlines='0' numVDivLines='" .$numline"' formatNumberScale='5' decimalPrecision='0' >";

    
$strCategories "<categories>";

    
$strDataProdA "<dataset seriesName='´äº¯¼ö' color='4444ff'  baseFontSize='12' baseFont='±¼¸²'>";

    foreach (
$arrData as $arSubData) {
        
$strCategories .= "<category outCnvBaseFontColor='ff0000' baseFontColor='ff0000'  name='" $arSubData[1] . "'    />";
        
$strDataProdA .= "<set  value='" $arSubData[2] . "' />";

    }
    
    
$strCategories .= "</categories>";
    
$strDataProdA .= "</dataset>";

    
$strXML $strXML $strCategories $strDataProdA $strDataProdB .  $strDataProdC "</graph>";

   echo 
renderChartHTML("../manage/FusionCharts/FCF_MSColumn2DLineDY.swf"""$strXML"productSales"700400);
?>
        </div><!--//chartWrap-->


    </div><!--//wrap-->
</body>
</html>