View file nkat/edit_ok.php

File size: 1.72Kb
<?php
$version=$HTTP_GET_VARS['version'];
include "xconf.php";
header("Cache-Control: no-cache");
include "fo.php";
$version=trim($version);

if ($version=="xhtml"){

$version=xhtml;
include "xhtml_head.php";

$div_s="<div class=\"a\">";
$div_ss="<div class=\"b\">";
$div_e="</div>";
      
}
else {
$version=wml;
$div_s="";
$div_ss="";
$div_e="";
include "wml_head.php";
}
print"$div_s
<p align=\"left\">";


$title=coding_cool(substr(trim($title), 0, 50));
$link=coding_cool(substr(trim($link), 0, 100));
$about=coding_cool(substr(trim($about), 0, 300));
$pass=coding_cool(substr(trim($pass), 0, 30));
$email=coding_cool(substr(trim($email), 0, 70));
//$title=translit_cool($title);
//$about=translit_cool($about);



If (!preg_match("/^(http:\/\/){1}[-0-9a-z_.]+\.[a-z]{2,4}$/i",$link)){
echo "<p>B&#x0432;e&#x0434;&#x0451;&#x043D;&#x043D;&#x044B;&#x0439; a&#x0434;pec &#x043D;e&#x0432;epe&#x043D;!<a href=\"edit.php?version=$version\">Ha&#x0437;a&#x0434;</a></p>";
exit;
}

If (!preg_match("/^[-0-9a-z_.]+@[0-9a-z_^\.]+\.[a-z]{2,4}$/i",$email)){
echo "<p>B&#x0432;e&#x0434;&#x0451;&#x043D;&#x043D;&#x044B;&#x0439; e-mail &#x043D;e&#x0432;epe&#x043D;!<a href=\"edit.php?version=$version\">Ha&#x0437;a&#x0434;</a></p>";
exit;
}

mysql_query("update `cool_site` set title='$title',email='$email',pass='$pass',link='$link',about='$about',category='$k' where id='$id';");
print "Ca&#x0439;&#x0442; &#x0423;c&#x043F;e&#x0448;&#x043D;o &#x0418;&#x0437;&#x043C;e&#x043D;e&#x043D;!<br/>
<a href=\"./?version=$version\">B Ka&#x0442;a&#x043B;o&#x0433;</a><br/>*****<br/>";

print "

</p>$div_e";
if ($version=="xhtml"){
include "xhtml3_down.php";
$version=xhtml;

}
else {
include "wml3_down.php";
}
?>