query($sql); if ($rc->size() > 0) { $sql = "SELECT site_acc_id FROM site_acc WHERE link_type='R' AND server='$server' AND user_agent='$user_agent'"; $rc = $db->query($sql); if ($rc->size() > 0) { $dat = $rc->fetch(); $sql = "UPDATE site_acc SET acc_dt=".time().", ip_addr='$host_ip', count=count+1 WHERE site_acc_id='{$dat['site_acc_id']}'"; $rc = $db->query($sql); if ($ec = $rc->isError()) trigger_error ("Failed to update site_acc table (R)"); $updated = true; } elseif ($ec = $rc->isError()) trigger_error ("Failed to access site_acc table (R)"); } if (!$ec and !$updated) { if (isset($_SERVER['HTTP_REFERER']) and !empty($_SERVER['HTTP_REFERER'])) $sql = "INSERT INTO site_acc (ip_addr, link_type, acc_dt, user_agent, referer, server) VALUES ('$host_ip', 'R', ".time().", '$user_agent', '".addslashes($_SERVER['HTTP_REFERER'])."','$server')"; else $sql = "INSERT INTO site_acc (ip_addr, link_type, acc_dt, user_agent, server) VALUES ('$host_ip', 'R', ".time().", '$user_agent','$server')"; trigger_error ("SQL = $sql"); $rc = $db->query($sql); if ($rc->isError()) trigger_error ("Failed to insert into site_acc table (R)"); } } } ?> User-agent: * Disallow: /pollywantsacracker2223/ Disallow: /cgi-bin/ Disallow: /mailman/ Disallow: /images/ Disallow: /contact.php Disallow: /events/ Disallow: /pre-course/ Disallow: /archive/ Disallow: /site/ Disallow: /templates/ Disallow: /member/