Ejemplo n.º 1
0
function MoonDB_AddNew()
{
    //global $posmgmt, $eveRender;
    global $eveRender, $eve;
    $access = $eve->SessionGetVar('access');
    if ($access >= "1") {
        $regions = POSMGMT::GetInstalledRegions();
        $systems = POSMGMT::GetSystemsWithPos();
        $materials = POSMGMT::GetStaticMaterials();
        $optregions[] = 'All Regions';
        foreach ($regions as $regID => $region) {
            $optregions[$regID] = $region['regionName'];
        }
        $optsystems[] = 'All Systems';
        foreach ($systems as $sysID => $system) {
            $optsystems[$system['solarSystemID']] = $system['solarSystemName'];
        }
        $optmaterials[] = 'All Materials';
        foreach ($materials as $material_id => $material) {
            $optmaterials[$material['material_id']] = $material['material_name'];
        }
        $optmoons[] = 'All Moons';
        $rows = MoonDB::GetMoons();
        $eveRender->Assign('rows', $rows);
        $eveRender->Assign('regions', $regions);
        $eveRender->Assign('optregions', $optregions);
        $eveRender->Assign('systems', $systems);
        $eveRender->Assign('optmoons', $optmoons);
        $eveRender->Assign('optmaterials', $optmaterials);
        $eveRender->Assign('optsystems', $optsystems);
        return 'add_moon.tpl';
    } else {
        $eve->SessionSetVar('errormsg', 'User not logged in or Access Denied - Please login or Contact your Admin!');
        $eve->RedirectUrl('login.php');
    }
}
Ejemplo n.º 2
0
        $hours = $silo[$x]['hourstogo'];
        $silo[$x]['correct_amount'] = $silo[$x]['material_amount'];
    }
}
//End Silo Tracking Code
$miners = $posmgmt->GetPosMiners($pos_id);
$optminers[0] = 'None';
foreach ($miners as $key => $miner) {
    $miners[$key] = array_merge($miner, $posmgmt->GetStaticModInfo($miner['structure_type']));
    if ($miner['material_id'] != 0) {
        $miners[$key] = array_merge($miners[$key], $posmgmt->GetStaticMatInfo($miner['material_id']));
    }
    $optminers[$miner['structure_id']] = $miners[$key]['material_name'] . ' - ' . $miners[$key]['name'];
}
//echo '<pre>';print_r($miners);echo '</pre>';exit;
$materials = $posmgmt->GetStaticMaterials();
$optmaterials[0] = 'None';
foreach ($materials as $mat) {
    if ($mat['material_id'] == 0) {
        continue;
    }
    $optmaterials[$mat['material_id']] = $mat['material_name'];
}
$optdirections = array('Input' => 'Input', 'Output' => 'Output');
//$seldirection  = (($silo['status']>0) ? 'Output' : 'Input');
//echo '<pre>';print_r($miners);echo '</pre>';exit;
if (in_array('5', $access) || in_array('6', $access) || in_array('42', $access) || in_array('43', $access) || in_array('44', $access)) {
    $tower['silos'] = $silo;
    $tower['mods'] = $mods;
    $tower['miners'] = $miners;
}