Просмотр файла forum/newreply.php

Размер файла: 3.58Kb
<?php
header("Content-type:text/html; charset=utf-8");
include("core.php"); //load main functions
include("conf.php"); //load config
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<link rel=\"shortcut icon\" href=\"logo/icon.php\"><meta http-equiv=\"refresh\" content=\"1;URL=index.php?action=viewpost&amp;idp=$idp&amp;nick=$nick&amp;pass=$pass&amp;read=new&amp;forumas=$forumas&amp;page=1\"/><title>PIZDEC.RU</title><style type=\"text/css\">
body { font-weight: normal; font-size: normal; font-family: georgia; color: #FFFF00; background-color: #000033 }
a:link { text-decoration: underline; color : #FF00FF }
a:active { text-decoration: underline; color : #FFFF00 }
a:visited { text-decoration: underline; color : #00FFFF }
a:hover { text-decoration: none; color : #FFFF00 }
div { margin: 1px 0px 1px 0px; padding: 5px 5px 5px 5px; font-weight: bold;}
div.black{ background-color: #33CCFF; padding-top: 3px; padding-bottom: 3px; padding-left: 4px;  border: 1px solid;  text-align: center;}
div.blue{ background-color: #000066;    text-align: left;}
a {font-weight: bold;}</style>
</head>
<body bgcolor=\"#000033\"><div class=\"black\"><img src=\"logo.gif\" alt=\"\"/><br/><font color=\"#FF0000\">Форум для риальных поцанов!</font></div>";
echo "<div>";
$nick=$_GET["nick"];
$pass=$_GET["pass"];
$tname="";
$ttext=$_POST["ttext"];
$idp=$_POST["idp"];
$forumas=$_GET["forumas"];
str_replace("$","\$",$tname);
str_replace("$","\$",$ttext);
echo connect($dbuser,$dbpass,$dbserver,$dbname);
//$name=base64_decode($name);
echo login($nick,$pass);
echo "<br/><br/>";
$name=mysql_fetch_array(mysql_query("SELECT name FROM posts WHERE id='".$idp."' AND forum='".$forumas."'"));
        $name=$name[0];

global $logged;
if ($logged)
   {
   $isclosed=mysql_fetch_array(mysql_query("SELECT closed FROM posts WHERE name='".$name."' AND thread='1'"));
   if ($isclosed[0] != 1) {
        $phone = explode(" ",$HTTP_USER_AGENT);
                                                        $phone = $phone[0];
echo post(0,$nick,$pass,$name,$ttext,$forumas,$phone);
echo "<br/>";
} else {ismod($nick,$pass,$forumas);
   global $moderator;
   if ($moderator) {$phone = explode(" ",$HTTP_USER_AGENT);
                    $phone = $phone[0];
                    echo post(0,$nick,$pass,$name,$ttext,$forumas,$phone);
                    echo "<br/>";} else echo "&#x422;&#x435;&#x43C;&#x430; &#x437;&#x430;&#x43A;&#x440;&#x44B;&#x442;&#x430;!!!<br/>"; }
} else echo "Please login first!<br/>";
$name=substr($name,0,100);
         $ttext=str_replace("$","-",$ttext);
         $tname=str_replace("$","",$tname);
         $tname=str_replace("&lt;","",$tname);
         $tname=str_replace("<","",$tname);
         $tname=str_replace(">","",$tname);
         $tname=str_replace("&gt;","",$tname);
         $tname=str_replace("\"","",$tname);
         $tname=str_replace("'","",$tname);
         $tname=str_replace("\\","",$tname);
         $tname=str_replace("&","",$tname);
$name=base64_encode($name);
if ($logged) echo "<a href=\"index.php?action=viewpost&amp;idp=$idp&amp;nick=$nick&amp;pass=$pass&amp;read=new&amp;forumas=$forumas&amp;page=1\">&#x41F;&#x43E;&#x441;&#x43C;&#x43E;&#x442;&#x440;&#x435;&#x442;&#x44C; &#x441;&#x43E;&#x43E;&#x431;&#x449;&#x435;&#x43D;&#x438;&#x435;</a><br/>
<br/><hr/><a href=\"index.php?nick=$nick&amp;pass=$pass\"><font color=\"#FF00FF\">: Хуерумы</font></a><br/><a href=\"$ssite\"><font color=\"#FF0000\">$coppy</font></a>"; 
echo $endhtml;
?>