/home/mjc1/public_html/manage/popTaxIssueCount.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
<!DOCTYPE html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
        <title>MacAddress ½Å±Ôµî·Ï</title> 
        <link rel='stylesheet' type='text/css' href='./css/reset.css'>
        <link rel='stylesheet' type='text/css' href='./css/point.css'>
    </head>
    
<?
    
@session_start();
    if( 
$_SESSION['ADMINID'] == ""){
?>
<script>
    location.href = "index.php";
</script>
<?
    
}
?>

<?
    
include ("./category/common.php");
    
    
$query  " select companyName from bill_mijin WHERE companyNum = '$from_companynum'";
    
$result mysql_query($query);
    
$row    mysql_fetch_row($result);
?>

<script language="JavaScript">
function goSelCompanyIssueList(num){
    opener.document.location.href="bill.php?searchCode=4&keyword="+num;
    opener.focus();
}
</script>

<body>
    <div class="wrap">
        <h2>¾÷üº° ¼¼±Ý°è»ê¼­ ¹ßÇà°Ç¼ö</h2>
        
        <table class="replyTable" style="width:377px;">
            <colgroup>
                <col style="width:40px;"><col><col style="width:100px;"><col style="width:60px;">
            </colgroup>
            <tr>
                <th>¹øÈ£</th>
                <th>ȸ»ç¸í</th>
                <th>»ç¾÷ÀÚ¹øÈ£</th>
                <th class="last">¹ßÇà¼ö</th>
            </tr>

<?
    
if($from_companynum.trim == "") return;

    
$query  "SELECT m.companyName, m.companyNum, COUNT(p.idx) as cnt ".
                    
"    FROM bill_mijin m ".
                    
"    INNER JOIN bill_publish p ON m.companyNum = p.from_companynum ".
                    
"    GROUP BY m.companyName, m.companyNum ".
                    
"    ORDER BY cnt DESC, m.companyName ";

    
$result mysql_query($query);

    
$totalcnt 0;
    
$cnt      1;
    if(
mysql_num_rows($result) > ) {
        while(
$row mysql_fetch_array($result)) {
?>
            <tr align="center" bgcolor="#FFFFFF" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='#FFFFFF'" style="cursor:pointer">
                <a href="javascript:goSelCompanyIssueList('<?=$row['companyNum']?>')">
                <td><?=$cnt?></td>
                <td><?=$row['companyName']?></td>
                <td><?=$row['companyNum']?></td>
                <td class="last"><?=$row['cnt']?></td>
                </a>
            </tr>
<?
            $totalcnt 
+= $row['cnt'];
            
$cnt++;
        }
?>
            <tr>
                <td colspan="4" style="background:#dbe2e9;">ÃÑ ¹ßÇàȽ¼ö : <b><?=$totalcnt?></b></td>
            </tr>
<?
    
}
?>
        </table>
        
        <div class="btn1Warp">
            <INPUT TYPE="button" value="´Ý±â" onclick="self.close();">
        </div>

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