You are here

function _antispam_spaminess_bar in AntiSpam 6

Same name and namespace in other branches
  1. 7 antispam.admin.inc \_antispam_spaminess_bar()
1 call to _antispam_spaminess_bar()
antispam_moderation_form in ./antispam.admin.inc

File

./antispam.admin.inc, line 646

Code

function _antispam_spaminess_bar($spaminess) {

  // $spaminess - float value between (0 to 1) or null
  if (empty($spaminess)) {
    return;
  }
  else {
    $ispaminess = (int) ($spaminess * 100);
  }
  $output = '<div style="width:100px; background-color: #eee;">';
  $output .= '<div style="width:' . $ispaminess . 'px; color: #000; background: url(' . base_path() . drupal_get_path('module', 'antispam') . '/spaminess.jpg) center left; padding:0px 2px; font-size: 9px">' . $spaminess;
  $output .= '</div></div>';
  return $output;
}