Example #1
0
function JB_delete_candidate($id)
{
    $sql = "SELECT * FROM `resumes_table` WHERE `user_id`='" . jb_escape_sql($id) . "'";
    $result = JB_mysql_query($sql) or die(mysql_error() . $sql);
    if (mysql_num_rows($result) > 0) {
        $row = mysql_fetch_array($result, MYSQL_ASSOC);
        JB_delete_resume($row['resume_id']);
        $sql = "DELETE FROM skill_matrix_data WHERE  `object_id`='" . jb_escape_sql($row['resume_id']) . "' AND user_id='" . jb_escape_sql($id) . "' ";
        JB_mysql_query($sql) or die(mysql_error() . $sql);
    }
    JB_delete_candidate_files($id);
    $sql = "DELETE FROM `saved_jobs` WHERE `user_id`='" . jb_escape_sql($id) . "'";
    JB_mysql_query($sql) or die(mysql_error() . $sql);
    $sql = "DELETE FROM `requests` WHERE `candidate_id`='" . jb_escape_sql($id) . "'";
    JB_mysql_query($sql) or die(mysql_error() . $sql);
    $sql = "DELETE FROM `applications` WHERE `user_id`='" . jb_escape_sql($id) . "'";
    JB_mysql_query($sql) or die(mysql_error() . $sql);
    $sql = "DELETE FROM `membership_invoices` WHERE `user_id`='" . jb_escape_sql($id) . "'";
    JB_mysql_query($sql) or die(mysql_error());
    JBPLUG_do_callback('delete_candidate_account', jb_escape_sql($id));
    $sql = "DELETE FROM `users` WHERE `ID`='" . jb_escape_sql($id) . "'";
    JB_mysql_query($sql) or die(mysql_error() . $sql);
    $affected = jb_mysql_affected_rows();
    return $affected;
}
Example #2
0
		<?php 
        $JBPage->output('HALF');
    }
}
if ($_REQUEST['resume_id'] != '') {
    $comp_key = md5($_REQUEST['resume_id'] . JB_ADMIN_PASSWORD);
    if ($comp_key === $key) {
        require_once '../include/resumes.inc.php';
        if ($_REQUEST['approve_resume'] != '') {
            $sql = "UPDATE `resumes_table` SET `approved`='Y' WHERE `resume_id`='" . jb_escape_sql($_REQUEST['resume_id']) . "' ";
            JB_mysql_query($sql) or die(mysql_error());
            $JBMarkup->ok_msg('Resume Approved.');
            echo "<hr>";
        }
        if ($_REQUEST['delete_resume'] != '') {
            JB_delete_resume($_REQUEST['resume_id']);
            $JBMarkup->ok_msg('Resume Deleted.');
            echo "<hr>";
        }
        ?>
		<h2>Remote Admin - Resume #<?php 
        echo jb_escape_html($_REQUEST['resume_id']);
        ?>
</h2>
		<form action="<?php 
        echo htmlentities($_REQUEST['PHP_SELF']);
        ?>
" method="POST">
		<input type="hidden" name="resume_id" value="<?php 
        echo htmlentities($_REQUEST['resume_id']);
        ?>