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'); } }
$constellationID = $eve->VarCleanFromInput('constellationID'); if (!empty($constellationID)) { $args['constellationID'] = $constellationID; } $regionID = $eve->VarCleanFromInput('regionID'); if (!empty($regionID)) { //echo $regionID;exit; $args['regionID'] = $regionID; } } if (!isset($days_to_refuel) || empty($days_to_refuel)) { $days_to_refuel = $default_days; } $regions = $posmgmt->GetInstalledRegions(); $constellations = $posmgmt->GetConstellationsWithPos(); $systems = $posmgmt->GetSystemsWithPos(); $optregions[] = 'All Regions'; foreach ($regions as $regID => $region) { $optregions[$regID] = $region['regionName']; } $optconstellations[] = 'All Constellations'; foreach ($constellations as $constID => $constellation) { $optconstellations[$constellation['constellationID']] = $constellation['constellationName']; } $optsystems[] = 'All Systems'; foreach ($systems as $sysID => $system) { $optsystems[$system['solarSystemID']] = $system['solarSystemName']; } $optlevels = array(1 => 'Current Level - Yes', 0 => 'Current Level - No'); $disopt = array(1 => 'Display Optimals - Yes', 0 => 'Display Optimals - No'); $eveRender->Assign('regions', $regions);