<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
$set['title']='Текст(text)'; // заголовок страницы
include_once '../sys/inc/thead.php';
title();
if (isset($_POST['add']) && $_POST['indent']!=NULL  && $_POST['align']!=NULL && $_POST['align_last']!=NULL  && $_POST['decoration']!=NULL && $_POST['transform']!=NULL)
{
$indent=esc(stripcslashes(htmlspecialchars($_POST['indent'])));
$align=esc(stripcslashes(htmlspecialchars($_POST['align'])));
$align_last=esc(stripcslashes(htmlspecialchars($_POST['align_last'])));
$decoration=esc(stripcslashes(htmlspecialchars($_POST['decoration'])));
$transform=esc(stripcslashes(htmlspecialchars($_POST['transform'])));
mysql_query("UPDATE `css4` SET `indent` = '$indent', `align` = '$align', `align_last` = '$align_last', `decoration` = '$decoration', `transform` = '$transform' LIMIT 1");
}
err();
aut();
echo "<div class='anton'><img src='/css/img/back.png'> <a href='/css/'>Назад</a></div>";
if (isset($_GET['add'])){
echo "<form action='?add=$passgen' method=\"post\">";
echo "Отступ(indent)(px):<br />\n";
echo "<input type=\"text\" name=\"indent\" value=\"\"/><br />\n";
echo "Расположение(align):<br />\n";
echo "<select name='align'>\n";
echo "<option value='left'>left</option>\n";
echo "<option value='center'>center</option>\n";
echo "<option value='right'>right</option>\n";
echo "<option value='justify'>justify</option>\n";
echo "</select><br />\n";
echo "Расположение(align-last):<br />\n";
echo "<select name='align_last'>\n";
echo "<option value='left'>left</option>\n";
echo "<option value='center'>center</option>\n";
echo "<option value='right'>right</option>\n";
echo "<option value='justify'>justify</option>\n";
echo "<option value='start'>start</option>\n";
echo "<option value='end'>end</option>\n";
echo "</select><br />\n";
echo "Декорация(decoration):<br />\n";
echo "<select name='decoration'>\n";
echo "<option value='blink'>blink</option>\n";
echo "<option value='overline'>overline</option>\n";
echo "<option value='underline'>underline</option>\n";
echo "<option value='line-through'>line-through</option>\n";
echo "</select><br />\n";
echo "Преобразование(transform):<br />\n";
echo "<select name='transform'>\n";
echo "<option value='capitalize'>capitalize</option>\n";
echo "<option value='lowercase'>lowercase</option>\n";
echo "<option value='uppercase'>uppercase</option>\n";
echo "</select><br />\n";
echo "<input class='submit' name='add' type='submit' value='Создать' /><br />\n";
echo "</form>";
}
echo "<div class='menu_razd'>Результат</div>";
$css=mysql_fetch_assoc(mysql_query("SELECT * FROM `css4`"));
if($css['indent']!=NULL)
{
echo "<div style='
text-indent: $css[indent]px;
text-align: $css[align];
text-align-last: $css[align_last];
text-decoration: $css[decoration];
text-transform: $css[transform];
'>";
echo "<br>
text-indent: $css[indent]px;<br>
text-align: $css[align];<br>
text-align-last: $css[align_last];<br>
text-decoration: $css[decoration];<br>
text-transform: $css[transform];<br>
<br>";
echo "</div>";
}
else echo "";
mysql_query("UPDATE `css4` SET `indent` = '', `align` = '', `align_last` = '', `decoration` = '', `transform` = '' LIMIT 1");
include_once '../sys/inc/tfoot.php';
?>