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
|
<?php include("./_common.php");
header("Content-type:text/html;charset=utf-8");
$sql = "set names utf8"; mysql_query($sql,$connect_web);
$m_mode = $_POST['m_mode']; $check_mode = $_POST['check_mode'];
if($mode=="setup"){ // 설정 저장
$sql = "update naver_search_set set s_words = '{$s_words}', get_cnt = '{$get_cnt}', get_type = '{$get_type}' where idx = '{$idx}' "; mysql_query($sql,$connect_web);
echo "OK";
} else if($mode=='st_ch'){
$sql = "update naver_search_get set status = '{$status}' where idx = '{$idx}' "; mysql_query($sql,$connect_web);
echo "OK";
} else if($mode=='search_get'){
//$loginUrl = "http://shop2.mjsoft.co/k_search/kin_search.php"; // API 방식 $loginUrl = "http://shop2.mjsoft.co/k_search/naver_kin_get.php";
$ch = curl_init(); curl_setopt ($ch, CURLOPT_URL,$loginUrl); //접속할 URL 주소 curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt ($ch, CURLOPT_SSLVERSION,1); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt ($ch, CURLOPT_POST, 0); curl_setopt ($ch, CURLOPT_TIMEOUT, 30); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec ($ch); echo $result;
}
if($check_mode == 'check_upt'){
$idx = $_POST['idx']; $check_val = $_POST['check_val'];
$sql = "update naver_search_get set check_val = '{$check_val}' where idx = '{$idx}' "; mysql_query($sql,$connect_web);
}
if($m_mode == 'memo_update'){ $idx = $_POST['idx']; $n_memo = $_POST['n_memo']; $reply = $_POST['reply']; $sql = "update naver_search_get set n_memo = '{$n_memo}', reply = '{$reply}' where idx = '{$idx}'"; mysql_query($sql,$connect_web);
}
if($sel_del=='Y'){ foreach($code_idx as $key=>$val){ $idx = $codes[$val];
$sql = "select site, s_key, link from naver_search_get where idx = '{$idx}' "; $res = mysql_query($sql,$connect_web); $info = mysql_fetch_array($res);
$del_date = date("Y-m-d H:i:s",time());
$sql = "insert into naver_search_del set site = '{$info['site']}', s_key = '{$info['s_key']}', link = '{$info['link']}', del_date = '{$del_date}' "; mysql_query($sql,$connect_web);
$sql = "delete from naver_search_get where idx = '{$idx}' "; mysql_query($sql,$connect_web); }
?> <script> document.location.href="m_n_search.php?<?php echo $qstr;?>" </script> <?php }
?>
<?php if($sel_upt == 'Y'){
foreach($code_idx as $key => $val){ $idx = $codes[$val]; $sql = "update naver_search_get set status = '{$sel_upt_status}' where idx = '{$idx}'"; mysql_query($sql, $connect_web); } ?> <script> document.location.href="m_n_search.php?<?php echo $qstr;?>" </script> <?php } ?>
|