Remove cp1251. Я сильно недооценивал трудолюбие неизвестного кодера.

This commit is contained in:
2023-01-10 19:26:14 +02:00
parent 008f36c094
commit b3810d2349
147 changed files with 267 additions and 1295 deletions
+5 -6
View File
@@ -8,13 +8,13 @@ $friend = mysql_fetch_array(mysql_query("SELECT * FROM `friends` WHERE `user` =
if($_POST['sd4'] && $_POST['friendadd']){
$_POST['friendadd']=htmlspecialchars($_POST['friendadd'],NULL,'cp1251');
$_POST['friendadd']=htmlspecialchars($_POST['friendadd'],NULL);
if(preg_match("/__/",$_POST['friendadd']) || preg_match("/--/",$_POST['friendadd'])){
echo"<font color=red>Персонаж не найден.</font>";
}else{
$frd = mysql_fetch_array(mysql_query("SELECT `id` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['friendadd'])."' LIMIT 1;"));
}
$_POST['comment']=htmlspecialchars($_POST['comment'],NULL,'cp1251');
$_POST['comment']=htmlspecialchars($_POST['comment'],NULL);
$frd2 = mysql_fetch_array(mysql_query("SELECT enemy,friend,notinlist FROM `friends` WHERE `user` = '".mysql_real_escape_string($u->info['id'])."' and (`friend`='".mysql_real_escape_string($frd['id'])."' or `enemy`='".mysql_real_escape_string($frd['id'])."' or `notinlist`='".mysql_real_escape_string($frd['id'])."') LIMIT 1;"));
if(!$frd['id']){echo"<font color=red>Персонаж не найден.</font>";}
elseif($frd['id']==$u->info['id']){echo"<font color=red>Себя добавить нельзя.</font>";}
@@ -30,7 +30,7 @@ echo"<font color=red>Персонаж <b>".$_POST['friendadd']."</b> добав
}
if($_POST['friendremove']){
$_POST['friendremove']=htmlspecialchars($_POST['friendremove'],NULL,'cp1251');
$_POST['friendremove']=htmlspecialchars($_POST['friendremove'],NULL);
if(preg_match("/__/",$_POST['friendremove']) || preg_match("/--/",$_POST['friendremove'])){
echo"<font color=red>Персонаж не найден.</font>";
}else{
@@ -56,13 +56,13 @@ if($_POST['friendedit']){
$_POST['friendedit']=htmlspecialchars($_POST['friendedit'],NULL,'cp1251');
$_POST['friendedit']=htmlspecialchars($_POST['friendedit'],NULL);
if(preg_match("/__/",$_POST['friendedit']) || preg_match("/--/",$_POST['friendedit'])){
echo"<font color=red>Персонаж не найден.</font>";
}else{
$frd = mysql_fetch_array(mysql_query("SELECT id FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['friendedit'])."' LIMIT 1;"));
}
$_POST['comment']=htmlspecialchars($_POST['comment'],NULL,'cp1251');
$_POST['comment']=htmlspecialchars($_POST['comment'],NULL);
if(!$frd['id']){echo"<font color=red>Персонаж не найден.</font>";}
elseif($frd['id']==$u->info['id']){echo"<font color=red>Себя отредактировать нельзя.</font>";}
elseif(preg_match("/__/",$_POST['comment']) || preg_match("/--/",$_POST['comment'])){echo"<font color=red>Введен неверный текст.</font>";}
@@ -90,7 +90,6 @@ echo"<font color=red>Данные контакта <b>".$_POST['friendedit']."</
?>
<HTML><HEAD>
<meta content="text/html; charset=windows-1251" http-equiv=Content-type>
<META Http-Equiv=Cache-Control Content=no-cache>
<meta http-equiv=PRAGMA content=NO-CACHE>
<META Http-Equiv=Expires Content=0>