File size: 833B
<?php
defined('WBCAT') or die('Restricted access');
if($_POST['submit']){
unset($_POST['submit']);
//foreach ($_POST as $key => $value) { echo "Параметр: {$key}; Значение: {$value}<br />\n"; }
try {
$_POST['code']=mysql_real_escape_string($_POST['code']);
if($Widget->set_widget_data("baner",$_POST['code'])){ echo '<div class="ok">Настройки сохранены!</div>';}
} catch (Exception $error)
{ echo "<div class=\"error\">{$error->getMessage()}</div>";}
}
$Wdata=$Widget->get_widget_data('baner');
echo <<<html
<h2>Настройка виджета seoupgrades</h2>
<form action="" method="post">
<b>html код банера</b><br/>
<textarea style="width: 99%;" name="code">{$Wdata}</textarea><br/>
<input type="submit" name="submit" value="Сохранить" />
</form>
html;
?>