diff --git a/lib/contents/visitor.inc.php b/lib/contents/visitor.inc.php index 79c4d91..1b40f0f 100755 --- a/lib/contents/visitor.inc.php +++ b/lib/contents/visitor.inc.php @@ -76,11 +76,10 @@ function setCounter($str_member_ID) { $member_name = $_d['member_name']; $member_name = preg_replace("/'/", "\'", $member_name); $photo = trim($_d['member_image'])?trim($_d['member_image']):'person.png'; - $_institution = trim($_d['inst_name'])?"'".$_d['inst_name']."'":'NULL'; - $_institution = preg_replace("/'/", "\'", $_institution); + $_institution = $dbs->escape_string(trim($_d['inst_name']))?$dbs->escape_string(trim($_d['inst_name'])):null; $_checkin_date = date('Y-m-d H:i:s'); - $_i = $dbs->query("INSERT INTO visitor_count (member_id, member_name, institution, checkin_date) VALUES ('$member_id', '$member_name', $_institution, '$_checkin_date')"); + $_i = $dbs->query("INSERT INTO visitor_count (member_id, member_name, institution, checkin_date) VALUES ('$member_id', '$member_name', '$_institution', '$_checkin_date')"); } else { // non member $_d = $_q->fetch_assoc(); diff --git a/template/default/style.css b/template/default/style.css index 8494031..91eaa1c 100755 --- a/template/default/style.css +++ b/template/default/style.css @@ -455,7 +455,6 @@ h4.title { } .itemList td:nth-child(3) { - display: none; } .itemList td:nth-child(4) {