No sé por qué ahora cuando subo códigos javascript no los deja guardar, solo me deja guardar texto
Código PHP:
if (basename($_SERVER["SCRIPT_NAME"]) != 'index.php') die(basename($_SERVER["SCRIPT_NAME"]));
$theme_tpl = get_gvar('theme_tpl');
if (file_exists('themes/'.$theme_tpl.'/settings.php')) {
include('themes/'.$theme_tpl.'/settings.php');
}
if (is_array($theme_blocks)) {
if ($step == 'post') {
foreach ($theme_blocks as $key=>$block) {
$key = 'theme_block_'.$key;
set_gvar($key,$_POST[$key]);
}
redirect('admin/blocks',1);
}
section_content('<h2>Blocks in your current template ('.$theme_tpl.')</h2>
<form method="post" action="'.url('admin/blocks/post').'">');
foreach ($theme_blocks as $key=>$block) {
$key = 'theme_block_'.$key;
section_content('<fieldset><legend>'.$block['name'].'</legend>
<p>'.$block['description'].'<br /><textarea name="'.$key.'" rows="5">'.h(get_gvar($key)).'</textarea>
</p></fieldset>');
}
section_content('<p><input type="submit" value="Save Changes" /></p>
</form>');
}
else {
section_content('No block was defined in your current template');
}