<?
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']='Параметр Font'; // заголовок страницы
include_once '../sys/inc/thead.php';
title();
if (isset($_POST['add']) && $_POST['size']!=NULL && $_POST['style']!=NULL && $_POST['text']!=NULL && $_POST['variant']!=NULL && $_POST['weight']!=NULL)
{
$size=esc(stripcslashes(htmlspecialchars($_POST['size'])));
$style=esc(stripcslashes(htmlspecialchars($_POST['style'])));
$text=esc(stripcslashes(htmlspecialchars($_POST['text'])));
$variant=esc(stripcslashes(htmlspecialchars($_POST['variant'])));
$weight=esc(stripcslashes(htmlspecialchars($_POST['weight'])));
mysql_query("UPDATE `css5` SET `size` = '$size', `style` = '$style', `text` = '$text', `variant` = '$variant', `weight` = '$weight' 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 "Размер(size)(px):<br />\n";
echo "<input type=\"text\" name=\"size\" value=\"\"/><br />\n";
echo "Текст(text):<br />\n";
echo "<input type=\"text\" name=\"text\" value=\"\"/><br />\n";
echo "Стиль(style):<br />\n";
echo "<select name='style'>\n";
echo "<option value='normal'>normal</option>\n";
echo "<option value='italic'>italic</option>\n";
echo "<option value='oblique'>oblique</option>\n";
echo "</select><br />\n";
echo "Вариант(variant):<br />\n";
echo "<select name='variant'>\n";
echo "<option value='normal'>normal</option>\n";
echo "<option value='small_caps'>small_caps</option>\n";
echo "</select><br />\n";
echo "Насыщенность(weight):<br />\n";
echo "<select name='weight'>\n";
echo "<option value='normal'>normal</option>\n";
echo "<option value='bold'>bold</option>\n";
echo "<option value='bolder'>bolder</option>\n";
echo "<option value='lighter'>lighter</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 `css5`"));
if($css['size']!=NULL){
echo "<center>";
echo "<div style='
font-size: $css[size]px;
font-style: $css[style];
font-variant: $css[variant];
font-weight: $css[weight];'>
$css[text]</div>
";
echo "</center>";
echo "<div style='border: 1px solid green'>";
echo "Код:<br>";
echo "
font-size: $css[size]px;<br>
font-style: $css[style];<br>
font-variant: $css[variant];<br>
font-weight: $css[weight];<br>
";
echo "</div>";
}
else echo "";
mysql_query("UPDATE `css5` SET `size` = '', `style` = '', `text` = '', `variant` = '', `weight` = '' LIMIT 1");
include_once '../sys/inc/tfoot.php';
?>