$new_id = sha1(time() . rand(1, 20) . "Solaris" . "SunOS"); $props = array(); $props['id'] = $new_id; $props['name'] = "Solaris"; $props['detection_text'] = "SunOS"; $props['id_user'] = $new_user->id_user; $new_user_sk = new user_system_kind(); $new_user_sk->create($props); $new_id = sha1(time() . rand(1, 20) . "Windows" . "indows"); $props = array(); $props['id'] = $new_id; $props['name'] = "Windows"; $props['detection_text'] = "indows"; $props['id_user'] = $new_user->id_user; $new_user_sk = new user_system_kind(); $new_user_sk->create($props); $library_messages = ""; global $library_messages; //include("controller.libraryinstall.php"); $PAGE->body = $PAGE->body . "<p>" . getTranslation('The following tables were created. Click Submit at the bottom of the page to continue.', $settings) . "</p>"; $PAGE->body = $PAGE->body . "<table width='100%'><tr><td width='50%' valign='top'>"; $PAGE->body = $PAGE->body . "<ul style='display:inline;'>"; foreach ($tables_to_create as $table_created) { $PAGE->body = $PAGE->body . "<li>"; $PAGE->body = $PAGE->body . $table_created; $PAGE->body = $PAGE->body . "</li>"; } $PAGE->body = $PAGE->body . "</ul>"; $PAGE->body = $PAGE->body . "</td>"; $PAGE->body = $PAGE->body . "<td valign='top' align='right'>"; $PAGE->body = $PAGE->body . "<img src='images/checkmark.png'/>";
} } } } // main page - add a system kind // main page - add a hf if (isset($_GET['action'])) { if ($_GET['action'] == 'add-system-kind') { if (isset($_POST['name']) && isset($_POST['detection_text'])) { if (strlen($_POST['name']) > 0 && strlen($_POST['detection_text']) > 0) { $new_id = sha1(time() . rand(1, 20) . $_POST['name'] . $_POST['detection_text']); $new_user_sk = new user_system_kind(); $_POST['id'] = $new_id; $_POST['id_user'] = $u->id_user; $props = array(); $new_user_sk->create($_POST); } } } } // main page - add a hf if (isset($_GET['action'])) { if ($_GET['action'] == 'add-hf-inherit') { if (isset($_POST['id_hf'])) { if (strlen($_POST['id_hf']) > 0) { $sha1_hfi = sha1(time() . rand(1, 20) . $_POST['id_hf']); $found_hfi = false; $hfi_check = new hf_inherit(); $hfi_list = $hfi_check->get_from_hashrange($_GET['q']); foreach ($hfi_list as $hfi_for_this_function) { if ($hfi_for_this_function['id_inherit'] == $_POST['id_hf']) {