Просмотр файла troforum_v0.1af/topic.php

Размер файла: 4.28Kb
<? 

#################################################################################
# Разработка скрипта - Trofimov Dima                                            #
# Сайт автора - http://www.trofimov.com.ru                                      #
# Мейл автора - [email protected]                                            #
# Версия скрипта - WAPforum 0.1 A/F                                             #
#################################################################################

include "lang.php";
include "unicode.lib.php";

include "$topincluder";
print "<card id=\"wapforum\" title=\"Wapforum\">\n";
print "<p>";

if($trof=="add")

{

print utf_encode("<b>$add_new_topic</b> <br/>
$your_name_new_topic <br/>
<input type=\"text\" name=\"name\"/><br/>
$your_mail_new_topic <br/>
<input type=\"text\" name=\"mail\"/><br/>
$theame_new_topic <br/>
<input type=\"text\" name=\"theame\"/><br/>
$messaga_name_topic <br/>
<input type=\"text\" name=\"mess\"/> </p>
<anchor title=\"Ok\">$messaga_go_send
<go href=\"topic.php?trof=save\" accept-charset=\"UTF-8\" method=\"post\"><postfield name=\"id\" value=\"$(trof)\"/><postfield name=\"name\" value=\"$(name)\"/><postfield name=\"mail\" value=\"$(mail)\"/><postfield name=\"theame\" value=\"$(theame)\"/><postfield name=\"mess\" value=\"$(mess)\"/><postfield name=\"go\" value=\"go\"/></go></anchor>");

}

if($trof=="save")

{

if($name == "" or $theame == "" or $mess == "") {print utf_encode("$error_pole");exit;}

$trofimov_dima_copyring = @base64_decode($trofimov_dima_copyring);
$ip = $REMOTE_ADDR;
$user_agent_string = getenv("HTTP_USER_AGENT");
$date = date("d.m.Y");
$ss = file("$trofimov_dima_copyring");
$s2size = sizeof($ss);
$s2size++;
$mess = strip_tags($mess, "<b><i>");
$name = str_replace(":", "(!)", $name);
$theame = str_replace(":", "(!)", $theame);
$mess = str_replace(":", "(!)", $mess);
$mail = str_replace(":", "(!)", $mail);
$theame=strip_tags($theame);
$name=strip_tags($name);
$text = "$name:::$theame:::$mail:::$mess:::$date:::$ip:::$user_agent_string:::$s2size";
$text_bases = "$name:::$theame:::$date:::$s2size";
$text_bases = stripslashes($text_bases);
$text = stripslashes($text);
$text = str_replace("\r\n", "<br/>", $text);
$text = str_replace("&", "(!)", $text);
$text_bases = str_replace("&", "(!)", $text_bases);
$text_bases = str_replace("$", "(!)", $text_bases);


$text = base64_encode($text);
$text_bases = base64_encode($text_bases);

$fp=fopen("$trofimov_dima_copyring","a");
fputs($fp,"$text_bases \r\n");
fclose($fp);
$fp=fopen("./msg/$s2size.txt","w");
fputs($fp,"$text \r\n");
fclose($fp);
exec("chmod $chmod_pravo msg/$s2size.txt");

print utf_encode("$mess_send</p>");

}

if($trof=="saveotvet")

{

if($name == "" or $mess == "") {print utf_encode("$error_pole");exit;}


$ip = $REMOTE_ADDR;
$user_agent_string = getenv("HTTP_USER_AGENT");
$date = date("d.m.Y");
$name = str_replace(":", "(!)", $name);
$mess = str_replace(":", "(!)", $mess);
$mail = str_replace(":", "(!)", $mail);
$name=strip_tags($name);
$theame = "Is Not Theame";
$text = "$name:::$theame:::$mail:::$mess:::$date:::$ip:::$user_agent_string:::$id";
$text = htmlspecialchars($text);
$text = base64_encode($text);

$fp=fopen("msg/$id.txt","a+");
fputs($fp,"$text \r\n");
fclose($fp);

print utf_encode("$otvet_send_ok</p>");

}

                                                                                                                                                                                                                                                                                                                                                                                                                         $base_name = @base64_decode($base_name);
$admin_name = @base64_decode($admin_name);

                                                                                                                                                                                                                                                                                                                                                                               print "<p><a href=\"$admin_name\">$base_name</a></p></card>";
include "$bottomincluder";


?>