/home/mjc1/public_html/manage/easybillBoard.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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
 <script type="text/javascript" src="../js/PopupCalendar.js"></script>
<?
  
include("category/common.php");
  
//include("admin_include.php");
      
include("memberManage.php");
 
   
$cm_nCount          =      15;
   
$cm_item_nCount     =      30;          
        
   function 
pageListing($cur_page$total_page$n$url,  $mode,$category_code,$searchCode1$searchCode2,$SearchMsw1$keyword $searchCode3$txtdate$txtdate2) {

  
$retValue .= "<table width=600 border=0 cellspacing=0 cellpadding=0 height=40 align=center><tr><td align=center valign=middle>";
  if (
$cur_page 1) {

      
$retValue .= "<span style=font-size:9pt;><font face=Verdana><a href='" $url . ($cur_page-1) ."&mode=".$mode."&category_code=".$category_code."&searchCode1=".$searchCode1."&searchCode2=".$searchCode2."&SearchMsw1=".$SearchMsw1."&keyword=".$keyword."&searchCode3=".$searchCode3."&txtdate=".$txtdate."&txtdate2=".$txtdate2."'>ÀÌÀü</a></font></span>";
  } else {
    
$retValue .= "&nbsp;";
    
$retValue .= "&nbsp;";
  }
  
$retValue .= "&nbsp;";
  
$start_page = ( ( (int)( ($cur_page ) / 10 ) ) * 10 ) + 1;
  
//echo (int)(($cur_page - 1) / 10);
  
$end_page $start_page 9;
  if (
$end_page >= $total_page$end_page $total_page;
  if (
$start_page 1$retValue .= " <span style=font-size:9pt;><font face=Verdana><a href='" $url . ($start_page-1) . "&mode=".$mode."&category_code=".$category_code."&searchCode1=".$searchCode1."&searchCode2=".$searchCode2."&SearchMsw1=".$SearchMsw1."&keyword=".$keyword."&searchCode3=".$searchCode3."&txtdate=".$txtdate."&txtdate2=".$txtdate2."'>...</a></font></span> ";
  if (
$total_page 1)
    for (
$k=$start_page;$k<=$end_page;$k++)
      if (
$cur_page != $k$retValue .= "&nbsp;<span style=font-size:9pt;><font face=Verdana><a href='$url$k&mode=".$mode."&category_code=".$category_code."&searchCode1=".$searchCode1."&searchCode2=".$searchCode2."&SearchMsw1=".$SearchMsw1."&keyword=".$keyword."&searchCode3=".$searchCode3."&txtdate=".$txtdate."&txtdate2=".$txtdate2."'>$k</a>&nbsp;</font></span>";
      else 
$retValue .= "&nbsp;<b>$k</b> ";
  if (
$total_page $end_page$retValue .= "<span style=font-size:9pt;><font face=Verdana><a href='" $url . ($end_page+1) . "&mode=".$mode."&category_code=".$category_code."&searchCode1=".$searchCode1."&searchCode2=".$searchCode2."&SearchMsw1=".$SearchMsw1."&keyword=".$keyword."&searchCode3=".$searchCode3."&txtdate=".$txtdate."&txtdate2=".$txtdate2."'>...</a></font></span> ";
  
$retValue .= "&nbsp;&nbsp;";
  if (
$cur_page $total_page) {
    
$retValue .= "<span style=font-size:9pt;><font face=Verdana><a href='$url. ($cur_page+1) ."&mode=".$mode."&category_code=".$category_code."&searchCode1=".$searchCode1."&searchCode2=".$searchCode2."&SearchMsw1=".$SearchMsw1."&keyword=".$keyword."&searchCode3=".$searchCode3."&txtdate=".$txtdate."&txtdate2=".$txtdate2."'>´ÙÀ½</a></font></span>";

  } else {
    
$retValue .= "&nbsp;";
    
$retValue .= "&nbsp;";
  }
  
$retValue .= "</td></tr></table>";
  return 
$retValue;
}
    
      if( isset(
$keyword) && $keyword !== ""){
          
           
$Code3 =  " AND company like '%$keyword%' "//ȸ»ç¸í

          
}
        if( isset(
$txtdate) && $txtdate !== ""  && $txtdate !== "all"){
  
           
$txtdateQry   =   " WHERE regdate between '$txtdate 00:00:00' and '$txtdate2 23:59:59' "
        
          }

if( 
$mode == "search"){
         
        if( isset(
$scomplet) && $scomplet !== ""  && $scomplet == "99"){

            
$completQry "";

        } else {

            
$completQry " AND complet = '$scomplet' ";

        }
}        
           

    
//ÀϹÝÄõ¸®
  
$total_sql  .=   "SELECT * FROM mBoard_easybill ";



 
   
$result      mysql_query($total_sql) or die (mysql_error());

  
$nTotalCount mysql_num_rows($result);

  
$nPage       ceil($nTotalCount $cm_nCount);

  if (
$pg == ""$pg 1;

  
$nFrom = ($pg 1) * $cm_nCount;

  
$sql    $total_sql "  order by idx DESC limit $nFrom$cm_nCount ";
 
  
$result mysql_query($sql) or die (mysql_error());

  
?>
<title>°áÁ¦¸®½ºÆ®</title>
<style type=text/css>
table { font-color;#000000;font-size:9pt }
.td {BACKGROUND-COLOR:#C1CDD8}
.nontd {BACKGROUND-COLOR:#ffffff}
</style>
<script> 
    
 function Search(){
//       if( searchFrm.txtdate.value == ''){
//        alert("½ÃÀÛÀÏÀ» ÀÔ·ÂÇϼ¼¿ä");
//        searchFrm.txtdate.focus();
//        return;
//      }
//       if( searchFrm.txtdate2.value == ''){
//        alert("Á¾·áÀÏÀ» ÀÔ·ÂÇϼ¼¿ä");
//        searchFrm.txtdate2.focus();
//        return;
//      }

   searchFrm.submit();
    
   }
 function categoryCh(t){
    
 location.href  =  'orderList.php?category_code='+t;   
 }
 
  function programCh(t){
    
 location.href  =  'orderList.php?category_code=<?=$category_code;?>&SearchMsw1='+t;   
 }
    
   
  //󸮻óź¯°æ**********************************************************************************************
 function saveprocess(idx){
  if(!confirm("ÀúÀå ÇϽðڽÀ´Ï±î?"))
     { 
        return;
     } else {
   var idx2 = document.getElementsByName("no")[idx].value; //idx°ª
   var statec = document.getElementsByName("statechg")[idx].value;    //󸮻óȲ
   var complet = document.getElementsByName("complet")[idx].value;    //󸮻óȲ
   changeIframe.location.href = "taxrequestProcess.php?idx="+idx2+"&state="+statec+"&complet="+complet+"&mode=update";
     }
 }

 function delrow(id){
  if(!confirm("»èÁ¦ ÇϽðڽÀ´Ï±î?"))
     { 
        return;
     } else {
   changeIframe.location.href = "taxrequestProcess.php?idx="+id+"&mode=delete";
     }
 }


 </script>



<br>
<!-- Å¸ÀÌÆ² ½ÃÀÛ-->
<table align="center" border="0" width="960">
     <tr>
        <td width="950">
            <p align="center"><img src="../img/admin/top_line_order.gif" width="1180" height="5" border="0"></p>
        </td>
    </tr>
</table>
<!-- Å¸ÀÌÆ² ³¡-->

  
<table align=center border=1 cellpadding=3 style='border-collapse: collapse' cellspacing=0  bordercolor='#BDBEBD' width="1180">
  <form name='orderFrm' target='changeIframe'>
    <input type=hidden name=all value=1>
    <input type=hidden name=exCode value=alldel>
    <tr> 
      <td align=center bgcolor="#0066FF" width="10%"><font color="white">¹øÈ£</font></td>
      <td width="10%" align=center bgcolor="#0066FF"><span style=font-size:9pt;><font face="Verdana" color="white">ÀÏÀÚ</font></span></td>
      <td align=center bgcolor="#0066FF" width="10%"><p align="center"><span style=font-size:9pt;><font face="Verdana" color="white">¾ÆÀ̵ð</font></span></td>
      <td align=center bgcolor="#0066FF" width="70%"><span style=font-size:9pt;><font face="Verdana" color="white">³»¿ë</font></span></td>
    </tr>
<?    
    $i 
0;
    
    
$today date("Y-m-d"time());
   while(
$row  mysql_fetch_array($result)) {

    if(
strlen($row[companyNum]) == "10"){
        
$cust1 substr($row[companyNum],0,3);
        
$cust2 substr($row[companyNum],3,2);
        
$cust3 substr($row[companyNum],5,5);

        
$newcustnum $cust1."-".$cust2."-".$cust3;
    } else {
        
$newcustnum $row[companyNum];
    }
?>
    <tr> 
    <td align=center><?=$row[idx]?><input type="hidden" name="no" value="<?=$row[idx]?>" ></td>
    <td align=center <? if($today == substr($row[date],0,10)){ echo "bgcolor=#ffff00"; } ?> ><span style=font-size:9pt;><font face=Verdana><?=$row[date];?></font></span></td>
    <td align=center><span style=font-size:9pt;><font face=Verdana><?=$row[id];?></font></span></td>
    <td align=left><span style=font-size:9pt;><font face=Verdana><?=$row[detail];?></font></span></td>
    </tr>
<? $i++;
    } 
?>
    


    <tr id='tr_<?=$i;?>' style='display:none;'>
        <td width="42">
           <p align="center"><img src="reply_head.gif" align=absmiddle>
        </td>
        <td colspan="14" width="1180">
        </td>
    </tr>
    <tr> 
      <td  bgcolor=#f6f6f6 width="1180" colspan="14"> 
      <table>
          <tr> 
            <td><!--  <a href='javascript:allDel();'><img src='bt_alldel.gif' border=0 align=absmiddle></a> --> 
            </td>
           
          </tr>
        </table>
        </td>
    </tr>
    <tr> 
      <td align=center bgcolor=#f6f6f6  colspan="14" width="1180">
<? echo pageListing($pg$nPage$cm_nCount"taxrequestBoard.php?pg=" $mode,$category_code,$searchCode1$searchCode2,$SearchMsw1$keyword ,$searchCode3$txtdate$txtdate2 )?> 
      </td>
  </form>
    </tr>
</table>
<table align="center" border="0" width="1180">
    <tr>
        <td width="1180">
            <p><img src="../img/admin/top_line_order.gif" width="1180" height="5" border="0"></p>
        </td>
    </tr>
    <tr>
        <td width="1180">
            <p align="right"><img src="../img/common/history.gif" align=absmiddle> : °ü¸®ÀÚ¸ðµå&gt;&gt;<b>°è»ê¼­¿äû ¸®½ºÆ®</b></p>
        </td>
    </tr>
</table>
<p align="center">&nbsp;</p>