/home/mjc1/public_html/manage/popbilluselist.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
<? @session_start();?>
<?
    
if( $_SESSION[ADMINID] == ""){
?>
<script>
location.href = "index.php";
</script>
<?
    
}
?>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<?
    
include ("category/common.php");
    
$query  " select companyName from bill_mijin WHERE companyNum = '$from_companynum'";
    
$result mysql_query($query);
    
$row    mysql_fetch_row($result);
?>
<div class="txt03" align="center">
    <b><?=$row[0]?></b><br>¼¼±Ý°è»ê¼­ ¹ßÇà°Ç¼ö
    <table cellpadding="1" cellspacing="1" border="0" class="txt03" bgcolor="BDBEBD">
        <tr align="center" bgcolor="#f6f6f6">
            <td width="50">³â</td>
            <td width="50">¿ù</td>
            <td width="50">¹ßÇà¼ö</td>
        </tr>
<?
    
if($from_companynum.trim == "") return;
    
$query  " SELECT p.year, p.month, COUNT(p.idx) as cnt ".
    
"   FROM bill_mijin m ".
    
"           INNER JOIN bill_publish p ON m.companyNum = p.from_companynum ".
    
"     WHERE m.companyNum = '$from_companynum' ".
    
"     GROUP bY p.year, p.month ";
    
$result mysql_query($query);

    
$totalcnt 0;

    if(
mysql_num_rows($result) > ) {
        while(
$row mysql_fetch_array($result)) {
?>
        <tr align="center" bgcolor="#FFFFFF">
            <td><?=$row[year]?></td>
            <td><?=$row[month]?></td>
            <td><?=$row[cnt]?></td>
        </tr>
<?
            $totalcnt 
+= $row[cnt];
        }
?>
        <tr>
            <td align="center" colspan="3" bgcolor="#FFFFFF">ÃÑ ¹ßÇàȽ¼ö : <b><?=$totalcnt?></b></td>
        </tr>
<?
    
}
?>
    </table>
    <br>
    <INPUT TYPE="button" value="´Ý±â" onclick="self.close();">
</div>