function delete_profile($sid, $confirm) { global $enableDelProtect, $username, $dbconn, $nessus_path; if ($enableDelProtect) { # PREVENT ACTUAL DELETION TO USE FOR PREVIOUSLY CREATED SCAN JOBS # FLAG AS DELETED ( Brilliant ) $query = "UPDATE vuln_nessus_settings SET deleted = '1' WHERE id={$sid}"; $result = $dbconn->execute($query); } else { # ALLOW TO REALLY DELETE RECORD if (preg_match("/omp\\s*\$/i", $nessus_path)) { $omp = new OMP(); $omp->delete_config($sid); } $query = "delete from vuln_nessus_settings where id={$sid}"; $result = $dbconn->execute($query); $query = "delete from vuln_nessus_settings_preferences where sid={$sid}"; $result = $dbconn->execute($query); $query = "delete from vuln_nessus_settings_plugins \n where sid={$sid}"; $result = $dbconn->execute($query); $query = "delete from vuln_nessus_settings_family \n where sid={$sid}"; $result = $dbconn->execute($query); $query = "delete from vuln_nessus_settings_category \n where sid={$sid}"; $result = $dbconn->execute($query); } echo "Profile has been deleted<BR>"; select_profile(); //logAccess( "User [ $username ] DELETED Profile $sid" ); }
// but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. require_once "../inc/util.inc"; require_once "../inc/profile.inc"; require_once "../inc/uotd.inc"; if (DISABLE_PROFILES) { error_page("Profiles are disabled"); } check_get_args(array("cmd", "pic")); $option = get_str('cmd', true); if ($option) { select_profile($option); exit; } page_head(tra("Profiles")); echo "\n <p>" . tra("%1Profiles%2 let individuals share backgrounds and opinions with the %3 community.", "<b>", "</b>", PROJECT) . " " . tra("Explore the diversity of your fellow volunteers, and contribute your own views for others to enjoy.") . "\n <p>" . tra("If you haven't already, you can %1create your own user profile%2 for others to see!", "<a href=\"create_profile.php\">", "</a>"); start_table_noborder(); $today = getdate(time()); $UOTD_heading = tra("User of the Day") . " -- " . $today['month'] . " " . $today['mday'] . ", " . $today['year']; row1($UOTD_heading); echo "<tr><td>"; $profile = get_current_uotd(); if ($profile) { $user = BoincUser::lookup_id($profile->userid); echo uotd_thumbnail($profile, $user); echo user_links($user) . "<br>"; $resp = output_transform($profile->response1);
save_sample_FS($_POST['from_sample_id'], $_POST['sample_id']); edit_sample($_POST['sample_id'], 'new_request_FS.php ', '', ''); } } elseif ($_POST['action'] == 'save_sample') { if (!save_sample($_POST)) { echo 'no sample saved<br>'; } else { edit_sample($_POST['sample_id'], 'new_request_FS.php ', 'disabled', 'no'); select_profile($_POST['sample_id'], 'new_request_FS.php '); select_examination($_POST['sample_id'], 'new_request_FS.php ', ''); } } elseif ($_POST['action'] == 'profile') { insert_profile($_POST['sample_id'], $_POST['profile']); edit_sample($_POST['sample_id'], 'new_request_FS.php ', 'disabled', 'no'); edit_examination($_POST['sample_id'], 'new_request_FS.php ', ''); select_profile($_POST['sample_id'], 'new_request_FS.php '); select_examination($_POST['sample_id'], 'new_request_FS.php ', ''); } elseif ($_POST['action'] == 'save_examination') { save_examination($_POST); edit_sample($_POST['sample_id'], 'new_request_FS.php ', 'disabled', 'no'); edit_examination($_POST['sample_id'], 'new_request_FS.php ', 'disabled'); select_profile($_POST['sample_id'], 'new_request_FS.php '); select_examination($_POST['sample_id'], 'new_request_FS.php ', ''); } elseif ($_POST['action'] == 'select_examination') { insert_single_examination($_POST['sample_id'], $_POST['id']); edit_sample($_POST['sample_id'], 'new_request_FS.php ', 'disabled', 'no'); edit_examination($_POST['sample_id'], 'new_request_FS.php ', ''); select_profile($_POST['sample_id'], 'new_request_FS.php '); select_examination($_POST['sample_id'], 'new_request_FS.php ', ''); } }
} $retstr .= "\n"; return $retstr; } switch ($disp) { case "edit": edit_autoenable($sid); break; case "editplugins": edit_plugins($dbconn, $sid); break; case "editprefs": edit_serverprefs($dbconn, $sid); break; case "new": new_profile(); break; case "viewconfig": view_config($sid); break; default: select_profile(); break; } echo " </td></tr>"; echo " </table>"; echo "</td></tr>"; echo "</table>"; echo "</br></br></br>"; $db->close(); require_once 'footer.php';