コード例 #1
0
ファイル: edit_eval_hdr.php プロジェクト: seans888/APC-CPO
        redirect("listview_eval_hdr.php?{$query_string}");
    }
    if ($_POST['btn_submit']) {
        log_action('Pressed submit button', $_SERVER['PHP_SELF']);
        $message .= $dbh_eval_hdr->sanitize($arr_form_data)->lst_error;
        extract($arr_form_data);
        if ($dbh_eval_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_eval_hdr->edit($arr_form_data);
            require_once 'subclasses/eval_dtl.php';
            $dbh_eval_hdr = new eval_dtl();
            $dbh_eval_hdr->del($arr_form_data);
            for ($a = 0; $a < $eval_dtl_count; $a++) {
                $param = array('id' => $id, 'questionnaire_id' => $cf_eval_dtl_questionnaire_id[$a], 'eval_hdr_id' => $id, 'response_rating' => $cf_eval_dtl_response_rating[$a], 'response_detail' => $cf_eval_dtl_response_detail[$a]);
                $dbh_eval_hdr->add($param);
            }
            redirect("listview_eval_hdr.php?{$query_string}");
        }
    }
}
require 'subclasses/eval_hdr_html.php';
$html = new eval_hdr_html();
$html->draw_header('Edit Eval 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');
$html->draw_footer();
コード例 #2
0
ファイル: add_eval_dtl.php プロジェクト: seans888/APC-CPO
    require 'components/query_string_standard.php';
    require 'subclasses/eval_dtl.php';
    $dbh_eval_dtl = new eval_dtl();
    $object_name = 'dbh_eval_dtl';
    require 'components/create_form_data.php';
    extract($arr_form_data);
    if ($_POST['btn_cancel']) {
        log_action('Pressed cancel button');
        redirect("listview_eval_dtl.php?{$query_string}");
    }
    if ($_POST['btn_submit']) {
        log_action('Pressed submit button');
        $message .= $dbh_eval_dtl->sanitize($arr_form_data)->lst_error;
        extract($arr_form_data);
        if ($dbh_eval_dtl->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_eval_dtl->add($arr_form_data);
            redirect("listview_eval_dtl.php?{$query_string}");
        }
    }
}
require 'subclasses/eval_dtl_html.php';
$html = new eval_dtl_html();
$html->draw_header('Add Eval Dtl', $message, $message_type);
$html->draw_listview_referrer_info($filter_field_used, $filter_used, $page_from, $filter_sort_asc, $filter_sort_desc);
$html->draw_controls('add');
$html->draw_footer();