X-Frame-Options header set in jrCore_send_response_and_detach()
Jamroom Developers
Marvellous

if ($_tmp && is_array($_tmp)) {
foreach ($_tmp as $header) {
if (stripos($header, 'Content-Length') !== 0) {
header($header);
if (stripos($header, 'Content-Type') === 0) {
$cont = true;
}
if (stripos($header, 'X-Frame-Options') === 0) {
$xframe = true;
}
}
}
}
else {
$_tmp = array();
}
if (!$cont) {
header("Content-Type: text/html; charset=utf-8");
}
if (!isset($_conf['jrCore_disable_xframe']) && !$xframe) {
header('X-Frame-Options: SAMEORIGIN');
}
$_options = array(
'show' => 'show',
'hide' => 'hide'
);
$_tmp = array(
'name' => 'mymodule_show_hide',
'label' => 'show or hide the checkbox field',
'help' => 'help!',
'type' => 'select',
'options' => $_options,
'required' => false
);
jrCore_form_field_create($_tmp);
// Checkbox shown or hidden depending on above
$_tmp = array(
'name' => 'mymodule_target',
'label' => 'check this',//777
'help' => 'check this help',//777
'type' => 'checkbox',
'default' => 'off',
'validate' => 'onoff'
);
jrCore_form_field_create($_tmp);
$_tmp = array('
if ($("#mymodule_show_hide").val() == "hide") {
$("#mymodule_target").parent().parent().hide();
$("#mymodule_target").val("off");
}
$("#mymodule_show_hide").change(function(){
if ($(this).val() == "hide") {
$("#mymodule_target").parent().parent().hide();
$("#mymodule_target").val("off");
} else {
$("#mymodule_target").parent().parent().show();
}
});
');
jrCore_create_page_element('javascript_ready_function',$_tmp);
page=$_post.p