You are here

function _ad_report_size in Advertisement 6.3

Same name and namespace in other branches
  1. 6.2 report/ad_report.module \_ad_report_size()
  2. 7 report/ad_report.module \_ad_report_size()
2 calls to _ad_report_size()
ad_report_admin_display in report/ad_report.module
Display the administrative report.
ad_report_bargraph in report/ad_report.module
Page to display ad with bargraph.

File

report/ad_report.module, line 814
Provides comprehensive charts and reports about advertising statistics.

Code

function _ad_report_size($elements) {
  if ($elements > 200) {
    $space = 80;
  }
  else {
    if ($elements > 80) {
      $space = 18;
    }
    else {
      if ($elements > 60) {
        $space = 12;
      }
      else {
        if ($elements > 48) {
          $space = 8;
        }
        else {
          if ($elements > 35) {
            $space = 6;
          }
          else {
            if ($elements > 20) {
              $space = 3;
            }
            else {
              if ($elements > 12) {
                $space = 2;
              }
              else {
                if ($elements > 8) {
                  $space = 1;
                }
                else {
                  $space = 0;
                }
              }
            }
          }
        }
      }
    }
  }
  return $space;
}