コード例 #1
0
    $id = urldecode($_GET['id']);
    require_once 'form_data_resume_hdr.php';
}
if (xsrf_guard()) {
    init_var($_POST['btn_cancel']);
    init_var($_POST['btn_delete']);
    require 'components/query_string_standard.php';
    if ($_POST['btn_cancel']) {
        log_action('Pressed cancel button');
        redirect("listview_resume_hdr.php?{$query_string}");
    } elseif ($_POST['btn_delete']) {
        log_action('Pressed delete button');
        require_once 'subclasses/resume_hdr.php';
        $dbh_resume_hdr = new resume_hdr();
        $object_name = 'dbh_resume_hdr';
        require 'components/create_form_data.php';
        $dbh_resume_hdr->delete($arr_form_data);
        require_once 'subclasses/resume_dtl.php';
        $dbh_resume_hdr = new resume_dtl();
        $dbh_resume_hdr->delete_many($arr_form_data);
        redirect("listview_resume_hdr.php?{$query_string}");
    }
}
require 'subclasses/resume_hdr_html.php';
$html = new resume_hdr_html();
$html->draw_header('Delete Resume Hdr', $message, $message_type);
$html->draw_listview_referrer_info($filter_field_used, $filter_used, $page_from, $filter_sort_asc, $filter_sort_desc);
$html->draw_hidden('id');
$html->detail_view = TRUE;
$html->draw_controls('delete');
$html->draw_footer();
コード例 #2
0
ファイル: add_resume_dtl.php プロジェクト: seans888/APC-CPO
//******************************************************************
//This file was generated by Cobalt, a rapid application development
//framework developed by JV Roig (jvroig@jvroig.com).
//
//Cobalt on the web: http://cobalt.jvroig.com
//******************************************************************
require 'path.php';
init_cobalt('Add resume dtl');
require 'components/get_listview_referrer.php';
if (xsrf_guard()) {
    init_var($_POST['btn_cancel']);
    init_var($_POST['btn_submit']);
    require 'components/query_string_standard.php';
    require 'subclasses/resume_dtl.php';
    $dbh_resume_dtl = new resume_dtl();
    $object_name = 'dbh_resume_dtl';
    require 'components/create_form_data.php';
    extract($arr_form_data);
    if ($_POST['btn_cancel']) {
        log_action('Pressed cancel button', $_SERVER['PHP_SELF']);
        redirect("listview_resume_dtl.php?{$query_string}");
    }
    if ($_POST['btn_submit']) {
        log_action('Pressed submit button', $_SERVER['PHP_SELF']);
        $message .= $dbh_resume_dtl->sanitize($arr_form_data)->lst_error;
        extract($arr_form_data);
        if ($dbh_resume_dtl->check_uniqueness($arr_form_data)->is_unique) {
            //Good, no duplicate in database
        } else {
            $message = "Record already exists with the same primary identifiers!";
コード例 #3
0
ファイル: csv_resume_dtl.php プロジェクト: seans888/APC-CPO
//
//Cobalt on the web: http://cobalt.jvroig.com
//******************************************************************
require 'path.php';
init_cobalt('View resume dtl');
if (xsrf_guard()) {
    init_var($_POST['btn_cancel']);
    init_var($_POST['btn_submit']);
    if ($_POST['btn_cancel']) {
        log_action('Pressed cancel button', $_SERVER['PHP_SELF']);
        redirect("listview_resume_dtl.php");
    }
    if ($_POST['btn_submit']) {
        log_action('Pressed submit button', $_SERVER['PHP_SELF']);
        require 'subclasses/resume_dtl.php';
        $dbh_resume_dtl = new resume_dtl();
        if ($message == "") {
            log_action("Exported table data to CSV", $_SERVER['PHP_SELF']);
            $timestamp = date('Y-m-d');
            $token = generate_token(0, 'fs');
            $csv_name = $token . $_SESSION['user'] . '_resume_dtl_' . $timestamp . '.csv';
            $filename = TMP_DIRECTORY . '/' . $csv_name;
            $csv_contents = $dbh_resume_dtl->export_to_csv();
            $csv_file = fopen($filename, "wb");
            fwrite($csv_file, $csv_contents);
            fclose($csv_file);
            chmod($filename, 0755);
            $csv_name = urlencode($csv_name);
            $message = 'CSV file successfully generated: <a href="/' . BASE_DIRECTORY . '/download_generic.php?filename=' . $csv_name . '">Download the CSV file.</a>';
            $message_type = 'system';
        }
コード例 #4
0
ファイル: edit_resume_hdr.php プロジェクト: seans888/APC-CPO
        log_action('Pressed cancel button');
        redirect("listview_resume_hdr.php?{$query_string}");
    }
    if ($_POST['btn_submit']) {
        log_action('Pressed submit button');
        $message .= $dbh_resume_hdr->sanitize($arr_form_data)->lst_error;
        extract($arr_form_data);
        if ($dbh_resume_hdr->check_uniqueness_for_editing($arr_form_data)->is_unique) {
            //Good, no duplicate in database
        } else {
            $message = "Record already exists with the same primary identifiers!";
        }
        if ($message == "") {
            $dbh_resume_hdr->edit($arr_form_data);
            require_once 'subclasses/resume_dtl.php';
            $dbh_resume_hdr = new resume_dtl();
            $dbh_resume_hdr->delete_many($arr_form_data);
            for ($a = 0; $a < $resume_dtl_count; $a++) {
                $param = array('response' => $cf_resume_dtl_response[$a], 'resume_hdr_id' => $id, 'questionnaire_id' => $cf_resume_dtl_questionnaire_id[$a]);
                $dbh_resume_hdr->add($param);
            }
            redirect("listview_resume_hdr.php?{$query_string}");
        }
    }
}
require 'subclasses/resume_hdr_html.php';
$html = new resume_hdr_html();
$html->draw_header('Edit Resume Hdr', $message, $message_type);
$html->draw_listview_referrer_info($filter_field_used, $filter_used, $page_from, $filter_sort_asc, $filter_sort_desc);
$html->draw_hidden('id');
$html->draw_controls('edit');
コード例 #5
0
if (isset($_GET['id'])) {
    $id = urldecode($_GET['id']);
    require_once 'form_data_resume_hdr.php';
} elseif (xsrf_guard()) {
    init_var($_POST['btn_cancel']);
    init_var($_POST['btn_delete']);
    require 'components/query_string_standard.php';
    if ($_POST['btn_cancel']) {
        log_action('Pressed cancel button', $_SERVER['PHP_SELF']);
        redirect("listview_resume_hdr.php?{$query_string}");
    } elseif ($_POST['btn_delete']) {
        log_action('Pressed delete button', $_SERVER['PHP_SELF']);
        require_once 'subclasses/resume_hdr.php';
        $dbh_resume_hdr = new resume_hdr();
        $object_name = 'dbh_resume_hdr';
        require 'components/create_form_data.php';
        $dbh_resume_hdr->del($arr_form_data);
        require_once 'subclasses/resume_dtl.php';
        $dbh_resume_hdr = new resume_dtl();
        $dbh_resume_hdr->del($arr_form_data);
        redirect("listview_resume_hdr.php?{$query_string}");
    }
}
require 'subclasses/resume_hdr_html.php';
$html = new resume_hdr_html();
$html->draw_header('Delete Resume Hdr', $message, $message_type);
$html->draw_listview_referrer_info($filter_field_used, $filter_used, $page_from, $filter_sort_asc, $filter_sort_desc);
$html->draw_hidden('id');
$html->detail_view = TRUE;
$html->draw_controls('delete');
$html->draw_footer();
コード例 #6
0
ファイル: add_resume_hdr.php プロジェクト: seans888/APC-CPO
        redirect("listview_resume_hdr.php?{$query_string}");
    }
    if ($_POST['btn_submit']) {
        log_action('Pressed submit button');
        $message .= $dbh_resume_hdr->sanitize($arr_form_data)->lst_error;
        extract($arr_form_data);
        if ($dbh_resume_hdr->check_uniqueness($arr_form_data)->is_unique) {
            //Good, no duplicate in database
        } else {
            $message = "Record already exists with the same primary identifiers!";
        }
        if ($message == "") {
            $dbh_resume_hdr->add($arr_form_data);
            $id = $dbh_resume_hdr->auto_id;
            require_once 'subclasses/resume_dtl.php';
            $dbh_resume_hdr = new resume_dtl();
            for ($a = 0; $a < $resume_dtl_count; $a++) {
                $param = array('response' => $cf_resume_dtl_response[$a], 'resume_hdr_id' => $id, 'questionnaire_id' => $cf_resume_dtl_questionnaire_id[$a]);
                $dbh_resume_hdr->add($param);
            }
            redirect("listview_resume_hdr.php?{$query_string}");
        }
    }
}
require 'subclasses/resume_hdr_html.php';
$html = new resume_hdr_html();
$html->draw_header('Add Resume Hdr', $message, $message_type);
$html->draw_listview_referrer_info($filter_field_used, $filter_used, $page_from, $filter_sort_asc, $filter_sort_desc);
$username = "******";
$password = "";
$hostname = "localhost";
コード例 #7
0
ファイル: edit_resume_hdr.php プロジェクト: seans888/APC-CPO
        log_action('Pressed cancel button');
        redirect("listview_resume_hdr.php?{$query_string}");
    }
    if ($_POST['btn_submit']) {
        log_action('Pressed submit button');
        $message .= $dbh_resume_hdr->sanitize($arr_form_data)->lst_error;
        extract($arr_form_data);
        if ($dbh_resume_hdr->check_uniqueness_for_editing($arr_form_data)->is_unique) {
            //Good, no duplicate in database
        } else {
            $message = "Record already exists with the same primary identifiers!";
        }
        if ($message == "") {
            $dbh_resume_hdr->edit($arr_form_data);
            require_once 'subclasses/resume_dtl.php';
            $dbh_resume_hdr = new resume_dtl();
            //$dbh_resume_hdr->delete_many($arr_form_data);
            $dbh_resume_hdr->delete_data($id);
            for ($a = 0; $a < $resume_dtl_count; $a++) {
                $param = array('response' => $cf_resume_dtl_response[$a], 'resume_hdr_id' => $id, 'questionnaire_id' => $cf_resume_dtl_questionnaire_id[$a]);
                $dbh_resume_hdr->add($param);
            }
            redirect("listview_resume_hdr.php?{$query_string}");
        }
    }
}
require 'subclasses/resume_hdr_html.php';
$html = new resume_hdr_html();
$html->draw_header('Edit Resume Hdr', $message, $message_type);
$html->draw_listview_referrer_info($filter_field_used, $filter_used, $page_from, $filter_sort_asc, $filter_sort_desc);
$html->draw_hidden('id');
コード例 #8
0
<?php

