<?php
error_reporting(0);
include "config.php";
if($login==$alogin && $pass==$apass)
{
header("Content-type: text/html; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-relative");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">\n";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"ru\"><head>\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
echo "<title>".$link." - Заказ Контенка</title>\n";
echo "
<link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\" />
</head>
<body>";
$lat = array("J", "j", "Zh", "zh", "Ch", "ch", "Ye", "ye", "Yu", "yu", "Ya", "ya", "Shc", "shc", "Sh", "sh", "Yo", "yo", "Q", "q", "'", "A", "a", "B", "b", "C", "c", "D", "d", "E", "e", "F", "f", "G", "g", "H", "h", "I", "i", "K", "k", "L", "l", "M", "m", "N", "n", "O", "o", "P", "p", "R", "r", "S", "s", "T", "t", "U", "u", "V", "v", "X", "x", "Z", "z");
$rus = array("Й", "й", "Ж", "ж", "Ч", "ч", "Э", "э", "Ю", "ю", "Я", "я", "Щ", "щ", "Ш", "ш", "Ё", "ё", "Ь", "ь", "ъ", "А", "а", "Б", "б", "Ц", "ц", "Д", "д", "Е", "е", "Ф", "ф", "Г", "г", "Х", "х", "И", "и", "К", "к", "Л", "л", "М", "м", "Н", "н", "О", "о", "П", "п", "Р", "р", "С", "с", "Т", "т", "У", "у", "В", "в", "Х", "х", "З", "з");
$sebeb = trim(htmlspecialchars(mysql_escape_string(trim($_POST['sebeb']))));
$status = intval($_POST['status']);
$translit = $_POST['translit'];
if(substr_count($translit, "sebeb") != 0)
{
$sebeb = str_replace($lat, $rus, $sebeb);
}
@mysql_select_db("$DBNAME");
$sid = intval($_GET['sid']);
$vlink = mysql_escape_string(htmlspecialchars(trim($_POST['vlink'])));
$vname = mysql_escape_string(htmlspecialchars(trim($_POST['vname'])));
$status = mysql_escape_string(htmlspecialchars(trim($_POST['status'])));
$why = mysql_escape_string(htmlspecialchars(trim($_POST['why'])));
$tarix = date("d/m/Y");
$sql = @mysql_query("UPDATE `zakaz_make` SET status='".$status."',`vlink` = '".$vlink."',`vname` = '".$vname."',`why` = '".$why."',`vipoln`='".$tarix."' WHERE `id` = ".$id."");
$c = 1;
if($sql)
{
echo "<div class=\"title\"><b>Данные Изменены!</b></div>";
echo"
<div class=\"cat\">";
}
else
{
echo "При добавлении произошла ошибка!<br/>\n";
echo mysql_error()."<br/>\n";
}
echo"
</div><div class=\"cat\"><img src=\"kv.gif\" alt=\"\"/> <a href=\"admin.php?apass=$pass&alogin=$login\">Назад</a><br/>
<img src=\"kv.gif\" alt=\"\"/><a href=\"http://".$link."\">На главную</a><br/>
</div>.<div class=\"rekl\">by FOREX 2009
</div>
";
echo "</body></html>";
}
else
{
header ("Location: index.php?sehv=error");
}
?>