try { $database = new Database(); $log = new Log($database); $current_user = new User($database, $current_user, $log, 1); // admin if (!$is_new_part) { $part = new Part($database, $current_user, $log, $part_id); ///@todo: remove this line: $new_visible = $part->get_visible(); } $root_storelocation = new Storelocation($database, $current_user, $log, 0); $root_category = new Category($database, $current_user, $log, 0); $root_manufacturer = new Manufacturer($database, $current_user, $log, 0); $root_footprint = new Footprint($database, $current_user, $log, 0); $root_supplier = new Supplier($database, $current_user, $log, 0); $root_attachement_type = new AttachementType($database, $current_user, $log, 0); if ($orderdetails_id > 0) { $orderdetails = new Orderdetails($database, $current_user, $log, $orderdetails_id); } else { $orderdetails = NULL; } if ($pricedetails_id > 0) { $pricedetails = new Pricedetails($database, $current_user, $log, $pricedetails_id); } else { $pricedetails = NULL; } if ($attachement_id > 0) { $attachement = new Attachement($database, $current_user, $log, $attachement_id); } else { $attachement = NULL; }
} if (isset($_REQUEST["apply"])) { $action = 'apply'; } /******************************************************************************** * * Initialize Objects * *********************************************************************************/ $html = new HTML($config['html']['theme'], $config['html']['custom_css'], 'Dateitypen'); try { $database = new Database(); $log = new Log($database); $current_user = new User($database, $current_user, $log, 1); // admin $root_attachement_type = new AttachementType($database, $current_user, $log, 0); if ($selected_id > 0) { $selected_attachement_type = new AttachementType($database, $current_user, $log, $selected_id); } else { $selected_attachement_type = NULL; } } catch (Exception $e) { $messages[] = array('text' => nl2br($e->getMessage()), 'strong' => true, 'color' => 'red'); $fatal_error = true; } /******************************************************************************** * * Execute actions * *********************************************************************************/ if (!$fatal_error) {