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
|
<?php include("./_common.php");
$_POST['kw'] = urldecode($_POST['kw']); $_POST['kw'] = iconv("utf8","euckr",$_POST['kw']); //$sql = "select * from visit_ref_log where ref_key='{$_POST['kw']}' and reg_date >= '{$_POST['sdate']} 00:00:00' and reg_date <= '{$_POST['edate']} 23:59:59' order by idx desc"; $sql = "select a.*, b.cnt from visit_ref_log a inner join (select session_key, count(*) as cnt from visit_ref_log where session_key <> '' group by session_key) b on a.session_key = b.session_key where ref_key='{$_POST['kw']}' and reg_date >= '{$_POST['sdate']} 00:00:00' and reg_date <= '{$_POST['edate']} 23:59:59' order by idx desc"; //_pr($sql); $result = mysql_query($sql,$connect_web); while($row=mysql_fetch_array($result)){ /*$sql = "select count(*) as cnt from visit_ref_log where session_key = '{$row['session_key']}'"; $res = mysql_query($sql,$connect_web); $info = mysql_fetch_array($res);*/ ?> <tr class='tr_sub_class tr_sub_<?php echo $_POST['kw_idx']?>'> <td colspan=1><?php echo $row['cnt'];?></td> <td colspan=1 style='width:650px;word-break:break-all;'><?php echo $row['referer'];?></td> <td colspan=1><?php echo $row['reg_date'];?><br><a href='./visit_ref.php?sdate=<?php echo $_POST['sdate'];?>&skey=ip&sword=<?php echo $row['ip'];?>' target="_blank"><?php echo $row['ip'];?></a></td> <td colspan=1> <input type='hidden' name='idx[]' value='<?php echo $row['idx'];?>'> <span class='show_detail_trace' style='cursor:pointer'>[̧˞]</span> </td> </tr> <?php } ?>
|