require 'components/get_listview_referrer.php';
require 'subclasses/resume_dtl.php';
$dbh_resume_dtl = new resume_dtl();
$dbh_resume_dtl->set_where("id='" . quote_smart($id) . "'");
if ($result = $dbh_resume_dtl->make_query()->result) {
    $data = $result->fetch_assoc();
    extract($data);
}
コード例 #9
0
<?php

require 'components/get_listview_referrer.php';
require 'subclasses/resume_hdr.php';
$dbh_resume_hdr = new resume_hdr();
$dbh_resume_hdr->set_where("id='" . quote_smart($id) . "'");
if ($result = $dbh_resume_hdr->make_query()->result) {
    $data = $result->fetch_assoc();
    extract($data);
}
require_once 'subclasses/resume_dtl.php';
$dbh_resume_hdr = new resume_dtl();
$dbh_resume_hdr->set_fields('response, questionnaire_id');
$dbh_resume_hdr->set_where("resume_hdr_id='" . quote_smart($id) . "'");
if ($result = $dbh_resume_hdr->make_query()->result) {
    $num_resume_dtl = $dbh_resume_hdr->num_rows;
    for ($a = 0; $a < $num_resume_dtl; $a++) {
        $data = $result->fetch_row();
        $cf_resume_dtl_response[$a] = $data[0];
        $cf_resume_dtl_questionnaire_id[$a] = $data[1];
    }
}
コード例 #10
0
require 'path.php';
init_cobalt('Delete resume dtl');
if (isset($_GET['id'])) {
    $id = urldecode($_GET['id']);
    require_once 'form_data_resume_dtl.php';
}
if (xsrf_guard()) {
    init_var($_POST['btn_cancel']);
    init_var($_POST['btn_delete']);
    require 'components/query_string_standard.php';
    if ($_POST['btn_cancel']) {
        log_action('Pressed cancel button');
        redirect("listview_resume_dtl.php?{$query_string}");
    } elseif ($_POST['btn_delete']) {
        log_action('Pressed delete button');
        require_once 'subclasses/resume_dtl.php';
        $dbh_resume_dtl = new resume_dtl();
        $object_name = 'dbh_resume_dtl';
        require 'components/create_form_data.php';
        $dbh_resume_dtl->delete($arr_form_data);
        redirect("listview_resume_dtl.php?{$query_string}");
    }
}
require 'subclasses/resume_dtl_html.php';
$html = new resume_dtl_html();
$html->draw_header('Delete Resume Dtl', $message, $message_type);
$html->draw_listview_referrer_info($filter_field_used, $filter_used, $page_from, $filter_sort_asc, $filter_sort_desc);
$html->draw_hidden('id');
$html->detail_view = TRUE;
$html->draw_controls('delete');
$html->draw_footer();
コード例 #11
0
ファイル: edit_resume_hdr.php プロジェクト: seans888/APC-CPO
        log_action('Pressed cancel button', $_SERVER['PHP_SELF']);
        redirect("listview_resume_hdr.php?{$query_string}");
    }
    if ($_POST['btn_submit']) {
        log_action('Pressed submit button', $_SERVER['PHP_SELF']);
        $message .= $dbh_resume_hdr->sanitize($arr_form_data)->lst_error;
        extract($arr_form_data);
        if ($dbh_resume_hdr->check_uniqueness_for_editing($arr_form_data)->is_unique) {
            //Good, no duplicate in database
        } else {
            $message = "Record already exists with the same primary identifiers!";
        }
        if ($message == "") {
            $dbh_resume_hdr->edit($arr_form_data);
            require_once 'subclasses/resume_dtl.php';
            $dbh_resume_hdr = new resume_dtl();
            $dbh_resume_hdr->del($arr_form_data);
            for ($a = 0; $a < $resume_dtl_count; $a++) {
                $param = array('id' => $id, 'response' => $cf_resume_dtl_response[$a], 'resume_hdr_id' => $id, 'questionnaire_id' => $cf_resume_dtl_questionnaire_id[$a]);
                $dbh_resume_hdr->add($param);
            }
            redirect("listview_resume_hdr.php?{$query_string}");
        }
    }
}
require 'subclasses/resume_hdr_html.php';
$html = new resume_hdr_html();
$html->draw_header('Edit Resume Hdr', $message, $message_type);
$html->draw_listview_referrer_info($filter_field_used, $filter_used, $page_from, $filter_sort_asc, $filter_sort_desc);
$html->draw_hidden('id');
$html->draw_controls('edit');