/**
  * Logs an action for statistics usage.
  * @param {String} $action The action name (usually the plugin name)
  * @param {String} $link The URL which this action represents.
  * @param {String} $label The label of this log action (e.g. 'Delicious').
  */
 function logAction($action, $link, $label = null)
 {
     global $db_link;
     $db_link->query('INSERT INTO ' . IBEGIN_SHARE_TABLE_PREFIX . 'log (action, label, link, ipaddress, agent, timestamp) VALUES (%s, %s, %s, %s, %s, %d)', $action, $label, $link, ip2long(iBeginShare::getIp()), getenv('HTTP_USER_AGENT'), time());
 }