$eveRender->Assign('systems', $systems);
 $eveRender->Assign('optsystems', $optsystems);
 $eveRender->Assign('default_days', $default_days);
 $eveRender->Assign('days_to_refuel', $days_to_refuel);
 $eveRender->Assign('regionID', $regionID);
 $eveRender->Assign('constellationID', $constellationID);
 $eveRender->Assign('systemID', $systemID);
 $eveRender->Assign('use_current_levels', $use_current_levels);
 $eveRender->Assign('display_optimal', $display_optimal);
 $eveRender->Assign('optlevels', $optlevels);
 $eveRender->Assign('disopt', $disopt);
 $eveRender->Assign('optposids', $optposids);
 $count = 0;
 $args['use_current_levels'] = $use_current_levels;
 $args['display_optimal'] = $display_optimal;
 $towers = $posmgmt->GetFuelBill($args);
 foreach ($towers as $key => $tower) {
     if (!in_array('1', $access) && !in_array('5', $access) && !in_array('6', $access)) {
         //quick user check
         continue;
         //Hide the tower
     } elseif (in_array('5', $access) || in_array('6', $access) || $tower['owner_id'] == $userinfo['eve_id'] || $tower['secondary_owner_id'] == $userinfo['eve_id']) {
         //Admin or tower owner logged in so kill the checkers so show the tower
     } elseif ($tower['secret_pos'] == 0) {
         //Not secret towers
         if ($tower['corp'] == $userinfo['corp']) {
             if (!in_array('20', $access) && !in_array('21', $access) && !in_array('22', $access)) {
                 continue;
             }
         } else {
             if (!in_array('50', $access) && !in_array('51', $access) && !in_array('52', $access)) {
$eveRender->Assign('partialopt', $partialopt);
if (!empty($pos_to_refuel)) {
    $days = $eve->VarCleanFromInput('days');
    $hours = $eve->VarCleanFromInput('hours');
    $use_current_levels = $eve->VarCleanFromInput('use_current_levels');
    $display_optimal = $eve->VarCleanFromInput('display_optimal');
    $partial_fuelup = $eve->VarCleanFromInput('partial_fuelup');
    $use_hanger_levels = 0;
    //$eve->VarCleanFromInput('use_hanger_levels');
    $cargosize = $eve->VarCleanFromInput('size');
    $args['days_to_refuel'] = $days + $hours / 24;
    $args['pos_ids'][] = $pos_to_refuel;
    $args['use_current_levels'] = $use_current_levels;
    $args['display_optimal'] = $display_optimal;
    $args['calc_fuel'] = 1;
    $bill = $posmgmt->GetFuelBill($args);
    $tower = $bill[$pos_to_refuel];
    $system = $tower['system'];
    $pos_id = $tower['pos_id'];
    $pos_race = $tower['pos_race'];
    $locationName = $tower['locationName'];
    $tower['regionName'] = $posmgmt->getRegionNameFromMoonID($locationName);
    $fuel = $tower;
    if ($cargosize > 0) {
        $fuel['trips'] = ceil($fuel['total_volume'] / $cargosize);
    }
    if ($display_optimal == 1) {
        $tower = $posmgmt->GetTowerInfo($pos_to_refuel);
        if ($tower) {
            $pos_size = $tower['pos_size'];
            $pos_race = $tower['pos_race'];