/home/mjc1/public_html/manage/jointBoardProcess.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
239
240
241
242
243
244
245
246
247
<?
    
include("./_common.php");
   include(
"./category/common.php");
   if( isset(
$mode) && $mode == "reply" ) {  /////////////////////////////////////1Â÷´ä±Û·ÎÁ÷.
 
   
$admin_info admin_member_info();
    if(
$admin_info['psn_auth']=='0' || substr($admin_info['psn_rwed'],2,1)=='0'){
        echo 
"<script>alert('ÇØ´ç ¼öÁ¤±ÇÇÑÀÌ ¾ø½À´Ï´Ù.');window.history.go(-1);</script>"; exit;
    }
   
     if( 
$counseler !== "0"){
         if(
$counseler == "1")  $writeName =  "°í°´»ó´ã 1ÆÀ";
         if(
$counseler == "2")  $writeName =  "°í°´»ó´ã 2ÆÀ";
         if(
$counseler == "3")  $writeName =  "°í°´»ó´ã 3ÆÀ";
         if(
$counseler == "4")  $writeName =  "°í°´»ó´ã 4ÆÀ";
         if(
$counseler == "5")  $writeName =  "°í°´»ó´ã 5ÆÀ";
       }
      if(
$developer !== "0"){
         if(
$developer == "2")  $writeName =  "°³¹ß 2ÆÀ";
         if(
$developer == "3")  $writeName =  "°³¹ß 3ÆÀ";
         if(
$developer == "4")  $writeName =  "°³¹ß 4ÆÀ";
         if(
$developer == "5")  $writeName =  "°³¹ß 5ÆÀ";
         if(
$developer == "6")  $writeName =  "°³¹ß 6ÆÀ";
        
        } 
   
    if(
$thread == "A"){
        
$_subject  =  "[´äº¯]".$insert_subject;
      }
   
    
$_content       addslashes($insert_content);
     
    
$reg_date    =  Time(); 
     
    
//  uid          ,name      ,company, email,    homepage, tel,     hphone ,   subject ,content,  add_file,
    //  use_program, hit,        thread, ch_view,   reg_date, temp,     id ,     fid
 
    
$replyQry  =  " insert into mBoard_joint values 
                   ( '','
$writeName','','','','','','$_subject','$_content','', 
                     '','','AA','','
$reg_date','','$id','$fid')";
      
mysql_query($replyQry); 

      
auth_access_log("EDIT");
    
    
     
////////////////////////////¸ÞÀϸµ.
     
    
$mailSel      =  " select email from mBoard_joint WHERE  uid= '$uid' ";
    
$mailResult   =    mysql_query($mailSel);
 
   if( 
mysql_num_rows($mailResult ) > ){
     
       
$mailRow          =  mysql_fetch_array($mailResult);
       
  
$Mail_To     =   $mailRow[0];
  
$Site_Name   =  "¹ÌÁø¼ÒÇÁÆ®";
  
$Admin_Email "mjc1@mijinsoft.co.kr";
  
$Mail_Header "from:$Site_Name<$Admin_Email>\nreply-to:$Site_Name<$Admin_Email>\n";
    
$Mail_Header .= "Content-Type: text/html;charset=EUC-KR";

   
$Mail_Subject "¹®ÀÇÇϽо÷¹«Á¦ÈÞ°ü·Ã ´äº¯ÀÔ´Ï´Ù.";
   
   
$Mail_Contents .= "<table width=680 border=0 cellpadding=15 cellspacing=5 bgcolor=f3f3f3>";
   
$Mail_Contents .= "<tr>";
   
$Mail_Contents .= "<td valign=top bgcolor=#FFFFFF> <table width=100% border=0 cellpadding=0 cellspacing=0>";
   
$Mail_Contents .= "<tr>"
   
$Mail_Contents .= "<td height=25>".nl2br($insert_content)."</td>";
   
$Mail_Contents .= "</tr>";
   
$Mail_Contents .= "<tr>"
   
$Mail_Contents .= "<td><img src=http://www.mijinsoft.co.kr/img/common/box_orange.gif width=3 height=3 hspace=10 align=absmiddle>Á¦ÈÞ¹®ÀÇ  TEL: 1566-8680  ´ã´çÀÚ : ±èÇö½Ä </td>"
   
$Mail_Contents .= "</tr>";
   
$Mail_Contents .= "</table></td></tr></table>";
   
   
        
mail($Mail_To,$Mail_Subject,$Mail_Contents,$Mail_Header);        
     
     }  
       
?>
<script>
  location.href = "jointBoard.php";
</script>
<?   
   
   
}
     if( isset(
$mode) && $mode == "reply2") {  ////////////////////////////////// 2Â÷ ´ä±Û·ÎÁ÷.

   
$admin_info admin_member_info();
    if(
$admin_info['psn_auth']=='0' || substr($admin_info['psn_rwed'],2,1)=='0'){
        echo 
"<script>alert('ÇØ´ç ¼öÁ¤±ÇÇÑÀÌ ¾ø½À´Ï´Ù.');window.history.go(-1);</script>"; exit;
    }

     if( 
$counseler !== "0"){
         if(
$counseler == "1")  $writeName =  "°í°´»ó´ã 1ÆÀ";
         if(
$counseler == "2")  $writeName =  "°í°´»ó´ã 2ÆÀ";
         if(
$counseler == "3")  $writeName =  "°í°´»ó´ã 3ÆÀ";
         if(
$counseler == "4")  $writeName =  "°í°´»ó´ã 4ÆÀ";
         if(
$counseler == "5")  $writeName =  "°í°´»ó´ã 5ÆÀ";
       }
      if(
$developer !== "0"){
         if(
$developer == "2")  $writeName =  "°³¹ß 2ÆÀ";
         if(
$developer == "3")  $writeName =  "°³¹ß 3ÆÀ";
         if(
$developer == "4")  $writeName =  "°³¹ß 4ÆÀ";
         if(
$developer == "5")  $writeName =  "°³¹ß 5ÆÀ";
         if(
$developer == "6")  $writeName =  "°³¹ß 6ÆÀ";
        
        } 
   
    if(
$thread == "AA"){
        
$_subject  =  "[´äº¯]".$insert_subject;
      }
   
     
$_content       addslashes($insert_content);
     
    
$reg_date    =  Time(); 
     
    
//  uid          ,name      ,company, email,    homepage, tel,     hphone ,   subject ,content,  add_file,
    //  use_program, hit,        thread, ch_view,   reg_date, temp,     id ,     fid

    
$replyQry  =  " insert into mBoard_joint values 
                   ( '','
$writeName','','','','','','$_subject','$_content','', 
                     '','','AAA','','
$reg_date','','$id','$fid'
                   
                   )"
;
      
mysql_query($replyQry); 

     
auth_access_log("EDIT");
             
?>
<script>
  location.href = "jointBoard.php";
</script>
<?   
   

   
  if( isset(
$mode) &&  $mode == "insert"){  ///////////////////////////»õ°Ô½Ã¹° ÀÔ·Â.
     
$_content       =     addslashes($content);
     
$reg_date       =     Time();
     
$tel            =    $tel1."-".$tel2."-".$tel3;
     
$hphone         =    $hp1."-".$hp2."-".$hp3;
     
      
//fid¸¦ ±¸ÇÑ´Ù.
     
     
$fidQry      =  "select fid from mBoard_joint order by fid desc limit 1";
     
$fidResult   =   mysql_query($fidQry);
     
      
$fidRow     =  mysql_fetch_array($fidResult); 
      
$_fid       =   $fidRow[0] +1;

     
$insertQry  =  " insert into mBoard_joint values 
                   ( '','
$name','$company','$email','$homepage','$tel','$hphone','$subject','$_content','', 
                     '','','A','n','
$reg_date','','$id','$_fid'
                     
                   )"
;
      
mysql_query($insertQry); 

      
auth_access_log("WRITE");
 
    
//uid°©À» ±¸ÇÑ´Ù.
     
$uidQry      =  "select uid from mBoard_joint order by uid desc limit 1";
     
$uidResult   =   mysql_query($uidQry);
     
      
$uidRow     =  mysql_fetch_array($uidResult);
      
$_uid       =   $uidRow[0];
?>
<script>
  location.href = "jointBoardEdit.php?re=n&uid=<?=$_uid;?>";
</script>
<?              
    
}       
   
 if(
$exCode == "alldel"){  ////////  ¼±ÅûèÁ¦
    
$admin_info admin_member_info();
    if(
$admin_info['psn_auth']=='0' || substr($admin_info['psn_rwed'],3,1)=='0'){
        echo 
"<script>alert('ÇØ´ç »èÁ¦±ÇÇÑÀÌ ¾ø½À´Ï´Ù.');window.history.go(-1);</script>"; exit;
    }
    
     for (
$i 0$i count$jointForm ); $i++) { 

      
$alldel   =  " delete from mBoard_joint where uid = '$jointForm[$i]' ";  
                         
MYSQL_QUERY($alldel);
           
       }
       
auth_access_log("DEL");
?>
<script>
  location.href = "jointBoard.php";
</script>
<?              
    
}
      
  if( isset(
$mode) && $mode =="replymody" && $uid !== "" && $content !== ""){  //´äº¯±Û ¼öÁ¤..

    
$admin_info admin_member_info();
    if(
$admin_info['psn_auth']=='0' || substr($admin_info['psn_rwed'],2,1)=='0'){
        echo 
"<script>alert('ÇØ´ç ¼öÁ¤±ÇÇÑÀÌ ¾ø½À´Ï´Ù.');window.history.go(-1);</script>"; exit;
    }
        
        
$_content       addslashes($content);
       
        
$newreplyQry  =  " update mBoard_joint  set content = '$_content'   WHERE uid = '$uid'";
                         
mysql_query($newreplyQry);
        
auth_access_log("EDIT");
?>
<script>
 location.href = "jointBoardEdit.php?uid=<?=$uid;?>&re=y";
</script>
<?          
   


if(
$exCode == "allupd"){  ////////  ¼±ÅüöÁ¤
    
$admin_info admin_member_info();
    if(
$admin_info['psn_auth']=='0' || substr($admin_info['psn_rwed'],3,1)=='0'){
        echo 
"<script>alert('ÇØ´ç ¼öÁ¤±ÇÇÑÀÌ ¾ø½À´Ï´Ù.');window.history.go(-1);</script>"; exit;
    }

    for (
$i 0$i count$jointForm ); $i++) { 
      
$allupd   =  " update mBoard_joint set work_res = '$result_sel[$i]' where uid = '$jointForm[$i]' ";  
                     
MYSQL_QUERY($allupd);
           
       }
       
auth_access_log("EDIT");
?>
<script>
  location.href = "jointBoard.php";
</script>
<?php
}

if(
$invData == "upd"){  ////////  ¼±ÅüöÁ¤

    
$admin_info admin_member_info();
    if(
$admin_info['psn_auth']=='0' || substr($admin_info['psn_rwed'],3,1)=='0'){
        echo 
"<script>alert('ÇØ´ç ¼öÁ¤±ÇÇÑÀÌ ¾ø½À´Ï´Ù.');window.history.go(-1);</script>"; exit;
    }

    
$upd   =  " update mBoard_joint set work_res = '$invRes' where uid = '$invCode' ";  
    
MYSQL_QUERY($upd);
           
    
auth_access_log("EDIT_SINGLE");
?>
<script>
  location.href = "jointBoard.php";
</script>
<?php
}    
?>