}
$data = $cF->inputRadio($name, $values, $valueCheck, 'ad_field adRadio');
echo $cF->displayDiv('Status', $data);
$name = 'type';
$values = $type;
if ($rowDetail[$name] != '') {
    $valueCheck = $rowDetail[$name];
} else {
    $valueCheck = 0;
}
$properties = array();
if ($_SESSION['adminGroup'] != 5) {
    $properties[] = array('propertie' => 'disabled', 'value' => 'disabled');
    $properties[] = array('propertie' => 'style', 'value' => 'background-color:#EEE');
}
$data = $cF->select($name, $values, $valueCheck, 'ad_field adInput adTxtMedium', $properties);
echo $cF->displayDiv('Chức vụ', $data);
if ($_SESSION['adminGroup'] == 5) {
    $name = 'price_public';
    $properties = array();
    $properties[] = array('propertie' => 'maxlength', 'value' => '10');
    $value = $rowDetail[$name];
    $data = $cF->inputText($name, $value, 'ad_field adInput adTxtMedium', $properties);
    echo $cF->displayDiv('Mức giá public', $data);
    $name = 'price_business';
    $properties = array();
    $properties[] = array('propertie' => 'maxlength', 'value' => '10');
    $value = $rowDetail[$name];
    $data = $cF->inputText($name, $value, 'ad_field adInput adTxtMedium', $properties);
    echo $cF->displayDiv('Mức giá doanh nghiệp', $data);
}
        }
    } else {
        $value = $_POST[$name];
    }
    $data = $cF->inputText($name, $value, 'input_large datetimepick', $properties);
    echo $cF->displayTable('Ngày hết hạn', $data);
}
$name = 'group_id';
$values = $c->_model->_listUsersGroup();
array_unshift($values, array('name' => '-- chọn nhóm --', 'id' => '0'));
if (!isset($_POST[$name])) {
    $valueCheck = $rowDetail[$name];
} else {
    $valueCheck = $_POST[$name];
}
$data = $cF->select($name, $values, $valueCheck, 'input_medium', 1);
echo $cF->displayTable('Group', $data);
$name = 'username';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '32');
if ($arrAction['disabled'] != '') {
    $properties[] = $arrAction['disabled'];
}
if ($arrAction['change'] == '') {
    $change = '';
} else {
    $change = 'changeUser';
}
$others = $c->messageChange('', $change);
if (!isset($_POST[$name])) {
    $value = $rowDetail[$name];
}
$table = $c->_model->_changeDauNhay($_GET['table']);
$id = $c->_model->_changeDauNhay($_GET['id']);
$rowDetail = $c->_model->_viewDetail($table, $id);
$rowCourse = '';
if (isset($rowDetail['header_id'])) {
    $rowCourse = $c->_model->_viewDetail('web_header', $rowDetail['header_id']);
    $rowCourse = $rowCourse['name'];
}
$cA = new modelAdmin();
$cF = new controlAdminForm();
echo $cF->displayDiv('Email nhận', '<b class="label2 adMessage" id="email">' . $rowDetail['email'] . '</b>');
$name = 'type_id';
$values = $cA->_listTable('web_event_form', NULL, 'AND `type`=2 AND `type_id`=1');
array_unshift($values, array('name' => '-- chọn form --', 'id' => ''));
$data = $cF->select($name, $values, '', 'adInput adTxtMedium');
$other = '<p class="adError error" id="type_id_error"></p>';
echo $cF->displayDiv('Chọn form mẫu', $data . $other);
$name = 'price';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '9');
$properties[] = array('propertie' => 'placeholder', 'value' => 'Giá cá nhân khóa Public');
$data = $cF->inputText($name, '', 'adInput adTxtMedium', $properties);
echo $cF->displayDiv('Giá', $data);
$name = 'totalusd';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '8');
$properties[] = array('propertie' => 'placeholder', 'value' => 'Tổng cộng chi phí USD');
$data = $cF->inputText($name, '', 'adInput adTxtMedium', $properties);
echo $cF->displayDiv('Total (USD)', $data);
$name = 'exchangerate';
if ($rowDetail[$name] == '') {
    $valueCheck = 2;
} else {
    $valueCheck = $rowDetail[$name];
}
$data = $cF->inputRadio($name, $values, $valueCheck, 'ad_field adRadio form_type');
echo $cF->displayDiv('Loại', $data);
$name = 'type_id';
$values = array();
$values[] = array('id' => '', 'name' => '-- chọn form mẫu --');
if ($rowDetail[$name] == '') {
    $valueCheck = '';
} else {
    $valueCheck = $rowDetail[$name];
}
$data = $cF->select($name, $values, $valueCheck, 'ad_field adInput adTxtMedium', 1);
echo $cF->displayDiv('Form mẫu', '<div class="listCheckBox2">' . $data . '</div> <div class="adHidden form_type_id">' . $valueCheck . '</div>');
$name = 'name';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '100');
$properties[] = array('propertie' => 'check', 'value' => '2');
$properties[] = array('propertie' => 'message', 'value' => 'Nhập name');
$other = '<span class="error adError"></span><span class="adNotes">Tên gợi nhớ</span>';
$value = $rowDetail[$name];
$data = $cF->inputText($name, $value, 'ad_field adInput adTxtMedium', $properties, $other);
echo $cF->displayDiv('Name', $data);
$name = 'subject';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '100');
$other = '<span class="adNotes">Tiêu đề dùng gửi mail</span>';
$value = $rowDetail[$name];
        $valueCheck = $rowDetail[$name];
    }
} else {
    $valueCheck = $_POST[$name];
}
$data = $cF->inputRadio($name, $values, $valueCheck, 'radio');
echo $cF->displayTable('Trạng thái', $data);
$name = 'nhanvien_lienhe';
$values = $c->_model->_listDanhSachNhanVien();
array_unshift($values, array('name' => '-- chọn nhân viên --', 'id' => ''));
if (!isset($_POST[$name])) {
    $valueCheck = $rowDetail[$name];
} else {
    $valueCheck = $_POST[$name];
}
$data = $cF->select($name, $values, $valueCheck, 'input_large', 1);
$data .= '<input type="button" id="sendmail" table="' . $table . '" value="Sendmail" style="color:#666; margin-left:5px; padding:3px 15px" /><p id="messageSendmail" class="message"></p>';
echo $cF->displayTable('Gửi đến nhân viên', $data);
$name = 'name';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '100');
if (!isset($_POST[$name])) {
    $value = $rowDetail[$name];
} else {
    $value = $_POST[$name];
}
$data = $cF->inputText($name, $value, 'input_medium', $properties);
echo $cF->displayTable('Họ tên', $data);
$name = 'email';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '100');
$data = $c->_model->_select($arr);
$values = array();
$values[] = array('id' => '', 'name' => '-- chọn khóa học --');
foreach ($data as $row) {
    $values[] = array('id' => $row['id'], 'name' => $row['name']);
}
if ($rowDetail[$name] != '') {
    $valueCheck = $rowDetail[$name];
} else {
    $valueCheck = 0;
}
$properties = array();
$properties[] = array('propertie' => 'check', 'value' => '1');
$properties[] = array('propertie' => 'message', 'value' => 'Chọn khóa học');
$other = '<p class="adError error"></p>';
$data = $cF->select($name, $values, $valueCheck, 'ad_field adInput adTxtMedium', $properties, $other);
echo $cF->displayDiv('Khóa học', $data);
$name = 'codeAuto';
$properties = array();
$properties[] = array('propertie' => 'style', 'value' => 'float:none; margin-left:5px');
$btnCodeAuto = $cF->inputButton($name, 'Lấy mã khóa học', 'adBtnSmall bgColorOranges', $properties);
$name = 'code';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '20');
$properties[] = array('propertie' => 'check', 'value' => '2');
$properties[] = array('propertie' => 'message', 'value' => 'Nhập mã lớp');
$properties[] = array('propertie' => 'placeholder', 'value' => 'Nhập mã cty OR public');
$value = $rowDetail[$name];
$other = $btnCodeAuto . '<span class="adNotes">Khóa học - Năm - Cty or public - Thứ tự</span> <p class="adError error"></p>';
$data = $cF->inputText($name, $value, 'ad_field adInput adTxtMedium', $properties, $other);
echo $cF->displayDiv('Mã lớp', $data);