<?php

$nid = arg(3);
$project = node_load($nid);

$supporters = ($project) ? _deliver_project_supporters_total($project->nid) : 0;
$project_donation_total = ($project) ? _deliver_project_donations_total($project->nid) : 0;
$project_cost_total = ($project) ? _deliver_project_cost_total($project->nid) : 0;
$pct_funded = ($project_donation_total != 0) ? ($project_donation_total / $project_cost_total) * 100 : 0;
$pct_funded_progress = ($pct_funded > 100) ? 100 : $pct_funded;
?>

             
<table border="0" cellpadding="0" cellspacing="0" id="project-pct-funded-admin">
<tbody><tr>
<td><span class="status">$<?php print number_format($project_donation_total); ?></span><br />of $<?php print number_format($project_cost_total); ?> raised</td>
<td><span class="status"><?php print $supporters; ?></span><br />Supporters</td>
<td class="graph">
     <div class="bar">
      <?php $widthOfPass = ceil ( (($pct_funded_progress * 289) / 100) - 75) ?>
      <?php if ($widthOfPass > 0): ?>
      <div class="tip"></div>
      <div class="passed" style="width:<?php print $widthOfPass; ?>px;"></div>
      <?php endif; ?>
      <div class="bubble"><span class="status"><?php print number_format($pct_funded, 0); ?>%</span><br>Funded</div>
    </div>

</td>
</tr>
</tbody></table>