$sql = "INSERT INTO " . TBL_PREFIX . "update_log VALUES ('NULL', '1', '" . $eve->VarPrepForStore($silo_id) . "', '2', 'Add Silo', '" . $time . "')"; $result = mysql_query($sql) or die('Could not insert values into update_log; ' . mysql_error()); } if ($s_id == 16221 || $s_id == 17170 || $s_id == 20175 || $s_id == 16869) { $structure_id = mysql_insert_id(); $sql = "INSERT INTO " . TBL_PREFIX . "reactor_info VALUES ('{$structure_id}','" . $eve->VarPrepForStore($pos_id) . "','" . $s_id . "','0')"; $dbconn->Execute($sql); $sql = "INSERT INTO " . TBL_PREFIX . "update_log VALUES ('NULL', '" . $eve_id . "', '" . $eve->VarPrepForStore($silo_id) . "', '2', 'Add Harvester/Reactor', '" . $time . "')"; $result = mysql_query($sql) or die('Could not insert values into update_log; ' . mysql_error()); } } } $mods = $posmgmt->GetAllPosMods($pos_id); if ($mods) { $current_pg = 0; $current_cpu = 0; foreach ($mods as $row) { if ($row['online']) { $current_pg = $current_pg + $row['pg']; $current_cpu = $current_cpu + $row['cpu']; } } $posmgmt->ChangeTowerCPUPG(array('pos_id' => $pos_id, 'new_pg' => $current_pg, 'new_cpu' => $current_cpu)); } $eve->RedirectUrl('viewpos.php?i=' . $pos_id); } $struct_amount = $eve->VarCleanFromInput('amount'); $eveRender->Assign('pos_id', $pos_id); $eveRender->Assign('structs', $structs); $eveRender->Display('addstructures.tpl'); exit;